Examples of flipCoin()


Examples of mage.players.Player.flipCoin()

    @Override
    public boolean replaceEvent(GameEvent event, Ability source, Game game) {
        Player player = game.getPlayer(event.getPlayerId());
        if (player != null) {
            boolean secondCoinFlip = player.flipCoin(game, event.getAppliedEffects());
            if (player.chooseUse(outcome, "Ignore the first coin flip?", game)) {
                event.setFlag(secondCoinFlip);
                game.informPlayers(new StringBuilder(player.getName()).append(" ignores the first coin flip.").toString());
            } else {
                game.informPlayers(new StringBuilder(player.getName()).append(" ignores the second coin flip.").toString());
View Full Code Here

Examples of mage.players.Player.flipCoin()

  @Override
  public boolean apply(Game game, Ability source) {
    Player player = game.getPlayer(source.getControllerId());
    if (player != null) {
      if (player.flipCoin()) {
        Permanent perm = game.getPermanent(source.getSourceId());
        if (perm != null) {
          perm.sacrifice(source.getId(), game);
        }
        player.drawCards(3, game);
View Full Code Here

Examples of mage.players.Player.flipCoin()

    @Override
    public boolean apply(Game game, Ability source) {
        Player you = game.getPlayer(source.getControllerId());
        if (you != null) {
            if (you.flipCoin(game)) {
                DjinnToken token = new DjinnToken();
                token.putOntoBattlefield(1, game, source.getSourceId(), source.getControllerId());
                return true;
            } else {
                you.damage(5, source.getSourceId(), game, true, false);
View Full Code Here

Examples of mage.players.Player.flipCoin()

    @Override
    public boolean apply(Game game, Ability source) {
        Player controller = game.getPlayer(source.getControllerId());
        if (controller != null) {
            Set<UUID> toSacrifice = new HashSet<UUID>();
            if (controller.flipCoin(game)) {
                // each blocking creature is sacrificed by its controller
                for (CombatGroup combatGroup: game.getCombat().getGroups()) {
                    for (UUID blockerId: combatGroup.getBlockers()) {
                        toSacrifice.add(blockerId);
                    }
View Full Code Here

Examples of mage.players.Player.flipCoin()

    @Override
    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;
        }
View Full Code Here

Examples of mage.players.Player.flipCoin()

    @Override
    public boolean apply(Game game, Ability source) {
        Player player = game.getPlayer(source.getControllerId());
        if (player != null) {
            if (player.flipCoin(game)) {
                UUID targetId = getTargetPointer().getFirst(game, source);
                Permanent permanent = game.getPermanent(targetId);
                if (permanent != null) {
                    permanent.destroy(source.getSourceId(), game, false);
                }
View Full Code Here

Examples of mage.players.Player.flipCoin()

    @Override
    public boolean apply(Game game, Ability source) {
        Player player = game.getPlayer(source.getControllerId());
        Permanent permanent = game.getPermanent(source.getSourceId());
        if (player != null && permanent != null) {
            if (!player.flipCoin(game)) {
                String message = new StringBuilder(permanent.getLogName()).append(" deals 2 damage to itself").toString();
                game.informPlayers(message);
                permanent.damage(2, source.getSourceId(), game, false, true);
            }
            return true;
View Full Code Here

Examples of mage.players.Player.flipCoin()

        Player you = game.getPlayer(source.getControllerId());
        Card molten = game.getCard(source.getSourceId());
        if (you != null) {
            ElementalToken token = new ElementalToken();
            token.putOntoBattlefield(2, game, source.getSourceId(), source.getControllerId());
            if (you.flipCoin(game)) {
                molten.moveToZone(Zone.HAND, source.getSourceId(), game, true);
                game.informPlayers(new StringBuilder(you.getName()).append(" won the flip.  ").append(molten.getLogName()).append(" is returned to ").append(you.getName()).append(" hand.").toString());
            }
            return true;
        }
View Full Code Here

Examples of mage.players.Player.flipCoin()

    public boolean apply(Game game, Ability source) {
        Player controller = game.getPlayer(source.getControllerId());
        if (controller != null) {
            int flipsWon = 0;
            boolean controllerStopped = false;
            while (controller.flipCoin(game)) {
                ++flipsWon;
                if (!controller.chooseUse(outcome, new StringBuilder("You won ").append(flipsWon).append(flipsWon == 1?" flip.":" flips.")
                        .append(" Flip another coin?").toString(), game)) {
                    controllerStopped = true;
                    break;
View Full Code Here

Examples of mage.players.Player.flipCoin()

    @Override
    public boolean apply(Game game, Ability source) {
        Player player = game.getPlayer(source.getControllerId());
        if (player != null) {
            if (player.flipCoin(game)) {
                Permanent perm = game.getPermanent(source.getSourceId());
                if (perm != null) {
                    perm.sacrifice(source.getSourceId(), game);
                }
                player.drawCards(3, game);
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.