Examples of gainLife()


Examples of mage.players.Player.gainLife()

    public boolean apply(Game game, Ability source) {
        Player player = game.getPlayer(source.getControllerId());
        if (player != null) {
            Integer amount = (Integer) game.getState().getValue(source.getSourceId().toString() + "_BloodTribute");
            if (amount != null && amount > 0) {
                player.gainLife(amount, game);
                return true;
            }
        }
        return false;
    }
View Full Code Here

Examples of mage.players.Player.gainLife()

    @Override
    public boolean apply(Game game, Ability source) {
        Player player = game.getPlayer(source.getControllerId());
        int life = 2 * game.getBattlefield().count(filter, source.getSourceId(), source.getControllerId(), game);
        if (player != null) {
            player.gainLife(life, 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());
        if (player.getLife() <= 10) {
            player.gainLife(1, game);
            return true;
        }
        return false;
    }
View Full Code Here

Examples of mage.players.Player.gainLife()

        if (controller != null) {
            TargetPlayer target = new TargetPlayer(1, 1, true, filter);
            if (controller.chooseTarget(Outcome.Detriment, target, ability, game)) {
                Player opponent = game.getPlayer(target.getFirstTarget());
                if (opponent != null) {
                    opponent.gainLife(amount, game);
                    paid = true;

                }

            }
View Full Code Here

Examples of mage.players.Player.gainLife()

        if (controller != null) {
            for (UUID playerId: controller.getInRange()) {
                if (!playerId.equals(controllerId)) {
                    Player player = game.getPlayer(playerId);
                    if (player != null) {
                        player.gainLife(amount, game);
                    }
                }
            }
            paid = 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());
        if (player != null) {
            player.gainLife(life.calculate(game, source, this), game);
        }
        return true;
    }

    private void setText() {
View Full Code Here

Examples of mage.players.Player.gainLife()

    @Override
    public boolean apply(Game game, Ability source) {
        Player you = game.getPlayer(source.getControllerId());
        attackers = game.getCombat().getAttackers().size();
        if (you != null) {
            you.gainLife(attackers, game);
            attackers = 0;
            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(permanent.getControllerId());
            if (player != null) {
                player.gainLife(permanent.getPower().getValue(), game);
            }
            return true;
        }
        return false;
    }
View Full Code Here

Examples of mage.players.Player.gainLife()

        else
          return false;
      }
      Player you = game.getPlayer(source.getControllerId());
      if (you != null) {
        you.gainLife(damageDealt, game);
        return true;
      }
    }
    return false;
  }
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) {
            controller.gainLife(10, game);
            boolean moreLife = false;
            for (UUID opponentId :game.getOpponents(source.getControllerId())) {
                Player opponent = game.getPlayer(opponentId);
                if (opponent != null) {
                    if (controller.getLife() > opponent.getLife()) {
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.