Package mage.game.turn

Examples of mage.game.turn.TurnMod


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


    @Override
    public boolean apply(Game game, Ability source) {
        UUID targetId = source.getFirstTarget();
        UUID controllerId = source.getControllerId();
        if (targetId != null && controllerId != null && !targetId.equals(controllerId)) {
            game.getState().getTurnMods().add(new TurnMod(targetId, controllerId));
            return true;
        }
        return false;
    }
View Full Code Here

        return new SkipNextTurnSourceEffect(this);
    }

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

    }

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

        super(effect);
    }

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

    public boolean apply(Game game, Ability source) {
        Player controller = game.getPlayer(source.getControllerId());
        if (controller != null) {
            for (int i=0; i<5; i++) {
                if (controller.flipCoin(game)) {
                    game.getState().getTurnMods().add(new TurnMod(source.getControllerId(), false));
                }
            }
            return true;
        }
        return false;
View Full Code Here

                    countersRemoved = ((SageOfHoursCost) cost).getRemovedCounters();
                }
            }
            int turns = countersRemoved / 5;
            for (int i = 0; i < turns; i++) {
                game.getState().getTurnMods().add(new TurnMod(player.getId(), false));
            }
            game.informPlayers(new StringBuilder("Removed ").append(countersRemoved)
                    .append(" +1/+1 counters: ").append(player.getName()).append(" takes ")
                    .append(CardUtil.numberToText(turns, "an"))
                    .append(turns > 1 ? " extra turns ":" extra turn ")
View Full Code Here

        return new TimeStretchEffect(this);
    }

    @Override
    public boolean apply(Game game, Ability source) {
        game.getState().getTurnMods().add(new TurnMod(source.getFirstTarget(), false));
        game.getState().getTurnMods().add(new TurnMod(source.getFirstTarget(), false));
        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

        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

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.