mirror of
https://github.com/vcmi/vcmi.git
synced 2025-11-29 23:07:48 +02:00
Various changes, including exprank limiter and development towards Tactics secondary skill support.
This commit is contained in:
@@ -6,6 +6,7 @@
|
||||
#include "../lib/map.h"
|
||||
#include "../lib/CGameState.h"
|
||||
#include "../lib/BattleState.h"
|
||||
#include "../lib/BattleAction.h"
|
||||
|
||||
|
||||
#define PLAYER_OWNS(id) (gh->getPlayerAt(c)==gh->getOwner(id))
|
||||
@@ -209,6 +210,15 @@ bool MakeAction::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;
|
||||
|
||||
if(GS(gh)->curB->tacticDistance)
|
||||
{
|
||||
if(ba.actionType != BattleAction::WALK && ba.actionType != BattleAction::END_TACTIC_PHASE)
|
||||
ERROR_AND_RETURN;
|
||||
if(gh->connections[GS(gh)->curB->sides[GS(gh)->curB->tacticsSide]] != c)
|
||||
ERROR_AND_RETURN;
|
||||
}
|
||||
|
||||
return gh->makeBattleAction(ba);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user