Package mage.players

Examples of mage.players.Player.gainLife()


        if (target != null) {
            numberCountersOriginal = target.getCounters().getCount(CounterType.M1M1);
            target.removeCounters(CounterType.M1M1.createInstance(), game);
            numberCountersAfter = target.getCounters().getCount(CounterType.M1M1);
            if (numberCountersAfter < numberCountersOriginal && you != null) {
                you.gainLife(2, game);
                return true;
            }
        }
        return false;
    }
View Full Code Here


    public boolean apply(Game game, Ability source) {
        int amount = (Integer) getValue("damage");
        if (amount > 0) {
            Player controller = game.getPlayer(source.getControllerId());
            if (controller != null) {
                controller.gainLife(amount, game);
                return true;
            }
        }
        return false;
    }
View Full Code Here

            }
        }
        if (count > 0) {
            Player player = game.getPlayer(source.getControllerId());
            if (player != null) {
                player.gainLife(count, game);
            }
        }
        return true;
    }
View Full Code Here

        if (target.canChoose(player.getId(), game)) {
            player.choose(Outcome.Sacrifice, target, source.getSourceId(), game);

            Permanent permanent = game.getPermanent(target.getFirstTarget());
            if (permanent != null) {
                controller.gainLife(permanent.getToughness().getValue(), game);
                return permanent.sacrifice(source.getSourceId(), game);
            }
            return true;
        }
        return false;
View Full Code Here

        if (card != null) {
            card.moveToZone(Zone.HAND, source.getSourceId(), game, true);

            int cmc = card.getManaCost().convertedManaCost();
            if (cmc > 0) {
                controller.gainLife(cmc, game);
            }
            cards.add(card);
            controller.revealCards(sourceObject.getName(), cards, game);
        }
        return true;
View Full Code Here

        Player player = game.getPlayer(source.getControllerId());
        if (p == null) {
            p = (Permanent) game.getLastKnownInformation(targetPointer.getFirst(game, source), Zone.BATTLEFIELD);
        }
        if (p != null && player != null) {
            player.gainLife(p.getPower().getValue(), game);
            return true;
        }
        return false;
    }
View Full Code Here

    public boolean apply(Game game, Ability source) {
        Object object = game.getState().getValue(CardUtil.getCardZoneString("targetPlayer", source.getSourceId(), game));
        if (object instanceof UUID) {
            Player player = game.getPlayer((UUID) object);
            if (player != null) {
                player.gainLife(6, game);
                return true;
            }
        }
        return false;
    }
View Full Code Here

    public boolean apply(Game game, Ability source) {
        Object object = game.getState().getValue(CardUtil.getCardZoneString("targetPlayer", source.getSourceId(), game));
        if (object instanceof UUID) {
            Player player = game.getPlayer((UUID) object);
            if (player != null) {
                player.gainLife(3, game);
                return true;
            }
        }
        return false;
    }
View Full Code Here

    @Override
    public boolean apply(Game game, Ability source) {
        Player player = game.getPlayer(source.getControllerId());
        if (player != null) {
            player.gainLife((Integer) this.getValue("damageAmount"), game);
        }
        return true;
    }

}
View Full Code Here

    public boolean apply(Game game, Ability source) {
        int amount = (Integer) getValue("damage");
        if (amount > 0) {
            Player controller = game.getPlayer(source.getControllerId());
            if (controller != null) {
                controller.gainLife(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.