1
0
Fork 0
mirror of https://github.com/correl/mage.git synced 2025-04-13 01:01:11 -09:00

- Fixed . Please test if able. It works as far as I can tell.

This commit is contained in:
jeffwadsworth 2020-08-04 17:27:31 -05:00
parent d945f95324
commit 3358e2da80

View file

@ -35,7 +35,8 @@ public final class StormwildCapridor extends CardImpl {
// Flying // Flying
this.addAbility(FlyingAbility.getInstance()); this.addAbility(FlyingAbility.getInstance());
// If noncombat damage would be dealt to Stormwild Capridor, prevent that damage. Put a +1/+1 counter on Stormwild Capridor for each 1 damage prevented this way. // If noncombat damage would be dealt to Stormwild Capridor, prevent that damage.
// Put a +1/+1 counter on Stormwild Capridor for each 1 damage prevented this way.
this.addAbility(new SimpleStaticAbility(new StormwildCapridorEffect())); this.addAbility(new SimpleStaticAbility(new StormwildCapridorEffect()));
} }
@ -53,8 +54,8 @@ class StormwildCapridorEffect extends PreventionEffectImpl {
StormwildCapridorEffect() { StormwildCapridorEffect() {
super(Duration.WhileOnBattlefield); super(Duration.WhileOnBattlefield);
staticText = "If noncombat damage would be dealt to {this}, prevent that damage. " + staticText = "If noncombat damage would be dealt to {this}, prevent that damage. "
"Put a +1/+1 counter on {this} for each 1 damage prevented this way"; + "Put a +1/+1 counter on {this} for each 1 damage prevented this way";
} }
private StormwildCapridorEffect(final StormwildCapridorEffect effect) { private StormwildCapridorEffect(final StormwildCapridorEffect effect) {
@ -89,8 +90,11 @@ class StormwildCapridorEffect extends PreventionEffectImpl {
|| !super.applies(event, source, game)) { || !super.applies(event, source, game)) {
return false; return false;
} }
DamageCreatureEvent damageEvent = (DamageCreatureEvent) event; if (!game.replaceEvent(GameEvent.getEvent(GameEvent.EventType.PREVENT_DAMAGE, source.getSourceId(), source.getControllerId()))) {
return !damageEvent.isCombatDamage(); DamageCreatureEvent damageEvent = (DamageCreatureEvent) event;
return !damageEvent.isCombatDamage();
}
return false;
} }
} }