mirror of
https://github.com/Card-Forge/forge.git
synced 2025-11-18 11:48:02 +00:00
Fix some cost reductions ignoring generic mana (#1541)
Co-authored-by: tool4EvEr <tool4EvEr@192.168.0.59>
This commit is contained in:
@@ -6,11 +6,13 @@ import java.util.Map.Entry;
|
|||||||
|
|
||||||
import org.apache.commons.lang3.StringUtils;
|
import org.apache.commons.lang3.StringUtils;
|
||||||
|
|
||||||
|
import com.google.common.base.Strings;
|
||||||
import com.google.common.collect.Lists;
|
import com.google.common.collect.Lists;
|
||||||
|
|
||||||
import forge.card.CardStateName;
|
import forge.card.CardStateName;
|
||||||
import forge.card.mana.ManaAtom;
|
import forge.card.mana.ManaAtom;
|
||||||
import forge.card.mana.ManaCost;
|
import forge.card.mana.ManaCost;
|
||||||
|
import forge.card.mana.ManaCostParser;
|
||||||
import forge.card.mana.ManaCostShard;
|
import forge.card.mana.ManaCostShard;
|
||||||
import forge.game.Game;
|
import forge.game.Game;
|
||||||
import forge.game.GameObject;
|
import forge.game.GameObject;
|
||||||
@@ -387,7 +389,7 @@ public class CostAdjustment {
|
|||||||
value = AbilityUtils.calculateAmount(hostCard, amount, staticAbility);
|
value = AbilityUtils.calculateAmount(hostCard, amount, staticAbility);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!staticAbility.hasParam("Cost") && ! staticAbility.hasParam("Color")) {
|
if (!staticAbility.hasParam("Cost") && !staticAbility.hasParam("Color")) {
|
||||||
int minMana = 0;
|
int minMana = 0;
|
||||||
if (staticAbility.hasParam("MinMana")) {
|
if (staticAbility.hasParam("MinMana")) {
|
||||||
minMana = Integer.valueOf(staticAbility.getParam("MinMana"));
|
minMana = Integer.valueOf(staticAbility.getParam("MinMana"));
|
||||||
@@ -405,7 +407,11 @@ public class CostAdjustment {
|
|||||||
if (StringUtils.isNumeric(cost)) {
|
if (StringUtils.isNumeric(cost)) {
|
||||||
sumGeneric += Integer.parseInt(cost) * value;
|
sumGeneric += Integer.parseInt(cost) * value;
|
||||||
} else {
|
} else {
|
||||||
|
if (staticAbility.hasParam("IgnoreGeneric")) {
|
||||||
manaCost.decreaseShard(ManaCostShard.parseNonGeneric(cost), value);
|
manaCost.decreaseShard(ManaCostShard.parseNonGeneric(cost), value);
|
||||||
|
} else {
|
||||||
|
manaCost.subtractManaCost(new ManaCost(new ManaCostParser(Strings.repeat(cost + " ", value))));
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return sumGeneric;
|
return sumGeneric;
|
||||||
|
|||||||
@@ -4,7 +4,7 @@ Types:Enchantment Class
|
|||||||
K:ETBReplacement:Other:AddExtraCounter:Mandatory:Battlefield:Creature.Legendary+YouCtrl+Other
|
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.
|
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
|
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
|
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: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
|
SVar:TrigImpulsiveDraw:DB$ Dig | Defined$ TriggeredPlayer | DigNum$ 2 | ChangeNum$ All | DestinationZone$ Exile | RememberChanged$ True | SubAbility$ DBEffect
|
||||||
|
|||||||
@@ -2,6 +2,5 @@ Name:Edgewalker
|
|||||||
ManaCost:1 W B
|
ManaCost:1 W B
|
||||||
Types:Creature Human Cleric
|
Types:Creature Human Cleric
|
||||||
PT:2/2
|
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$ 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.)
|
||||||
S:Mode$ ReduceCost | ValidCard$ Cleric | Type$ Spell | Activator$ You | Amount$ 1 | Color$ B
|
|
||||||
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.)
|
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.)
|
||||||
|
|||||||
@@ -6,7 +6,7 @@ K:Changeling
|
|||||||
K:ETBReplacement:Other:ChooseCT
|
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
|
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
|
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.
|
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
|
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.
|
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.
|
||||||
|
|||||||
@@ -2,5 +2,5 @@ Name:Ragemonger
|
|||||||
ManaCost:1 B R
|
ManaCost:1 B R
|
||||||
Types:Creature Minotaur Shaman
|
Types:Creature Minotaur Shaman
|
||||||
PT:2/3
|
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.)
|
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.)
|
||||||
|
|||||||
Reference in New Issue
Block a user