moved phase pass automation into stateeffects() where it should have been from the start, it really shouldnt be run as part of "update()" it bothered me enough to actually move it.
This commit is contained in:
@@ -388,25 +388,7 @@ void GameObserver::Update(float dt)
|
||||
stateEffects();
|
||||
oldGamePhase = currentGamePhase;
|
||||
|
||||
//Auto skip Phases
|
||||
int skipLevel = (player->playMode == Player::MODE_TEST_SUITE) ? Constants::ASKIP_NONE : options[Options::ASPHASES].number;
|
||||
int nrCreatures = currentPlayer->game->inPlay->countByType("Creature");
|
||||
|
||||
if (skipLevel == Constants::ASKIP_SAFE || skipLevel == Constants::ASKIP_FULL)
|
||||
{
|
||||
if ((opponent()->isAI() && !(isInterrupting)) && (currentGamePhase == Constants::MTG_PHASE_UNTAP || currentGamePhase
|
||||
== Constants::MTG_PHASE_DRAW || currentGamePhase == Constants::MTG_PHASE_COMBATBEGIN || ((currentGamePhase
|
||||
== Constants::MTG_PHASE_COMBATATTACKERS) && (nrCreatures == 0)) || currentGamePhase
|
||||
== Constants::MTG_PHASE_COMBATEND || currentGamePhase == Constants::MTG_PHASE_ENDOFTURN
|
||||
|| ((currentGamePhase == Constants::MTG_PHASE_CLEANUP) && (currentPlayer->game->hand->nb_cards < 8))))
|
||||
userRequestNextGamePhase();
|
||||
}
|
||||
if (skipLevel == Constants::ASKIP_FULL)
|
||||
{
|
||||
if ((opponent()->isAI() && !(isInterrupting)) && (currentGamePhase == Constants::MTG_PHASE_UPKEEP || currentGamePhase
|
||||
== Constants::MTG_PHASE_COMBATDAMAGE))
|
||||
userRequestNextGamePhase();
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
@@ -475,6 +457,27 @@ void GameObserver::stateEffects()
|
||||
userRequestNextGamePhase();
|
||||
}
|
||||
|
||||
//Auto skip Phases
|
||||
GameObserver * game = game->GetInstance();
|
||||
int skipLevel = (game->currentPlayer->playMode == Player::MODE_TEST_SUITE) ? Constants::ASKIP_NONE : options[Options::ASPHASES].number;
|
||||
int nrCreatures = currentPlayer->game->inPlay->countByType("Creature");
|
||||
|
||||
if (skipLevel == Constants::ASKIP_SAFE || skipLevel == Constants::ASKIP_FULL)
|
||||
{
|
||||
if ((opponent()->isAI() && !(isInterrupting)) && (currentGamePhase == Constants::MTG_PHASE_UNTAP || currentGamePhase
|
||||
== Constants::MTG_PHASE_DRAW || currentGamePhase == Constants::MTG_PHASE_COMBATBEGIN || ((currentGamePhase
|
||||
== Constants::MTG_PHASE_COMBATATTACKERS) && (nrCreatures == 0)) || currentGamePhase
|
||||
== Constants::MTG_PHASE_COMBATEND || currentGamePhase == Constants::MTG_PHASE_ENDOFTURN
|
||||
|| ((currentGamePhase == Constants::MTG_PHASE_CLEANUP) && (currentPlayer->game->hand->nb_cards < 8))))
|
||||
userRequestNextGamePhase();
|
||||
}
|
||||
if (skipLevel == Constants::ASKIP_FULL)
|
||||
{
|
||||
if ((opponent()->isAI() && !(isInterrupting)) && (currentGamePhase == Constants::MTG_PHASE_UPKEEP || currentGamePhase
|
||||
== Constants::MTG_PHASE_COMBATDAMAGE))
|
||||
userRequestNextGamePhase();
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
void GameObserver::Render()
|
||||
|
||||
Reference in New Issue
Block a user