mirror of
https://github.com/correl/mage.git
synced 2025-01-12 19:25:44 +00:00
fixed Abandon Hope targeting any player
This commit is contained in:
parent
8f04b9fb14
commit
8f7e91183f
1 changed files with 7 additions and 6 deletions
|
@ -1,4 +1,3 @@
|
|||
|
||||
package mage.cards.a;
|
||||
|
||||
import mage.abilities.Ability;
|
||||
|
@ -15,8 +14,8 @@ import mage.constants.TargetController;
|
|||
import mage.constants.Zone;
|
||||
import mage.filter.StaticFilters;
|
||||
import mage.game.Game;
|
||||
import mage.target.TargetPlayer;
|
||||
import mage.target.common.TargetCardInHand;
|
||||
import mage.target.common.TargetOpponent;
|
||||
|
||||
import java.util.UUID;
|
||||
|
||||
|
@ -29,18 +28,20 @@ public final class AbandonHope extends CardImpl {
|
|||
super(ownerId, setInfo, new CardType[]{CardType.SORCERY}, "{X}{1}{B}");
|
||||
|
||||
// As an additional cost to cast Abandon Hope, discard X cards.
|
||||
Ability ability = new SimpleStaticAbility(Zone.ALL, new InfoEffect("As an additional cost to cast this spell, discard X cards"));
|
||||
Ability ability = new SimpleStaticAbility(
|
||||
Zone.ALL, new InfoEffect("As an additional cost to cast this spell, discard X cards")
|
||||
);
|
||||
ability.setRuleAtTheTop(true);
|
||||
this.addAbility(ability);
|
||||
|
||||
// Look at target opponent's hand and choose X cards from it. That player discards those cards.
|
||||
ManacostVariableValue manaX = ManacostVariableValue.instance;
|
||||
this.getSpellAbility().addEffect(new DiscardCardYouChooseTargetEffect(manaX, TargetController.ANY));
|
||||
this.getSpellAbility().addTarget(new TargetPlayer());
|
||||
this.getSpellAbility().addTarget(new TargetOpponent());
|
||||
this.getSpellAbility().setCostAdjuster(AbandonHopeAdjuster.instance);
|
||||
}
|
||||
|
||||
public AbandonHope(final AbandonHope card) {
|
||||
private AbandonHope(final AbandonHope card) {
|
||||
super(card);
|
||||
}
|
||||
|
||||
|
@ -60,4 +61,4 @@ enum AbandonHopeAdjuster implements CostAdjuster {
|
|||
ability.addCost(new DiscardTargetCost(new TargetCardInHand(xValue, xValue, StaticFilters.FILTER_CARD_CARDS)));
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue