mirror of
https://github.com/Card-Forge/forge.git
synced 2025-11-14 09:48:02 +00:00
CardUtil: fix getValidCardsToTarget for orcus
This commit is contained in:
committed by
Michael Kamensky
parent
4e0130f9e0
commit
1fb50f416c
@@ -530,6 +530,7 @@ public final class CardUtil {
|
|||||||
// however, due to the changes necessary for SA_Requirements this is much
|
// however, due to the changes necessary for SA_Requirements this is much
|
||||||
// different than the original
|
// different than the original
|
||||||
public static List<Card> getValidCardsToTarget(TargetRestrictions tgt, SpellAbility ability) {
|
public static List<Card> getValidCardsToTarget(TargetRestrictions tgt, SpellAbility ability) {
|
||||||
|
Card activatingCard = ability.getHostCard();
|
||||||
final Game game = ability.getActivatingPlayer().getGame();
|
final Game game = ability.getActivatingPlayer().getGame();
|
||||||
final List<ZoneType> zone = tgt.getZone();
|
final List<ZoneType> zone = tgt.getZone();
|
||||||
|
|
||||||
@@ -539,7 +540,6 @@ public final class CardUtil {
|
|||||||
if (canTgtStack) {
|
if (canTgtStack) {
|
||||||
// Since getTargetableCards doesn't have additional checks if one of the Zones is stack
|
// 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
|
// Remove the activating card from targeting itself if its on the Stack
|
||||||
Card activatingCard = ability.getHostCard();
|
|
||||||
if (activatingCard.isInZone(ZoneType.Stack)) {
|
if (activatingCard.isInZone(ZoneType.Stack)) {
|
||||||
choices.remove(ability.getHostCard());
|
choices.remove(ability.getHostCard());
|
||||||
}
|
}
|
||||||
@@ -561,7 +561,7 @@ public final class CardUtil {
|
|||||||
|
|
||||||
final List<Card> choicesCopy = Lists.newArrayList(choices);
|
final List<Card> choicesCopy = Lists.newArrayList(choices);
|
||||||
for (final Card c : choicesCopy) {
|
for (final Card c : choicesCopy) {
|
||||||
if (c.getCMC() > tgt.getMaxTotalCMC(c, ability) - totalCMCTargeted) {
|
if (c.getCMC() > tgt.getMaxTotalCMC(activatingCard, ability) - totalCMCTargeted) {
|
||||||
choices.remove(c);
|
choices.remove(c);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -576,7 +576,7 @@ public final class CardUtil {
|
|||||||
|
|
||||||
final List<Card> choicesCopy = Lists.newArrayList(choices);
|
final List<Card> choicesCopy = Lists.newArrayList(choices);
|
||||||
for (final Card c : choicesCopy) {
|
for (final Card c : choicesCopy) {
|
||||||
if (c.getNetPower() > tgt.getMaxTotalPower(c, ability) - totalPowerTargeted) {
|
if (c.getNetPower() > tgt.getMaxTotalPower(activatingCard, ability) - totalPowerTargeted) {
|
||||||
choices.remove(c);
|
choices.remove(c);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -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.
|
||||||
Reference in New Issue
Block a user