mirror of
https://github.com/correl/mage.git
synced 2024-12-25 03:00:15 +00:00
- Use Prevention Effect instead of Replacement Effect for Swans of Bryn Argoll.
This commit is contained in:
parent
6dd1cace26
commit
221463ff4f
1 changed files with 4 additions and 5 deletions
|
@ -31,13 +31,12 @@ import java.util.UUID;
|
|||
import mage.MageInt;
|
||||
import mage.abilities.Ability;
|
||||
import mage.abilities.common.SimpleStaticAbility;
|
||||
import mage.abilities.effects.ReplacementEffectImpl;
|
||||
import mage.abilities.effects.PreventionEffectImpl;
|
||||
import mage.abilities.keyword.FlyingAbility;
|
||||
import mage.cards.Card;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.constants.CardType;
|
||||
import mage.constants.Duration;
|
||||
import mage.constants.Outcome;
|
||||
import mage.constants.Rarity;
|
||||
import mage.constants.Zone;
|
||||
import mage.game.Game;
|
||||
|
@ -83,10 +82,10 @@ public class SwansOfBrynArgoll extends CardImpl {
|
|||
}
|
||||
}
|
||||
|
||||
class SwansOfBrynArgollEffect extends ReplacementEffectImpl {
|
||||
class SwansOfBrynArgollEffect extends PreventionEffectImpl {
|
||||
|
||||
SwansOfBrynArgollEffect() {
|
||||
super(Duration.WhileOnBattlefield, Outcome.PreventDamage);
|
||||
super(Duration.WhileOnBattlefield);
|
||||
staticText = "If a source would deal damage to {this}, prevent that damage. The source's controller draws cards equal to the damage prevented this way";
|
||||
}
|
||||
|
||||
|
@ -124,7 +123,7 @@ class SwansOfBrynArgollEffect extends ReplacementEffectImpl {
|
|||
|
||||
@Override
|
||||
public boolean applies(GameEvent event, Ability source, Game game) {
|
||||
return event.getType() == EventType.DAMAGE_CREATURE
|
||||
return event.getType() == EventType.DAMAGE_CREATURE
|
||||
&& event.getTargetId().equals(source.getSourceId());
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue