mirror of
https://github.com/Card-Forge/forge.git
synced 2025-11-17 11:18:01 +00:00
Fix cost reducers (like Heartstone and Training Grounds).
This commit is contained in:
@@ -436,9 +436,14 @@ public class ManaCostAdjustment {
|
|||||||
|
|
||||||
|
|
||||||
if (!params.containsKey("Color")) {
|
if (!params.containsKey("Color")) {
|
||||||
manaCost.decreaseColorlessMana(value);
|
int minMana = 0;
|
||||||
if (manaCost.toString().equals("0") && params.containsKey("MinMana")) {
|
if (params.containsKey("MinMana")) {
|
||||||
manaCost.increaseColorlessMana(Integer.valueOf(params.get("MinMana")));
|
minMana = Integer.valueOf(params.get("MinMana"));
|
||||||
|
}
|
||||||
|
|
||||||
|
final int maxReduction = Math.max(0, manaCost.getConvertedManaCost() - minMana);
|
||||||
|
if (maxReduction > 0) {
|
||||||
|
manaCost.decreaseColorlessMana(Math.min(value, maxReduction));
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
final String color = params.get("Color");
|
final String color = params.get("Color");
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
Name:Heartstone
|
Name:Heartstone
|
||||||
ManaCost:3
|
ManaCost:3
|
||||||
Types:Artifact
|
Types:Artifact
|
||||||
S:Mode$ ReduceCost | ValidCard$ Creature.YouCtrl | Type$ Ability | Amount$ 1 | MinMana$ 1 | AffectedZone$ Battlefield | Description$ Activated abilities of creatures you control cost 1 less to activate. This effect can't reduce the amount of mana an ability costs to activate to less than one mana.
|
S:Mode$ ReduceCost | ValidCard$ Creature.YouCtrl | Type$ Ability | Amount$ 1 | MinMana$ 1 | AffectedZone$ Battlefield | Description$ Activated abilities of creatures you control cost {1} less to activate. This effect can't reduce the amount of mana an ability costs to activate to less than one mana.
|
||||||
SVar:Picture:http://www.wizards.com/global/images/magic/general/heartstone.jpg
|
SVar:Picture:http://www.wizards.com/global/images/magic/general/heartstone.jpg
|
||||||
Oracle:Activated abilities of creatures cost {1} less to activate. This effect can't reduce the amount of mana an ability costs to activate to less than one mana.
|
Oracle:Activated abilities of creatures cost {1} less to activate. This effect can't reduce the amount of mana an ability costs to activate to less than one mana.
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
Name:Training Grounds
|
Name:Training Grounds
|
||||||
ManaCost:U
|
ManaCost:U
|
||||||
Types:Enchantment
|
Types:Enchantment
|
||||||
S:Mode$ ReduceCost | ValidCard$ Creature.YouCtrl | Type$ Ability | Amount$ 2 | MinMana$ 1 | AffectedZone$ Battlefield | Description$ Activated abilities of creatures you control cost 2 less to activate. This effect can't reduce the amount of mana an ability costs to activate to less than one mana.
|
S:Mode$ ReduceCost | ValidCard$ Creature.YouCtrl | Type$ Ability | Amount$ 2 | MinMana$ 1 | AffectedZone$ Battlefield | Description$ Activated abilities of creatures you control cost {2} less to activate. This effect can't reduce the amount of mana an ability costs to activate to less than one mana.
|
||||||
SVar:Picture:http://www.wizards.com/global/images/magic/general/training_grounds.jpg
|
SVar:Picture:http://www.wizards.com/global/images/magic/general/training_grounds.jpg
|
||||||
Oracle:Activated abilities of creatures you control cost up to {2} less to activate. This effect can't reduce the amount of mana an ability costs to activate to less than one mana.
|
Oracle:Activated abilities of creatures you control cost up to {2} less to activate. This effect can't reduce the amount of mana an ability costs to activate to less than one mana.
|
||||||
|
|||||||
Reference in New Issue
Block a user