Package mage.players

Examples of mage.players.Player.damage()


                Player player = game.getPlayer(uuid);
                if (permanent != null) {
                    permanent.damage(damage, source.getSourceId(), game, false, true);
                }
                if (player != null) {
                    player.damage(damage, source.getSourceId(), game, true, false);
                }
            }
            return true;
        }
        return false;
View Full Code Here


                    Card artifact = game.getCard(targetedArtifact.getId());
                    Player controller = game.getPlayer(targetedArtifact.getControllerId());
                    targetedArtifact.destroy(id, game, true);
                    if (controller.getGraveyard().contains(artifact.getId())) {
                        int alliesControlled = game.getBattlefield().count(filter, source.getSourceId(), source.getControllerId(), game);
                        controller.damage(alliesControlled, id, game, false, true);
                        return true;
                    }
                }
            }
        }
View Full Code Here

        Permanent targetedLand = game.getPermanent(source.getFirstTarget());
        if (targetedLand != null) {
            Player controller = game.getPlayer(targetedLand.getControllerId());
            targetedLand.destroy(id, game, true);
            int landsInGraveyard = controller.getGraveyard().count(filter, game);
            controller.damage(landsInGraveyard, id, game, false, true);
            return true;
        }
        return false;
    }
}
View Full Code Here

        DynamicValue value = new MultikickerCount();
        int damage = value.calculate(game, source, this) * 2;

        Player player = game.getPlayer(source.getFirstTarget());
        if (player != null) {
            player.damage(damage, id, game, false, true);
            return true;
        }
        return false;
    }

View Full Code Here

            if (creature != null) {
                creature.damage(1, attachmentid, game, false, true);
            }
            Player player = game.getPlayer(target);
            if (player != null) {
                player.damage(1, attachmentid, game, false, true);
            }
        }
        Permanent razor = game.getPermanent(attachmentid);
        if (razor != null) {
            razor.moveToZone(Zone.HAND, id, game, true);
View Full Code Here

        Player player = game.getPlayer(source.getControllerId());
        Integer damageAmount = (Integer) this.getValue("damageAmount");
        if (player != null && damageAmount.intValue() > 0) {
            Player targetPlayer = game.getPlayer(targetPointer.getFirst(game, source));
            if (targetPlayer != null) {
               targetPlayer.damage(damageAmount.intValue(), source.getSourceId(), game, false, true);
               return true;
            }
            Permanent permanent = game.getPermanent(targetPointer.getFirst(game, source));
            if (permanent != null) {
                permanent.damage(damageAmount.intValue(), source.getSourceId(), game, false, true);
View Full Code Here

        for (UUID opponentId : game.getOpponents(source.getControllerId())) {
            Player opponent = game.getPlayer(opponentId);
            if (opponent != null) {
                int damage = opponent.getHand().size();
                if (damage > 0) {
                    opponent.damage(damage, source.getSourceId(), game, false, true);
                }
            }
        }
        return true;
    }
View Full Code Here

        {
            int couvertedManaCost = permanent.getManaCost().convertedManaCost();
            Player player = game.getPlayer(permanent.getControllerId());
            permanent.destroy(source.getSourceId(), game, false);
            if(player != null){
                player.damage(couvertedManaCost, source.getSourceId(), game, false, true);
            }
            return true;
        }
        return false;
    }
View Full Code Here

        {
            int amount = player.getHand().size() - 4;
            if(amount > 0)
            {
                if (player != null) {
                    player.damage(amount, source.getSourceId(), game, false, true);
                    return true;
                }

            }
        }
View Full Code Here

            if (permanent != null) {
                applied |= (permanent.damage( damage, source.getSourceId(), game, false, true ) > 0);
            }
            Player player = game.getPlayer(target);
            if (player != null) {
                applied |= (player.damage( damage, source.getSourceId(), game, false, true ) > 0);
            }

            twoDamageDone = true;
        }
        return applied;
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.