From 0f6fab52489b35442c5356e56bb40048b866f3db Mon Sep 17 00:00:00 2001 From: Simown Date: Wed, 22 Jul 2015 22:01:02 +0100 Subject: [PATCH] Small fixes to "Domain" cards Draco, Fettergeist and Samite Pilgrim. --- .../mage/sets/avacynrestored/Fettergeist.java | 5 +-- Mage.Sets/src/mage/sets/ftvdragons/Draco.java | 6 +-- .../mage/sets/planeshift/SamitePilgrim.java | 42 ++----------------- 3 files changed, 5 insertions(+), 48 deletions(-) diff --git a/Mage.Sets/src/mage/sets/avacynrestored/Fettergeist.java b/Mage.Sets/src/mage/sets/avacynrestored/Fettergeist.java index 6b8cec80c8..cd1e936ab9 100644 --- a/Mage.Sets/src/mage/sets/avacynrestored/Fettergeist.java +++ b/Mage.Sets/src/mage/sets/avacynrestored/Fettergeist.java @@ -102,10 +102,7 @@ class FettergeistUnlessPaysEffect extends OneShotEffect { if (player != null && permanent != null) { PermanentsOnBattlefieldCount amount = new PermanentsOnBattlefieldCount(filter, 1); int count = amount.calculate(game, source, this); - if (count == 0) { - return true; - } - if (player.chooseUse(Outcome.Benefit, "Pay " + count + "?", source, game)) { + if (player.chooseUse(Outcome.Benefit, "Pay " + count + "? Or " + permanent.getName() + " will be sacrificed.", source, game)) { GenericManaCost cost = new GenericManaCost(count); if (cost.pay(source, game, source.getSourceId(), source.getControllerId(), false)) { return true; diff --git a/Mage.Sets/src/mage/sets/ftvdragons/Draco.java b/Mage.Sets/src/mage/sets/ftvdragons/Draco.java index e169224878..2335c0a2e9 100644 --- a/Mage.Sets/src/mage/sets/ftvdragons/Draco.java +++ b/Mage.Sets/src/mage/sets/ftvdragons/Draco.java @@ -124,11 +124,7 @@ class DracoSacrificeUnlessPaysEffect extends OneShotEffect { if (player != null && permanent != null) { // The cost is reduced by {2} for each basic land type. int domainValueReduction = new DomainValue(2).calculate(game, source, this); - // Nothing to pay - if (domainValueReduction >= MAX_DOMAIN_VALUE) { - return true; - } - int count = (MAX_DOMAIN_VALUE-domainValueReduction ); + int count = MAX_DOMAIN_VALUE - domainValueReduction; if (player.chooseUse(Outcome.Benefit, "Pay {" + count + "}? Or " + permanent.getName() + " will be sacrificed.", source, game)) { GenericManaCost cost = new GenericManaCost(count); if (cost.pay(source, game, source.getSourceId(), source.getControllerId(), false)) { diff --git a/Mage.Sets/src/mage/sets/planeshift/SamitePilgrim.java b/Mage.Sets/src/mage/sets/planeshift/SamitePilgrim.java index c2fa8ef4db..81ea8fbc8e 100644 --- a/Mage.Sets/src/mage/sets/planeshift/SamitePilgrim.java +++ b/Mage.Sets/src/mage/sets/planeshift/SamitePilgrim.java @@ -55,7 +55,7 @@ public class SamitePilgrim extends CardImpl { this.power = new MageInt(1); this.toughness = new MageInt(1); - // Domain - {tap}: Prevent the next X damage that would be dealt to target creature this turn, where X is the number of basic land types among lands you control. + // Domain - {T}: Prevent the next X damage that would be dealt to target creature this turn, where X is the number of basic land types among lands you control. Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new SamitePilgrimPreventDamageToTargetEffect(), new TapSourceCost()); ability.addTarget(new TargetCreaturePermanent()); this.addAbility(ability); @@ -73,16 +73,14 @@ public class SamitePilgrim extends CardImpl { class SamitePilgrimPreventDamageToTargetEffect extends PreventionEffectImpl { - protected int amount = 0; public SamitePilgrimPreventDamageToTargetEffect() { - super(Duration.EndOfTurn); + super(Duration.EndOfTurn, Integer.MAX_VALUE, false, true); staticText = "Prevent the next X damage that would be dealt to target creature this turn, where X is the number of basic land types among lands you control."; } public SamitePilgrimPreventDamageToTargetEffect(final SamitePilgrimPreventDamageToTargetEffect effect) { super(effect); - this.amount = effect.amount; } @Override @@ -93,7 +91,7 @@ class SamitePilgrimPreventDamageToTargetEffect extends PreventionEffectImpl { @Override public void init(Ability source, Game game) { super.init(source, game); - amount = new DomainValue().calculate(game, source, this); + amountToPrevent = new DomainValue().calculate(game, source, this); } @Override @@ -101,40 +99,6 @@ class SamitePilgrimPreventDamageToTargetEffect extends PreventionEffectImpl { return true; } - @Override - public boolean replaceEvent(GameEvent event, Ability source, Game game) { - boolean result = false; - int toPrevent = amount; - if (event.getAmount() < this.amount) { - toPrevent = event.getAmount(); - amount -= event.getAmount(); - } else { - amount = 0; - } - GameEvent preventEvent = new GameEvent(GameEvent.EventType.PREVENT_DAMAGE, source.getControllerId(), source.getSourceId(), source.getControllerId(), toPrevent, false); - if (!game.replaceEvent(preventEvent)) { - Permanent targetCreature = game.getPermanent(source.getFirstTarget()); - if (targetCreature != null) { - if (amount == 0) { - this.used = true; - this.discard(); - } - if (event.getAmount() >= toPrevent) { - event.setAmount(event.getAmount() - toPrevent); - } else { - event.setAmount(0); - result = true; - } - if (toPrevent > 0) { - game.informPlayers(new StringBuilder("Samite Pilgrim ").append("prevented ").append(toPrevent).append(" to ").append(targetCreature.getName()).toString()); - game.fireEvent(GameEvent.getEvent(GameEvent.EventType.PREVENTED_DAMAGE, - source.getControllerId(), source.getSourceId(), source.getControllerId(), toPrevent)); - } - } - } - return result; - } - @Override public boolean applies(GameEvent event, Ability source, Game game) { return !this.used && super.applies(event, source, game) && event.getTargetId().equals(source.getFirstTarget());