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() {
|
||||
@Override
|
||||
|
@ -19,15 +31,12 @@
|
|||
}
|
||||
}
|
||||
},
|
||||
new MagicWhenDamageIsDealtTrigger() {
|
||||
new MagicStatic(MagicLayer.Ability) {
|
||||
@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);
|
||||
public void modAbilityFlags(final MagicPermanent source,final MagicPermanent permanent,final Set<MagicAbility> flags) {
|
||||
if (permanent.getController().getLife() >= 7) {
|
||||
permanent.addAbility(trigger);
|
||||
}
|
||||
return MagicEvent.NONE;
|
||||
}
|
||||
}
|
||||
]
|
||||
|
|
Loading…
Reference in New Issue