Freerunning as calculateAmount (#5511)

* Freerunning as calculateAmount

* Fix desc

---------

Co-authored-by: TRT <>
This commit is contained in:
Hans Mackowiak
2024-07-05 06:16:17 +02:00
committed by GitHub
parent 608beb0aac
commit 01cc878b4d
4 changed files with 30 additions and 1 deletions

View File

@@ -1665,6 +1665,10 @@ public class AbilityUtils {
return doXMath(calculateAmount(c, sq[sa.isBargained() ? 1 : 2], ctb), expr, c, ctb);
}
if (sq[0].startsWith("Freerunning")) {
return doXMath(calculateAmount(c, sq[sa.isFreerunning() ? 1 : 2], ctb), expr, c, ctb);
}
// Count$Madness.<True>.<False>
if (sq[0].startsWith("Madness")) {
return doXMath(calculateAmount(c, sq[sa.isMadness() ? 1 : 2], ctb), expr, c, ctb);

View File

@@ -3127,7 +3127,14 @@ public class CardFactoryUtil {
newSA.putParam("Secondary", "True");
}
newSA.putParam("PrecostDesc", "Freerunning");
newSA.putParam("CostDesc", ManaCostParser.parse(k[1]));
StringBuilder costDesc = new StringBuilder();
if (!freerunningCost.isOnlyManaCost()) {
costDesc.append("");
} else {
costDesc.append(" ");
}
costDesc.append(freerunningCost.toSimpleString());
newSA.putParam("CostDesc", costDesc.toString());
// makes new SpellDescription
final StringBuilder sb = new StringBuilder();

View File

@@ -0,0 +1,7 @@
Name:Escape Detection
ManaCost:1 U U
Types:Instant
K:Freerunning:Return<1/Creature.Blue/blue creature>
A:SP$ ChangeZone | ValidTgts$ Creature | TgtPrompt$ Select target creature | Origin$ Battlefield | Destination$ Hand | SubAbility$ DBDraw | SpellDescription$ Return target creature to its owner's hand. Draw a card.
SVar:DBDraw:DB$ Draw | Defined$ You | NumCards$ 1
Oracle:Freerunning—Return a blue creature you control to its owners hand. (You may cast this spell for its freerunning cost if you dealt combat damage to a player this turn with an Assassin or commander.)\nReturn target creature to its owner's hand.\nDraw a card.

View File

@@ -0,0 +1,11 @@
Name:Monastery Raid
ManaCost:2 R
Types:Sorcery
K:Freerunning:X R
A:SP$ Dig | Defined$ You | DigNum$ Y | ChangeNum$ All | DestinationZone$ Exile | RememberChanged$ True | SubAbility$ DBMayPlay | SpellDescription$ Exile the top two cards of your library. If this spells freerunning cost was paid, exile the top X cards of your library instead. You may play the exiled cards until the end of your next turn.
SVar:DBMayPlay:DB$ Effect | StaticAbilities$ STCommuned | Duration$ UntilTheEndOfYourNextTurn | RememberObjects$ Remembered | ForgetOnMoved$ Exile | SubAbility$ DBCleanup
SVar:DBCleanup:DB$ Cleanup | ClearRemembered$ True
SVar:STCommuned:Mode$ Continuous | Affected$ Card.IsRemembered | EffectZone$ Command | AffectedZone$ Exile | MayPlay$ True | Description$ You may play the exiled cards until the end of your next turn.
SVar:Y:Count$Freerunning.X.2
SVar:X:Count$xPaid
Oracle:Freerunning {X}{R} (You may cast this spell for its freerunning cost if you dealt combat damage to a player this turn with an Assassin or commander.)\nExile the top two cards of your library. If this spells freerunning cost was paid, exile the top X cards of your library instead. You may play the exiled cards until the end of your next turn.