Examples of loseLife()


Examples of mage.players.Player.loseLife()

                if (card != null) {
                    Cards cards = new CardsImpl();
                    cards.add(card);
                    player.revealCards(sourcePermanent.getName(), cards, game);
                    player.moveCardToHandWithInfo(card, source.getSourceId(), game, Zone.LIBRARY);
                    player.loseLife(card.getManaCost().convertedManaCost(), game);

                }
                return true;
            }
        }
View Full Code Here

Examples of mage.players.Player.loseLife()

            Card card = controller.getLibrary().removeFromTop(game);
            if (card != null) {
                controller.moveCardToHandWithInfo(card, source.getSourceId(), game, Zone.LIBRARY);
                int cmc = card.getManaCost().convertedManaCost();
                if (cmc > 0) {
                    controller.loseLife(cmc, game);
                }
                controller.revealCards(new StringBuilder(sourceCard.getName()).append(" put into hand").toString(), new CardsImpl(card), game);
            }
        }
        return true;
View Full Code Here

Examples of mage.players.Player.loseLife()

    @Override
    public boolean apply(Game game, Ability source) {
        for (UUID opp : game.getOpponents(source.getControllerId())) {
            Player opponent = game.getPlayer(opp);
            if (opponent != null)
                opponent.loseLife(2, game);
        }
        return true;
    }

    @Override
View Full Code Here

Examples of mage.players.Player.loseLife()

        if (card != null && watcher != null) {
            Player player = game.getPlayer(((Permanent)card).getControllerId());
            if (player != null) {
                int amount = watcher.creaturesDiedThisTurn;
                if (amount > 0) {
                    player.loseLife(amount, game);
                    return true;
                }
            }
        }
        return false;
View Full Code Here

Examples of mage.players.Player.loseLife()

                }
            }
            player.lookAtCards("Lim-Dul's Vault", cards, game);
            doAgain = player.chooseUse(outcome, "Pay 1 lfe and look at the next 5 cards?", game);
            if (doAgain) {
                player.loseLife(1, game);
            } else {
                player.shuffleLibrary(game);
            }
           
            TargetCard target = new TargetCard(Zone.PICK, new FilterCard(doAgain ? textBottom : textTop));
View Full Code Here

Examples of mage.players.Player.loseLife()

                if (amount > 0) {
                    Set<UUID> opponents = game.getOpponents(source.getControllerId());
                    for (UUID opponentId : opponents) {
                        Player opponent = game.getPlayer(opponentId);
                        if (opponent != null) {
                            opponent.loseLife(amount, game);
                        }
                    }
                }
                return true;
            }
View Full Code Here

Examples of mage.players.Player.loseLife()

        if (creatureCard != null && controller != null) {
            boolean result = false;
            if (game.getState().getZone(creatureCard.getId()).equals(Zone.GRAVEYARD)) {
                result = controller.putOntoBattlefieldWithInfo(creatureCard, game, Zone.GRAVEYARD, source.getSourceId());
            }
            controller.loseLife(creatureCard.getManaCost().convertedManaCost(), game);
            return result;
        }
        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) {
            do {
                controller.loseLife(2, game);
                controller.drawCards(2, game);
            } while (controller.isInGame() && ClashEffect.getInstance().apply(game, source));
            return true;
        }
        return false;
View Full Code Here

Examples of mage.players.Player.loseLife()

            if (newValue - oldValue > 0) {
                player.gainLife(newValue - oldValue, game);
            }
            if (oldValue - newValue > 0) {
                player.loseLife(oldValue - newValue, game);
            }
            return true;
        }
        return false;
    }
View Full Code Here

Examples of mage.players.Player.loseLife()

    public boolean apply(Game game, Ability source) {
        Player player = game.getPlayer(targetPointer.getFirst(game, source));
        if (player != null) {
            Integer amount = (int) Math.ceil(player.getLife() / 2f);
            if (amount > 0) {
                player.loseLife(amount, 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.