- Fixed empty ActionStack "interrupt" messages
- If no attackers are declared, go straight to Combat end phase
- Once First strike damage is declared, attacking player needs to "actively" request a next phase event to go to the next damage step
- Second Damage step is called "Combat Damage (2)"
- UserRequestNextPhase is to be used knowing that it might not succeed
- Step change for GuiCombat is now computed at GameObserver::nextGamePhase

Note: Combat damage to creatures is not assigned when AI attacks. As this seems to be a problem with the previous SVN version, I4m still committing this change
This commit is contained in:
wagic.the.homebrew@gmail.com
2009-09-13 12:42:18 +00:00
parent 1f67998d7a
commit 7ce2c563e1
29 changed files with 130 additions and 128 deletions

View File

@@ -81,11 +81,28 @@ void GameObserver::nextPlayer(){
combatStep = BLOCKERS;
}
void GameObserver::nextGamePhase(){
Phase * cPhaseOld = phaseRing->getCurrentPhase();
if (cPhaseOld->id == Constants::MTG_PHASE_COMBATDAMAGE)
if (FIRST_STRIKE == combatStep || END_FIRST_STRIKE == combatStep || DAMAGE == combatStep) {
nextCombatStep(); return;
}
if (cPhaseOld->id == Constants::MTG_PHASE_COMBATBLOCKERS)
if (BLOCKERS == combatStep) { nextCombatStep(); return; }
phaseRing->forward();
//Go directly to end of combat if no attackers
if (cPhaseOld->id == Constants::MTG_PHASE_COMBATATTACKERS && !(currentPlayer->game->inPlay->getNextAttacker(NULL))){
phaseRing->forward();
phaseRing->forward();
}
Phase * cPhase = phaseRing->getCurrentPhase();
currentGamePhase = cPhase->id;
if (Constants::MTG_PHASE_COMBATDAMAGE == currentGamePhase)
nextCombatStep();
if (currentPlayer != cPhase->player) nextPlayer();
@@ -152,11 +169,16 @@ void GameObserver::userRequestNextGamePhase(){
if (mLayers->stackLayer()->getNext(NULL,0,NOT_RESOLVED)) return;
if (getCurrentTargetChooser()) return;
Phase * cPhaseOld = phaseRing->getCurrentPhase();
if (cPhaseOld->id == Constants::MTG_PHASE_COMBATDAMAGE)
if (FIRST_STRIKE == combatStep || END_FIRST_STRIKE == combatStep || DAMAGE == combatStep) { nextCombatStep(); return; }
if (cPhaseOld->id == Constants::MTG_PHASE_COMBATBLOCKERS)
if (BLOCKERS == combatStep) { nextCombatStep(); return; }
nextGamePhase();
if ((cPhaseOld->id == Constants::MTG_PHASE_COMBATBLOCKERS && combatStep == ORDER) ||
cPhaseOld->id == Constants::MTG_PHASE_COMBATDAMAGE ||
opponent()->isAI() ||
options[GameOptions::phaseInterrupts[currentGamePhase]].number)
mLayers->stackLayer()->AddNextGamePhase();
else
nextGamePhase();
}
int GameObserver::forceShuffleLibraries(){