From 42b18e2fbc0428fc6156d632bd692b2efafd2304 Mon Sep 17 00:00:00 2001 From: swordshine Date: Fri, 10 May 2013 13:05:25 +0000 Subject: [PATCH] - Added Kentaro, the Smiling Cat --- .gitattributes | 1 + res/cardsfolder/k/kentaro_the_smiling_cat.txt | 9 +++++++++ src/main/java/forge/game/GameActionUtil.java | 7 ++++++- 3 files changed, 16 insertions(+), 1 deletion(-) create mode 100644 res/cardsfolder/k/kentaro_the_smiling_cat.txt diff --git a/.gitattributes b/.gitattributes index 8712e75e250..c04a838b6ad 100644 --- a/.gitattributes +++ b/.gitattributes @@ -5753,6 +5753,7 @@ res/cardsfolder/k/kemba_kha_regent.txt svneol=native#text/plain res/cardsfolder/k/kembas_legion.txt -text res/cardsfolder/k/kembas_skyguard.txt svneol=native#text/plain res/cardsfolder/k/kemuri_onna.txt svneol=native#text/plain +res/cardsfolder/k/kentaro_the_smiling_cat.txt -text res/cardsfolder/k/kessig.txt -text res/cardsfolder/k/kessig_cagebreakers.txt -text res/cardsfolder/k/kessig_malcontents.txt -text diff --git a/res/cardsfolder/k/kentaro_the_smiling_cat.txt b/res/cardsfolder/k/kentaro_the_smiling_cat.txt new file mode 100644 index 00000000000..47ea1e0c07d --- /dev/null +++ b/res/cardsfolder/k/kentaro_the_smiling_cat.txt @@ -0,0 +1,9 @@ +Name:Kentaro, the Smiling Cat +ManaCost:1 W +Types:Legendary Creature Human Samurai +PT:2/1 +K:Bushido 1 +S:Mode$ Continuous | Affected$ Card.Samurai+YouCtrl | AddHiddenKeyword$ Alternative Cost ConvertedManaCost | AffectedZone$ Hand,Graveyard,Exile,Library | Description$ You may pay X rather than pay the mana cost for Samurai spells you cast, where X is that spell's converted mana cost. +SVar:Picture:http://www.wizards.com/global/images/magic/general/kentaro_the_smiling_cat.jpg +Oracle:Bushido 1 (When this blocks or becomes blocked, it gets +1/+1 until end of turn.)\nYou may pay {X} rather than pay the mana cost for Samurai spells you cast, where X is that spell's converted mana cost. +SetInfo:BOK Rare \ No newline at end of file diff --git a/src/main/java/forge/game/GameActionUtil.java b/src/main/java/forge/game/GameActionUtil.java index b81a7d3035c..96575df4160 100644 --- a/src/main/java/forge/game/GameActionUtil.java +++ b/src/main/java/forge/game/GameActionUtil.java @@ -1219,7 +1219,12 @@ public final class GameActionUtil { if (sa.isSpell() && keyword.startsWith("Alternative Cost")) { final SpellAbility newSA = sa.copy(); newSA.setBasicSpell(false); - final Cost cost = new Cost(keyword.substring(17), false).add(newSA.getPayCosts().copyWithNoMana()); + String kw = keyword; + if (keyword.contains("ConvertedManaCost")) { + final String cmc = Integer.toString(sa.getSourceCard().getCMC()); + kw = keyword.replace("ConvertedManaCost", cmc); + } + final Cost cost = new Cost(kw.substring(17), false).add(newSA.getPayCosts().copyWithNoMana()); newSA.setPayCosts(cost); newSA.setDescription(sa.getDescription() + " (by paying " + cost.toSimpleString() + " instead of its mana cost)"); alternatives.add(newSA);