Examples of loseLife()


Examples of mage.players.Player.loseLife()

    @Override
    public boolean checkTrigger(GameEvent event, Game game) {
        if (event.getType() == GameEvent.EventType.UPKEEP_STEP_PRE && game.getOpponents(controllerId).contains(event.getPlayerId())) {
            Player opponent = game.getPlayer(event.getPlayerId());
            if (opponent != null && opponent.getHand().size() == 0) {
                opponent.loseLife(2, game);
                return true;
            }
        }
        return false;
    }
View Full Code Here

Examples of mage.players.Player.loseLife()

            // Each player loses a third of his or her life,
            for (UUID playerId : controller.getInRange()) {
                Player player = game.getPlayer(playerId);
                if (player != null) {
                    int lifeToLose = (int) Math.ceil(player.getLife() / 3.0);
                    player.loseLife(lifeToLose, game);
                }
            }
            // then discards a third of the cards in his or her hand,
            for (UUID playerId : controller.getInRange()) {
                Player player = game.getPlayer(playerId);
View Full Code Here

Examples of mage.players.Player.loseLife()

            for (UUID playerId : game.getOpponents(controller.getId())) {
                Player opponent =  game.getPlayer(playerId);
                if (opponent != null) {
                    int lifeLost = watcher.getLiveLost(playerId);
                    if (lifeLost > 0) {
                        opponent.loseLife(lifeLost, game);
                    }
                }
            }
            return true;
        }
View Full Code Here

Examples of mage.players.Player.loseLife()

        Permanent land = game.getPermanent(targetPointer.getFirst(game, source));
        if (land != null) {
            opponent = game.getPlayer(land.getControllerId());
        }
        if (opponent != null) {
            opponent.loseLife(2, game);
        }
        if (you != null) {
            you.gainLife(2, game);
        }
        return true;
View Full Code Here

Examples of mage.players.Player.loseLife()

                    currentLifePaid = 0;
                    totalPaidLife = 0;
                    if (currentPlayer.chooseUse(Outcome.AIDontUseIt, "Pay life?", game)) {
                        totalPaidLife = currentPlayer.getAmount(0, controller.getLife(), "Pay how many life?", game);
                        if (totalPaidLife > 0) {
                            currentPlayer.loseLife(totalPaidLife, game);
                            if (payLife.get(currentPlayer.getId()) == null) {
                                payLife.put(currentPlayer.getId(), totalPaidLife);
                            } else {
                                currentLifePaid = payLife.get(currentPlayer.getId());
                                payLife.put(currentPlayer.getId(), currentLifePaid + totalPaidLife);
View Full Code Here

Examples of mage.players.Player.loseLife()

    @Override
    public boolean apply(Game game, Ability source) {
        Player player = game.getPlayer(this.getTargetPointer().getFirst(game, source));
        if (player != null) {
            player.loseLife(6, game);
            game.getState().setValue(CardUtil.getCardZoneString("targetPlayer", source.getSourceId(), game), player.getId());
            return true;
        }
        return false;
    }
View Full Code Here

Examples of mage.players.Player.loseLife()

    @Override
    public boolean apply(Game game, Ability source) {
        Player player = game.getPlayer(this.getTargetPointer().getFirst(game, source));
        if (player != null) {
            player.loseLife(3, game);
            game.getState().setValue(CardUtil.getCardZoneString("targetPlayer", source.getSourceId(), game), player.getId());
            return true;
        }
        return false;
    }
View Full Code Here

Examples of mage.players.Player.loseLife()

    public boolean apply(Game game, Ability source) {
        Spell spell = game.getStack().getSpell(source.getFirstTarget());
        if (spell != null) {
            Player player = game.getPlayer(source.getControllerId());
            if (player != null) {
                player.loseLife(spell.getConvertedManaCost(), game);
                return true;
            }           
        }       
        return false;
    }
View Full Code Here

Examples of mage.players.Player.loseLife()

        boolean applied = false;
        Set<UUID> opponents = game.getOpponents(source.getControllerId());
        for (UUID opponentUUID : opponents) {
            Player player = game.getPlayer(opponentUUID);
            if (player != null) {
                player.loseLife(1, game);
                applied = true;
            }
        }
        return applied;
    }
View Full Code Here

Examples of mage.players.Player.loseLife()

    public boolean apply(Game game, Ability source) {
        Player opponent = game.getPlayer(getTargetPointer().getFirst(game, source));
        if (opponent != null) {
            int lifeLose = 3 - opponent.getHand().size();
            if (lifeLose > 0 ) {
                opponent.loseLife(lifeLose, 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.