35 lines
1.3 KiB
Groovy
35 lines
1.3 KiB
Groovy
[
|
|
new MagicWhenComesIntoPlayTrigger() {
|
|
@Override
|
|
public MagicEvent executeTrigger(
|
|
final MagicGame game,
|
|
final MagicPermanent permanent,
|
|
final MagicPlayer player) {
|
|
final int amount = player.getNrOfPermanentsWithSubType(MagicSubType.Human);
|
|
return new MagicEvent(
|
|
permanent,
|
|
MagicTargetChoice.NEG_TARGET_PLAYER,
|
|
new MagicDamageTargetPicker(amount),
|
|
this,
|
|
"SN deals damage to target player\$ " +
|
|
"equal to the number of Humans PN controls."
|
|
);
|
|
}
|
|
|
|
@Override
|
|
public void executeEvent(final MagicGame game, final MagicEvent event) {
|
|
event.processTargetPlayer(game,new MagicPlayerAction() {
|
|
public void doAction(final MagicPlayer player) {
|
|
final int amount = event.getPlayer().getNrOfPermanentsWithSubType(MagicSubType.Human);
|
|
final MagicDamage damage = new MagicDamage(
|
|
event.getSource(),
|
|
player,
|
|
amount
|
|
);
|
|
game.doAction(new MagicDealDamageAction(damage));
|
|
}
|
|
});
|
|
}
|
|
}
|
|
]
|