Package mage.game.turn

Examples of mage.game.turn.TurnMod


    }
   
    @Override
    public boolean apply(Game game, Ability source) {
        // Take an extra turn after this one
        TurnMod extraTurn = new TurnMod(source.getControllerId(), false);
        game.getState().getTurnMods().add(extraTurn);
       
        FinalFortuneLoseDelayedTriggeredAbility delayedTriggeredAbility = new FinalFortuneLoseDelayedTriggeredAbility();
        delayedTriggeredAbility.setSourceId(source.getSourceId());
        delayedTriggeredAbility.setControllerId(source.getControllerId());
        delayedTriggeredAbility.setConnectedTurnMod(extraTurn.getId());
        game.addDelayedTriggeredAbility(delayedTriggeredAbility);
       
        return true;
    }
View Full Code Here


        return new AdditionalCombatPhaseEffect(this);
    }

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

    @Override
    public boolean apply(Game game, Ability source) {
        // 15.07.2006 If it's somehow not a main phase when Fury of the Horde resolves, all it does is untap all creatures that attacked that turn. No new phases are created.
        if (TurnPhase.PRECOMBAT_MAIN.equals(game.getTurn().getPhaseType()) || TurnPhase.POSTCOMBAT_MAIN.equals(game.getTurn().getPhaseType())) {
            // we can't add two turn modes at once, will add additional post combat on delayed trigger resolution
            TurnMod combat = new TurnMod(source.getControllerId(), TurnPhase.COMBAT, TurnPhase.POSTCOMBAT_MAIN, false);
            game.getState().getTurnMods().add(combat);
            RelentlessAssaultDelayedAddMainPhaseAbility delayedTriggeredAbility = new RelentlessAssaultDelayedAddMainPhaseAbility();
            delayedTriggeredAbility.setSourceId(source.getSourceId());
            delayedTriggeredAbility.setControllerId(source.getControllerId());
            delayedTriggeredAbility.setConnectedTurnMod(combat.getId());
            game.addDelayedTriggeredAbility(delayedTriggeredAbility);
            return true;
        }
        return false;
    }
View Full Code Here

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

    public boolean apply(Game game, Ability source) {       
        // 15.07.2006 If it's somehow not a main phase when Fury of the Horde resolves, all it does is untap all creatures that attacked that turn. No new phases are created.
         if (TurnPhase.PRECOMBAT_MAIN.equals(game.getTurn().getPhaseType())
                 || TurnPhase.POSTCOMBAT_MAIN.equals(game.getTurn().getPhaseType()) ) {
            // we can't add two turn modes at once, will add additional post combat on delayed trigger resolution
            TurnMod combat = new TurnMod(source.getControllerId(), TurnPhase.COMBAT, TurnPhase.POSTCOMBAT_MAIN, false);
            game.getState().getTurnMods().add(combat);
            DelayedAddMainPhaseAbility delayedTriggeredAbility = new DelayedAddMainPhaseAbility();
            delayedTriggeredAbility.setSourceId(source.getSourceId());
            delayedTriggeredAbility.setControllerId(source.getControllerId());
            delayedTriggeredAbility.setConnectedTurnMod(combat.getId());
            game.addDelayedTriggeredAbility(delayedTriggeredAbility);
            return true;
        }
         return false;
    }
View Full Code Here

        if (event.getType() == GameEvent.EventType.PHASE_CHANGED && this.connectedTurnMod.equals(event.getSourceId())) {
            enabled = true;
        }
        if (event.getType() == GameEvent.EventType.COMBAT_PHASE_PRE && enabled) {
            // add additional post combat main phase after that - after phase == null because add it after this combat
            game.getState().getTurnMods().add(new TurnMod(getControllerId(), TurnPhase.POSTCOMBAT_MAIN, null, false));
            enabled = false;
        }
        return false;
    }
View Full Code Here

    }

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

        return new ParadoxHazeEffect(this);
    }
   
    @Override
    public boolean apply(Game game, Ability source) {
        game.getState().getTurnMods().add(new TurnMod(this.getTargetPointer().getFirst(game, source), new UpkeepStep(), null));
        return true;
    }
View Full Code Here

       return new AdditionalCombatPhaseEffect(this);
    }

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

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

TOP

Related Classes of mage.game.turn.TurnMod

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.