Examples of loseLife()


Examples of mage.players.Player.loseLife()

                Spell targetSpell = (Spell)targetCard;
                controller = game.getPlayer(targetSpell.getControllerId());
            }

            if ( controller != null ) {
                controller.loseLife(amount, game);
                return true;
            }
        }
        return false;
    }
View Full Code Here

Examples of mage.players.Player.loseLife()

                    int loseLife = card.getManaCost().convertedManaCost();
                    Set<UUID> opponents = game.getOpponents(source.getControllerId());
                    for (UUID opponentUuid : opponents) {
                        Player opponent = game.getPlayer(opponentUuid);
                        if (opponent != null) {
                            opponent.loseLife(loseLife, game);
                        }
                    }
                }
            }
            return false;
View Full Code Here

Examples of mage.players.Player.loseLife()

        Integer amountLifeGained = (Integer) this.getValue("amountLifeGained");
        if (amountLifeGained != null ) {
            for (UUID opponentId: game.getOpponents(source.getControllerId())) {
                Player opponent = game.getPlayer(opponentId);
                if (opponent != null) {
                    opponent.loseLife(amountLifeGained, game);
                }
            }
        }
        return false;
    }
View Full Code Here

Examples of mage.players.Player.loseLife()

    @Override
    public boolean apply(Game game, Ability source) {
        Player controller = game.getPlayer(source.getControllerId());
        if (controller != null) {
            if (game.getBattlefield().countAll(new FilterCreaturePermanent("Ogre", "Ogre"), source.getControllerId(), game) < 1) {
                controller.loseLife(2, game);
            }
            return true;
        }
        return false;
    }
View Full Code Here

Examples of mage.players.Player.loseLife()

            cards.add(card);
            player.revealCards("Pain Seer", cards, game);

            if (card != null &&
                card.moveToZone(Zone.HAND, source.getSourceId(), game, false)) {
                player.loseLife(card.getManaCost().convertedManaCost(), game);
                return true;
            }
        }
        return false;
    }
View Full Code Here

Examples of mage.players.Player.loseLife()

    @Override
    public boolean apply(Game game, Ability source) {
        Player controller = game.getPlayer(source.getControllerId());
        if (controller != null) {
            if (game.getBattlefield().countAll(new FilterCreaturePermanent("Demon", "Demon"), source.getControllerId(), game) < 1) {
                controller.loseLife(1, game);
            }
            return true;
        }
        return false;
    }
View Full Code Here

Examples of mage.players.Player.loseLife()

                        Card card = cards.get(cardId, game);
                        if (card != null) {
                            if (controller.canPayLifeCost()
                                    && controller.getLife() >= 4
                                    && controller.chooseUse(outcome, new StringBuilder("Pay 4 life for ").append(card.getName()).append("? (Otherwise it's put on top of your library)").toString(), game)) {
                                controller.loseLife(4, game);
                                game.informPlayers(new StringBuilder(controller.getName()).append(" pays 4 life to keep a card on hand").toString());
                            } else {
                                cardsPutBack.add(card);
                            }
                        }
View Full Code Here

Examples of mage.players.Player.loseLife()

            for (UUID playerId : controller.getInRange()) {
                int lifePaid = lifePaidAmounts.get(playerId);
                if (lifePaid > 0) {
                    Player player = game.getPlayer(playerId);
                    if (player != null) {
                        player.loseLife(lifePaid, game);
                    }
                }
            }

            for (Permanent creature : sacrifices) {
View Full Code Here

Examples of mage.players.Player.loseLife()

        Player controller = game.getPlayer(source.getControllerId());
        if (target != null && controller != null) {
            int toughness = target.getToughness().getValue();
            target.destroy(source.getSourceId(), game, false);
            if (toughness > 0) {
                controller.loseLife(toughness, game);
            }
            return true;
        }
        return false;
    }
View Full Code Here

Examples of mage.players.Player.loseLife()

        Player player = game.getPlayer(targetPointer.getFirst(game, source));
        if (player != null) {
            Cost cost = new DiscardTargetCost(new TargetCardInHand());
            if (cost.canPay(source, player.getId(), player.getId(), game)) {
                if (!cost.pay(source, game, player.getId(), player.getId(), false)) {
                    player.loseLife(5, game);
                }
                return true;
            }
        }
        return false;
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.