Package mage.game.turn

Examples of mage.game.turn.Phase


  }

  public void playNext(Game game, UUID activePlayerId, SimulationNode node) {
    boolean skip = false;
    while (true) {
      Phase currentPhase = game.getPhase();
      if (!skip)
        currentPhase.getStep().endStep(game, activePlayerId);
      game.applyEffects();
      switch (currentPhase.getStep().getType()) {
        case UNTAP:
          game.getPhase().setStep(new UpkeepStep());
          break;
        case UPKEEP:
          game.getPhase().setStep(new DrawStep());
          break;
        case DRAW:
          game.getTurn().setPhase(new PreCombatMainPhase());
          game.getPhase().setStep(new PreCombatMainStep());
          break;
        case PRECOMBAT_MAIN:
          game.getTurn().setPhase(new CombatPhase());
          game.getPhase().setStep(new BeginCombatStep());
          break;
        case BEGIN_COMBAT:
          game.getPhase().setStep(new DeclareAttackersStep());
          break;
        case DECLARE_ATTACKERS:
          game.getPhase().setStep(new DeclareBlockersStep());
          break;
        case DECLARE_BLOCKERS:
          game.getPhase().setStep(new CombatDamageStep(true));
          break;
        case COMBAT_DAMAGE:
          if (((CombatDamageStep)currentPhase.getStep()).getFirst())
            game.getPhase().setStep(new CombatDamageStep(false));
          else
            game.getPhase().setStep(new EndOfCombatStep());
          break;
        case END_COMBAT:
View Full Code Here


                creature.removeFromCombat(game);
                creature.untap(game);
            }
        }
        if (!attackers.isEmpty()) {
            Phase phase = game.getTurn().getPhase();
            game.getState().getTurnMods().add(new TurnMod(game.getActivePlayerId(), TurnPhase.COMBAT, null, false));
            ContinuousEffect effect = new IllusionistsGambitRequirementEffect(attackers, phase);
            game.addEffect(effect, source);
            effect = new IllusionistsGambitRestrictionEffect(attackers, phase);
            game.addEffect(effect, source);
View Full Code Here

TOP

Related Classes of mage.game.turn.Phase

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.