From 51a0745348d1daaadef218c58a79ef7587eeef9e Mon Sep 17 00:00:00 2001 From: swordshine Date: Tue, 24 Dec 2013 02:06:22 +0000 Subject: [PATCH] - Refactored Entwine ability --- forge-gui/res/cardsfolder/a/abunas_chant.txt | 8 +++--- .../res/cardsfolder/b/barbed_lightning.txt | 8 +++--- .../res/cardsfolder/b/betrayal_of_flesh.txt | 8 +++--- forge-gui/res/cardsfolder/b/blinding_beam.txt | 8 +++--- forge-gui/res/cardsfolder/d/dreams_grip.txt | 8 +++--- .../res/cardsfolder/g/grab_the_reins.txt | 10 +++---- forge-gui/res/cardsfolder/i/incite_war.txt | 8 +++--- .../cardsfolder/j/journey_of_discovery.txt | 8 +++--- .../res/cardsfolder/o/one_dozen_eyes.txt | 8 +++--- .../res/cardsfolder/p/promise_of_power.txt | 11 ++++---- forge-gui/res/cardsfolder/r/rain_of_rust.txt | 8 +++--- forge-gui/res/cardsfolder/r/reap_and_sow.txt | 8 +++--- .../res/cardsfolder/r/roar_of_the_kha.txt | 8 +++--- .../res/cardsfolder/r/rude_awakening.txt | 8 +++--- .../res/cardsfolder/s/savage_beating.txt | 8 +++--- forge-gui/res/cardsfolder/s/second_sight.txt | 7 ++--- .../res/cardsfolder/s/shriveling_rot.txt | 7 ++--- forge-gui/res/cardsfolder/s/solar_tide.txt | 7 ++--- .../res/cardsfolder/s/stir_the_pride.txt | 8 +++--- .../res/cardsfolder/t/temporal_cascade.txt | 8 +++--- .../res/cardsfolder/t/tooth_and_nail.txt | 8 +++--- .../res/cardsfolder/w/wail_of_the_nim.txt | 8 +++--- .../main/java/forge/game/GameActionUtil.java | 12 +++++++++ .../forge/game/ability/AbilityFactory.java | 27 +++++++++++++++++++ .../src/main/java/forge/game/card/Card.java | 3 +++ .../java/forge/game/card/CardFactoryUtil.java | 3 +-- .../forge/game/spellability/OptionalCost.java | 1 + .../forge/game/spellability/SpellAbility.java | 1 + .../main/java/forge/gui/player/HumanPlay.java | 14 +++++++--- .../filters/ToggleButtonsFilter.java | 2 +- 30 files changed, 146 insertions(+), 95 deletions(-) diff --git a/forge-gui/res/cardsfolder/a/abunas_chant.txt b/forge-gui/res/cardsfolder/a/abunas_chant.txt index 988b151d5aa..84526ba87ef 100644 --- a/forge-gui/res/cardsfolder/a/abunas_chant.txt +++ b/forge-gui/res/cardsfolder/a/abunas_chant.txt @@ -1,10 +1,10 @@ Name:Abuna's Chant ManaCost:3 W Types:Instant -A:SP$ GainLife | Cost$ 3 W | LifeAmount$ 5 | SpellDescription$ Choose one - You gain 5 life; -A:SP$ PreventDamage | Cost$ 3 W | ValidTgts$ Creature | TgtPrompt$ Select target creature | Amount$ 5 | SpellDescription$ or prevent the next 5 damage that would be dealt to target creature this turn. -A:SP$ GainLife | Cost$ 5 W | PrecostDesc$ Entwine | CostDesc$ {2} | LifeAmount$ 5 | NonBasicSpell$ True | SpellDescription$ (Choose both if you pay the entwine cost.) | SubAbility$ DBPreventDamage -SVar:DBPreventDamage:DB$ PreventDamage | ValidTgts$ Creature | TgtPrompt$ Select target creature | Amount$ 5 +K:Entwine 2 +A:SP$ Charm | Cost$ 3 W | Choices$ DBGainLife,DBPreventDmg | SpellDescription$ Choose one - You gain 5 life; or prevent the next 5 damage that would be dealt to target creature this turn. +SVar:DBGainLife:DB$ GainLife | LifeAmount$ 5 | SpellDescription$ You gain 5 life; +SVar:DBPreventDmg:DB$ PreventDamage | ValidTgts$ Creature | TgtPrompt$ Select target creature | Amount$ 5 | SpellDescription$ Prevent the next 5 damage that would be dealt to target creature this turn. SVar:RemAIDeck:True SVar:Picture:http://www.wizards.com/global/images/magic/general/abunas_chant.jpg Oracle:Choose one - You gain 5 life; or prevent the next 5 damage that would be dealt to target creature this turn.\nEntwine {2} (Choose both if you pay the entwine cost.) \ No newline at end of file diff --git a/forge-gui/res/cardsfolder/b/barbed_lightning.txt b/forge-gui/res/cardsfolder/b/barbed_lightning.txt index 8eadc1ce663..9ec75e97607 100644 --- a/forge-gui/res/cardsfolder/b/barbed_lightning.txt +++ b/forge-gui/res/cardsfolder/b/barbed_lightning.txt @@ -1,10 +1,10 @@ Name:Barbed Lightning ManaCost:2 R Types:Instant -A:SP$ DealDamage | Cost$ 2 R | ValidTgts$ Creature | TgtPrompt$ Select target creature | NumDmg$ 3 | PrecostDesc$ Choose one - | SpellDescription$ CARDNAME deals 3 damage to target creature; -A:SP$ DealDamage | Cost$ 2 R | ValidTgts$ Player | TgtPrompt$ Select target player | NumDmg$ 3 | SpellDescription$ or CARDNAME deals 3 damage to target player. -A:SP$ DealDamage | Cost$ 4 R | PrecostDesc$ Entwine | CostDesc$ {2} | ValidTgts$ Creature | TgtPrompt$ Select target creature | NumDmg$ 3 | NonBasicSpell$ True | SpellDescription$ (Choose both if you pay the entwine cost.) | SubAbility$ DBDamage -SVar:DBDamage:DB$DealDamage| ValidTgts$ Player | TgtPrompt$ Select target player | NumDmg$ 3 | +K:Entwine 2 +A:SP$ Charm | Cost$ 2 R | Choices$ DBDmgC,DBDmgP | CharmNum$ 1 | SpellDescription$ Choose one - CARDNAME deals 3 damage to target creature; or CARDNAME deals 3 damage to target player. +SVar:DBDmgC:DB$ DealDamage | ValidTgts$ Creature | TgtPrompt$ Select target creature | NumDmg$ 3 | SpellDescription$ CARDNAME deals 3 damage to target creature; +SVar:DBDmgP:DB$ DealDamage | ValidTgts$ Player | TgtPrompt$ Select target player | NumDmg$ 3 | SpellDescription$ CARDNAME deals 3 damage to target player. SVar:RemAIDeck:True SVar:Picture:http://www.wizards.com/global/images/magic/general/barbed_lightning.jpg Oracle:Choose one - Barbed Lightning deals 3 damage to target creature; or Barbed Lightning deals 3 damage to target player.\nEntwine {2} (Choose both if you pay the entwine cost.) \ No newline at end of file diff --git a/forge-gui/res/cardsfolder/b/betrayal_of_flesh.txt b/forge-gui/res/cardsfolder/b/betrayal_of_flesh.txt index ef6cbeb3980..c2ce167b472 100644 --- a/forge-gui/res/cardsfolder/b/betrayal_of_flesh.txt +++ b/forge-gui/res/cardsfolder/b/betrayal_of_flesh.txt @@ -1,10 +1,10 @@ Name:Betrayal of Flesh ManaCost:5 B Types:Instant -A:SP$ Destroy | Cost$ 5 B | ValidTgts$ Creature | TgtPrompt$ Select target creature | PrecostDesc$ Choose one - | SpellDescription$ Destroy target creature; -A:SP$ ChangeZone | Cost$ 5 B | Origin$ Graveyard | Destination$ Battlefield | TgtPrompt$ Choose target creature card in your graveyard | ValidTgts$ Creature.YouCtrl | SpellDescription$ or return target creature card from your graveyard to the battlefield. -A:SP$ Destroy | Cost$ 5 B Sac<3/Land> | ValidTgts$ Creature | TgtPrompt$ Select target creature | SubAbility$ DBChange | PrecostDesc$ Entwine - | CostDesc$ Sacrifice three lands. | NonBasicSpell$ True | SpellDescription$ (Choose both if you pay the entwine cost.) -SVar:DBChange:DB$ ChangeZone | Cost$ 0 | Origin$ Graveyard | Destination$ Battlefield | TgtPrompt$ Choose target creature card in your graveyard | ValidTgts$ Creature.YouCtrl +K:Entwine Sac<3/Land> +A:SP$ Charm | Cost$ 5 B | Choices$ DBDestroy,DBChange | CharmNum$ 1 | SpellDescription$ Choose one - Destroy target creature; or return target creature card from your graveyard to the battlefield. +SVar:DBDestroy:DB$ Destroy | ValidTgts$ Creature | TgtPrompt$ Select target creature | SpellDescription$ Destroy target creature +SVar:DBChange:DB$ ChangeZone | Origin$ Graveyard | Destination$ Battlefield | TgtPrompt$ Choose target creature card in your graveyard | ValidTgts$ Creature.YouCtrl | SpellDescription$ Return target creature card from your graveyard to the battlefield. SVar:RemAIDeck:True SVar:Picture:http://www.wizards.com/global/images/magic/general/betrayal_of_flesh.jpg Oracle:Choose one - Destroy target creature; or return target creature card from your graveyard to the battlefield.\nEntwine-Sacrifice three lands. (Choose both if you pay the entwine cost.) \ No newline at end of file diff --git a/forge-gui/res/cardsfolder/b/blinding_beam.txt b/forge-gui/res/cardsfolder/b/blinding_beam.txt index e4d258ed4d8..0637e3eb6a2 100644 --- a/forge-gui/res/cardsfolder/b/blinding_beam.txt +++ b/forge-gui/res/cardsfolder/b/blinding_beam.txt @@ -1,10 +1,10 @@ Name:Blinding Beam ManaCost:2 W Types:Instant -A:SP$ Tap | Cost$ 2 W | ValidTgts$ Creature | TargetMin$ 2 | TargetMax$ 2 | TgtPrompt$ Select two target creatures | SpellDescription$ Choose one - Tap two target creatures; -A:SP$ Effect | Cost$ 2 W | ValidTgts$ Player | TgtPrompt$ Select target player | IsCurse$ True | StaticAbilities$ DontUntap | Triggers$ RestoreSight | SVars$ ExileEffect | RememberObjects$ Targeted | Duration$ Permanent | SpellDescription$ or creatures don't untap during target player's next untap step. -A:SP$ Effect | Cost$ 3 W | ValidTgts$ Player | TgtPrompt$ Select target player | IsCurse$ True | StaticAbilities$ DontUntap | Triggers$ RestoreSight | SVars$ ExileEffect | RememberObjects$ Targeted | AILogic$ BeginningOfOppTurn | Duration$ Permanent | SubAbility$ BlindTheFoe | PrecostDesc$ Entwine | CostDesc$ {1} | NonBasicSpell$ True | SpellDescription$ (Choose both if you pay the entwine cost.) -SVar:BlindTheFoe:DB$ Tap | ValidTgts$ Creature | TargetMin$ 2 | TargetMax$ 2 | TgtPrompt$ Select two target creatures +K:Entwine 1 +A:SP$ Charm | Cost$ 2 W | Choices$ DBTap,DBEffect | CharmNum$ 1 | SpellDescription$ Choose one - Tap two target creatures; or creatures don't untap during target player's next untap step. +SVar:DBTap:DB$ Tap | ValidTgts$ Creature | TargetMin$ 2 | TargetMax$ 2 | TgtPrompt$ Select two target creatures | SpellDescription$ Tap two target creatures; +SVar:DBEffect:DB$ Effect | ValidTgts$ Player | TgtPrompt$ Select target player | IsCurse$ True | StaticAbilities$ DontUntap | Triggers$ RestoreSight | SVars$ ExileEffect | RememberObjects$ Targeted | Duration$ Permanent | SpellDescription$ Creatures don't untap during target player's next untap step. SVar:DontUntap:Mode$ Continuous | EffectZone$ Command | AffectedZone$ Battlefield | Affected$ Creature.RememberedPlayerCtrl | AddHiddenKeyword$ This card doesn't untap during your next untap step. SVar:RestoreSight:Mode$ Phase | Phase$ Upkeep | ValidPlayer$ Player.IsRemembered | TriggerZones$ Command | Execute$ ExileEffect | Static$ True SVar:ExileEffect:DB$ ChangeZone | Defined$ Self | Origin$ Command | Destination$ Exile diff --git a/forge-gui/res/cardsfolder/d/dreams_grip.txt b/forge-gui/res/cardsfolder/d/dreams_grip.txt index 69b38a0475a..92a6d561baa 100644 --- a/forge-gui/res/cardsfolder/d/dreams_grip.txt +++ b/forge-gui/res/cardsfolder/d/dreams_grip.txt @@ -1,10 +1,10 @@ Name:Dream's Grip ManaCost:U Types:Instant -A:SP$ Tap | Cost$ U | ValidTgts$ Permanent | TgtPrompt$ Select target permanent to tap | PrecostDesc$ Choose one - | SpellDescription$ Tap target permanent; -A:SP$ Untap | Cost$ U | ValidTgts$ Permanent | TgtPrompt$ Select target permanent to untap | SpellDescription$ or untap target permanent. -A:SP$ Tap | Cost$ 1 U | ValidTgts$ Permanent | TgtPrompt$ Select target permanent to tap | SubAbility$ DBUntap | PrecostDesc$ Entwine | CostDesc$ {1} | NonBasicSpell$ True | SpellDescription$ (Choose both if you pay the entwine cost.) -SVar:DBUntap:DB$ Untap | Cost$ 0 | ValidTgts$ Permanent | TgtPrompt$ Select target permanent to untap +K:Entwine 1 +A:SP$ Charm | Cost$ U | Choices$ DBTap,DBUntap | CharmNum$ 1 | SpellDescription$ Choose one - Tap target permanent; or untap target permanent. +SVar:DBTap:DB$ Tap | ValidTgts$ Permanent | TgtPrompt$ Select target permanent to tap | SpellDescription$ Tap target permanent; +SVar:DBUntap:DB$ Untap | ValidTgts$ Permanent | TgtPrompt$ Select target permanent to untap | SpellDescription$ Untap target permanent. SVar:RemAIDeck:True SVar:Picture:http://www.wizards.com/global/images/magic/general/dreams_grip.jpg Oracle:Choose one - Tap target permanent; or untap target permanent.\nEntwine {1} (Choose both if you pay the entwine cost.) \ No newline at end of file diff --git a/forge-gui/res/cardsfolder/g/grab_the_reins.txt b/forge-gui/res/cardsfolder/g/grab_the_reins.txt index f15efad8393..759df686c03 100644 --- a/forge-gui/res/cardsfolder/g/grab_the_reins.txt +++ b/forge-gui/res/cardsfolder/g/grab_the_reins.txt @@ -1,11 +1,11 @@ Name:Grab the Reins ManaCost:3 R Types:Instant -A:SP$ GainControl | Cost$ 3 R | ValidTgts$ Creature | TgtPrompt$ Select target creature to gain control of | LoseControl$ EOT | AddKWs$ Haste | SpellDescription$ Choose one - Until end of turn, you gain control of target creature and it gains haste; -A:SP$ Sacrifice | Cost$ 3 R | Amount$ 1 | SacValid$ Creature | RememberSacrificed$ True | SubAbility$ GrabDmg | SpellDescription$ or sacrifice a creature, then CARDNAME deals damage equal to that creature's power to target creature or player. -A:SP$ GainControl | Cost$ 5 R R | ValidTgts$ Creature | TgtPrompt$ Select target creature to gain control of | LoseControl$ EOT | AddKWs$ Haste | NonBasicSpell$ True | SubAbility$ GrabASacrifice | PrecostDesc$ Entwine | CostDesc$ {2}{R} | SpellDescription$ (Choose both if you pay the entwine cost.) -SVar:GrabASacrifice:DB$ Sacrifice | Amount$ 1 | SacValid$ Creature | RememberSacrificed$ True | SubAbility$ GrabDmg -SVar:GrabDmg:DB$DealDamage | Cost$ 0 | ValidTgts$ Creature,Player | TgtPrompt$ Select target creature or player to deal the damage to | NumDmg$ X | SubAbility$ DBCleanup | References$ X +K:Entwine 2 R +A:SP$ Charm | Cost$ 3 R | Choices$ DBGainControl,DBSac | CharmNum$ 1 | SpellDescription$ Choose one - Until end of turn, you gain control of target creature and it gains haste; or sacrifice a creature, then CARDNAME deals damage equal to that creature's power to target creature or player. +SVar:DBGainControl:DB$ GainControl | ValidTgts$ Creature | TgtPrompt$ Select target creature to gain control of | LoseControl$ EOT | AddKWs$ Haste | SpellDescription$ Until end of turn, you gain control of target creature and it gains haste; +SVar:DBSac:DB$ Sacrifice | Amount$ 1 | SacValid$ Creature | RememberSacrificed$ True | SubAbility$ GrabDmg | SpellDescription$ Sacrifice a creature, then CARDNAME deals damage equal to that creature's power to target creature or player. +SVar:GrabDmg:DB$ DealDamage | ValidTgts$ Creature,Player | TgtPrompt$ Select target creature or player to deal the damage to | NumDmg$ X | SubAbility$ DBCleanup | References$ X SVar:DBCleanup:DB$ Cleanup | ClearRemembered$ True SVar:X:RememberedLKI$CardPower SVar:RemAIDeck:True diff --git a/forge-gui/res/cardsfolder/i/incite_war.txt b/forge-gui/res/cardsfolder/i/incite_war.txt index 39351f0f5ab..b5eec47d913 100644 --- a/forge-gui/res/cardsfolder/i/incite_war.txt +++ b/forge-gui/res/cardsfolder/i/incite_war.txt @@ -1,11 +1,11 @@ Name:Incite War ManaCost:2 R Types:Instant -A:SP$ Effect | Cost$ 2 R | Name$ Incite War Effect | ValidTgts$ Player | TgtPrompt$ Select target player | StaticAbilities$ MustAttack | References$ MustAttack | RememberObjects$ Targeted | PrecostDesc$ Choose one - | SpellDescription$ Creatures target player controls attack this turn if able; +K:Entwine 2 +A:SP$ Charm | Cost$ 2 R | Choices$ DBEffect,DBPumpAll | CharmNum$ 1 | SpellDescription$ Choose one - Creatures target player controls attack this turn if able; or creatures you control gain first strike until end of turn. +SVar:DBEffect:DB$ Effect | Name$ Incite War Effect | ValidTgts$ Player | TgtPrompt$ Select target player | StaticAbilities$ MustAttack | References$ MustAttack | RememberObjects$ Targeted | SpellDescription$ Creatures target player controls attack this turn if able; SVar:MustAttack:Mode$ Continuous | EffectZone$ Command | Affected$ Creature.RememberedPlayerCtrl | AddHiddenKeyword$ CARDNAME attacks each turn if able. | Description$ Creatures target player controls attack this turn if able. -A:SP$ PumpAll | Cost$ 2 R | ValidCards$ Creature.YouCtrl | KW$ First Strike | SpellDescription$ or creatures you control gain first strike until end of turn. -A:SP$ Effect | Cost$ 4 R | Name$ Incite War Effect | ValidTgts$ Player | TgtPrompt$ Select target player | StaticAbilities$ MustAttack | References$ MustAttack | RememberObjects$ Targeted | PrecostDesc$ Entwine | CostDesc$ {2} | SubAbility$ DBPumpAll | NonBasicSpell$ True | SpellDescription$ (Choose both if you pay the entwine cost.) -SVar:DBPumpAll:DB$ PumpAll | ValidCards$ Creature.YouCtrl | KW$ First Strike +SVar:DBPumpAll:DB$ PumpAll | ValidCards$ Creature.YouCtrl | KW$ First Strike | SpellDescription$ Creatures you control gain first strike until end of turn. SVar:RemAIDeck:True SVar:Picture:http://www.wizards.com/global/images/magic/general/incite_war.jpg Oracle:Choose one - Creatures target player controls attack this turn if able; or creatures you control gain first strike until end of turn.\nEntwine {2} (Choose both if you pay the entwine cost.) \ No newline at end of file diff --git a/forge-gui/res/cardsfolder/j/journey_of_discovery.txt b/forge-gui/res/cardsfolder/j/journey_of_discovery.txt index 618a4afbee3..6ada6ec86aa 100644 --- a/forge-gui/res/cardsfolder/j/journey_of_discovery.txt +++ b/forge-gui/res/cardsfolder/j/journey_of_discovery.txt @@ -1,10 +1,10 @@ Name:Journey of Discovery ManaCost:2 G Types:Sorcery -A:SP$ ChangeZone | Cost$ 2 G | Origin$ Library | Destination$ Hand | ChangeType$ Land.Basic | ChangeNum$ 2 | PrecostDesc$ Choose one - | SpellDescription$ Search your library for up to two basic land cards, reveal them, put them into your hand, then shuffle your library; -A:SP$ Effect | Cost$ 2 G | Name$ Journey of Discovery Effect | StaticAbilities$ JourneyOfDis | AILogic$ Always | SpellDescription$ or you may play up to two additional lands this turn. -A:SP$ ChangeZone | Cost$ 4 G G | Origin$ Library | Destination$ Hand | ChangeType$ Land.Basic | ChangeNum$ 2 | PrecostDesc$ Entwine | CostDesc$ {2}{G} | SubAbility$ DBEffect | NonBasicSpell$ True | SpellDescription$ (Choose both if you pay the entwine cost.) -SVar:DBEffect:DB$ Effect | Cost$ 0 | Name$ Journey of Discovery Effect | StaticAbilities$ JourneyOfDis | AILogic$ Always +K:Entwine 2 G +A:SP$ Charm | Cost$ 2 G | Choices$ DBChangeZone,DBEffect | CharmNum$ 1 | SpellDescription$ Choose one - Search your library for up to two basic land cards, reveal them, put them into your hand, then shuffle your library; or you may play up to two additional lands this turn. +SVar:DBChangeZone:DB$ ChangeZone | Origin$ Library | Destination$ Hand | ChangeType$ Land.Basic | ChangeNum$ 2 | SpellDescription$ Search your library for up to two basic land cards, reveal them, put them into your hand, then shuffle your library; +SVar:DBEffet:DB$ Effect | Name$ Journey of Discovery Effect | StaticAbilities$ JourneyOfDis | AILogic$ Always | SpellDescription$ You may play up to two additional lands this turn. SVar:JourneyOfDis:Mode$ Continuous | Affected$ You | AddKeyword$ AdjustLandPlays:2 | EffectZone$ Command | Description$ You may play two additional lands this turn. SVar:RemAIDeck:True SVar:Picture:http://www.wizards.com/global/images/magic/general/journey_of_discovery.jpg diff --git a/forge-gui/res/cardsfolder/o/one_dozen_eyes.txt b/forge-gui/res/cardsfolder/o/one_dozen_eyes.txt index ddfedc96d1f..ab6d8ab439e 100644 --- a/forge-gui/res/cardsfolder/o/one_dozen_eyes.txt +++ b/forge-gui/res/cardsfolder/o/one_dozen_eyes.txt @@ -1,9 +1,9 @@ Name:One Dozen Eyes ManaCost:5 G Types:Sorcery -A:SP$ Token | Cost$ 5 G | TokenAmount$ 1 | TokenName$ Beast | TokenTypes$ Creature,Beast | TokenOwner$ You | TokenColors$ Green | TokenPower$ 5 | TokenToughness$ 5 | PrecostDesc$ Choose one - | SpellDescription$ Put a 5/5 green Beast creature token onto the battlefield; -A:SP$ Token | Cost$ 5 G | TokenAmount$ 5 | TokenName$ Insect | TokenTypes$ Creature,Insect | TokenOwner$ You | TokenColors$ Green | TokenPower$ 1 | TokenToughness$ 1 | SpellDescription$ or put five 1/1 green Insect creature tokens onto the battlefield. -A:SP$ Token | Cost$ 5 G G G G | PrecostDesc$ Entwine | CostDesc$ {G}{G}{G} | TokenAmount$ 1 | TokenName$ Beast | TokenTypes$ Creature,Beast | TokenOwner$ You | TokenColors$ Green | TokenPower$ 5 | TokenToughness$ 5 | NonBasicSpell$ True | SpellDescription$ (Choose both if you pay the entwine cost.) | SubAbility$ DBToken2 -SVar:DBToken2:DB$Token | TokenAmount$ 5 | TokenName$ Insect | TokenTypes$ Creature,Insect | TokenOwner$ You | TokenColors$ Green | TokenPower$ 1 | TokenToughness$ 1 +K:Entwine G G G +A:SP$ Charm | Cost$ 5 G | Choices$ DBToken,DBToken2 | CharmNum$ 1 | SpellDescription$ Choose one - Put a 5/5 green Beast creature token onto the battlefield; or put five 1/1 green Insect creature tokens onto the battlefield. +SVar:DBToken:DB$ Token | TokenAmount$ 1 | TokenName$ Beast | TokenTypes$ Creature,Beast | TokenOwner$ You | TokenColors$ Green | TokenPower$ 5 | TokenToughness$ 5 | SpellDescription$ Put a 5/5 green Beast creature token onto the battlefield; +SVar:DBToken2:DB$ Token | TokenAmount$ 5 | TokenName$ Insect | TokenTypes$ Creature,Insect | TokenOwner$ You | TokenColors$ Green | TokenPower$ 1 | TokenToughness$ 1 | SpellDescription$ Put five 1/1 green Insect creature tokens onto the battlefield. SVar:Picture:http://www.wizards.com/global/images/magic/general/one_dozen_eyes.jpg Oracle:Choose one - Put a 5/5 green Beast creature token onto the battlefield; or put five 1/1 green Insect creature tokens onto the battlefield.\nEntwine {G}{G}{G} (Choose both if you pay the entwine cost.) \ No newline at end of file diff --git a/forge-gui/res/cardsfolder/p/promise_of_power.txt b/forge-gui/res/cardsfolder/p/promise_of_power.txt index 0798ce5b0f7..6e9417bfa04 100644 --- a/forge-gui/res/cardsfolder/p/promise_of_power.txt +++ b/forge-gui/res/cardsfolder/p/promise_of_power.txt @@ -1,12 +1,11 @@ Name:Promise of Power ManaCost:2 B B B Types:Sorcery -A:SP$ Draw | Cost$ 2 B B B | NumCards$ 5 | PrecostDesc$ Choose one - | SpellDescription$ You draw five cards and you lose 5 life; | SubAbility$ DBLoseLife -A:SP$ Token | Cost$ 2 B B B | TokenAmount$ 1 | TokenName$ Demon | TokenTypes$ Creature,Demon | TokenOwner$ You | TokenColors$ Black | TokenKeywords$ Flying | TokenPower$ X | TokenToughness$ X | References$ X | SpellDescription$ or put an X/X black Demon creature token with flying onto the battlefield, where X is the number of cards in your hand as the token enters the battlefield. -A:SP$ Draw | Cost$ 6 B B B | NumCards$ 5 | PrecostDesc$ Entwine | CostDesc$ {4} | NonBasicSpell$ True | SpellDescription$ (Choose both if you pay the entwine cost.) | SubAbility$ DBLoseLife2 -SVar:DBLoseLife:DB$LoseLife | LifeAmount$ 5 -SVar:DBLoseLife2:DB$LoseLife | LifeAmount$ 5 | SubAbility$ DBToken -SVar:DBToken:DB$Token | TokenAmount$ 1 | TokenName$ Demon | TokenTypes$ Creature,Demon | TokenOwner$ You | TokenColors$ Black | TokenKeywords$ Flying | TokenPower$ X | TokenToughness$ X +K:Entwine 4 +A:SP$ Charm | Cost$ 2 B B B | Choices$ DBDraw,DBToken | CharmNum$ 1 | SpellDescription$ Choose one - You draw five cards and you lose 5 life; or put an X/X black Demon creature token with flying onto the battlefield, where X is the number of cards in your hand as the token enters the battlefield. +SVar:DBDraw:DB$ Draw | NumCards$ 5 | SpellDescription$ You draw five cards and you lose 5 life; | SubAbility$ DBLoseLife +SVar:DBLoseLife:DB$ LoseLife | LifeAmount$ 5 +SVar:DBToken:DB$ Token | TokenAmount$ 1 | TokenName$ Demon | TokenTypes$ Creature,Demon | TokenOwner$ You | TokenColors$ Black | TokenKeywords$ Flying | TokenPower$ X | TokenToughness$ X | References$ X | SpellDescription$ Put an X/X black Demon creature token with flying onto the battlefield, where X is the number of cards in your hand as the token enters the battlefield. SVar:X:Count$NumCardsInYourHand SVar:RemAIDeck:True SVar:Picture:http://www.wizards.com/global/images/magic/general/promise_of_power.jpg diff --git a/forge-gui/res/cardsfolder/r/rain_of_rust.txt b/forge-gui/res/cardsfolder/r/rain_of_rust.txt index 2368809a9bf..f87ae8ff7ee 100644 --- a/forge-gui/res/cardsfolder/r/rain_of_rust.txt +++ b/forge-gui/res/cardsfolder/r/rain_of_rust.txt @@ -1,10 +1,10 @@ Name:Rain of Rust ManaCost:3 R R Types:Instant -A:SP$ Destroy | Cost$ 3 R R | ValidTgts$ Artifact | TgtPrompt$ Select target artifact | PrecostDesc$ Choose one - | SpellDescription$ Destroy target artifact; -A:SP$ Destroy | Cost$ 3 R R | ValidTgts$ Land | TgtPrompt$ Select target land | SpellDescription$ or destroy target land. -A:SP$ Destroy | Cost$ 6 R R R | ValidTgts$ Artifact | TgtPrompt$ Select target artifact | SubAbility$ DBDestroy | PrecostDesc$ Entwine | CostDesc$ {3}{R} | NonBasicSpell$ True | SpellDescription$ (Choose both if you pay the entwine cost.) -SVar:DBDestroy:DB$Destroy | ValidTgts$ Land | TgtPrompt$ Select target land +K:Entwine 3 R +A:SP$ Charm | Cost$ 3 R R | Choices$ DBDestroyArtifact,DBDestroyLand | CharmNum$ 1 | SpellDescription$ Choose one - Destroy target artifact; or destroy target land. +SVar:DBDestroyArtifact:DB$ Destroy | ValidTgts$ Artifact | TgtPrompt$ Select target artifact | SpellDescription$ Destroy target artifact; +SVar:DBDestroyLand:DB$ Destroy | ValidTgts$ Land | TgtPrompt$ Select target land | SpellDescription$ Destroy target land. SVar:RemAIDeck:True SVar:Picture:http://www.wizards.com/global/images/magic/general/rain_of_rust.jpg Oracle:Choose one - Destroy target artifact; or destroy target land.\nEntwine {3}{R} (Choose both if you pay the entwine cost.) \ No newline at end of file diff --git a/forge-gui/res/cardsfolder/r/reap_and_sow.txt b/forge-gui/res/cardsfolder/r/reap_and_sow.txt index 2688e283e95..f07f6dfa4e8 100644 --- a/forge-gui/res/cardsfolder/r/reap_and_sow.txt +++ b/forge-gui/res/cardsfolder/r/reap_and_sow.txt @@ -1,9 +1,9 @@ Name:Reap and Sow ManaCost:3 G Types:Sorcery -A:SP$ Destroy | Cost$ 3 G | ValidTgts$ Land | TgtPrompt$ Select target land | PrecostDesc$ Choose one - | SpellDescription$ Destroy target land; -A:SP$ ChangeZone | Cost$ 3 G | Origin$ Library | Destination$ Battlefield | ChangeType$ Land | ChangeNum$ 1 | SpellDescription$ or search your library for a land card, put that card onto the battlefield, then shuffle your library. -A:SP$ Destroy | Cost$ 4 G G | ValidTgts$ Land | TgtPrompt$ Select target land | SubAbility$ DBChange | PrecostDesc$ Entwine | CostDesc$ {1}{G} | NonBasicSpell$ True | SpellDescription$ (Choose both if you pay the entwine cost.) -SVar:DBChange:DB$ChangeZone | Cost$ 0 | Origin$ Library | Destination$ Battlefield | ChangeType$ Land | ChangeNum$ 1 +K:Entwine 1 G +A:SP$ Charm | Cost$ 3 G | Choices$ DBDestroyLand,DBChange | CharmNum$ 1 | SpellDescription$ Choose one - Destroy target land; or search your library for a land card, put that card onto the battlefield, then shuffle your library. +SVar:DBDestroyLand:DB$ Destroy | ValidTgts$ Land | TgtPrompt$ Select target land | SpellDescription$ Destroy target land; +SVar:DBChange:DB$ ChangeZone | Origin$ Library | Destination$ Battlefield | ChangeType$ Land | ChangeNum$ 1 | SpellDescription$ Search your library for a land card, put that card onto the battlefield, then shuffle your library. SVar:Picture:http://www.wizards.com/global/images/magic/general/reap_and_sow.jpg Oracle:Choose one - Destroy target land; or search your library for a land card, put that card onto the battlefield, then shuffle your library.\nEntwine {1}{G} (Choose both if you pay the entwine cost.) \ No newline at end of file diff --git a/forge-gui/res/cardsfolder/r/roar_of_the_kha.txt b/forge-gui/res/cardsfolder/r/roar_of_the_kha.txt index 1e5102495f6..7bbcba55ef3 100644 --- a/forge-gui/res/cardsfolder/r/roar_of_the_kha.txt +++ b/forge-gui/res/cardsfolder/r/roar_of_the_kha.txt @@ -1,10 +1,10 @@ Name:Roar of the Kha ManaCost:1 W Types:Instant -A:SP$ PumpAll | Cost$ 1 W | NumAtt$ 1 | NumDef$ 1 | ValidCards$ Creature.YouCtrl | PrecostDesc$ Choose one - | SpellDescription$ Creatures you control get +1/+1 until end of turn; -A:SP$ UntapAll | Cost$ 1 W | ValidCards$ Creature.YouCtrl | SpellDescription$ or untap all creatures you control. -A:SP$ UntapAll | Cost$ 2 W W | ValidCards$ Creature.YouCtrl | SubAbility$ DBPump | PrecostDesc$ Entwine | CostDesc$ {1}{W} | NonBasicSpell$ True | SpellDescription$ (Choose both if you pay the entwine cost.) -SVar:DBPump:DB$PumpAll | ValidCards$ Creature.YouCtrl | NumAtt$ 1 | NumDef$ 1 +K:Entwine 1 W +A:SP$ Charm | Cost$ 1 W | Choices$ DBPump,DBUntap | CharmNum$ 1 | SpellDescription$ Choose one - Creatures you control get +1/+1 until end of turn; or untap all creatures you control. +SVar:DBPump:DB$ PumpAll | NumAtt$ 1 | NumDef$ 1 | ValidCards$ Creature.YouCtrl | SpellDescription$ Creatures you control get +1/+1 until end of turn; +SVar:DBUntap:DB$ UntapAll | ValidCards$ Creature.YouCtrl | SpellDescription$ Untap all creatures you control. SVar:RemAIDeck:True SVar:Picture:http://www.wizards.com/global/images/magic/general/roar_of_the_kha.jpg Oracle:Choose one - Creatures you control get +1/+1 until end of turn; or untap all creatures you control.\nEntwine {1}{W} (Choose both if you pay the entwine cost.) \ No newline at end of file diff --git a/forge-gui/res/cardsfolder/r/rude_awakening.txt b/forge-gui/res/cardsfolder/r/rude_awakening.txt index a5f0d162b3c..6e34ade96df 100644 --- a/forge-gui/res/cardsfolder/r/rude_awakening.txt +++ b/forge-gui/res/cardsfolder/r/rude_awakening.txt @@ -1,10 +1,10 @@ Name:Rude Awakening ManaCost:4 G Types:Sorcery -A:SP$ UntapAll | Cost$ 4 G | ValidCards$ Land.YouCtrl | PrecostDesc$ Choose one - | SpellDescription$ Untap all lands you control; -A:SP$ AnimateAll | Cost$ 4 G | ValidCards$ Land.YouCtrl | Power$ 2 | Toughness$ 2 | Types$ Creature | SpellDescription$ or until end of turn, lands you control become 2/2 creatures that are still lands. -A:SP$ UntapAll | Cost$ 6 G G | ValidCards$ Land.YouCtrl | PrecostDesc$ Entwine | CostDesc$ {2}{G} | SubAbility$ DBAnimate | NonBasicSpell$ True | SpellDescription$ (Choose both if you pay the entwine cost.) -SVar:DBAnimate:DB$AnimateAll | ValidCards$ Land.YouCtrl | Power$ 2 | Toughness$ 2 | Types$ Creature +K:Entwine 2 G +A:SP$ Charm | Cost$ 4 G | Choices$ DBUntap,DBAnimate | CharmNum$ 1 | SpellDescription$ Choose one - Untap all lands you control; or until end of turn, lands you control become 2/2 creatures that are still lands. +SVar:DBUntap:DB$ UntapAll | ValidCards$ Land.YouCtrl | SpellDescription$ Untap all lands you control; +SVar:DBAnimate:DB$ AnimateAll | ValidCards$ Land.YouCtrl | Power$ 2 | Toughness$ 2 | Types$ Creature | SpellDescription$ Until end of turn, lands you control become 2/2 creatures that are still lands. SVar:RemAIDeck:True SVar:Picture:http://www.wizards.com/global/images/magic/general/rude_awakening.jpg Oracle:Choose one - Untap all lands you control; or until end of turn, lands you control become 2/2 creatures that are still lands.\nEntwine {2}{G} (Choose both if you pay the entwine cost.) \ No newline at end of file diff --git a/forge-gui/res/cardsfolder/s/savage_beating.txt b/forge-gui/res/cardsfolder/s/savage_beating.txt index c2ac55aeacd..4556e272815 100644 --- a/forge-gui/res/cardsfolder/s/savage_beating.txt +++ b/forge-gui/res/cardsfolder/s/savage_beating.txt @@ -2,10 +2,10 @@ Name:Savage Beating ManaCost:3 R R Types:Instant Text:Cast CARDNAME only during your turn and only during combat. -A:SP$ PumpAll | Cost$ 3 R R | ValidCards$ Creature.YouCtrl | KW$ Double Strike | PlayerTurn$ True | ActivationPhases$ BeginCombat->EndCombat | PrecostDesc$ Choose one - | SpellDescription$ Creatures you control gain double strike until end of turn; -A:SP$ UntapAll | Cost$ 3 R R | ValidCards$ Creature.YouCtrl | PlayerTurn$ True | ActivationPhases$ BeginCombat->EndCombat | SubAbility$ DBAddCombat | SpellDescription$ or untap all creatures you control and after this phase, there is an additional combat phase. -A:SP$ PumpAll | Cost$ 4 R R R | ValidCards$ Creature.YouCtrl | KW$ Double Strike | PlayerTurn$ True | ActivationPhases$ BeginCombat->EndCombat | PrecostDesc$ Entwine | CostDesc$ {1}{R} | SubAbility$ DBUntapAll | NonBasicSpell$ True | SpellDescription$ (Choose both if you pay the entwine cost.) -SVar:DBUntapAll:DB$ UntapAll | ValidCards$ Creature.YouCtrl | SubAbility$ DBAddCombat +K:Entwine 1 R +A:SP$ Charm | Cost$ 3 R R | Choices$ DBPump,DBUntapAll | CharmNum$ 1 | PlayerTurn$ True | ActivationPhases$ BeginCombat->EndCombat | SpellDescription$ Choose one - Creatures you control gain double strike until end of turn; or untap all creatures you control and after this phase, there is an additional combat phase. +SVar:DBPump:DB$ PumpAll | ValidCards$ Creature.YouCtrl | KW$ Double Strike | SpellDescription$ Creatures you control gain double strike until end of turn; +SVar:DBUntapAll:DB$ UntapAll | ValidCards$ Creature.YouCtrl | SubAbility$ DBAddCombat | SpellDescription$ Untap all creatures you control and after this phase, there is an additional combat phase. SVar:DBAddCombat:DB$ AddPhase | ExtraPhase$ BeginCombat | AfterPhase$ EndCombat SVar:RemAIDeck:True SVar:Picture:http://www.wizards.com/global/images/magic/general/savage_beating.jpg diff --git a/forge-gui/res/cardsfolder/s/second_sight.txt b/forge-gui/res/cardsfolder/s/second_sight.txt index 695f365a8af..7af3a32d6db 100644 --- a/forge-gui/res/cardsfolder/s/second_sight.txt +++ b/forge-gui/res/cardsfolder/s/second_sight.txt @@ -1,9 +1,10 @@ Name:Second Sight ManaCost:2 U Types:Instant -A:SP$ RearrangeTopOfLibrary | Cost$ 2 U | ValidTgts$ Opponent | TgtPrompt$ Choose target opponent. | NumCards$ 5 | PrecostDesc$ Choose one - | SpellDescription$ Look at the top five cards of target opponent's library, then put them back in any order; -A:SP$ RearrangeTopOfLibrary | Cost$ 2 U | Defined$ You | NumCards$ 5 | SpellDescription$ or look at the top five cards of your library, then put them back in any order. -A:SP$ RearrangeTopOfLibrary | Cost$ 2 U U | Defined$ Each | NumCards$ 5 | NonBasicSpell$ True | SpellDescription$ Entwine {U} (Choose both if you pay the entwine cost.) +K:Entwine U +A:SP$ Charm | Cost$ 2 U | Choices$ DBRearrange,DBRearrange2 | CharmNum$ 1 | SpellDescription$ Choose one - Look at the top five cards of target opponent's library, then put them back in any order; or look at the top five cards of your library, then put them back in any order. +SVar:DBRearrange:DB$ RearrangeTopOfLibrary | ValidTgts$ Opponent | TgtPrompt$ Choose target opponent. | NumCards$ 5 | SpellDescription$ Look at the top five cards of target opponent's library, then put them back in any order; +SVar:DBRearrange2:DB$ RearrangeTopOfLibrary | Defined$ You | NumCards$ 5 | SpellDescription$ look at the top five cards of your library, then put them back in any order. SVar:RemAIDeck:True SVar:Picture:http://www.wizards.com/global/images/magic/general/second_sight.jpg Oracle:Choose one - Look at the top five cards of target opponent's library, then put them back in any order; or look at the top five cards of your library, then put them back in any order.\nEntwine {U} (Choose both if you pay the entwine cost.) \ No newline at end of file diff --git a/forge-gui/res/cardsfolder/s/shriveling_rot.txt b/forge-gui/res/cardsfolder/s/shriveling_rot.txt index 7afa2da82f9..163c6ea90b8 100644 --- a/forge-gui/res/cardsfolder/s/shriveling_rot.txt +++ b/forge-gui/res/cardsfolder/s/shriveling_rot.txt @@ -1,9 +1,10 @@ Name:Shriveling Rot ManaCost:2 B B Types:Instant -A:SP$ Effect | Cost$ 2 B B | Name$ Shriveling Rot Effect | Triggers$ Trig1 | SVars$ SVar1 | PrecostDesc$ Choose one - | SpellDescription$ Until end of turn, whenever a creature is dealt damage, destroy it; -A:SP$ Effect | Cost$ 2 B B | Name$ Shriveling Rot Effect | Triggers$ Trig2 | SVars$ SVar2,X | SpellDescription$ or until end of turn, whenever a creature is put into a graveyard from the battlefield, that creature's controller loses life equal to its toughness. -A:SP$ Effect | Cost$ 4 B B B | Name$ Shriveling Rot Effect | Triggers$ Trig1,Trig2 | SVars$ SVar1,SVar2,X | PrecostDesc$ Entwine | CostDesc$ {2}{B} | NonBasicSpell$ True | SpellDescription$ (Choose both if you pay the entwine cost.) +K:Entwine 2 B +A:SP$ Charm | Cost$ 2 B B | Choices$ DBEffect,DBEffect2 | CharmNum$ 1 | SpellDescription$ Choose one - Until end of turn, whenever a creature is dealt damage, destroy it; or until end of turn, whenever a creature dies, that creature's controller loses life equal to its toughness. +SVar:DBEffect:DB$ Effect | Name$ Shriveling Rot Effect | Triggers$ Trig1 | SVars$ SVar1 | SpellDescription$ Until end of turn, whenever a creature is dealt damage, destroy it; +SVar:DBEffect2:DB$ Effect | Name$ Shriveling Rot Effect 2 | Triggers$ Trig2 | SVars$ SVar2,X | SpellDescription$ Until end of turn, whenever a creature is put into a graveyard from the battlefield, that creature's controller loses life equal to its toughness. SVar:Trig1:Mode$ DamageDone | ValidTarget$ Creature | Execute$ SVar1 | TriggerDescription$ Whenever a creature is dealt damage, destroy it. SVar:SVar1:AB$ Destroy | Cost$ 0 | Defined$ TriggeredTarget SVar:Trig2:Mode$ ChangesZone | Origin$ Battlefield | Destination$ Graveyard | ValidCard$ Creature | Execute$ SVar2 | TriggerDescription$ Whenever a creature is put into a graveyard from the battlefield, that creature's controller loses life equal to its toughness. diff --git a/forge-gui/res/cardsfolder/s/solar_tide.txt b/forge-gui/res/cardsfolder/s/solar_tide.txt index 3f7c9b187a0..5c989da8696 100644 --- a/forge-gui/res/cardsfolder/s/solar_tide.txt +++ b/forge-gui/res/cardsfolder/s/solar_tide.txt @@ -1,8 +1,9 @@ Name:Solar Tide ManaCost:4 W W Types:Sorcery -A:SP$ DestroyAll | Cost$ 4 W W | ValidCards$ Creature.powerLE2 | PrecostDesc$ Choose one - | SpellDescription$ Destroy all creatures with power 2 or less; -A:SP$ DestroyAll | Cost$ 4 W W | ValidCards$ Creature.powerGE3 | SpellDescription$ or destroy all creatures with power 3 or greater. -A:SP$ DestroyAll | Cost$ 4 W W Sac<2/Land> | CostDesc$ Sacrifice two lands. | ValidCards$ Creature | PrecostDesc$ Entwine - | NonBasicSpell$ True | SpellDescription$ (Choose both if you pay the entwine cost.) +K:Entwine Sac<2/Land> +A:SP$ Charm | Cost$ 4 W W | Choices$ DBDestroyAll,DBDestroyAll2 | CharmNum$ 1 | SpellDescription$ Choose one - Destroy all creatures with power 2 or less; or destroy all creatures with power 3 or greater. +SVar:DBDestroyAll:DB$ DestroyAll | ValidCards$ Creature.powerLE2 | SpellDescription$ Destroy all creatures with power 2 or less; +SVar:DBDestroyAll2:DB$ DestroyAll | ValidCards$ Creature.powerGE3 | SpellDescription$ Destroy all creatures with power 3 or greater. SVar:Picture:http://www.wizards.com/global/images/magic/general/solar_tide.jpg Oracle:Choose one - Destroy all creatures with power 2 or less; or destroy all creatures with power 3 or greater.\nEntwine-Sacrifice two lands. (Choose both if you pay the entwine cost.) \ No newline at end of file diff --git a/forge-gui/res/cardsfolder/s/stir_the_pride.txt b/forge-gui/res/cardsfolder/s/stir_the_pride.txt index 11b33e8aea3..ae14edd43aa 100644 --- a/forge-gui/res/cardsfolder/s/stir_the_pride.txt +++ b/forge-gui/res/cardsfolder/s/stir_the_pride.txt @@ -1,10 +1,10 @@ Name:Stir the Pride ManaCost:4 W Types:Instant -A:SP$ PumpAll | Cost$ 4 W | NumAtt$ 2 | NumDef$ 2 | ValidCards$ Creature.YouCtrl | PrecostDesc$ Choose one - | SpellDescription$ Creatures you control get +2/+2 until end of turn; -A:SP$ AnimateAll | Cost$ 4 W | ValidCards$ Creature.YouCtrl | Triggers$ TrigPrideDamage | sVars$ GainLife,X | References$ GainLife,X | SpellDescription$ or until end of turn, creatures you control gain "Whenever this creature deals damage, you gain that much life." -A:SP$ AnimateAll | Cost$ 5 W W | ValidCards$ Creature.YouCtrl | Triggers$ TrigPrideDamage | sVars$ GainLife,X | References$ GainLife,X | SubAbility$ DBPump | NonBasicSpell$ True | PrecostDesc$ Entwine | CostDesc$ {1}{W} | SpellDescription$ (Choose both if you pay the entwine cost.) -SVar:DBPump:DB$PumpAll | ValidCards$ Creature.YouCtrl | NumAtt$ 2 | NumDef$ 2 +K:Entwine 1 W +A:SP$ Charm | Cost$ 4 W | Choices$ DBPumpAll,DBAnimateAll | CharmNum$ 1 | SpellDescription$ Choose one - Creatures you control get +2/+2 until end of turn; or until end of turn, creatures you control gain "Whenever this creature deals damage, you gain that much life." +SVar:DBPumpAll:DB$ PumpAll | NumAtt$ 2 | NumDef$ 2 | ValidCards$ Creature.YouCtrl | SpellDescription$ Creatures you control get +2/+2 until end of turn; +SVar:DBAnimateAll:DB$ AnimateAll | ValidCards$ Creature.YouCtrl | Triggers$ TrigPrideDamage | sVars$ GainLife,X | References$ GainLife,X | SpellDescription$ Until end of turn, creatures you control gain "Whenever this creature deals damage, you gain that much life." SVar:TrigPrideDamage:Mode$ DamageDone | ValidSource$ Card.Self | Execute$ GainLife | TriggerZones$ Battlefield | TriggerDescription$ Whenever CARDNAME deals damage, you gain that much life. SVar:GainLife:AB$ GainLife | Cost$ 0 | LifeAmount$ X | References$ X SVar:X:TriggerCount$DamageAmount diff --git a/forge-gui/res/cardsfolder/t/temporal_cascade.txt b/forge-gui/res/cardsfolder/t/temporal_cascade.txt index a13c41c5daf..8e052fa8207 100644 --- a/forge-gui/res/cardsfolder/t/temporal_cascade.txt +++ b/forge-gui/res/cardsfolder/t/temporal_cascade.txt @@ -1,10 +1,10 @@ Name:Temporal Cascade ManaCost:5 U U Types:Sorcery -A:SP$ ChangeZoneAll | Cost$ 5 U U | ChangeType$ Card | Origin$ Hand,Graveyard | Destination$ Library | Shuffle$ True | UseAllOriginZones$ True | PrecostDesc$ Choose one - | SpellDescription$ Each player shuffles his or her hand and graveyard into his or her library; -A:SP$ Draw | Cost$ 5 U U | NumCards$ 7 | Defined$ Each | SpellDescription$ or each player draws seven cards. -A:SP$ ChangeZoneAll | Cost$ 7 U U | ChangeType$ Card | Origin$ Hand,Graveyard | Destination$ Library | Shuffle$ True | UseAllOriginZones$ True | SubAbility$ CascadeDraw | PrecostDesc$ Entwine | CostDesc$ {2} | NonBasicSpell$ True | SpellDescription$ (Choose both if you pay the entwine cost.) -SVar:CascadeDraw:DB$ Draw | NumCards$ 7 | Defined$ Each +K:Entwine 2 +A:SP$ Charm | Cost$ 5 U U | Choices$ DBChangeZone,DBDraw | CharmNum$ 1 | SpellDescription$ Choose one - Each player shuffles his or her hand and graveyard into his or her library; or each player draws seven cards. +SVar:DBChangeZone:DB$ ChangeZoneAll | ChangeType$ Card | Origin$ Hand,Graveyard | Destination$ Library | Shuffle$ True | UseAllOriginZones$ True | SpellDescription$ Each player shuffles his or her hand and graveyard into his or her library; +SVar:DBDraw:DB$ Draw | NumCards$ 7 | Defined$ Each | SpellDescription$ Each player draws seven cards. SVar:RemAIDeck:True SVar:Picture:http://www.wizards.com/global/images/magic/general/temporal_cascade.jpg Oracle:Choose one - Each player shuffles his or her hand and graveyard into his or her library; or each player draws seven cards.\nEntwine {2} (Choose both if you pay the entwine cost.) \ No newline at end of file diff --git a/forge-gui/res/cardsfolder/t/tooth_and_nail.txt b/forge-gui/res/cardsfolder/t/tooth_and_nail.txt index 51abcc6cb69..6ac5ade47fd 100644 --- a/forge-gui/res/cardsfolder/t/tooth_and_nail.txt +++ b/forge-gui/res/cardsfolder/t/tooth_and_nail.txt @@ -1,9 +1,9 @@ Name:Tooth and Nail ManaCost:5 G G Types:Sorcery -A:SP$ ChangeZone | Cost$ 5 G G | Origin$ Library | Destination$ Hand | ChangeType$ Creature | ChangeNum$ 2 | Reveal$ True | Shuffle$ True | PrecostDesc$ Choose one - | SpellDescription$ Search your library for up to two creature cards, reveal them, put them into your hand, then shuffle your library; -A:SP$ ChangeZone | Cost$ 5 G G | Origin$ Hand | Destination$ Battlefield | ChangeType$ Creature | ChangeNum$ 2 | SpellDescription$ or put up to two creature cards from your hand onto the battlefield. -A:SP$ ChangeZone | Cost$ 7 G G | Origin$ Library | Destination$ Hand | ChangeType$ Creature | ChangeNum$ 2 | Reveal$ True | Shuffle$ True | SubAbility$ ChangeZone | PrecostDesc$ Entwine | CostDesc$ {2} | NonBasicSpell$ True | SpellDescription$ (Choose both if you pay the entwine cost.) -SVar:ChangeZone:DB$ChangeZone | Origin$ Hand | Destination$ Battlefield | ChangeType$ Creature | ChangeNum$ 2 +K:Entwine 2 +A:SP$ Charm | Cost$ 5 G G | Choices$ DBSearch,DBChangeZone | CharmNum$ 1 | SpellDescription$ Choose one - Search your library for up to two creature cards, reveal them, put them into your hand, then shuffle your library; or put up to two creature cards from your hand onto the battlefield. +SVar:DBSearch:DB$ ChangeZone | Cost$ 5 G G | Origin$ Library | Destination$ Hand | ChangeType$ Creature | ChangeNum$ 2 | Reveal$ True | Shuffle$ True | SpellDescription$ Search your library for up to two creature cards, reveal them, put them into your hand, then shuffle your library; +SVar:DBChangeZone:DB$ ChangeZone | Origin$ Hand | Destination$ Battlefield | ChangeType$ Creature | ChangeNum$ 2 | SpellDescription$ Put up to two creature cards from your hand onto the battlefield. SVar:Picture:http://www.wizards.com/global/images/magic/general/tooth_and_nail.jpg Oracle:Choose one - Search your library for up to two creature cards, reveal them, put them into your hand, then shuffle your library; or put up to two creature cards from your hand onto the battlefield.\nEntwine {2} (Choose both if you pay the entwine cost.) \ No newline at end of file diff --git a/forge-gui/res/cardsfolder/w/wail_of_the_nim.txt b/forge-gui/res/cardsfolder/w/wail_of_the_nim.txt index a356b3e3b40..89bde3e5a0c 100644 --- a/forge-gui/res/cardsfolder/w/wail_of_the_nim.txt +++ b/forge-gui/res/cardsfolder/w/wail_of_the_nim.txt @@ -1,10 +1,10 @@ Name:Wail of the Nim ManaCost:2 B Types:Instant -A:SP$ RegenerateAll | Cost$ 2 B | ValidCards$ Creature.YouCtrl | PrecostDesc$ Choose one - | SpellDescription$ Regenerate each creature you control; -A:SP$ DamageAll | Cost$ 2 B | ValidCards$ Creature | ValidPlayers$ Each | NumDmg$ 1 | SpellDescription$ or CARDNAME deals 1 damage to each creature and each player. -A:SP$ RegenerateAll | Cost$ 2 B B | ValidCards$ Creature.YouCtrl | SubAbility$ DBDamageAll | PrecostDesc$ Entwine | CostDesc$ {B} | NonBasicSpell$ True | SpellDescription$ (Choose both if you pay the entwine cost.) -SVar:DBDamageAll:DB$ DamageAll | ValidCards$ Creature | ValidPlayers$ Each | NumDmg$ 1 +K:Entwine B +A:SP$ Charm | Cost$ 2 B | Choices$ DBRegenerate,DBDamageAll | CharmNum$ 1 | SpellDescription$ Choose one - Regenerate each creature you control; or CARDNAME deals 1 damage to each creature and each player. +SVar:DBRegenerate:DB$ RegenerateAll | ValidCards$ Creature.YouCtrl | SpellDescription$ Regenerate each creature you control; +SVar:DBDamageAll:DB$ DamageAll | ValidCards$ Creature | ValidPlayers$ Each | NumDmg$ 1 | SpellDescription$ CARDNAME deals 1 damage to each creature and each player. SVar:RemAIDeck:True SVar:Picture:http://www.wizards.com/global/images/magic/general/wail_of_the_nim.jpg Oracle:Choose one - Regenerate each creature you control; or Wail of the Nim deals 1 damage to each creature and each player.\nEntwine {B} (Choose both if you pay the entwine cost.) \ No newline at end of file diff --git a/forge-gui/src/main/java/forge/game/GameActionUtil.java b/forge-gui/src/main/java/forge/game/GameActionUtil.java index a0823514992..8cfff30bf8d 100644 --- a/forge-gui/src/main/java/forge/game/GameActionUtil.java +++ b/forge-gui/src/main/java/forge/game/GameActionUtil.java @@ -34,6 +34,7 @@ import forge.game.ability.AbilityFactory; import forge.game.ability.AbilityUtils; import forge.game.ability.ApiType; import forge.game.ability.AbilityFactory.AbilityRecordType; +import forge.game.ability.effects.CharmEffect; import forge.game.card.Card; import forge.game.card.CardLists; import forge.game.card.CardPredicates; @@ -408,6 +409,17 @@ public final class GameActionUtil { i++; } } + } else if (keyword.startsWith("Entwine")) { + for (int i = 0; i < abilities.size(); i++) { + final SpellAbility newSA = abilities.get(i).copy(); + SpellAbility entwine = AbilityFactory.buildEntwineAbility(newSA); + entwine.setPayCosts(new Cost(keyword.substring(8), false).add(newSA.getPayCosts())); + entwine.addOptionalCost(OptionalCost.Entwine); + if (newSA.canPlay()) { + abilities.add(i, entwine); + i++; + } + } } else if (keyword.startsWith("Kicker")) { for (int i = 0; i < abilities.size(); i++) { String[] sCosts = TextUtil.split(keyword.substring(7), ':'); diff --git a/forge-gui/src/main/java/forge/game/ability/AbilityFactory.java b/forge-gui/src/main/java/forge/game/ability/AbilityFactory.java index e3798eeb807..85bf819b0fd 100644 --- a/forge-gui/src/main/java/forge/game/ability/AbilityFactory.java +++ b/forge-gui/src/main/java/forge/game/ability/AbilityFactory.java @@ -366,4 +366,31 @@ public final class AbilityFactory { return left; } + public static final SpellAbility buildEntwineAbility(final SpellAbility sa) { + final Card source = sa.getSourceCard(); + final String[] saChoices = sa.getParam("Choices").split(","); + if (sa.getApi() != ApiType.Charm || saChoices.length != 2) + throw new IllegalStateException("Entwine ability may be built only on charm cards"); + final String ab = source.getSVar(saChoices[0]); + Map firstMap = getMapParams(ab); + AbilityRecordType firstType = AbilityRecordType.getRecordType(firstMap); + ApiType firstApi = firstType.getApiTypeOf(firstMap); + firstMap.put("StackDecription", firstMap.get("SpellDescription")); + firstMap.put("SpellDescription", sa.getDescription() + " Entwine (Choose both if you pay the entwine cost.)"); + SpellAbility entwineSA = getAbility(AbilityRecordType.Spell, firstApi, firstMap, new Cost(sa.getPayCosts().toSimpleString(), false), source); + + final String ab2 = source.getSVar(saChoices[1]); + Map secondMap = getMapParams(ab2); + ApiType secondApi = firstType.getApiTypeOf(secondMap); + secondMap.put("StackDecription", secondMap.get("SpellDescription")); + secondMap.put("SpellDescription", ""); + AbilitySub sub = (AbilitySub) getAbility(AbilityRecordType.SubAbility, secondApi, secondMap, null, source); + entwineSA.appendSubAbility(sub); + + entwineSA.setBasicSpell(false); + entwineSA.setActivatingPlayer(sa.getActivatingPlayer()); + entwineSA.setRestrictions(sa.getRestrictions()); + return entwineSA; + } + } // end class AbilityFactory diff --git a/forge-gui/src/main/java/forge/game/card/Card.java b/forge-gui/src/main/java/forge/game/card/Card.java index 3ff40893426..6c66d446d2c 100644 --- a/forge-gui/src/main/java/forge/game/card/Card.java +++ b/forge-gui/src/main/java/forge/game/card/Card.java @@ -2434,6 +2434,9 @@ public class Card extends GameEntity implements Comparable { } else if (keyword.startsWith("Buyback")) { final Cost cost = new Cost(keyword.substring(8), false); sb.append("Buyback " + cost.toSimpleString() + "\r\n"); + } else if (keyword.startsWith("Entwine")) { + final Cost cost = new Cost(keyword.substring(8), false); + sb.append("Entwine " + cost.toSimpleString() + "\r\n"); } else if (keyword.startsWith("Kicker")) { final Cost cost = new Cost(keyword.substring(7), false); sb.append("Kicker " + cost.toSimpleString() + "\r\n"); diff --git a/forge-gui/src/main/java/forge/game/card/CardFactoryUtil.java b/forge-gui/src/main/java/forge/game/card/CardFactoryUtil.java index ad6a8667ee8..36a12ca3863 100644 --- a/forge-gui/src/main/java/forge/game/card/CardFactoryUtil.java +++ b/forge-gui/src/main/java/forge/game/card/CardFactoryUtil.java @@ -2429,7 +2429,6 @@ public class CardFactoryUtil { card.addSpellAbility(makeAltCostAbility(card, altCost, sa1)); } } - if (card.hasKeyword("Delve")) { card.getSpellAbilities().get(0).setDelve(true); } @@ -3446,7 +3445,7 @@ public class CardFactoryUtil { ripplePos = hasKeyword(card, "Ripple", n + 1); } // Ripple } - + public final static void refreshTotemArmor(Card c) { boolean hasKw = c.hasKeyword("Totem armor"); diff --git a/forge-gui/src/main/java/forge/game/spellability/OptionalCost.java b/forge-gui/src/main/java/forge/game/spellability/OptionalCost.java index b0edf40482a..972838f760e 100644 --- a/forge-gui/src/main/java/forge/game/spellability/OptionalCost.java +++ b/forge-gui/src/main/java/forge/game/spellability/OptionalCost.java @@ -7,6 +7,7 @@ package forge.game.spellability; public enum OptionalCost { Conspire, Buyback, + Entwine, Kicker1, Kicker2, AltCost, // used by prowl diff --git a/forge-gui/src/main/java/forge/game/spellability/SpellAbility.java b/forge-gui/src/main/java/forge/game/spellability/SpellAbility.java index 8a765e4c1d8..47532e4a71e 100644 --- a/forge-gui/src/main/java/forge/game/spellability/SpellAbility.java +++ b/forge-gui/src/main/java/forge/game/spellability/SpellAbility.java @@ -1715,4 +1715,5 @@ public abstract class SpellAbility extends GameObject implements ISpellAbility { } return false; } + } \ No newline at end of file diff --git a/forge-gui/src/main/java/forge/gui/player/HumanPlay.java b/forge-gui/src/main/java/forge/gui/player/HumanPlay.java index 95d817faa1c..c821caf19ae 100644 --- a/forge-gui/src/main/java/forge/gui/player/HumanPlay.java +++ b/forge-gui/src/main/java/forge/gui/player/HumanPlay.java @@ -13,6 +13,7 @@ import forge.card.mana.ManaCost; import forge.game.GameActionUtil; import forge.game.Game; import forge.game.GameLogEntryType; +import forge.game.ability.AbilityFactory; import forge.game.ability.AbilityUtils; import forge.game.ability.ApiType; import forge.game.ability.effects.CharmEffect; @@ -49,7 +50,9 @@ import forge.game.cost.CostTapType; import forge.game.mana.ManaCostBeingPaid; import forge.game.player.Player; import forge.game.spellability.Ability; +import forge.game.spellability.AbilitySub; import forge.game.spellability.HumanPlaySpellAbility; +import forge.game.spellability.OptionalCost; import forge.game.spellability.SpellAbility; import forge.game.spellability.TargetRestrictions; import forge.game.zone.ZoneType; @@ -97,16 +100,19 @@ public class HumanPlay { source.setSplitStateToPlayAbility(sa); - if (sa.getApi() == ApiType.Charm && !sa.isWrapper()) { - CharmEffect.makeChoices(sa); - } - sa = chooseOptionalAdditionalCosts(p, sa); if (sa == null) { return; } + if (sa.getApi() == ApiType.Charm && !sa.isWrapper()) { + CharmEffect.makeChoices(sa); + } + + + + // Need to check PayCosts, and Ability + All SubAbilities for Target boolean newAbility = sa.getPayCosts() != null; SpellAbility ability = sa; diff --git a/forge-gui/src/main/java/forge/gui/toolbox/itemmanager/filters/ToggleButtonsFilter.java b/forge-gui/src/main/java/forge/gui/toolbox/itemmanager/filters/ToggleButtonsFilter.java index 79e93fbe9a7..f8e9b5aa223 100644 --- a/forge-gui/src/main/java/forge/gui/toolbox/itemmanager/filters/ToggleButtonsFilter.java +++ b/forge-gui/src/main/java/forge/gui/toolbox/itemmanager/filters/ToggleButtonsFilter.java @@ -61,7 +61,7 @@ public abstract class ToggleButtonsFilter extends ItemF int maxTextWidth = buttonWidth - 8; //account for padding for (FLabel btn : buttons) { - if (!btn.getText().isEmpty()) { + if (btn.getText() != null && !btn.getText().isEmpty()) { int max = maxTextWidth; Icon icon = btn.getIcon(); if (icon != null) {