add in the 'as long as' in Elderscale Wurms's second ability
parent
06b59b041d
commit
784b1c1586
|
@ -1,3 +1,15 @@
|
||||||
|
def trigger = new MagicWhenDamageIsDealtTrigger() {
|
||||||
|
@Override
|
||||||
|
public MagicEvent executeTrigger(final MagicGame game,final MagicPermanent permanent,final MagicDamage damage) {
|
||||||
|
final MagicPlayer player = permanent.getController();
|
||||||
|
final MagicTarget target = damage.getTarget();
|
||||||
|
if (player == target && player.getLife() < 7) {
|
||||||
|
player.setLife(7);
|
||||||
|
}
|
||||||
|
return MagicEvent.NONE;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
[
|
[
|
||||||
new MagicWhenComesIntoPlayTrigger() {
|
new MagicWhenComesIntoPlayTrigger() {
|
||||||
@Override
|
@Override
|
||||||
|
@ -19,15 +31,12 @@
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
new MagicWhenDamageIsDealtTrigger() {
|
new MagicStatic(MagicLayer.Ability) {
|
||||||
@Override
|
@Override
|
||||||
public MagicEvent executeTrigger(final MagicGame game,final MagicPermanent permanent,final MagicDamage damage) {
|
public void modAbilityFlags(final MagicPermanent source,final MagicPermanent permanent,final Set<MagicAbility> flags) {
|
||||||
final MagicPlayer player = permanent.getController();
|
if (permanent.getController().getLife() >= 7) {
|
||||||
final MagicTarget target = damage.getTarget();
|
permanent.addAbility(trigger);
|
||||||
if (player == target && player.getLife() < 7) {
|
|
||||||
player.setLife(7);
|
|
||||||
}
|
}
|
||||||
return MagicEvent.NONE;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
|
|
Loading…
Reference in New Issue