represent alt mana cost {0} as MagicManaCost.NONE so that no log message if shown if there is no cost modification, fixes #640
parent
165c19aee7
commit
8751f451e5
|
@ -221,9 +221,11 @@ public enum MagicCostEvent {
|
|||
},
|
||||
AltManaCost("(pay )?alt mana cost " + ARG.MANACOST) {
|
||||
public MagicEvent toEvent(final Matcher arg, final MagicSource source) {
|
||||
return source instanceof MagicCard ?
|
||||
MagicPayManaCostEvent.Cast((MagicCard)source, MagicManaCost.create(ARG.manacost(arg))):
|
||||
new MagicPayManaCostEvent(source, MagicManaCost.create(ARG.manacost(arg)));
|
||||
final MagicManaCost origCost = MagicManaCost.create(ARG.manacost(arg));
|
||||
final MagicManaCost cost = origCost == MagicManaCost.ZERO ? MagicManaCost.NONE : origCost;
|
||||
return (source instanceof MagicCard) ?
|
||||
MagicPayManaCostEvent.Cast((MagicCard)source, cost) :
|
||||
new MagicPayManaCostEvent(source, cost);
|
||||
}
|
||||
},
|
||||
DamageYou("SN deals " + ARG.NUMBER + " damage to you") {
|
||||
|
|
|
@ -32,6 +32,7 @@ class TestCostReduction extends TestGameBuilder {
|
|||
addToHand(P, "Enrage", 1);
|
||||
addToHand(P, "Bonfire of the Damned", 1);
|
||||
addToHand(P, "Gut Shot", 1);
|
||||
addToHand(P, "Kobolds of Kher Keep", 1);
|
||||
|
||||
P = opponent;
|
||||
|
||||
|
|
Loading…
Reference in New Issue