mirror of
https://github.com/correl/mage.git
synced 2024-12-26 11:09:27 +00:00
Fix for colored mana producers only produce colorless mana (#432). Had to change logic to work properly. The mana will be copied before adding and replaced by mana pool.
This commit is contained in:
parent
153b87e664
commit
97a1b0130c
3 changed files with 2 additions and 6 deletions
|
@ -112,7 +112,6 @@ public class CommanderManaReplacementEffect extends ReplacementEffectImpl {
|
||||||
}
|
}
|
||||||
mana.setWhite(0);
|
mana.setWhite(0);
|
||||||
}
|
}
|
||||||
((ManaEvent) event).setMana(mana);
|
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -48,8 +48,4 @@ public class ManaEvent extends GameEvent {
|
||||||
return mana;
|
return mana;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void setMana(Mana mana) {
|
|
||||||
this.mana = mana;
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -302,7 +302,8 @@ public class ManaPool implements Serializable {
|
||||||
return m;
|
return m;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void addMana(Mana mana, Game game, Ability source) {
|
public void addMana(Mana manaToAdd, Game game, Ability source) {
|
||||||
|
Mana mana = manaToAdd.copy();
|
||||||
if (!game.replaceEvent(new ManaEvent(EventType.ADD_MANA, source.getId(), source.getSourceId(), source.getControllerId(), mana))) {
|
if (!game.replaceEvent(new ManaEvent(EventType.ADD_MANA, source.getId(), source.getSourceId(), source.getControllerId(), mana))) {
|
||||||
if (mana instanceof ConditionalMana) {
|
if (mana instanceof ConditionalMana) {
|
||||||
this.manaItems.add(new ManaPoolItem((ConditionalMana)mana, source.getSourceId()));
|
this.manaItems.add(new ManaPoolItem((ConditionalMana)mana, source.getSourceId()));
|
||||||
|
|
Loading…
Reference in a new issue