From 131284d35f1635b6dc870878b35c8ab440db426d Mon Sep 17 00:00:00 2001 From: swordshine Date: Mon, 24 Jun 2019 12:53:35 +0800 Subject: [PATCH 1/3] Fix Sorin --- .../res/cardsfolder/upcoming/sorin_imperious_bloodlord.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/forge-gui/res/cardsfolder/upcoming/sorin_imperious_bloodlord.txt b/forge-gui/res/cardsfolder/upcoming/sorin_imperious_bloodlord.txt index 37cb9ab5569..d5772da2870 100644 --- a/forge-gui/res/cardsfolder/upcoming/sorin_imperious_bloodlord.txt +++ b/forge-gui/res/cardsfolder/upcoming/sorin_imperious_bloodlord.txt @@ -9,7 +9,7 @@ SVar:TrigPayCost:DB$ ImmediateTrigger | Execute$ DBDmg | ConditionDefined$ Remem SVar:DBDmg:DB$ DealDamage | ValidTgts$ Creature,Player,Planeswalker | TgtPrompt$ Select any target | NumDmg$ 3 | SubAbility$ DBGainLife SVar:DBGainLife:DB$ GainLife | LifeAmount$ 3 SVar:DBCleanup:DB$ Cleanup | ClearRemembered$ True -A:AB$ ChangeZone | Cost$ SubCounter<3/LOYALTY> | Origin$ Hand | Destination$ Battlefield | ChangeType$ Creature.Vampire | ChangeNum$ 1 | SpellDescription$ You may put a vampire creature card from your hand onto the battlefield. +A:AB$ ChangeZone | Cost$ SubCounter<3/LOYALTY> | Planeswalker$ True | Origin$ Hand | Destination$ Battlefield | ChangeType$ Creature.Vampire | ChangeNum$ 1 | SpellDescription$ You may put a vampire creature card from your hand onto the battlefield. SVar:PlayMain1:TRUE DeckHints:Type$Vampire Oracle:[+1]: Target creature you control gains deathtouch and lifelink until end of turn. If it's a Vampire, put a +1/+1 counter on it.\n[+1]: You may sacrifice a Vampire. When you do, Sorin, Imperious Bloodlord deals 3 damage to any target and you gain 3 life.\n[-3]: You may put a vampire creature card from your hand onto the battlefield. From 72da47cc67c71342f4d4a2813ff8bb6bde9c2c7c Mon Sep 17 00:00:00 2001 From: swordshine Date: Mon, 24 Jun 2019 13:46:28 +0800 Subject: [PATCH 2/3] Add Loxodon Lifechanter --- .../cardsfolder/upcoming/loxodon_lifechanter.txt | 13 +++++++++++++ 1 file changed, 13 insertions(+) create mode 100644 forge-gui/res/cardsfolder/upcoming/loxodon_lifechanter.txt diff --git a/forge-gui/res/cardsfolder/upcoming/loxodon_lifechanter.txt b/forge-gui/res/cardsfolder/upcoming/loxodon_lifechanter.txt new file mode 100644 index 00000000000..4201c6c14af --- /dev/null +++ b/forge-gui/res/cardsfolder/upcoming/loxodon_lifechanter.txt @@ -0,0 +1,13 @@ +Name:Loxodon Lifechanter +ManaCost:5 W +Types:Creature Elephant Cleric +PT:4/6 +T:Mode$ ChangesZone | Origin$ Any | Destination$ Battlefield | ValidCard$ Card.Self | Execute$ TrigLife | OptionalDecider$ You | TriggerDescription$ When CARDNAME enters the battlefield, you may have your life total become the total toughness of creatures you control. +SVar:TrigLife:DB$ PumpAll | ValidCards$ Creature.YouCtrl | RememberAllPumped$ True | SubAbility$ DBSetLife +SVar:DBSetLife:DB$ SetLife | Defined$ You | LifeAmount$ Y | References$ Y | SubAbility$ DBCleanup +SVar:DBCleanup:DB$ Cleanup | ClearRemembered$ True +SVar:Y:Remembered$CardToughness +A:AB$ Pump | Cost$ 5 W | NumAtt$ X | NumDef$ X | References$ X | SpellDescription$ CARDNAME gets +X/+X until end of turn, where X is your life total. +SVar:X:Count$YourLifeTotal +AI:RemoveDeck:All +Oracle:When Loxodon Lifechanter enters the battlefield, you may have your life total become the total toughness of creatures you control.\n{5}{W}: Loxodon Lifechanter gets +X/+X until end of turn, where X is your life total. From 4b0c412547c9653f82d349fb6062304ae6280f94 Mon Sep 17 00:00:00 2001 From: swordshine Date: Mon, 24 Jun 2019 19:11:13 +0800 Subject: [PATCH 3/3] Add Embodiment of Agonies --- .../java/forge/game/card/CardFactoryUtil.java | 19 ++++++++++++++++++- .../upcoming/embodiment_of_agonies.txt | 11 +++++++++++ 2 files changed, 29 insertions(+), 1 deletion(-) create mode 100644 forge-gui/res/cardsfolder/upcoming/embodiment_of_agonies.txt diff --git a/forge-game/src/main/java/forge/game/card/CardFactoryUtil.java b/forge-game/src/main/java/forge/game/card/CardFactoryUtil.java index ba3755676cd..a6e70c9eae6 100644 --- a/forge-game/src/main/java/forge/game/card/CardFactoryUtil.java +++ b/forge-game/src/main/java/forge/game/card/CardFactoryUtil.java @@ -1113,7 +1113,7 @@ public class CardFactoryUtil { } if (sq[0].contains("CreatureType")) { - String[] sqparts = sq[0].split(" ", 2); + String[] sqparts = l[0].split(" ", 2); final String[] rest = sqparts[1].split(","); final CardCollectionView cardsInZones = sqparts[0].length() > 12 @@ -1130,6 +1130,23 @@ public class CardFactoryUtil { return doXMath(n, m, c); } + if (sq[0].contains("ExactManaCost")) { + String[] sqparts = l[0].split(" ", 2); + final String[] rest = sqparts[1].split(","); + + final CardCollectionView cardsInZones = sqparts[0].length() > 13 + ? game.getCardsIn(ZoneType.listValueOf(sqparts[0].substring(13))) + : game.getCardsIn(ZoneType.Battlefield); + + CardCollection cards = CardLists.getValidCards(cardsInZones, rest, cc, c, null); + final Set manaCost = Sets.newHashSet(); + + for (Card card : cards) { + manaCost.add(card.getManaCost().getShortString()); + } + + return doXMath(manaCost.size(), m, c); + } if (sq[0].contains("Hellbent")) { return doXMath(Integer.parseInt(sq[cc.hasHellbent() ? 1 : 2]), m, c); diff --git a/forge-gui/res/cardsfolder/upcoming/embodiment_of_agonies.txt b/forge-gui/res/cardsfolder/upcoming/embodiment_of_agonies.txt new file mode 100644 index 00000000000..23e2e924b7b --- /dev/null +++ b/forge-gui/res/cardsfolder/upcoming/embodiment_of_agonies.txt @@ -0,0 +1,11 @@ +Name:Embodiment of Agonies +ManaCost:1 B B +Types:Creature Demon +PT:0/0 +K:Flying +K:Deathtouch +K:etbCounter:P1P1:X:no condition:CARDNAME enters the battlefield with a +1/+1 counter on it for each different mana cost among nonland cards in your graveyard. +SVar:X:Count$ExactManaCostGraveyard Card.nonLand+YouOwn +SVar:NeedsToPlayVar:X GT2 +DeckHas:Ability$Counters +Oracle:Flying, deathtouch\nEmbodiment of Agonies enters the battlefield with a +1/+1 counter on it for each different mana cost among nonland cards in your graveyard. (For example, {2}{B} and {1}{B}{B} are different mana costs.)