From 4a04de9482025cd98fb451a6e5cb6e8d16e0cc68 Mon Sep 17 00:00:00 2001 From: moomarc Date: Thu, 27 Sep 2012 09:40:41 +0000 Subject: [PATCH] - Added Thromok the Insatiable - Fixed Marrow Chomper's etb trigger --- .gitattributes | 1 + res/cardsfolder/m/marrow_chomper.txt | 2 +- res/cardsfolder/t/thromok_the_insatiable.txt | 12 ++++++++++++ src/main/java/forge/Card.java | 12 ++++++++---- .../java/forge/card/cardfactory/CardFactoryUtil.java | 3 ++- 5 files changed, 24 insertions(+), 6 deletions(-) create mode 100644 res/cardsfolder/t/thromok_the_insatiable.txt diff --git a/.gitattributes b/.gitattributes index 1c46c9b3cb6..aa475950402 100644 --- a/.gitattributes +++ b/.gitattributes @@ -9846,6 +9846,7 @@ res/cardsfolder/t/thrill_of_the_hunt.txt svneol=native#text/plain res/cardsfolder/t/thriss_nantuko_primus.txt svneol=native#text/plain res/cardsfolder/t/thrive.txt svneol=native#text/plain res/cardsfolder/t/throat_slitter.txt svneol=native#text/plain +res/cardsfolder/t/thromok_the_insatiable.txt -text res/cardsfolder/t/throne_of_bone.txt svneol=native#text/plain res/cardsfolder/t/throne_of_empires.txt -text res/cardsfolder/t/throne_of_geth.txt svneol=native#text/plain diff --git a/res/cardsfolder/m/marrow_chomper.txt b/res/cardsfolder/m/marrow_chomper.txt index 93c600dfdf5..d89d6503af2 100644 --- a/res/cardsfolder/m/marrow_chomper.txt +++ b/res/cardsfolder/m/marrow_chomper.txt @@ -6,7 +6,7 @@ PT:3/3 K:Devour:2 T:Mode$ ChangesZone | Destination$ Battlefield | ValidCard$ Card.Self | Execute$ TrigGainLife | TriggerDescription$ When CARDNAME enters the battlefield, you gain 2 life for each creature it devoured. SVar:TrigGainLife:AB$GainLife | Cost$ 0 | Defined$ You | LifeAmount$ X | References$ X -SVar:X:Count$Devoured Card +SVar:X:Count$Devoured Card/Twice SVar:Rarity:Rare SVar:Picture:http://www.wizards.com/global/images/magic/general/marrow_chomper.jpg SetInfo:ARB|Uncommon|http://magiccards.info/scans/en/arb/93.jpg diff --git a/res/cardsfolder/t/thromok_the_insatiable.txt b/res/cardsfolder/t/thromok_the_insatiable.txt new file mode 100644 index 00000000000..385b6816157 --- /dev/null +++ b/res/cardsfolder/t/thromok_the_insatiable.txt @@ -0,0 +1,12 @@ +Name:Thromok the Insatiable +ManaCost:3 R G +Types:Legendary Creature Hellion +Text:no text +PT:0/0 +K:Devour:X:, where X is the number of creatures devoured this way +SVar:X:Count$Devoured Creature +SVar:Rarity:Common +SVar:Picture:http://www.wizards.com/global/images/magic/general/thromok_the_insatiable.jpg +SetInfo:PC2|Mythic|http://magiccards.info/scans/en/pc2/106.jpg +Oracle:Devour X, where X is the number of creatures devoured this way (As this enters the battlefield, you may sacrifice any number of creatures. This creature enters the battlefield with X +1/+1 counters on it for each of those creatures.) +End \ No newline at end of file diff --git a/src/main/java/forge/Card.java b/src/main/java/forge/Card.java index 09d1a58fb9c..28cff99785e 100644 --- a/src/main/java/forge/Card.java +++ b/src/main/java/forge/Card.java @@ -2238,13 +2238,17 @@ public class Card extends GameEntity implements Comparable { String k = keywords.get(i); k = k.replace("Curse", ""); sbLong.append(k).append("\r\n"); - } else if (keyword.startsWith("Soulshift") || keywords.get(i).startsWith("Devour") - || keyword.startsWith("Fading") + } else if (keyword.startsWith("Soulshift") || keyword.startsWith("Fading") || keyword.startsWith("Ripple") || keywords.get(i).startsWith("Unearth") || keyword.startsWith("Vanishing") || keywords.get(i).startsWith("Madness")) { String k = keywords.get(i); k = k.replace(":", " "); sbLong.append(k).append("\r\n"); + } else if (keyword.startsWith("Devour")) { + final String[] parts = keyword.split(":"); + final String extra = parts.length > 2 ? parts[2] : ""; + final String devour = "Devour " + parts[1] + extra; + sbLong.append(devour).append("\r\n"); } else if (keyword.startsWith("Morph")) { sbLong.append("Morph"); if (keyword.contains(":")) { @@ -2624,7 +2628,7 @@ public class Card extends GameEntity implements Comparable { sb.append(" You may choose new targets for the copies."); } sb.append(")\r\n"); - }else if (keyword.startsWith("Haunt")) { + } else if (keyword.startsWith("Haunt")) { if (sb.toString().endsWith("\r\n\r\n")) { sb.delete(sb.lastIndexOf("\r\n"), sb.lastIndexOf("\r\n") + 3); } @@ -6570,7 +6574,7 @@ public class Card extends GameEntity implements Comparable { if (Singletons.getModel().getGameState().getPhaseHandler().isPlayerTurn(this.getController())) { return false; } - }else if (property.startsWith("YouOwn")) { + } else if (property.startsWith("YouOwn")) { if (!this.getOwner().isPlayer(sourceController)) { return false; } diff --git a/src/main/java/forge/card/cardfactory/CardFactoryUtil.java b/src/main/java/forge/card/cardfactory/CardFactoryUtil.java index 3344d95c97f..72520fdf7ea 100644 --- a/src/main/java/forge/card/cardfactory/CardFactoryUtil.java +++ b/src/main/java/forge/card/cardfactory/CardFactoryUtil.java @@ -4971,7 +4971,6 @@ public class CardFactoryUtil { final String[] k = parse.split(":"); final String magnitude = k[1]; - final int multiplier = Integer.parseInt(magnitude); // final String player = card.getController(); final int[] numCreatures = new int[1]; @@ -5011,6 +5010,8 @@ public class CardFactoryUtil { } numCreatures[0] = count; } + final int multiplier = magnitude.equals("X") ? AbilityFactory.calculateAmount(card, magnitude, null) + : Integer.parseInt(magnitude); final int totalCounters = numCreatures[0] * multiplier; card.addCounter(Counters.P1P1, totalCounters);