another go

This commit is contained in:
Northmoc
2022-11-04 12:05:41 -04:00
parent 62836d6696
commit ae87f836b4
13 changed files with 42 additions and 32 deletions

View File

@@ -7,6 +7,7 @@ import forge.game.ability.SpellAbilityEffect;
import forge.game.player.Player; import forge.game.player.Player;
import forge.game.spellability.SpellAbility; import forge.game.spellability.SpellAbility;
import forge.util.Lang; import forge.util.Lang;
import org.apache.commons.lang3.StringUtils;
public class LifeGainEffect extends SpellAbilityEffect { public class LifeGainEffect extends SpellAbilityEffect {
@@ -20,8 +21,11 @@ public class LifeGainEffect extends SpellAbilityEffect {
sb.append(Lang.joinHomogenous(getDefinedPlayersOrTargeted(sa))); sb.append(Lang.joinHomogenous(getDefinedPlayersOrTargeted(sa)));
sb.append(getDefinedPlayersOrTargeted(sa).size() > 1 ? " gain " : " gains "); sb.append(getDefinedPlayersOrTargeted(sa).size() > 1 ? " gain " : " gains ");
if (sa.hasParam("XDesc")) { if (!StringUtils.isNumeric(amountStr) && sa.hasParam("SpellDescription") &&
sb.append("life equal to ").append(sa.getParam("XDesc")).append("."); sa.getParam("SpellDescription").contains("life equal to")) {
String xDesc = sa.getParam("SpellDescription");
xDesc = xDesc.substring(xDesc.indexOf("life equal to"));
sb.append(xDesc);
} else if (!amountStr.equals("AFLifeLost") || sa.hasSVar(amountStr)) { } else if (!amountStr.equals("AFLifeLost") || sa.hasSVar(amountStr)) {
final int amount = AbilityUtils.calculateAmount(sa.getHostCard(), amountStr, sa); final int amount = AbilityUtils.calculateAmount(sa.getHostCard(), amountStr, sa);

View File

@@ -3,9 +3,10 @@ ManaCost:4 G W
Types:Legendary Planeswalker Ajani Types:Legendary Planeswalker Ajani
Loyalty:4 Loyalty:4
A:AB$ Dig | Cost$ AddCounter<2/LOYALTY> | Planeswalker$ True | DigNum$ 3 | Reveal$ True | ChangeNum$ All | ChangeValid$ Permanent.nonLand | SpellDescription$ Reveal the top three cards of your library. Put all nonland permanent cards revealed this way into your hand and the rest on the bottom of your library in any order. A:AB$ Dig | Cost$ AddCounter<2/LOYALTY> | Planeswalker$ True | DigNum$ 3 | Reveal$ True | ChangeNum$ All | ChangeValid$ Permanent.nonLand | SpellDescription$ Reveal the top three cards of your library. Put all nonland permanent cards revealed this way into your hand and the rest on the bottom of your library in any order.
A:AB$ ChangeZone | Cost$ SubCounter<2/LOYALTY> | Planeswalker$ True | ValidTgts$ Creature | TgtPrompt$ Select target creature | Origin$ Battlefield | Destination$ Exile | SubAbility$ DBGainLife | SpellDescription$ Exile target creature. A:AB$ ChangeZone | Cost$ SubCounter<2/LOYALTY> | Planeswalker$ True | ValidTgts$ Creature | RememberLKI$ True | Origin$ Battlefield | Destination$ Exile | SubAbility$ DBGainLife | SpellDescription$ Exile target creature.
SVar:DBGainLife:DB$ GainLife | Defined$ TargetedController | LifeAmount$ X | XDesc$ its power | SpellDescription$ Its controller gains life equal to its power. SVar:DBGainLife:DB$ GainLife | Defined$ RememberedController | LifeAmount$ X | SubAbility$ DBCleanup | SpellDescription$ Its controller gains life equal to its power.
SVar:X:TargetedLKI$CardPower SVar:DBCleanup:DB$ Cleanup | ClearRemembered$ True
SVar:X:RememberedLKI$CardPower
A:AB$ PutCounterAll | Cost$ SubCounter<9/LOYALTY> | ValidCards$ Creature.YouCtrl | CounterType$ P1P1 | CounterNum$ 5 | Planeswalker$ True | Ultimate$ True | ValidCards2$ Planeswalker.YouCtrl+Other | CounterType2$ LOYALTY | AILogic$ OwnCreatsAndOtherPWs | SpellDescription$ Put five +1/+1 counters on each creature you control and five loyalty counters on each other planeswalker you control. A:AB$ PutCounterAll | Cost$ SubCounter<9/LOYALTY> | ValidCards$ Creature.YouCtrl | CounterType$ P1P1 | CounterNum$ 5 | Planeswalker$ True | Ultimate$ True | ValidCards2$ Planeswalker.YouCtrl+Other | CounterType2$ LOYALTY | AILogic$ OwnCreatsAndOtherPWs | SpellDescription$ Put five +1/+1 counters on each creature you control and five loyalty counters on each other planeswalker you control.
DeckHas:Ability$Counters DeckHas:Ability$Counters
DeckHints:Type$Planeswalker DeckHints:Type$Planeswalker

View File

@@ -2,10 +2,10 @@ Name:Avenger en-Dal
ManaCost:1 W ManaCost:1 W
Types:Creature Human Spellshaper Types:Creature Human Spellshaper
PT:1/1 PT:1/1
A:AB$ ChangeZone | Cost$ 2 W T Discard<1/Card> | ValidTgts$ Creature.attacking | TgtPrompt$ Select target attacking creature | RememberLKI$ True | Origin$ Battlefield | Destination$ Exile | SpellDescription$ Exile target attacking creature. Its controller gains life equal to its toughness. | SubAbility$ DBGainLife A:AB$ ChangeZone | Cost$ 2 W T Discard<1/Card> | ValidTgts$ Creature.attacking | TgtPrompt$ Select target attacking creature | RememberLKI$ True | Origin$ Battlefield | Destination$ Exile | SubAbility$ DBGainLife | SpellDescription$ Exile target attacking creature.
SVar:DBGainLife:DB$ GainLife | Defined$ RememberedController | LifeAmount$ X | SubAbility$ DBCleanup SVar:DBGainLife:DB$ GainLife | Defined$ RememberedController | LifeAmount$ X | SubAbility$ DBCleanup | SpellDescription$ Its controller gains life equal to its toughness.
SVar:DBCleanup:DB$ Cleanup | ClearRemembered$ True SVar:DBCleanup:DB$ Cleanup | ClearRemembered$ True
SVar:X:TargetedLKI$CardToughness SVar:X:RememberedLKI$CardToughness
SVar:AIPreference:DiscardCost$Card SVar:AIPreference:DiscardCost$Card
AI:RemoveDeck:Random AI:RemoveDeck:Random
DeckHas:Ability$Discard DeckHas:Ability$Discard

View File

@@ -1,7 +1,8 @@
Name:Condemn Name:Condemn
ManaCost:W ManaCost:W
Types:Instant Types:Instant
A:SP$ ChangeZone | ValidTgts$ Creature.attacking | TgtPrompt$ Select target attacking creature | Origin$ Battlefield | Destination$ Library | LibraryPosition$ -1 | SubAbility$ DBGainLife | SpellDescription$ Put target attacking creature on the bottom of its owner's library. A:SP$ ChangeZone | ValidTgts$ Creature.attacking | TgtPrompt$ Select target attacking creature | RememberLKI$ True | Origin$ Battlefield | Destination$ Library | LibraryPosition$ -1 | SubAbility$ DBGainLife | SpellDescription$ Put target attacking creature on the bottom of its owner's library.
SVar:DBGainLife:DB$ GainLife | Defined$ RememberedController | LifeAmount$ X | XDesc$ its toughness | SpellDescription$ Its controller gains life equal to its toughness. SVar:DBGainLife:DB$ GainLife | Defined$ RememberedController | LifeAmount$ X | SubAbility$ DBCleanup | SpellDescription$ Its controller gains life equal to its toughness.
SVar:X:TargetedLKI$CardToughness SVar:DBCleanup:DB$ Cleanup | ClearRemembered$ True
SVar:X:RememberedLKI$CardToughness
Oracle:Put target attacking creature on the bottom of its owner's library. Its controller gains life equal to its toughness. Oracle:Put target attacking creature on the bottom of its owner's library. Its controller gains life equal to its toughness.

View File

@@ -1,8 +1,9 @@
Name:Crumble Name:Crumble
ManaCost:G ManaCost:G
Types:Instant Types:Instant
A:SP$ Destroy | ValidTgts$ Artifact | NoRegen$ True | SubAbility$ DBGainLife | SpellDescription$ Destroy target artifact. It can't be regenerated. A:SP$ Destroy | ValidTgts$ Artifact | NoRegen$ True | SubAbility$ DBGainLife | RememberLKI$ True | SpellDescription$ Destroy target artifact. It can't be regenerated.
SVar:DBGainLife:DB$ GainLife | Defined$ TargetedController | LifeAmount$ X | XDesc$ its mana value | SpellDescription$ That artifact's controller gains life equal to its mana value. SVar:DBGainLife:DB$ GainLife | Defined$ RememberedController | LifeAmount$ X | SubAbility$ DBCleanup | SpellDescription$ That artifact's controller gains life equal to its mana value.
SVar:X:Targeted$CardManaCost SVar:DBCleanup:DB$ Cleanup | ClearRemembered$ True
SVar:X:RememberedLKI$CardManaCost
AI:RemoveDeck:Random AI:RemoveDeck:Random
Oracle:Destroy target artifact. It can't be regenerated. That artifact's controller gains life equal to its mana value. Oracle:Destroy target artifact. It can't be regenerated. That artifact's controller gains life equal to its mana value.

View File

@@ -1,8 +1,8 @@
Name:Devour Flesh Name:Devour Flesh
ManaCost:1 B ManaCost:1 B
Types:Instant Types:Instant
A:SP$ Sacrifice | ValidTgts$ Player | SacValid$ Creature | SacMessage$ creature | RememberSacrificed$ True | SubAbility$ DBGainLife | StackDescription$ SpellDescription | SpellDescription$ Target player sacrifices a creature, then gains life equal to that creature's toughness. A:SP$ Sacrifice | ValidTgts$ Player | SacValid$ Creature | SacMessage$ creature | RememberSacrificed$ True | SubAbility$ DBGainLife | SpellDescription$ Target player sacrifices a creature,
SVar:DBGainLife:DB$ GainLife | Defined$ Targeted | LifeAmount$ X | SubAbility$ DBCleanup | StackDescription$ None SVar:DBGainLife:DB$ GainLife | Defined$ Targeted | LifeAmount$ X | SubAbility$ DBCleanup | SpellDescription$ then gains life equal to that creature's toughness.
SVar:DBCleanup:DB$ Cleanup | ClearRemembered$ True SVar:DBCleanup:DB$ Cleanup | ClearRemembered$ True
SVar:X:RememberedLKI$CardToughness SVar:X:RememberedLKI$CardToughness
Oracle:Target player sacrifices a creature, then gains life equal to that creature's toughness. Oracle:Target player sacrifices a creature, then gains life equal to that creature's toughness.

View File

@@ -1,7 +1,7 @@
Name:Dismantle Name:Dismantle
ManaCost:2 R ManaCost:2 R
Types:Sorcery Types:Sorcery
A:SP$ Destroy | Cost$ 2 R | ValidTgts$ Artifact | TgtPrompt$ Select target artifact | SubAbility$ DBPutCounter | SpellDescription$ Destroy target artifact. If that artifact had counters on it, put that many +1/+1 counters or charge counters on an artifact you control. A:SP$ Destroy | ValidTgts$ Artifact | SubAbility$ DBPutCounter | RememberLKI$ True | SpellDescription$ Destroy target artifact.
SVar:DBPutCounter:DB$ PutCounter | Choices$ Artifact.YouCtrl | CounterType$ P1P1,CHARGE | CounterNum$ X | CounterTypePerDefined$ True | ConditionDefined$ Targeted | ConditionPresent$ Card.HasCounters | ConditionCompare$ GE1 | StackDescription$ put that many +1/+1 counters or charge counters on an artifact you control. SVar:DBPutCounter:DB$ PutCounter | Choices$ Artifact.YouCtrl | CounterType$ P1P1,CHARGE | CounterNum$ X | CounterTypePerDefined$ True | ConditionDefined$ RememberedLKI | ConditionPresent$ Card.HasCounters | SpellDescription$ If that artifact had counters on it, put that many +1/+1 counters or charge counters on an artifact you control.
SVar:X:TargetedLKI$CardCounters.ALL SVar:X:RememberedLKI$CardCounters.ALL
Oracle:Destroy target artifact. If that artifact had counters on it, put that many +1/+1 counters or charge counters on an artifact you control. Oracle:Destroy target artifact. If that artifact had counters on it, put that many +1/+1 counters or charge counters on an artifact you control.

View File

@@ -1,7 +1,9 @@
Name:Gloomwidow's Feast Name:Gloomwidow's Feast
ManaCost:3 G ManaCost:3 G
Types:Instant Types:Instant
A:SP$ Destroy | Cost$ 3 G | ValidTgts$ Creature.withFlying | TgtPrompt$ Select target creature with flying | RememberLKI$ True | SubAbility$ DBToken | SpellDescription$ Destroy target creature with flying. If that creature was blue or black, create a 1/2 green Spider creature token with reach. A:SP$ Destroy | ValidTgts$ Creature.withFlying | TgtPrompt$ Select target creature with flying | RememberLKI$ True | SubAbility$ DBToken | SpellDescription$ Destroy target creature with flying.
SVar:DBToken:DB$ Token | ConditionDefined$ RememberedLKI | ConditionPresent$ Card.Blue,Card.Black | ConditionCompare$ EQ1 | TokenAmount$ 1 | TokenScript$ g_1_2_spider_reach | TokenOwner$ You | ConditionDescription$ If that creature was blue or black, put a 1/2 green Spider creature token with reach onto the battlefield. | SubAbility$ DBCleanup SVar:DBToken:DB$ Token | ConditionDefined$ RememberedLKI | ConditionPresent$ Card.Blue,Card.Black | TokenScript$ g_1_2_spider_reach | SubAbility$ DBCleanup | SpellDescription$ If that creature was blue or black, create a 1/2 green Spider creature token with reach. (It can block creatures with flying.)
SVar:DBCleanup:DB$ Cleanup | ClearRemembered$ True SVar:DBCleanup:DB$ Cleanup | ClearRemembered$ True
AI:RemoveDeck:Random
DeckHas:Ability$Token & Type$Spider
Oracle:Destroy target creature with flying. If that creature was blue or black, create a 1/2 green Spider creature token with reach. (It can block creatures with flying.) Oracle:Destroy target creature with flying. If that creature was blue or black, create a 1/2 green Spider creature token with reach. (It can block creatures with flying.)

View File

@@ -2,6 +2,6 @@ Name:Illumination
ManaCost:W W ManaCost:W W
Types:Instant Types:Instant
A:SP$ Counter | TargetType$ Spell | TgtPrompt$ Select target artifact or enchantment spell | ValidTgts$ Artifact,Enchantment | SubAbility$ DBGainLife | SpellDescription$ Counter target artifact or enchantment spell. A:SP$ Counter | TargetType$ Spell | TgtPrompt$ Select target artifact or enchantment spell | ValidTgts$ Artifact,Enchantment | SubAbility$ DBGainLife | SpellDescription$ Counter target artifact or enchantment spell.
SVar:DBGainLife:DB$ GainLife | Defined$ TargetedController | LifeAmount$ X | XDesc$ its mana value | SpellDescription$ Its controller gains life equal to its mana value. SVar:DBGainLife:DB$ GainLife | Defined$ TargetedController | LifeAmount$ X | SpellDescription$ Its controller gains life equal to its mana value.
SVar:X:Targeted$CardManaCost SVar:X:Targeted$CardManaCost
Oracle:Counter target artifact or enchantment spell. Its controller gains life equal to its mana value. Oracle:Counter target artifact or enchantment spell. Its controller gains life equal to its mana value.

View File

@@ -1,8 +1,8 @@
Name:Kaervek's Purge Name:Kaervek's Purge
ManaCost:X B R ManaCost:X B R
Types:Sorcery Types:Sorcery
A:SP$ Destroy | Cost$ X B R | ValidTgts$ Creature.cmcEQX | TgtPrompt$ Select target creature | RememberLKI$ True | SubAbility$ DBDamage | SpellDescription$ Destroy target creature with mana value X. If that creature dies this way, CARDNAME deals damage equal to the creature's power to the creature's controller. A:SP$ Destroy | Cost$ X B R | ValidTgts$ Creature.cmcEQX | TgtPrompt$ Select target creature with mana value X | RememberLKI$ True | SubAbility$ DBDamage | SpellDescription$ Destroy target creature with mana value X. If that creature dies this way, CARDNAME deals damage equal to the creature's power to the creature's controller.
SVar:DBDamage:DB$ DealDamage | Defined$ TargetedController | NumDmg$ Z | ConditionCheckSVar$ Y | ConditionSVarCompare$ GE1 | SubAbility$ DBCleanup SVar:DBDamage:DB$ DealDamage | Defined$ RememberedController | NumDmg$ Z | ConditionCheckSVar$ Y | ConditionSVarCompare$ GE1 | SubAbility$ DBCleanup
SVar:DBCleanup:DB$ Cleanup | ClearRemembered$ True SVar:DBCleanup:DB$ Cleanup | ClearRemembered$ True
SVar:X:Count$xPaid SVar:X:Count$xPaid
SVar:Y:Remembered$Amount SVar:Y:Remembered$Amount

View File

@@ -1,7 +1,8 @@
Name:Rite of the Serpent Name:Rite of the Serpent
ManaCost:4 B B ManaCost:4 B B
Types:Sorcery Types:Sorcery
A:SP$ Destroy | Cost$ 4 B B | ValidTgts$ Creature | TgtPrompt$ Select target creature | SubAbility$ DBToken | SpellDescription$ Destroy target creature. If that creature had a +1/+1 counter on it, create a 1/1 green Snake creature token. A:SP$ Destroy | ValidTgts$ Creature | SubAbility$ DBToken | RememberLKI$ True | SpellDescription$ Destroy target creature.
SVar:DBToken:DB$ Token | TokenAmount$ 1 | TokenScript$ g_1_1_snake | TokenOwner$ You | ConditionCheckSVar$ X | ConditionSVarCompare$ GE1 SVar:DBToken:DB$ Token | TokenScript$ g_1_1_snake | ConditionDefined$ RememberedLKI | ConditionPresent$ Creature.counters_GE1_P1P1 | SubAbility$ DBCleanup | SpellDescription$ If that creature had a +1/+1 counter on it, create a 1/1 green Snake creature token.
SVar:X:TargetedLKI$Valid Creature.counters_GE1_P1P1 SVar:DBCleanup:DB$ Cleanup | ClearRemembered$ True
DeckHas:Ability$Token & Type$Snake
Oracle:Destroy target creature. If that creature had a +1/+1 counter on it, create a 1/1 green Snake creature token. Oracle:Destroy target creature. If that creature had a +1/+1 counter on it, create a 1/1 green Snake creature token.

View File

@@ -7,7 +7,7 @@ K:Lifelink
K:Evoke:ExileFromHand<1/Card.White+Other/white card> K:Evoke:ExileFromHand<1/Card.White+Other/white card>
T:Mode$ ChangesZone | Origin$ Any | Destination$ Battlefield | ValidCard$ Card.Self | Execute$ TrigExile | TriggerDescription$ When CARDNAME enters the battlefield, exile up to one other target creature. That creature's controller gains life equal to its power. T:Mode$ ChangesZone | Origin$ Any | Destination$ Battlefield | ValidCard$ Card.Self | Execute$ TrigExile | TriggerDescription$ When CARDNAME enters the battlefield, exile up to one other target creature. That creature's controller gains life equal to its power.
SVar:TrigExile:DB$ ChangeZone | Origin$ Battlefield | Destination$ Exile | ValidTgts$ Creature.Other | RememberLKI$ True | TgtPrompt$ Select up to one other target creature | TargetMin$ 0 | TargetMax$ 1 | SubAbility$ DBGainLife SVar:TrigExile:DB$ ChangeZone | Origin$ Battlefield | Destination$ Exile | ValidTgts$ Creature.Other | RememberLKI$ True | TgtPrompt$ Select up to one other target creature | TargetMin$ 0 | TargetMax$ 1 | SubAbility$ DBGainLife
SVar:DBGainLife:DB$ GainLife | Defined$ TargetedController | LifeAmount$ X | XDesc$ its power | SpellDescription$ Its controller gains life equal to its power. SVar:DBGainLife:DB$ GainLife | Defined$ RememberedController | LifeAmount$ X
SVar:X:TargetedLKI$CardPower SVar:X:RememberedLKI$CardPower
DeckHas:Ability$LifeGain DeckHas:Ability$LifeGain
Oracle:Flash\nLifelink\nWhen Solitude enters the battlefield, exile up to one other target creature. That creature's controller gains life equal to its power.\nEvoke—Exile a white card from your hand. Oracle:Flash\nLifelink\nWhen Solitude enters the battlefield, exile up to one other target creature. That creature's controller gains life equal to its power.\nEvoke—Exile a white card from your hand.

View File

@@ -1,7 +1,7 @@
Name:Swords to Plowshares Name:Swords to Plowshares
ManaCost:W ManaCost:W
Types:Instant Types:Instant
A:SP$ ChangeZone | ValidTgts$ Creature | Origin$ Battlefield | Destination$ Exile | SubAbility$ DBGainLife | SpellDescription$ Exile target creature. A:SP$ ChangeZone | ValidTgts$ Creature | Origin$ Battlefield | Destination$ Exile | RememberLKI$ True | SubAbility$ DBGainLife | SpellDescription$ Exile target creature.
SVar:DBGainLife:DB$ GainLife | Defined$ TargetedController | LifeAmount$ X | XDesc$ its power | SpellDescription$ Its controller gains life equal to its power. SVar:DBGainLife:DB$ GainLife | Defined$ RememberedController | LifeAmount$ X | SpellDescription$ Its controller gains life equal to its power.
SVar:X:TargetedLKI$CardPower SVar:X:RememberedLKI$CardPower
Oracle:Exile target creature. Its controller gains life equal to its power. Oracle:Exile target creature. Its controller gains life equal to its power.