mirror of
https://github.com/vcmi/vcmi.git
synced 2025-11-25 22:42:04 +02:00
Little more work on #760:
* no tactics in creature banks * no spellcasting during tactics phase
This commit is contained in:
@@ -265,8 +265,12 @@ bool MakeAction::applyGh( CGameHandler *gh )
|
||||
|
||||
bool MakeCustomAction::applyGh( CGameHandler *gh )
|
||||
{
|
||||
if(!GS(gh)->curB) ERROR_AND_RETURN;
|
||||
if(gh->connections[GS(gh)->curB->getStack(GS(gh)->curB->activeStack)->owner] != c) ERROR_AND_RETURN;
|
||||
const BattleInfo *b = GS(gh)->curB;
|
||||
if(!b) ERROR_AND_RETURN;
|
||||
if(b->tacticDistance) ERROR_AND_RETURN;
|
||||
const CStack *active = GS(gh)->curB->getStack(GS(gh)->curB->activeStack);
|
||||
if(!active) ERROR_AND_RETURN;
|
||||
if(gh->connections[active->owner] != c) ERROR_AND_RETURN;
|
||||
return gh->makeCustomAction(ba);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user