added stack check, modified life check

if activating ability, playing a land or casting sorcery spell at
sorcery level(timing restriction), if the stack is not empty, don't
allow it. Modified the life state check, if any of the players would
lose the game, allow the gamestateeffects to check... added
reduceto:value for ali from cairo...
This commit is contained in:
Anthony Calosa
2015-10-01 22:25:26 +08:00
parent e1c02c8bf5
commit ddee2c08e2
10 changed files with 112 additions and 71 deletions

View File

@@ -578,6 +578,8 @@ void GameObserver::Update(float dt)
{
mLayers->actionLayer()->Update(0);
}
players[0]->DeadLifeState();
players[1]->DeadLifeState();
gameStateBasedEffects();
}
oldGamePhase = mCurrentGamePhase;
@@ -764,7 +766,7 @@ void GameObserver::gameStateBasedEffects()
///////////////////////////////////////////////////////////
//life checks/poison checks also checks cant win or lose.//
///////////////////////////////////////////////////////////
players[i]->DeadLifeState();//refactored
players[i]->DeadLifeState(true);//refactored
}
//////////////////////////////////////////////////////
//-------------card based states effects------------//