Merge branch 'fixes' into 'master'

Fixes

See merge request core-developers/forge!4433
This commit is contained in:
Michael Kamensky
2021-04-09 07:10:27 +00:00
12 changed files with 34 additions and 22 deletions

View File

@@ -158,6 +158,20 @@ public class ChooseGenericEffectAi extends SpellAbilityAi {
}
}
return others;
} else if ("Counters".equals(logic)) {
SpellAbility p1p1 = null, loyalty = null;
for (final SpellAbility sp : spells) {
if (sp.getDescription().equals("P1P1")) {
p1p1 = sp;
} else {
loyalty = sp;
}
}
if (sa.getTargetCard().getType().isPlaneswalker()) {
return loyalty;
} else {
return p1p1;
}
} else if ("Fatespinner".equals(logic)) {
SpellAbility skipDraw = null, /*skipMain = null,*/ skipCombat = null;
for (final SpellAbility sp : spells) {

View File

@@ -3393,7 +3393,7 @@ public class CardFactoryUtil {
String costDesc = cost.toSimpleString();
String strTrig = "Mode$ BecomesTarget | ValidSource$ Card.OppCtrl | ValidTarget$ Card.Self "
+ " | Secondary$ True | TriggerDescription$ Ward " + costDesc + " ("
+ " | Secondary$ True | TriggerZones$ Battlefield | TriggerDescription$ Ward " + costDesc + " ("
+ inst.getReminderText() + ")";
String effect = "DB$ Counter | Defined$ TriggeredSourceSA | UnlessCost$ " + k[1]
+ " | UnlessPayer$ TriggeredSourceSAController";

View File

@@ -5,8 +5,7 @@ T:Mode$ ChangesZone | Origin$ Any | Destination$ Battlefield | ValidCard$ Card.S
SVar:TrigSearch:DB$ ChangeZone | Origin$ Library | OriginChoice$ True | OriginAlternative$ Graveyard | AlternativeMessage$ Would you like to search your library with this ability? If you do, your library will be shuffled. | Destination$ Hand | ChangeType$ Card.namedAjani; Valiant Protector | ChangeNum$ 1 | Optional$ True
A:AB$ ChooseCard | Cost$ Sac<1/CARDNAME> | Choices$ Creature | AILogic$ NeedsPrevention | SubAbility$ DBEffect | RememberChosen$ True | SpellDescription$ Prevent all combat damage a creature of your choice would deal this turn.
SVar:DBEffect:DB$ Effect | ReplacementEffects$ RPreventNextFromSource | RememberObjects$ Remembered | SubAbility$ DBCleanup | ConditionDefined$ Remembered | ConditionPresent$ Card | ConditionCompare$ GE1
SVar:RPreventNextFromSource:Event$ DamageDone | CombatDamage$ True | ValidSource$ Card.IsRemembered | Prevent$ True | PreventionEffect$ True | Description$ Prevent all combat damage a creature of your choice would deal this turn.
SVar:RPreventNextFromSource:Event$ DamageDone | IsCombat$ True | ValidSource$ Card.IsRemembered | Prevent$ True | PreventionEffect$ True | Description$ Prevent all combat damage a creature of your choice would deal this turn.
SVar:DBCleanup:DB$ Cleanup | ClearRemembered$ True
DeckHints:Name$Ajani, Valiant Protector
SVar:Picture:http://www.wizards.com/global/images/magic/general/ajanis_aid.jpg
Oracle:When Ajani's Aid enters the battlefield, you may search your library and/or graveyard for a card named Ajani, Valiant Protector, reveal it, and put it into your hand. If you search your library this way, shuffle it.\nSacrifice Ajani's Aid: Prevent all combat damage a creature of your choice would deal this turn.

View File

@@ -6,7 +6,7 @@ SVar:DBExile:DB$ ChangeZone | Origin$ Battlefield | Destination$ Exile | ValidTg
SVar:DBEffect:DB$ Effect | Duration$ UntilYourNextTurn | StaticAbilities$ RaiseCost | SpellDescription$ Noncreature spells your opponents cast cost {2} more to cast until your next turn.
SVar:RaiseCost:Mode$ RaiseCost | ValidCard$ Card.nonCreature | Activator$ Opponent | Type$ Spell | Amount$ 2 | EffectZone$ Command | Description$ Noncreature spells your opponents cast cost {2} more to cast until your next turn.
SVar:DBReturn:DB$ ChangeZone | Origin$ Graveyard | Destination$ Battlefield | ValidTgts$ Creature.YouOwn,Planeswalker.YouOwn | TgtPrompt$ Select target creature or planeswalker | RememberChanged$ True | SubAbility$ AddCounter | SpellDescription$ Return target creature or planeswalker card from your graveyard to the battlefield. Put a +1/+1 counter or a loyalty counter on it.
SVar:AddCounter:DB$ GenericChoice | Defined$ You | Choices$ P1P1,Loyalty
SVar:AddCounter:DB$ GenericChoice | Defined$ You | Choices$ P1P1,Loyalty | AILogic$ Counters
SVar:P1P1:DB$ PutCounter | Defined$ Remembered | CounterType$ P1P1 | CounterNum$ 1 | SubAbility$ DBCleanup | SpellDescription$ Put a +1/+1 counter on it.
SVar:Loyalty:DB$ PutCounter | Defined$ Remembered | CounterType$ LOYALTY | CounterNum$ 1 | SubAbility$ DBCleanup | SpellDescription$ Put a loyalty counter on it.
SVar:DBCleanup:DB$ Cleanup | ClearRemembered$ True
@@ -14,5 +14,5 @@ SVar:PlayMain1:TRUE
SVar:NeedsToPlayVar:Y GE1
SVar:Y:Count$ValidGraveyard Creature.YouOwn/Plus.Y1
SVar:Y1:Count$ValidGraveyard Planeswalker.YouOwn
DeckHas:Ability$Counters
DeckHas:Ability$Counters & Ability$Sacrifice & Ability$Graveyard
Oracle:(As this Saga enters and after your draw step, add a lore counter. Sacrifice after III.)\nI — Exile target permanent an opponent controls with converted mana cost 3 or greater.\nII — Noncreature spells your opponents cast cost {2} more to cast until your next turn.\nIII — Return target creature or planeswalker card from your graveyard to the battlefield. Put a +1/+1 counter or a loyalty counter on it.

View File

@@ -1,7 +1,7 @@
Name:Final Parting
ManaCost:3 B B
Types:Sorcery
A:SP$ ChangeZone | Cost$ 3 B B | Origin$ Library | Destination$ Library | ChangeType$ Card | ChangeNum$ 2 | RememberChanged$ True | Shuffle$ False | StackDescription$ SpellDescription | SubAbility$ DBChangeZone1 | SpellDescription$ Search your library for two cards. Put one into your hand and the other into your graveyard. Then shuffle your library.
A:SP$ ChangeZone | Cost$ 3 B B | Origin$ Library | Destination$ Library | ChangeType$ Card | ChangeNum$ 2 | Mandatory$ True | RememberChanged$ True | Shuffle$ False | StackDescription$ SpellDescription | SubAbility$ DBChangeZone1 | SpellDescription$ Search your library for two cards. Put one into your hand and the other into your graveyard. Then shuffle your library.
SVar:DBChangeZone1:DB$ ChangeZone | Origin$ Library | Destination$ Hand | ChangeType$ Card.IsRemembered | ChangeNum$ 1 | Mandatory$ True | NoLooking$ True | SelectPrompt$ Select a card to go to your hand | Shuffle$ False | SubAbility$ DBChangeZone2 | StackDescription$ None
SVar:DBChangeZone2:DB$ ChangeZone | Origin$ Library | Destination$ Graveyard | ChangeType$ Card.IsRemembered | Mandatory$ True | NoLooking$ True | SelectPrompt$ Select a card to go to your graveyard | StackDescription$ None | SubAbility$ DBCleanup
SVar:DBCleanup:DB$ Cleanup | ClearRemembered$ True

View File

@@ -1,9 +1,9 @@
Name:Gifts Ungiven
ManaCost:3 U
Types:Instant
A:SP$ ChangeZone | Cost$ 3 U | Origin$ Library | Destination$ Library | ChangeType$ Card | ChangeNum$ 4 | RememberChanged$ True | Reveal$ True | Shuffle$ False | DifferentNames$ True | StackDescription$ SpellDescription | SubAbility$ DBChangeZone1 | SpellDescription$ Search your library for up to four cards with different names and reveal them. Target opponent chooses two of those cards. Put the chosen cards into your graveyard and the rest into your hand. Then shuffle your library.
SVar:DBChangeZone1:DB$ ChangeZone | Origin$ Library | Destination$ Graveyard | ChangeType$ Card.IsRemembered | Chooser$ Opponent | ChangeNum$ 2 | Mandatory$ True | NoLooking$ True | SelectPrompt$ Select a card for the graveyard | Shuffle$ False | SubAbility$ DBChangeZone2 | StackDescription$ None
SVar:DBChangeZone2:DB$ ChangeZone | Origin$ Library | Destination$ Hand | ChangeType$ Card.IsRemembered | ChangeNum$ 2 | Mandatory$ True | NoLooking$ True | SelectPrompt$ Select a card for the hand | StackDescription$ None | SubAbility$ DBCleanup
A:SP$ ChangeZone | Cost$ 3 U | Origin$ Library | Destination$ Library | ChangeType$ Card | ChangeNum$ 4 | RememberChanged$ True | Reveal$ True | Shuffle$ False | DifferentNames$ True | StackDescription$ SpellDescription | SubAbility$ DBChoose | StackDescription$ {p:You} searches their library for up to four cards with different names and reveals them. | SpellDescription$ Search your library for up to four cards with different names and reveal them. Target opponent chooses two of those cards. Put the chosen cards into your graveyard and the rest into your hand. Then shuffle your library.
SVar:DBChoose:DB$ ChooseCard | ValidTgts$ Opponent | TgtPrompt$ Select target opponent | Choices$ Card.IsRemembered | ChoiceZone$ Library | ChoiceTitle$ Choose two cards for the graveyard | Mandatory$ True | Amount$ 2 | SubAbility$ DBChangeZone1 | StackDescription$ {p:Targeted} chooses two of those cards.
SVar:DBChangeZone1:DB$ ChangeZone | Origin$ Library | Destination$ Graveyard | Defined$ ChosenCard | ChangeNum$ 2 | Mandatory$ True | NoLooking$ True | SelectPrompt$ Select a card for the graveyard | Shuffle$ False | SubAbility$ DBChangeZone2 | StackDescription$ {p:You} puts the chosen cards into their graveyard
SVar:DBChangeZone2:DB$ ChangeZoneAll | Origin$ Library | Destination$ Hand | ChangeType$ Card.IsRemembered | Mandatory$ True | NoLooking$ True | Shuffle$ True | SelectPrompt$ Select a card for the hand | StackDescription$ and the rest into their hand. Then {p:You} shuffles their library. | SubAbility$ DBCleanup
SVar:DBCleanup:DB$ Cleanup | ClearRemembered$ True
SVar:Picture:http://www.wizards.com/global/images/magic/general/gifts_ungiven.jpg
Oracle:Search your library for up to four cards with different names and reveal them. Target opponent chooses two of those cards. Put the chosen cards into your graveyard and the rest into your hand. Then shuffle your library.

View File

@@ -2,6 +2,6 @@ Name:Grow from the Ashes
ManaCost:2 G
Types:Sorcery
K:Kicker:2
A:SP$ ChangeZone | Cost$ 2 G | Origin$ Library | Destination$ Battlefield | ChangeType$ Land.Basic | ChangeNum$ X | SpellDescription$ Search your library for a basic land card, put it onto the battlefield, then shuffle your library. If this spell was kicked, instead search your library for two basic land cards, put them onto the battlefield, then shuffle your library.
A:SP$ ChangeZone | Cost$ 2 G | Origin$ Library | Destination$ Battlefield | ChangeType$ Land.Basic | ChangeNum$ X | Mandatory$ True | SpellDescription$ Search your library for a basic land card, put it onto the battlefield, then shuffle your library. If this spell was kicked, instead search your library for two basic land cards, put them onto the battlefield, then shuffle your library.
SVar:X:Count$Kicked.2.1
Oracle:Kicker {2} (You may pay an additional {2} as you cast this spell.)\nSearch your library for a basic land card, put it onto the battlefield, then shuffle your library. If this spell was kicked, instead search your library for two basic land cards, put them onto the battlefield, then shuffle your library.

View File

@@ -1,9 +1,9 @@
Name:Intuition
ManaCost:2 U
Types:Instant
A:SP$ ChangeZone | Cost$ 2 U | Origin$ Library | Destination$ Library | ChangeType$ Card | ChangeNum$ 3 | RememberChanged$ True | Reveal$ True | Shuffle$ False | AILogic$ Intuition | SubAbility$ DBChangeZone1 | StackDescription$ Search your library for three cards and reveal them. Target opponent chooses one. Put that card into your hand and the rest into your graveyard. Then shuffle your library. | SpellDescription$ Search your library for three cards and reveal them. Target opponent chooses one. Put that card into your hand and the rest into your graveyard. Then shuffle your library.
SVar:DBChangeZone1:DB$ ChangeZone | Origin$ Library | Destination$ Hand | ChangeType$ Card.IsRemembered | Chooser$ Opponent | ChangeNum$ 1 | Mandatory$ True | NoLooking$ True | SelectPrompt$ Select a card for the hand | Shuffle$ False | SubAbility$ DBChangeZone2 | StackDescription$ None
SVar:DBChangeZone2:DB$ ChangeZoneAll | Origin$ Library | Destination$ Graveyard | ChangeType$ Card.IsRemembered | Shuffle$ True | StackDescription$ None | SubAbility$ DBCleanup
A:SP$ ChangeZone | Cost$ 2 U | Origin$ Library | Destination$ Library | ChangeType$ Card | ChangeNum$ 3 | Mandatory$ True | RememberChanged$ True | Reveal$ True | Shuffle$ False | AILogic$ Intuition | SubAbility$ DBChoose | StackDescription$ {p:You} searches their library for three cards and reveals them. | SpellDescription$ Search your library for three cards and reveal them. Target opponent chooses one. Put that card into your hand and the rest into your graveyard. Then shuffle your library.
SVar:DBChoose:DB$ ChooseCard | ValidTgts$ Opponent | TgtPrompt$ Select target opponent | Choices$ Card.IsRemembered | ChoiceZone$ Library | ChoiceTitle$ Choose a card for the hand | Mandatory$ True | Amount$ 1 | SubAbility$ DBChangeZone1 | StackDescription$ {p:Targeted} chooses one.
SVar:DBChangeZone1:DB$ ChangeZone | Origin$ Library | Destination$ Hand | Defined$ ChosenCard | Shuffle$ False | SubAbility$ DBChangeZone2 | StackDescription$ {p:You} puts that card into their hand
SVar:DBChangeZone2:DB$ ChangeZoneAll | Origin$ Library | Destination$ Graveyard | ChangeType$ Card.IsRemembered | Shuffle$ True | StackDescription$ and the rest into their graveyard. Then {p:You} shuffles their library. | SubAbility$ DBCleanup
SVar:DBCleanup:DB$ Cleanup | ClearRemembered$ True
SVar:Picture:http://www.wizards.com/global/images/magic/general/intuition.jpg
Oracle:Search your library for three cards and reveal them. Target opponent chooses one. Put that card into your hand and the rest into your graveyard. Then shuffle your library.

View File

@@ -5,7 +5,7 @@ Loyalty:0
K:etbCounter:LOYALTY:Y:no Condition:CARDNAME enters the battlefield with a loyalty counter on her for each time youve cast a commander from the command zone this game.
SVar:Y:Count$TotalCommanderCastFromCommandZone
A:AB$ Effect | Cost$ AddCounter<0/LOYALTY> | Planeswalker$ True | Duration$ UntilYourNextTurn | ValidTgts$ Creature | TgtPrompt$ Choose target creature | AILogic$ Pump | RememberObjects$ Targeted | ReplacementEffects$ TripleCombatDamage | SpellDescription$ Choose target creature. Until your next turn, if that creature would deal combat damage to one of your opponents, it deals triple that damage to that player instead.
SVar:TripleCombatDamage:Event$ DamageDone | ValidSource$ Creature.IsRemembered | CombatDamage$ True | ValidTarget$ Player.Opponent | ReplaceWith$ DmgTriple | Description$ Choose target creature. Until your next turn, if that creature would deal combat damage to one of your opponents, it deals triple that damage to that player instead.
SVar:TripleCombatDamage:Event$ DamageDone | ValidSource$ Creature.IsRemembered | IsCombat$ True | ValidTarget$ Player.Opponent | ReplaceWith$ DmgTriple | Description$ Choose target creature. Until your next turn, if that creature would deal combat damage to one of your opponents, it deals triple that damage to that player instead.
SVar:DmgTriple:DB$ ReplaceEffect | VarName$ DamageAmount | VarValue$ Z
SVar:Z:ReplaceCount$DamageAmount/Thrice
A:AB$ DealDamage | Cost$ SubCounter<X/LOYALTY> | Planeswalker$ True | Ultimate$ True | ValidTgts$ Creature,Player,Planeswalker | TgtPrompt$ Choose up to three targets | TargetMin$ 0 | TargetMax$ 3 | NumDmg$ X | SpellDescription$ CARDNAME deals X damage to each of up to three targets.

View File

@@ -1,12 +1,11 @@
Name:Signal the Clans
ManaCost:R G
Types:Instant
A:SP$ ChangeZone | Cost$ R G | Origin$ Library | Destination$ Library | ChangeType$ Creature | ChangeNum$ 3 | RememberChanged$ True | Reveal$ True | Shuffle$ False | StackDescription$ SpellDescription | SubAbility$ DBChoose | SpellDescription$ Search your library for three creature cards and reveal them. If you reveal three cards with different names, choose one of them at random and put that card into your hand. Shuffle the rest into your library.
A:SP$ ChangeZone | Cost$ R G | Origin$ Library | Destination$ Library | ChangeType$ Creature | ChangeNum$ 3 | Mandatory$ True | RememberChanged$ True | Reveal$ True | Shuffle$ False | StackDescription$ SpellDescription | SubAbility$ DBChoose | SpellDescription$ Search your library for three creature cards and reveal them. If you reveal three cards with different names, choose one of them at random and put that card into your hand. Shuffle the rest into your library.
SVar:DBChoose:DB$ ChooseCard | Defined$ You | Amount$ 1 | AtRandom$ True | Choices$ Card.IsRemembered | ChoiceZone$ Library | SubAbility$ DBChange | StackDescription$ None | ConditionCheckSVar$ X | ConditionSVarCompare$ EQ3
SVar:DBChange:DB$ ChangeZone | Origin$ Library | Destination$ Hand | Defined$ ChosenCard | StackDescription$ None | SubAbility$ DBShuffle | ConditionCheckSVar$ X | ConditionSVarCompare$ EQ3
SVar:DBShuffle:DB$ Shuffle | Defined$ You | SubAbility$ DBCleanup
SVar:DBCleanup:DB$ Cleanup | ClearRemembered$ True
SVar:X:Count$DifferentCardNames_Creature.IsRemembered
AI:RemoveDeck:All
SVar:Picture:http://www.wizards.com/global/images/magic/general/signal_the_clans.jpg
Oracle:Search your library for three creature cards and reveal them. If you reveal three cards with different names, choose one of them at random and put that card into your hand. Shuffle the rest into your library.

View File

@@ -1,8 +1,8 @@
Name:Containment Breach
ManaCost:2 G
Types:Sorcery Lesson
A:SP$ Destroy | Cost$ 2 G | ValidTgts$ Artifact | SubAbility$ TrigToken | SpellDescription$ Destroy target artifact. If its mana value is 2 or less, create a 1/1 black and green Pest creature token with “When this creature dies, you gain 1 life.”
SVar:TrigToken:DB$Token | TokenScript$ bg_1_1_pest_lifegain | TokenOwner$ You | ConditionCheckSVar$ X | ConditionSVarCompare$ LE2
A:SP$ Destroy | Cost$ 2 G | ValidTgts$ Artifact,Enchantment | TgtPrompt$ Select target artifact or enchantment | SubAbility$ TrigToken | SpellDescription$ Destroy target artifact or enchantment. If its mana value is 2 or less, create a 1/1 black and green Pest creature token with “When this creature dies, you gain 1 life.”
SVar:TrigToken:DB$ Token | TokenScript$ bg_1_1_pest_lifegain | ConditionCheckSVar$ X | ConditionSVarCompare$ LE2
SVar:X:Targeted$CardManaCost
DeckHas:Ability$Token
DeckHas:Ability$Token & Ability$LifeGain
Oracle:Destroy target artifact or enchantment. If its mana value is 2 or less, create a 1/1 black and green Pest creature token with "When this creature dies, you gain 1 life."

View File

@@ -2,7 +2,7 @@ Name:Witherbloom Command
ManaCost:B G
Types:Sorcery
A:SP$ Charm | Cost$ B G | CharmNum$ 2 | Choices$ DBMill,DBDestroy,DBPump,DBLoseLife
SVar:DBMill:DB$ Mill | NumCards$ 2 | ValidTgts$ Player | TgtPrompt$ Select target player | SubAbility$ DBReturn | SpellDescription$ Target player mills three cards, then you return a land card from your graveyard to your hand.
SVar:DBMill:DB$ Mill | NumCards$ 3 | ValidTgts$ Player | TgtPrompt$ Select target player | SubAbility$ DBReturn | SpellDescription$ Target player mills three cards, then you return a land card from your graveyard to your hand.
SVar:DBReturn:DB$ ChangeZone | Origin$ Graveyard | Destination$ Hand | Hidden$ True | Mandatory$ True | ChangeType$ Land.YouOwn
SVar:DBDestroy:DB$ Destroy | ValidTgts$ Permanent.nonCreature+nonLand+cmcLE2 | TgtPrompt$ Select target noncreature, nonland permanent with mana value 2 or less | SpellDescription$ Destroy target noncreature, nonland permanent with mana value 2 or less.
SVar:DBPump:DB$ Pump | ValidTgts$ Creature | TgtPrompt$ Select target creature | NumAtt$ -3 | NumDef$ -1 | SpellDescription$ Target creature gets -3/-1 until end of turn.