2013-05-26 22:10:20 -07:00
|
|
|
[
|
|
|
|
new MagicWhenOtherComesIntoPlayTrigger() {
|
|
|
|
@Override
|
|
|
|
public MagicEvent executeTrigger(final MagicGame game,final MagicPermanent permanent,final MagicPermanent otherPermanent) {
|
|
|
|
return (otherPermanent.isCreature() && otherPermanent.isFriend(permanent)) ?
|
|
|
|
new MagicEvent(
|
|
|
|
permanent,
|
|
|
|
MagicTargetChoice.NEG_TARGET_CREATURE_OR_PLAYER,
|
|
|
|
new MagicDamageTargetPicker(otherPermanent.getPower()),
|
|
|
|
otherPermanent,
|
|
|
|
this,
|
2013-05-26 22:18:16 -07:00
|
|
|
"RN deals damage equal to its power to target creature or player\$."
|
2013-05-26 22:10:20 -07:00
|
|
|
) :
|
|
|
|
MagicEvent.NONE;
|
|
|
|
}
|
2013-06-23 18:29:26 -07:00
|
|
|
|
2013-05-26 22:10:20 -07:00
|
|
|
@Override
|
|
|
|
public void executeEvent(final MagicGame game, final MagicEvent event) {
|
|
|
|
final MagicPermanent permanent = event.getRefPermanent();
|
|
|
|
event.processTarget(game,new MagicTargetAction() {
|
|
|
|
public void doAction(final MagicTarget target) {
|
|
|
|
final MagicDamage damage = new MagicDamage(permanent,target,permanent.getPower());
|
|
|
|
game.doAction(new MagicDealDamageAction(damage));
|
|
|
|
}
|
|
|
|
});
|
2013-06-23 18:29:26 -07:00
|
|
|
}
|
2013-05-26 22:10:20 -07:00
|
|
|
}
|
|
|
|
]
|