1
0
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:
mateuszb
2011-02-12 16:12:48 +00:00
parent 9f90ef58ca
commit fcdc3f0bdd
20 changed files with 322 additions and 215 deletions

View File

@@ -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);
}