diff --git a/forge-game/src/main/java/forge/game/cost/CostAdjustment.java b/forge-game/src/main/java/forge/game/cost/CostAdjustment.java index f7a03fdc7eb..1a3b41df03e 100644 --- a/forge-game/src/main/java/forge/game/cost/CostAdjustment.java +++ b/forge-game/src/main/java/forge/game/cost/CostAdjustment.java @@ -6,11 +6,13 @@ import java.util.Map.Entry; import org.apache.commons.lang3.StringUtils; +import com.google.common.base.Strings; import com.google.common.collect.Lists; import forge.card.CardStateName; import forge.card.mana.ManaAtom; import forge.card.mana.ManaCost; +import forge.card.mana.ManaCostParser; import forge.card.mana.ManaCostShard; import forge.game.Game; import forge.game.GameObject; @@ -387,7 +389,7 @@ public class CostAdjustment { value = AbilityUtils.calculateAmount(hostCard, amount, staticAbility); } - if (!staticAbility.hasParam("Cost") && ! staticAbility.hasParam("Color")) { + if (!staticAbility.hasParam("Cost") && !staticAbility.hasParam("Color")) { int minMana = 0; if (staticAbility.hasParam("MinMana")) { minMana = Integer.valueOf(staticAbility.getParam("MinMana")); @@ -405,7 +407,11 @@ public class CostAdjustment { if (StringUtils.isNumeric(cost)) { sumGeneric += Integer.parseInt(cost) * value; } else { - manaCost.decreaseShard(ManaCostShard.parseNonGeneric(cost), value); + if (staticAbility.hasParam("IgnoreGeneric")) { + manaCost.decreaseShard(ManaCostShard.parseNonGeneric(cost), value); + } else { + manaCost.subtractManaCost(new ManaCost(new ManaCostParser(Strings.repeat(cost + " ", value)))); + } } } return sumGeneric; diff --git a/forge-gui/res/cardsfolder/b/bard_class.txt b/forge-gui/res/cardsfolder/b/bard_class.txt index 2d8d4bb1640..01b52c21587 100644 --- a/forge-gui/res/cardsfolder/b/bard_class.txt +++ b/forge-gui/res/cardsfolder/b/bard_class.txt @@ -4,7 +4,7 @@ Types:Enchantment Class K:ETBReplacement:Other:AddExtraCounter:Mandatory:Battlefield:Creature.Legendary+YouCtrl+Other SVar:AddExtraCounter:DB$ PutCounter | ETB$ True | Defined$ ReplacedCard | CounterType$ P1P1 | CounterNum$ 1 | SpellDescription$ Legendary creatures you control enter the battlefield with an additional +1/+1 counter on them. K:Class:2:R G:AddStaticAbility$ SReduceCost -SVar:SReduceCost:Mode$ ReduceCost | ValidCard$ Legendary | Type$ Spell | Activator$ You | Amount$ 1 | Color$ R G | Secondary$ True | Description$ Legendary spells you cast cost {R}{G} less to cast. This effect reduces only the amount of colored mana you pay. +SVar:SReduceCost:Mode$ ReduceCost | ValidCard$ Legendary | Type$ Spell | Activator$ You | Amount$ 1 | Color$ R G | IgnoreGeneric$ True | Secondary$ True | Description$ Legendary spells you cast cost {R}{G} less to cast. This effect reduces only the amount of colored mana you pay. K:Class:3:3 R G:AddTrigger$ TriggerCast SVar:TriggerCast:Mode$ SpellCast | ValidCard$ Legendary | ValidActivatingPlayer$ You | TriggerZones$ Battlefield | Execute$ TrigImpulsiveDraw | Secondary$ True | TriggerDescription$ Whenever you cast a legendary spell, exile the top two cards of your library. You may play them this turn. SVar:TrigImpulsiveDraw:DB$ Dig | Defined$ TriggeredPlayer | DigNum$ 2 | ChangeNum$ All | DestinationZone$ Exile | RememberChanged$ True | SubAbility$ DBEffect diff --git a/forge-gui/res/cardsfolder/e/edgewalker.txt b/forge-gui/res/cardsfolder/e/edgewalker.txt index a0298f2c888..89c2c3d8ca2 100644 --- a/forge-gui/res/cardsfolder/e/edgewalker.txt +++ b/forge-gui/res/cardsfolder/e/edgewalker.txt @@ -2,6 +2,5 @@ Name:Edgewalker ManaCost:1 W B Types:Creature Human Cleric PT:2/2 -S:Mode$ ReduceCost | ValidCard$ Cleric | Type$ Spell | Activator$ You | Amount$ 1 | Color$ W | Description$ Cleric spells you cast cost {W}{B} less to cast. This effect reduces only the amount of colored mana you pay. (For example, if you cast a Cleric spell with mana cost {1}{W}, it costs {1} to cast.) -S:Mode$ ReduceCost | ValidCard$ Cleric | Type$ Spell | Activator$ You | Amount$ 1 | Color$ B +S:Mode$ ReduceCost | ValidCard$ Cleric | Type$ Spell | Activator$ You | Amount$ 1 | Color$ W B | IgnoreGeneric$ True | Description$ Cleric spells you cast cost {W}{B} less to cast. This effect reduces only the amount of colored mana you pay. (For example, if you cast a Cleric spell with mana cost {1}{W}, it costs {1} to cast.) Oracle:Cleric spells you cast cost {W}{B} less to cast. This effect reduces only the amount of colored mana you pay. (For example, if you cast a Cleric spell with mana cost {1}{W}, it costs {1} to cast.) diff --git a/forge-gui/res/cardsfolder/m/morophon_the_boundless.txt b/forge-gui/res/cardsfolder/m/morophon_the_boundless.txt index 880d77fc42c..8533ff5825b 100644 --- a/forge-gui/res/cardsfolder/m/morophon_the_boundless.txt +++ b/forge-gui/res/cardsfolder/m/morophon_the_boundless.txt @@ -6,7 +6,7 @@ K:Changeling K:ETBReplacement:Other:ChooseCT SVar:ChooseCT:DB$ ChooseType | Defined$ You | Type$ Creature | SpellDescription$ As CARDNAME enters the battlefield, choose a creature type. | StackDescription$ SpellDescription | AILogic$ MostProminentInComputerDeck AI:RemoveDeck:Random -S:Mode$ ReduceCost | ValidCard$ Card.ChosenType | Type$ Spell | Activator$ You | Amount$ 1 | Color$ W U B R G | Description$ Spells of the chosen type you cast cost {W}{U}{B}{R}{G} less to cast. This effect reduces only the amount of colored mana you pay. +S:Mode$ ReduceCost | ValidCard$ Card.ChosenType | Type$ Spell | Activator$ You | Amount$ 1 | Color$ W U B R G | IgnoreGeneric$ True | Description$ Spells of the chosen type you cast cost {W}{U}{B}{R}{G} less to cast. This effect reduces only the amount of colored mana you pay. S:Mode$ Continuous | Affected$ Creature.ChosenType+Other+YouCtrl | AddPower$ 1 | AddToughness$ 1 | Description$ Other creatures you control of the chosen type get +1/+1. SVar:PlayMain1:TRUE Oracle:Changeling (This card is every creature type.)\nAs Morophon, the Boundless enters the battlefield, choose a creature type.\nSpells of the chosen type you cast cost {W}{U}{B}{R}{G} less to cast. This effect reduces only the amount of colored mana you pay.\nOther creatures you control of the chosen type get +1/+1. diff --git a/forge-gui/res/cardsfolder/r/ragemonger.txt b/forge-gui/res/cardsfolder/r/ragemonger.txt index f709568404a..53cfeb70b58 100644 --- a/forge-gui/res/cardsfolder/r/ragemonger.txt +++ b/forge-gui/res/cardsfolder/r/ragemonger.txt @@ -2,5 +2,5 @@ Name:Ragemonger ManaCost:1 B R Types:Creature Minotaur Shaman PT:2/3 -S:Mode$ ReduceCost | ValidCard$ Minotaur | Type$ Spell | Activator$ You | Amount$ 1 | Color$ B R | Description$ Minotaur spells you cast cost {B}{R} less to cast. This effect reduces only the amount of colored mana you pay. (For example, if you cast a Minotaur spell with mana cost {2}{R}, it costs {2} to cast.) +S:Mode$ ReduceCost | ValidCard$ Minotaur | Type$ Spell | Activator$ You | Amount$ 1 | Color$ B R | IgnoreGeneric$ True | Description$ Minotaur spells you cast cost {B}{R} less to cast. This effect reduces only the amount of colored mana you pay. (For example, if you cast a Minotaur spell with mana cost {2}{R}, it costs {2} to cast.) Oracle:Minotaur spells you cast cost {B}{R} less to cast. This effect reduces only the amount of colored mana you pay. (For example, if you cast a Minotaur spell with mana cost {2}{R}, it costs {2} to cast.)