From cdb76d344ecb5540e30dc303589e5497b875372c Mon Sep 17 00:00:00 2001 From: drdev Date: Sat, 30 Nov 2013 07:26:10 +0000 Subject: [PATCH] Fix display of 0 loyalty planeswalker abilities --- .../res/cardsfolder/c/chandra_pyromaster.txt | 32 +++++------ ...rruk_relentless_garruk_the_veil_cursed.txt | 54 +++++++++---------- forge-gui/res/cardsfolder/g/gideon_jura.txt | 2 +- .../res/cardsfolder/j/jace_memory_adept.txt | 2 +- .../cardsfolder/j/jace_the_mind_sculptor.txt | 2 +- .../java/forge/game/cost/CostPutCounter.java | 7 ++- 6 files changed, 52 insertions(+), 47 deletions(-) diff --git a/forge-gui/res/cardsfolder/c/chandra_pyromaster.txt b/forge-gui/res/cardsfolder/c/chandra_pyromaster.txt index d228a75399b..63da6f88c66 100644 --- a/forge-gui/res/cardsfolder/c/chandra_pyromaster.txt +++ b/forge-gui/res/cardsfolder/c/chandra_pyromaster.txt @@ -1,16 +1,16 @@ -Name:Chandra, Pyromaster -ManaCost:2 R R -Types:Planeswalker Chandra -Loyalty:4 -A:AB$ DealDamage | Cost$ AddCounter<1/LOYALTY> | Planeswalker$ True | ValidTgts$ Player | TgtPrompt$ Select target player | NumDmg$ 1 | SubAbility$ ChandraDamage | SpellDescription$ CARDNAME deals 1 damage to target player and 1 damage to up to one target creature that player controls. That creature can't block this turn. -SVar:ChandraDamage:DB$ DealDamage | ValidTgts$ Creature.TargetedPlayerCtrl | TgtPrompt$ Select target creature that player controls | TargetMin$ 0 | TargetMax$ 1 | NumDmg$ 1 | SubAbility$ DBPump -SVar:DBPump:DB$ Pump | Defined$ Targeted | IsCurse$ True | KW$ HIDDEN CARDNAME can't block. | ConditionDefined$ Targeted | ConditionPresent$ Creature | ConditionCompare$ GE1 -A:AB$ Mill | Cost$ 0 | Planeswalker$ True | Defined$ You | NumCards$ 1 | Destination$ Exile | RememberMilled$ True | SubAbility$ DBMayBePlay | SpellDescription$ Exile the top card of your library. You may play it this turn. -SVar:DBMayBePlay:DB$ Pump | Defined$ Remembered | PumpZone$ Exile | KW$ HIDDEN May be played | SubAbility$ DBCleanup -SVar:DBCleanup:DB$ Cleanup | ClearRemembered$ True -A:AB$ Mill | Cost$ SubCounter<7/LOYALTY> | Planeswalker$ True | Ultimate$ True | Defined$ You | NumCards$ 10 | Destination$ Exile | RememberMilled$ True | SubAbility$ DBChoose | SpellDescription$ Exile the top ten cards of your library. Choose an instant or sorcery card exiled this way and copy it three times. You may cast the copies without paying their mana costs. -SVar:DBChoose:DB$ ChooseCard | Choices$ Instant.IsRemembered,Sorcery.IsRemembered | ChoiceZone$ Exile | Defined$ You | SubAbility$ DBPlay -SVar:DBPlay:DB$ Play | Defined$ ChosenCard | WithoutManaCost$ True | CopyCard$ True | Amount$ 3 | Controller$ You | Optional$ True | SubAbility$ DBCleanup -SVar:RemAIDeck:True -SVar:Picture:http://www.wizards.com/global/images/magic/general/chandra_pyromaster.jpg -Oracle:[+1] Chandra, Pyromaster deals 1 damage to target player and 1 damage to up to one target creature that player controls. That creature can't block this turn.\n[0] Exile the top card of your library. You may play it this turn.\n[-7] Exile the top ten cards of your library. Choose an instant or sorcery card exiled this way and copy it three times. You may cast the copies without paying their mana costs. +Name:Chandra, Pyromaster +ManaCost:2 R R +Types:Planeswalker Chandra +Loyalty:4 +A:AB$ DealDamage | Cost$ AddCounter<1/LOYALTY> | Planeswalker$ True | ValidTgts$ Player | TgtPrompt$ Select target player | NumDmg$ 1 | SubAbility$ ChandraDamage | SpellDescription$ CARDNAME deals 1 damage to target player and 1 damage to up to one target creature that player controls. That creature can't block this turn. +SVar:ChandraDamage:DB$ DealDamage | ValidTgts$ Creature.TargetedPlayerCtrl | TgtPrompt$ Select target creature that player controls | TargetMin$ 0 | TargetMax$ 1 | NumDmg$ 1 | SubAbility$ DBPump +SVar:DBPump:DB$ Pump | Defined$ Targeted | IsCurse$ True | KW$ HIDDEN CARDNAME can't block. | ConditionDefined$ Targeted | ConditionPresent$ Creature | ConditionCompare$ GE1 +A:AB$ Mill | Cost$ AddCounter<0/LOYALTY> | Planeswalker$ True | Defined$ You | NumCards$ 1 | Destination$ Exile | RememberMilled$ True | SubAbility$ DBMayBePlay | SpellDescription$ Exile the top card of your library. You may play it this turn. +SVar:DBMayBePlay:DB$ Pump | Defined$ Remembered | PumpZone$ Exile | KW$ HIDDEN May be played | SubAbility$ DBCleanup +SVar:DBCleanup:DB$ Cleanup | ClearRemembered$ True +A:AB$ Mill | Cost$ SubCounter<7/LOYALTY> | Planeswalker$ True | Ultimate$ True | Defined$ You | NumCards$ 10 | Destination$ Exile | RememberMilled$ True | SubAbility$ DBChoose | SpellDescription$ Exile the top ten cards of your library. Choose an instant or sorcery card exiled this way and copy it three times. You may cast the copies without paying their mana costs. +SVar:DBChoose:DB$ ChooseCard | Choices$ Instant.IsRemembered,Sorcery.IsRemembered | ChoiceZone$ Exile | Defined$ You | SubAbility$ DBPlay +SVar:DBPlay:DB$ Play | Defined$ ChosenCard | WithoutManaCost$ True | CopyCard$ True | Amount$ 3 | Controller$ You | Optional$ True | SubAbility$ DBCleanup +SVar:RemAIDeck:True +SVar:Picture:http://www.wizards.com/global/images/magic/general/chandra_pyromaster.jpg +Oracle:[+1] Chandra, Pyromaster deals 1 damage to target player and 1 damage to up to one target creature that player controls. That creature can't block this turn.\n[0] Exile the top card of your library. You may play it this turn.\n[-7] Exile the top ten cards of your library. Choose an instant or sorcery card exiled this way and copy it three times. You may cast the copies without paying their mana costs. \ No newline at end of file diff --git a/forge-gui/res/cardsfolder/g/garruk_relentless_garruk_the_veil_cursed.txt b/forge-gui/res/cardsfolder/g/garruk_relentless_garruk_the_veil_cursed.txt index ead36a4f4f9..1f830f53778 100644 --- a/forge-gui/res/cardsfolder/g/garruk_relentless_garruk_the_veil_cursed.txt +++ b/forge-gui/res/cardsfolder/g/garruk_relentless_garruk_the_veil_cursed.txt @@ -1,28 +1,28 @@ -Name:Garruk Relentless -ManaCost:3 G -Types:Planeswalker Garruk -Loyalty:3 -T:Mode$ Always | IsPresent$ Card.Self+counters_LE2_LOYALTY | Execute$ TrigTransform | TriggerDescription$ When CARDNAME has two or fewer loyalty counters on him, transform him. -A:AB$ DealDamage | Cost$ 0 | ValidTgts$ Creature | TgtPrompt$ Select target creature | NumDmg$ 3 | SubAbility$ DamageThis | Planeswalker$ True | SpellDescription$ CARDNAME deals 3 damage to target creature. That creature deals damage equal to its power to him. -A:AB$ Token | Cost$ 0 | TokenAmount$ 1 | TokenName$ Wolf | TokenColors$ Green | TokenTypes$ Creature,Wolf | TokenOwner$ You | TokenPower$ 2 | TokenToughness$ 2 | Planeswalker$ True | References$ Y | SpellDescription$ Put a 2/2 green Wolf creature token onto the battlefield. -SVar:DamageThis:DB$ DealDamage | Defined$ Self | DamageSource$ Targeted | NumDmg$ Y -SVar:Y:Targeted$CardPower -SVar:TrigTransform:AB$ SetState | Cost$ 0 | Defined$ Self | Mode$ Transform -AlternateMode:DoubleFaced -SVar:Picture:http://www.wizards.com/global/images/magic/general/garruk_relentless.jpg -Oracle:When Garruk Relentless has two or fewer loyalty counters on him, transform him.\n[0] Garruk Relentless deals 3 damage to target creature. That creature deals damage equal to its power to him.\n[0] Put a 2/2 green Wolf creature token onto the battlefield. - -ALTERNATE - -Name:Garruk, the Veil-Cursed -ManaCost:no cost -Colors:green,black -Types:Planeswalker Garruk -Loyalty:3 -A:AB$ Token | Cost$ AddCounter<1/LOYALTY> | TokenAmount$ 1 | TokenName$ Wolf | TokenImage$ B 1 1 Wolf |TokenColors$ Black | TokenTypes$ Creature,Wolf | TokenOwner$ You | TokenPower$ 1 | TokenToughness$ 1 | TokenKeywords$ Deathtouch | Planeswalker$ True | SpellDescription$ Put a 1/1 black Wolf creature token with deathtouch onto the battlefield. -A:AB$ Sacrifice | Cost$ SubCounter<1/LOYALTY> | Defined$ You | SacValid$ Creature | SacMessage$ Creature | SubAbility$ DBSearch | Planeswalker$ True | SpellDescription$ Sacrifice a creature.If you do, search your library for a creature card, reveal it, put it into your hand, then shuffle your library. -A:AB$ PumpAll | Cost$ SubCounter<3/LOYALTY> | ValidCards$ Creature.YouCtrl | KW$ Trample | NumAtt$ X | NumDef$ X | Planeswalker$ True | Ultimate$ True | References$ X | SpellDescription$ Creatures you control gain trample and get +X/+X until end of turn, where X is the number of creature cards in your graveyard. -SVar:X:Count$TypeInYourYard.Creature -SVar:DBSearch:DB$ ChangeZone | Origin$ Library | Destination$ Hand | ChangeType$ Creature | ChangeNum$ 1 -SVar:Picture:http://www.wizards.com/global/images/magic/general/garruk_the_veil_cursed.jpg +Name:Garruk Relentless +ManaCost:3 G +Types:Planeswalker Garruk +Loyalty:3 +T:Mode$ Always | IsPresent$ Card.Self+counters_LE2_LOYALTY | Execute$ TrigTransform | TriggerDescription$ When CARDNAME has two or fewer loyalty counters on him, transform him. +A:AB$ DealDamage | Cost$ AddCounter<0/LOYALTY> | ValidTgts$ Creature | TgtPrompt$ Select target creature | NumDmg$ 3 | SubAbility$ DamageThis | Planeswalker$ True | SpellDescription$ CARDNAME deals 3 damage to target creature. That creature deals damage equal to its power to him. +A:AB$ Token | Cost$ AddCounter<0/LOYALTY> | TokenAmount$ 1 | TokenName$ Wolf | TokenColors$ Green | TokenTypes$ Creature,Wolf | TokenOwner$ You | TokenPower$ 2 | TokenToughness$ 2 | Planeswalker$ True | References$ Y | SpellDescription$ Put a 2/2 green Wolf creature token onto the battlefield. +SVar:DamageThis:DB$ DealDamage | Defined$ Self | DamageSource$ Targeted | NumDmg$ Y +SVar:Y:Targeted$CardPower +SVar:TrigTransform:AB$ SetState | Cost$ 0 | Defined$ Self | Mode$ Transform +AlternateMode:DoubleFaced +SVar:Picture:http://www.wizards.com/global/images/magic/general/garruk_relentless.jpg +Oracle:When Garruk Relentless has two or fewer loyalty counters on him, transform him.\n[0] Garruk Relentless deals 3 damage to target creature. That creature deals damage equal to its power to him.\n[0] Put a 2/2 green Wolf creature token onto the battlefield. + +ALTERNATE + +Name:Garruk, the Veil-Cursed +ManaCost:no cost +Colors:green,black +Types:Planeswalker Garruk +Loyalty:3 +A:AB$ Token | Cost$ AddCounter<1/LOYALTY> | TokenAmount$ 1 | TokenName$ Wolf | TokenImage$ B 1 1 Wolf |TokenColors$ Black | TokenTypes$ Creature,Wolf | TokenOwner$ You | TokenPower$ 1 | TokenToughness$ 1 | TokenKeywords$ Deathtouch | Planeswalker$ True | SpellDescription$ Put a 1/1 black Wolf creature token with deathtouch onto the battlefield. +A:AB$ Sacrifice | Cost$ SubCounter<1/LOYALTY> | Defined$ You | SacValid$ Creature | SacMessage$ Creature | SubAbility$ DBSearch | Planeswalker$ True | SpellDescription$ Sacrifice a creature.If you do, search your library for a creature card, reveal it, put it into your hand, then shuffle your library. +A:AB$ PumpAll | Cost$ SubCounter<3/LOYALTY> | ValidCards$ Creature.YouCtrl | KW$ Trample | NumAtt$ X | NumDef$ X | Planeswalker$ True | Ultimate$ True | References$ X | SpellDescription$ Creatures you control gain trample and get +X/+X until end of turn, where X is the number of creature cards in your graveyard. +SVar:X:Count$TypeInYourYard.Creature +SVar:DBSearch:DB$ ChangeZone | Origin$ Library | Destination$ Hand | ChangeType$ Creature | ChangeNum$ 1 +SVar:Picture:http://www.wizards.com/global/images/magic/general/garruk_the_veil_cursed.jpg Oracle:[+1] Put a 1/1 black Wolf creature token with deathtouch onto the battlefield.\n[-1] Sacrifice a creature. If you do, search your library for a creature card, reveal it, put it into your hand, then shuffle your library.\n[-3] Creatures you control gain trample and get +X/+X until end of turn, where X is the number of creature cards in your graveyard. \ No newline at end of file diff --git a/forge-gui/res/cardsfolder/g/gideon_jura.txt b/forge-gui/res/cardsfolder/g/gideon_jura.txt index ca4b80897b6..4819e2ba815 100644 --- a/forge-gui/res/cardsfolder/g/gideon_jura.txt +++ b/forge-gui/res/cardsfolder/g/gideon_jura.txt @@ -4,7 +4,7 @@ Types:Planeswalker Gideon Loyalty:6 A:AB$ MustAttack | Cost$ AddCounter<2/LOYALTY> | ValidTgts$ Opponent | TgtPrompt$ Select target opponent | Defender$ Self | Planeswalker$ True | SpellDescription$ During target opponent's next turn, creatures that player controls attack CARDNAME if able. A:AB$ Destroy | Cost$ SubCounter<2/LOYALTY> | ValidTgts$ Creature.tapped | TgtPrompt$ Select target tapped creature | Planeswalker$ True | SpellDescription$ Destroy target tapped creature. -A:AB$ Animate | Cost$ 0 | Defined$ Self | Power$ 6 | Toughness$ 6 | Types$ Creature,Human,Soldier | SubAbility$ DBPrevent | Planeswalker$ True | SpellDescription$ Until end of turn, CARDNAME becomes a 6/6 Human Soldier creature that's still a planeswalker. Prevent all damage that would be dealt to him this turn. +A:AB$ Animate | Cost$ AddCounter<0/LOYALTY> | Defined$ Self | Power$ 6 | Toughness$ 6 | Types$ Creature,Human,Soldier | SubAbility$ DBPrevent | Planeswalker$ True | SpellDescription$ Until end of turn, CARDNAME becomes a 6/6 Human Soldier creature that's still a planeswalker. Prevent all damage that would be dealt to him this turn. SVar:DBPrevent:DB$ Pump | Defined$ Self | KW$ HIDDEN Prevent all damage that would be dealt to CARDNAME. #restriction logic will need to be added to Human declare attackers for this to be OK for the AI to use SVar:RemAIDeck:True diff --git a/forge-gui/res/cardsfolder/j/jace_memory_adept.txt b/forge-gui/res/cardsfolder/j/jace_memory_adept.txt index bbb57709594..28d34fdda09 100644 --- a/forge-gui/res/cardsfolder/j/jace_memory_adept.txt +++ b/forge-gui/res/cardsfolder/j/jace_memory_adept.txt @@ -4,7 +4,7 @@ Types:Planeswalker Jace Loyalty:4 A:AB$ Draw | Cost$ AddCounter<1/LOYALTY> | Defined$ You | SubAbility$ DBMill | Planeswalker$ True | SpellDescription$ Draw a card. Target player puts the top card of his or her library into his or her graveyard. SVar:DBMill:DB$ Mill | ValidTgts$ Player | TgtPrompt$ Select target player | NumCards$ 1 -A:AB$ Mill | Cost$ 0 | ValidTgts$ Player | TgtPrompt$ Select target player | NumCards$ 10 | Planeswalker$ True | SpellDescription$ Target player puts the top 10 cards of his or her library in his or her graveyard. +A:AB$ Mill | Cost$ AddCounter<0/LOYALTY> | ValidTgts$ Player | TgtPrompt$ Select target player | NumCards$ 10 | Planeswalker$ True | SpellDescription$ Target player puts the top 10 cards of his or her library in his or her graveyard. A:AB$ Draw | Cost$ SubCounter<7/LOYALTY> | ValidTgts$ Player | TgtPrompt$ Select target player | TargetMin$ 0 | TargetMax$ MaxTgt | References$ MaxTgt | NumCards$ 20 | Planeswalker$ True | Ultimate$ True | SpellDescription$ Any number of target players each draw 20 cards. SVar:MaxTgt:PlayerCountPlayers$Amount SVar:Picture:http://www.wizards.com/global/images/magic/general/jace_memory_adept.jpg diff --git a/forge-gui/res/cardsfolder/j/jace_the_mind_sculptor.txt b/forge-gui/res/cardsfolder/j/jace_the_mind_sculptor.txt index b97d97204b7..2f786344c55 100644 --- a/forge-gui/res/cardsfolder/j/jace_the_mind_sculptor.txt +++ b/forge-gui/res/cardsfolder/j/jace_the_mind_sculptor.txt @@ -3,7 +3,7 @@ ManaCost:2 U U Types:Planeswalker Jace Loyalty:3 A:AB$ Dig | Cost$ AddCounter<2/LOYALTY> | ValidTgts$ Player | TgtPrompt$ Select target player | DigNum$ 1 | AnyNumber$ True | DestinationZone$ Library | LibraryPosition2$ 0 | Planeswalker$ True | SpellDescription$ Look at the top card of target player's library. You may put that card on the bottom of that player's library. -A:AB$ Draw | Cost$ 0 | NumCards$ 3 | SubAbility$ DBChangeZone | Planeswalker$ True | SpellDescription$ Draw three cards, then put two cards from your hand on top of your library in any order. +A:AB$ Draw | Cost$ AddCounter<0/LOYALTY> | NumCards$ 3 | SubAbility$ DBChangeZone | Planeswalker$ True | SpellDescription$ Draw three cards, then put two cards from your hand on top of your library in any order. SVar:DBChangeZone:DB$ ChangeZone | Origin$ Hand | Destination$ Library | ChangeType$ Card | ChangeNum$ 2 | LibraryPosition$ 0 | Mandatory$ True A:AB$ ChangeZone | Cost$ SubCounter<1/LOYALTY> | Origin$ Battlefield | Destination$ Hand | ValidTgts$ Creature | TgtPrompt$ Select target creature | Planeswalker$ True | SpellDescription$ Return target creature to its owner's hand. A:AB$ ChangeZoneAll | Cost$ SubCounter<12/LOYALTY> | Origin$ Library | Destination$ Exile | ValidTgts$ Player | TgtPrompt$ Select target player | SubAbility$ DBChangeZone2 | Planeswalker$ True | Ultimate$ True | SpellDescription$ Exile all cards from target player's library, then that player shuffles his or her hand into his or her library. diff --git a/forge-gui/src/main/java/forge/game/cost/CostPutCounter.java b/forge-gui/src/main/java/forge/game/cost/CostPutCounter.java index 6f36b5c73e5..04060ca87b9 100644 --- a/forge-gui/src/main/java/forge/game/cost/CostPutCounter.java +++ b/forge-gui/src/main/java/forge/game/cost/CostPutCounter.java @@ -165,7 +165,12 @@ public class CostPutCounter extends CostPartWithList { public final String toString() { final StringBuilder sb = new StringBuilder(); if (this.counter == CounterType.LOYALTY) { - sb.append("+").append(this.getAmount()); + if (this.getAmount().equals("0")) { + sb.append("0"); + } + else { + sb.append("+").append(this.getAmount()); + } } else { sb.append("Put "); final Integer i = this.convertAmount();