mirror of
https://github.com/magefree/mage.git
synced 2026-01-10 21:02:08 -08:00
* Market Festival - Fixed that the mana generated by Market Festival could be used to pay mana costs of a mana ability of the land Market Festival enchants (e.g. second ability of Nykthos, Shrine to Nyx).
This commit is contained in:
parent
116100461f
commit
551f03a542
5 changed files with 42 additions and 14 deletions
|
|
@ -54,6 +54,8 @@ import org.apache.log4j.Logger;
|
|||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
import java.util.UUID;
|
||||
import mage.abilities.costs.common.TapSourceCost;
|
||||
import mage.game.events.GameEvent;
|
||||
|
||||
/**
|
||||
*
|
||||
|
|
@ -365,6 +367,15 @@ public abstract class AbilityImpl implements Ability {
|
|||
game.informPlayers(new StringBuilder(controller.getName()).append(" announces a value of ").append(xValue).append(" for ").append(variableManaCost.getText()).toString());
|
||||
}
|
||||
activated = true;
|
||||
// fire if tapped for mana (may only fires now because else costs of ability itself can be payed with mana of abilities that trigger for that event
|
||||
if (this.getAbilityType().equals(AbilityType.MANA)) {
|
||||
for (Cost cost: costs) {
|
||||
if (cost instanceof TapSourceCost) {
|
||||
game.fireEvent(GameEvent.getEvent(GameEvent.EventType.TAPPED_FOR_MANA, sourceId, sourceId, controllerId));
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue