mirror of
https://github.com/correl/mage.git
synced 2024-12-25 03:00:15 +00:00
* Fixed AddManaOfAnyColorEffect to send TAPPED_FOR_MANA event correctly (fixed that City of Brass did not work with Heartbeat of Spring).
This commit is contained in:
parent
ac0d923afd
commit
105e12db10
2 changed files with 3 additions and 2 deletions
|
@ -359,7 +359,7 @@ public abstract class AbilityImpl implements Ability {
|
||||||
} else if (effect instanceof DynamicManaEffect) {
|
} else if (effect instanceof DynamicManaEffect) {
|
||||||
mana = ((DynamicManaEffect)effect).getMana(game, this);
|
mana = ((DynamicManaEffect)effect).getMana(game, this);
|
||||||
}
|
}
|
||||||
if (mana != null) { // if mana == null the event has to be fires in the mana effect
|
if (mana != null) { // if mana == null the event has to be fired in the mana effect
|
||||||
game.fireEvent(new ManaEvent(GameEvent.EventType.TAPPED_FOR_MANA, sourceId, sourceId, controllerId, mana));
|
game.fireEvent(new ManaEvent(GameEvent.EventType.TAPPED_FOR_MANA, sourceId, sourceId, controllerId, mana));
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
|
|
@ -73,7 +73,7 @@ public class AddManaOfAnyColorEffect extends BasicManaEffect {
|
||||||
|
|
||||||
if (controller.choose(outcome, choice, game)) {
|
if (controller.choose(outcome, choice, game)) {
|
||||||
if (choice.getColor() == null) {
|
if (choice.getColor() == null) {
|
||||||
return false; // it happenes, don't know how
|
return false; // it happens, don't know how
|
||||||
}
|
}
|
||||||
Mana createdMana = null;
|
Mana createdMana = null;
|
||||||
if (choice.getColor().isBlack()) {
|
if (choice.getColor().isBlack()) {
|
||||||
|
@ -89,6 +89,7 @@ public class AddManaOfAnyColorEffect extends BasicManaEffect {
|
||||||
}
|
}
|
||||||
if (createdMana != null) {
|
if (createdMana != null) {
|
||||||
controller.getManaPool().addMana(createdMana, game, source);
|
controller.getManaPool().addMana(createdMana, game, source);
|
||||||
|
checkToFirePossibleEvents(createdMana, game, source);
|
||||||
}
|
}
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue