Sarevok's Tome (CLB) and related tweaks (#1205)

* sarevoks_tome.txt

* DigUntilEffect.getStackDescription use exile verb when appropriate, better untilAmount parse

* DigUntilEffect.getStackDescription support "NoPutDesc"

* somewhat related old card tweaks

* DigUntilEffect.getStackDescription missing ')'

* sarevoks_tome.txt add DefinedDesc
This commit is contained in:
Northmoc
2022-07-27 02:47:00 -04:00
committed by GitHub
parent 2312dc27b8
commit ecbc4ffdc8
6 changed files with 43 additions and 25 deletions

View File

@@ -17,6 +17,7 @@ import forge.game.player.Player;
import forge.game.spellability.SpellAbility; import forge.game.spellability.SpellAbility;
import forge.game.zone.PlayerZone; import forge.game.zone.PlayerZone;
import forge.game.zone.ZoneType; import forge.game.zone.ZoneType;
import forge.util.Lang;
import forge.util.Localizer; import forge.util.Localizer;
import forge.util.MyRandom; import forge.util.MyRandom;
@@ -40,8 +41,10 @@ public class DigUntilEffect extends SpellAbilityEffect {
sb.append(pl).append(" "); sb.append(pl).append(" ");
} }
sb.append("reveals cards from their library until revealing "); final ZoneType revealed = ZoneType.smartValueOf(sa.getParam("RevealedDestination"));
sb.append(untilAmount).append(" ").append(desc).append(" card"); sb.append(revealed.equals(ZoneType.Exile) ? "exiles cards from their library until they exile " :
"reveals cards from their library until revealing ");
sb.append(Lang.nounWithNumeralExceptOne(untilAmount, desc + " card"));
if (untilAmount != 1) { if (untilAmount != 1) {
sb.append("s"); sb.append("s");
} }
@@ -49,27 +52,30 @@ public class DigUntilEffect extends SpellAbilityEffect {
untilAmount = AbilityUtils.calculateAmount(sa.getHostCard(), sa.getParam("MaxRevealed"), sa); untilAmount = AbilityUtils.calculateAmount(sa.getHostCard(), sa.getParam("MaxRevealed"), sa);
sb.append(" or ").append(untilAmount).append(" card/s"); sb.append(" or ").append(untilAmount).append(" card/s");
} }
sb.append(". Put "); sb.append(".");
final ZoneType found = ZoneType.smartValueOf(sa.getParam("FoundDestination")); if (!sa.hasParam("NoPutDesc")) {
final ZoneType revealed = ZoneType.smartValueOf(sa.getParam("RevealedDestination")); sb.append(" Put ");
if (found != null) {
sb.append(untilAmount > 1 ? "those cards" : "that card");
sb.append(" ");
if (found.equals(ZoneType.Hand)) { final ZoneType found = ZoneType.smartValueOf(sa.getParam("FoundDestination"));
sb.append("into their hand "); if (found != null) {
} sb.append(untilAmount > 1 ? "those cards" : "that card");
sb.append(" ");
if (revealed.equals(ZoneType.Graveyard)) { if (found.equals(ZoneType.Hand)) {
sb.append("and all other cards into their graveyard."); sb.append("into their hand ");
} }
if (revealed.equals(ZoneType.Exile)) {
sb.append("and exile all other cards revealed this way."); if (revealed.equals(ZoneType.Graveyard)) {
} sb.append("and all other cards into their graveyard.");
} else if (revealed != null) { }
if (revealed.equals(ZoneType.Hand)) { if (revealed.equals(ZoneType.Exile)) {
sb.append("all cards revealed this way into their hand"); sb.append("and exile all other cards revealed this way.");
}
} else if (revealed != null) {
if (revealed.equals(ZoneType.Hand)) {
sb.append("all cards revealed this way into their hand");
}
} }
} }
return sb.toString(); return sb.toString();

View File

@@ -5,8 +5,8 @@ PT:6/6
K:Flying K:Flying
K:Trample K:Trample
T:Mode$ ChangesZone | Origin$ Any | Destination$ Battlefield | ValidCard$ Card.Self | Execute$ TrigRepeat | TriggerDescription$ When CARDNAME enters the battlefield, exile cards from the top of your library until you exile a nonland card, then put that card into your hand. If the card's mana value is 4 or greater, repeat this process. CARDNAME deals 1 damage to you for each card put into your hand this way. T:Mode$ ChangesZone | Origin$ Any | Destination$ Battlefield | ValidCard$ Card.Self | Execute$ TrigRepeat | TriggerDescription$ When CARDNAME enters the battlefield, exile cards from the top of your library until you exile a nonland card, then put that card into your hand. If the card's mana value is 4 or greater, repeat this process. CARDNAME deals 1 damage to you for each card put into your hand this way.
SVar:TrigRepeat:DB$ Repeat | RepeatSubAbility$ DBCleanup | RepeatDefined$ Remembered | RepeatPresent$ Card.cmcGE4 | RepeatCompare$ EQ1 | StackDescription$ Exile cards from the top of your library until you exile a nonland card, then put that card into your hand. If the card's mana value is 4 or greater, repeat this process. CARDNAME deals 1 damage to you for each card put into your hand this way. SVar:TrigRepeat:DB$ Repeat | RepeatSubAbility$ DBCleanup | RepeatDefined$ Remembered | RepeatPresent$ Card.cmcGE4 | RepeatCompare$ EQ1
SVar:DBCleanup:DB$ Cleanup | ClearRemembered$ True | SubAbility$ DBDigUntil SVar:DBCleanup:DB$ Cleanup | ClearRemembered$ True | SubAbility$ DBDigUntil
SVar:DBDigUntil:DB$ DigUntil | ValidPlayer$ You | Valid$ Card.nonLand | ValidDescription$ nonland | FoundDestination$ Hand | RevealedDestination$ Exile | RememberFound$ True | SubAbility$ DBDealDamage SVar:DBDigUntil:DB$ DigUntil | Valid$ Card.nonLand | ValidDescription$ nonland | FoundDestination$ Hand | RevealedDestination$ Exile | RememberFound$ True | SubAbility$ DBDealDamage
SVar:DBDealDamage:DB$ DealDamage | NumDmg$ 1 | Defined$ You SVar:DBDealDamage:DB$ DealDamage | NumDmg$ 1 | Defined$ You
Oracle:Flying, trample\nWhen Demonlord Belzenlok enters the battlefield, exile cards from the top of your library until you exile a nonland card, then put that card into your hand. If the card's mana value is 4 or greater, repeat this process. Demonlord Belzenlok deals 1 damage to you for each card put into your hand this way. Oracle:Flying, trample\nWhen Demonlord Belzenlok enters the battlefield, exile cards from the top of your library until you exile a nonland card, then put that card into your hand. If the card's mana value is 4 or greater, repeat this process. Demonlord Belzenlok deals 1 damage to you for each card put into your hand this way.

View File

@@ -4,7 +4,7 @@ Types:Creature Eldrazi
PT:3/1 PT:3/1
K:Devoid K:Devoid
T:Mode$ SpellCast | ValidCard$ Card.Self | Execute$ TrigChange | TriggerDescription$ When you cast this spell, you may pay {1}{C}. If you do, gain control of target creature until end of turn, untap that creature, and it gains haste until end of turn. ({C} represents colorless mana.) T:Mode$ SpellCast | ValidCard$ Card.Self | Execute$ TrigChange | TriggerDescription$ When you cast this spell, you may pay {1}{C}. If you do, gain control of target creature until end of turn, untap that creature, and it gains haste until end of turn. ({C} represents colorless mana.)
SVar:TrigChange:AB$GainControl | Cost$ 1 C | TgtPrompt$ Choose target creature. | ValidTgts$ Creature | LoseControl$ EOT | Untap$ True | AddKWs$ Haste | SpellDescription$ Gain control of target creature until end of turn, untap that creature, and it gains haste until end of turn. SVar:TrigChange:AB$ GainControl | Cost$ 1 C | ValidTgts$ Creature | LoseControl$ EOT | Untap$ True | AddKWs$ Haste | SpellDescription$ Gain control of target creature until end of turn, untap that creature, and it gains haste until end of turn.
K:Haste K:Haste
DeckHints:Ability$Mana.Colorless DeckHints:Ability$Mana.Colorless
Oracle:Devoid (This card has no color.)\nWhen you cast this spell, you may pay {1}{C}. If you do, gain control of target creature until end of turn, untap that creature, and it gains haste until end of turn. ({C} represents colorless mana.)\nHaste Oracle:Devoid (This card has no color.)\nWhen you cast this spell, you may pay {1}{C}. If you do, gain control of target creature until end of turn, untap that creature, and it gains haste until end of turn. ({C} represents colorless mana.)\nHaste

View File

@@ -6,7 +6,7 @@ K:Mutate:3 RG U U
K:Flying K:Flying
K:Trample K:Trample
T:Mode$ Mutates | ValidCard$ Card.Self | Execute$ TrigDigUntil | TriggerDescription$ Whenever this creature mutates, exile cards from the top of your library until you exile a nonland permanent card. Put that card onto the battlefield or into your hand. T:Mode$ Mutates | ValidCard$ Card.Self | Execute$ TrigDigUntil | TriggerDescription$ Whenever this creature mutates, exile cards from the top of your library until you exile a nonland permanent card. Put that card onto the battlefield or into your hand.
SVar:TrigDigUntil:DB$ DigUntil | ValidPlayer$ You | Valid$ Permanent.nonLand | ValidDescription$ nonland permanent | FoundDestination$ Exile | RevealedDestination$ Exile | RememberFound$ True | SubAbility$ DBChoose SVar:TrigDigUntil:DB$ DigUntil | Valid$ Permanent.nonLand | ValidDescription$ nonland permanent | FoundDestination$ Exile | RevealedDestination$ Exile | RememberFound$ True | SubAbility$ DBChoose
SVar:DBChoose:DB$ GenericChoice | Choices$ Battlefield,Hand | Defined$ You SVar:DBChoose:DB$ GenericChoice | Choices$ Battlefield,Hand | Defined$ You
SVar:Battlefield:DB$ ChangeZone | Defined$ Remembered | Origin$ Exile | Destination$ Battlefield | SubAbility$ DBCleanup | SpellDescription$ Put the nonland permanent onto the battlefield SVar:Battlefield:DB$ ChangeZone | Defined$ Remembered | Origin$ Exile | Destination$ Battlefield | SubAbility$ DBCleanup | SpellDescription$ Put the nonland permanent onto the battlefield
SVar:Hand:DB$ ChangeZone | Defined$ Remembered | Origin$ Exile | Destination$ Hand | SubAbility$ DBCleanup | SpellDescription$ Put the nonland permanent into your hand SVar:Hand:DB$ ChangeZone | Defined$ Remembered | Origin$ Exile | Destination$ Hand | SubAbility$ DBCleanup | SpellDescription$ Put the nonland permanent into your hand

View File

@@ -2,7 +2,7 @@ Name:Undying Flames
ManaCost:4 R R ManaCost:4 R R
Types:Sorcery Types:Sorcery
K:Epic K:Epic
A:SP$ DigUntil | Cost$ 4 R R | Defined$ You | Valid$ Card.nonLand | ValidDescription$ nonland | FoundDestination$ Exile | RevealedDestination$ Exile | RememberFound$ True | SubAbility$ UndyingDamage | SpellDescription$ Exile cards from the top of your library until you exile a nonland card. Undying Flames deals damage to any target equal to that card's mana value. A:SP$ DigUntil | Valid$ Card.nonLand | ValidDescription$ nonland | FoundDestination$ Exile | RevealedDestination$ Exile | RememberFound$ True | SubAbility$ UndyingDamage | NoPutDesc$ True | SpellDescription$ Exile cards from the top of your library until you exile a nonland card. Undying Flames deals damage to any target equal to that card's mana value.
SVar:UndyingDamage:DB$ DealDamage | ValidTgts$ Creature,Player,Planeswalker | TgtPrompt$ Select any target | NumDmg$ FlameX | SubAbility$ DBCleanup SVar:UndyingDamage:DB$ DealDamage | ValidTgts$ Creature,Player,Planeswalker | TgtPrompt$ Select any target | NumDmg$ FlameX | SubAbility$ DBCleanup
SVar:DBCleanup:DB$ Cleanup | ClearRemembered$ True SVar:DBCleanup:DB$ Cleanup | ClearRemembered$ True
SVar:FlameX:Remembered$CardManaCost SVar:FlameX:Remembered$CardManaCost

View File

@@ -0,0 +1,12 @@
Name:Sarevok's Tome
ManaCost:4
Types:Artifact
T:Mode$ ChangesZone | Origin$ Any | Destination$ Battlefield | ValidCard$ Card.Self | Execute$ TrigInitiative | TriggerDescription$ When CARDNAME enters the battlefield, you take the initiative.
SVar:TrigInitiative:DB$ TakeInitiative
A:AB$ Mana | Cost$ T | Produced$ C | Amount$ X | SpellDescription$ Add {C}. If you have the initiative, add {C}{C} instead.
SVar:X:Count$Initiative.2.1
A:AB$ DigUntil | Cost$ 3 T | Valid$ Card.nonLand | ValidDescription$ nonland | FoundDestination$ Exile | RevealedDestination$ Exile | RememberFound$ True | SubAbility$ DBPlay | CheckSVar$ Y | NoPutDesc$ True | SpellDescription$ Exile cards from the top of your library until you exile a nonland card. You may cast that card without paying its mana cost. Activate only if you've completed a dungeon.
SVar:DBPlay:DB$ Play | Defined$ Remembered | DefinedDesc$ that card | ValidSA$ Spell | WithoutManaCost$ True | Optional$ True | SubAbility$ DBCleanup
SVar:DBCleanup:DB$ Cleanup | ClearRemembered$ True
SVar:Y:PlayerCountPropertyYou$DungeonsCompleted
Oracle:When Sarevok's Tome enters the battlefield, you take the initiative.\n{T}: Add {C}. If you have the initiative, add {C}{C} instead.\n{3}, {T}: Exile cards from the top of your library until you exile a nonland card. You may cast that card without paying its mana cost. Activate only if you've completed a dungeon.