CardUtil: fix getValidCardsToTarget for orcus

This commit is contained in:
Hans Mackowiak
2021-07-14 03:11:06 +00:00
committed by Michael Kamensky
parent 4e0130f9e0
commit 1fb50f416c
2 changed files with 18 additions and 3 deletions

View File

@@ -530,6 +530,7 @@ public final class CardUtil {
// however, due to the changes necessary for SA_Requirements this is much
// different than the original
public static List<Card> getValidCardsToTarget(TargetRestrictions tgt, SpellAbility ability) {
Card activatingCard = ability.getHostCard();
final Game game = ability.getActivatingPlayer().getGame();
final List<ZoneType> zone = tgt.getZone();
@@ -539,7 +540,6 @@ public final class CardUtil {
if (canTgtStack) {
// Since getTargetableCards doesn't have additional checks if one of the Zones is stack
// Remove the activating card from targeting itself if its on the Stack
Card activatingCard = ability.getHostCard();
if (activatingCard.isInZone(ZoneType.Stack)) {
choices.remove(ability.getHostCard());
}
@@ -561,7 +561,7 @@ public final class CardUtil {
final List<Card> choicesCopy = Lists.newArrayList(choices);
for (final Card c : choicesCopy) {
if (c.getCMC() > tgt.getMaxTotalCMC(c, ability) - totalCMCTargeted) {
if (c.getCMC() > tgt.getMaxTotalCMC(activatingCard, ability) - totalCMCTargeted) {
choices.remove(c);
}
}
@@ -576,7 +576,7 @@ public final class CardUtil {
final List<Card> choicesCopy = Lists.newArrayList(choices);
for (final Card c : choicesCopy) {
if (c.getNetPower() > tgt.getMaxTotalPower(c, ability) - totalPowerTargeted) {
if (c.getNetPower() > tgt.getMaxTotalPower(activatingCard, ability) - totalPowerTargeted) {
choices.remove(c);
}
}

View File

@@ -0,0 +1,15 @@
Name:Orcus, Prince of Undeath
ManaCost:X 2 B R
Types:Legendary Creature Demon
PT:5/3
K:Flying
K:Trample
T:Mode$ ChangesZone | Origin$ Any | Destination$ Battlefield | ValidCard$ Card.Self | Execute$ TrigCharm | TriggerDescription$ When CARDNAME enters the battlefield, ABILITY
SVar:TrigCharm:DB$ Charm | Choices$ DBPumpAll,DBReturn
SVar:DBPumpAll:DB$ PumpAll | NumAtt$ -X | NumDef$ -X | ValidCards$ Creature.Other | IsCurse$ True | SubAbility$ DBLoseLife | SpellDescription$ Each other creature gets -X/-X until end of turn. You lose X life.
SVar:DBLoseLife:DB$ LoseLife | LifeAmount$ X
SVar:DBReturn:DB$ ChangeZone | Origin$ Graveyard | Destination$ Battlefield | TargetMin$ 0 | TargetMax$ X | MaxTotalTargetCMC$ X | ValidTgts$ Creature.YouOwn | SubAbility$ DBPump | TgtPrompt$ Select up to X target creature cards with total mana value X or less | StackDescription$ SpellDescription | SpellDescription$ Return up to X target creature cards with total mana value X or less from your graveyard to the battlefield. They gain haste until end of turn.
SVar:DBPump:DB$ Pump | Defined$ Targeted | KW$ Haste
SVar:X:Count$xPaid
SVar:PlayMain1:TRUE
Oracle:Flying, trample\nWhen Orcus, Prince of Undeath enters the battlefield, choose one —\n• Each other creature gets -X/-X until end of turn. You lose X life.\n• Return up to X target creature cards with total mana value X or less from your graveyard to the battlefield. They gain haste until end of turn.