Examples of gainLife()


Examples of mage.players.Player.gainLife()

                Card card = game.getCard(target.getFirstTarget());
                if (card != null) {
                    targetPlayer.getGraveyard().remove(card);
                    card.moveToExile(null, "", source.getSourceId(), game);
                    if (card.getCardType().contains(CardType.CREATURE)) {
                        controller.gainLife(2, game);
                    }
                }
                return true;
            }
        }
View Full Code Here

Examples of mage.players.Player.gainLife()

    @Override
    public boolean apply(Game game, Ability source) {
        Player player = game.getPlayer(source.getControllerId());
        Permanent creature = (Permanent) game.getLastKnownInformation(source.getFirstTarget(), Zone.BATTLEFIELD);
        if (player != null && creature != null) {
            player.gainLife(creature.getToughness().getValue(), game);
            return true;
        }
        return false;
    }
}
View Full Code Here

Examples of mage.players.Player.gainLife()

            Card targetCard = game.getCard(getTargetPointer().getFirst(game, source));
            if (targetCard != null) {
                if (game.getState().getZone(targetCard.getId()).equals(Zone.GRAVEYARD)) {
                    controller.moveCardToExileWithInfo(targetCard, null, "", source.getSourceId(), game, Zone.GRAVEYARD);
                }
                controller.gainLife(targetCard.getToughness().getValue(), game);
                return true;
            }
        }
        return false;
    }
View Full Code Here

Examples of mage.players.Player.gainLife()

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

Examples of mage.players.Player.gainLife()

        Player targetPlayer = game.getPlayer(targetPointer.getFirst(game, source));
        Player sourcePlayer = game.getPlayer(source.getControllerId());
        if (targetPlayer != null && sourcePlayer != null) {
            int amount = game.getBattlefield().count(filter, source.getSourceId(), targetPlayer.getId(), game);
            if (amount > 0) {
                sourcePlayer.gainLife(amount, game);
            }
            return true;
        }
        return false;
    }
View Full Code Here

Examples of mage.players.Player.gainLife()

    public boolean apply(Game game, Ability source) {
        Permanent target = (Permanent) game.getLastKnownInformation(targetPointer.getFirst(game, source), Zone.BATTLEFIELD);
        if (target != null) {
            Player player = game.getPlayer(target.getControllerId());
            if (player != null) {
                player.gainLife(4, game);
                return true;
            }
        }
        return false;
    }
View Full Code Here

Examples of mage.players.Player.gainLife()

    public boolean apply(Game game, Ability source) {
        Permanent permanent = game.getPermanentOrLKIBattlefield(getTargetPointer().getFirst(game, source));
        if (permanent != null) {
            Player player = game.getPlayer(source.getControllerId());
            if (player != null) {
                player.gainLife(permanent.getToughness().getValue(), game);
            }
        }
        return false;
    }
View Full Code Here

Examples of mage.players.Player.gainLife()

                    return false;
                }
            }
            Player controller = game.getPlayer(source.getControllerId());
            if (controller != null) {
                controller.gainLife(lifetogain, game);
            } else {
                return false;
            }
        }
        return true;
View Full Code Here

Examples of mage.players.Player.gainLife()

    @Override
    public boolean apply(Game game, Ability source) {
        Player controller = game.getPlayer(source.getControllerId());
        if (controller != null) {
            if (FerociousCondition.getInstance().apply(game, source)) {
                controller.gainLife(10, game);
            } else {
                controller.gainLife(5, game);
            }
            return true;
        }
View Full Code Here

Examples of mage.players.Player.gainLife()

        Player controller = game.getPlayer(source.getControllerId());
        if (controller != null) {
            if (FerociousCondition.getInstance().apply(game, source)) {
                controller.gainLife(10, game);
            } else {
                controller.gainLife(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.