Examples of TurnMod


Examples of mage.game.turn.TurnMod

    return new TimeWarpEffect(this);
  }

  @Override
  public boolean apply(Game game, Ability source) {
    game.getState().getTurnMods().add(new TurnMod(source.getFirstTarget(), false));
    return true;
  }
View Full Code Here

Examples of mage.game.turn.TurnMod

//  }

  @Override
  public void init() {
    super.init();
    state.getTurnMods().add(new TurnMod(startingPlayerId, PhaseStep.DRAW));
  }
View Full Code Here

Examples of mage.game.turn.TurnMod

  @Override
  public boolean apply(Game game, Ability source) {
    Permanent permanent = game.getPermanent(source.getFirstTarget());
    if (permanent != null) {
      permanent.setTapped(false);
      game.getState().getTurnMods().add(new TurnMod(source.getControllerId(), TurnPhase.COMBAT, null, false));
    }
    else {
      return false;
    }
    return true;
View Full Code Here

Examples of mage.game.turn.TurnMod

    @Override
    public boolean apply(Game game, Ability source) {
        if (targetPointer != null) {
            Player player = game.getPlayer(targetPointer.getFirst(game, source));
            if (player != null) {
                game.getState().getTurnMods().add(new TurnMod(player.getId(), PhaseStep.UNTAP));
                return true;
            }
        }
        return false;
    }
View Full Code Here

Examples of mage.game.turn.TurnMod

        }
    }

    private void playExtraTurns() {
        //20091005 - 500.7
        TurnMod extraTurn = getNextExtraTurn();
        while (extraTurn != null) {
            GameEvent event = new GameEvent(GameEvent.EventType.PLAY_TURN, null, null, extraTurn.getPlayerId());
            if (!replaceEvent(event)) {
                Player extraPlayer = this.getPlayer(extraTurn.getPlayerId());
                if (extraPlayer != null && extraPlayer.isInGame()) {
                    state.setExtraTurn(true);
                    state.setTurnId(extraTurn.getId());
                    informPlayers(extraPlayer.getName() + " takes an extra turn");
                    playTurn(extraPlayer);
                    state.setTurnNum(state.getTurnNum() + 1);
                }
            }
View Full Code Here

Examples of mage.game.turn.TurnMod

    }
   
    private TurnMod getNextExtraTurn() {
        boolean checkForExtraTurn = true;
        while(checkForExtraTurn) {
            TurnMod extraTurn = getState().getTurnMods().getNextExtraTurn();
            if (extraTurn != null) {
                GameEvent event = new GameEvent(GameEvent.EventType.EXTRA_TURN, extraTurn.getId(), null, extraTurn.getPlayerId());
                if (!replaceEvent(event)) {
                    return extraTurn;
                }
            } else {
                checkForExtraTurn = false;
View Full Code Here

Examples of mage.game.turn.TurnMod

            ManaCosts cost = new ManaCostsImpl("{5}{R}{R}");
            if (player.chooseUse(Outcome.Damage, "Pay " + cost.getText() + "?", game)) {
                cost.clearPaid();
                if (cost.pay(source, game, source.getSourceId(), source.getControllerId(), false)) {
                    new UntapAllControllerEffect(new FilterAttackingCreature(),"").apply(game, source);
                    game.getState().getTurnMods().add(new TurnMod(source.getControllerId(), TurnPhase.COMBAT, null, false));
                    return true;
                }
            }
        }
        return false;
View Full Code Here

Examples of mage.game.turn.TurnMod

       
        if (magosi != null) {
            magosi.addCounters(CounterType.EON.createInstance(), game);
        }
        if (player != null) {
            game.getState().getTurnMods().add(new TurnMod(player.getId(), true));
        }
        return true;
    }
View Full Code Here

Examples of mage.game.turn.TurnMod

        return new SpipTurnEffect(this);
    }

    @Override
    public boolean apply(Game game, Ability source) {
        game.getState().getTurnMods().add(new TurnMod(source.getControllerId(), true));
        return true;
    }
View Full Code Here

Examples of mage.game.turn.TurnMod

                }
            }

        }
        this.getState().addAbility(ability, this.getId(), null);
        state.getTurnMods().add(new TurnMod(startingPlayerId, PhaseStep.DRAW));
    }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.