mirror of
https://github.com/magefree/mage.git
synced 2026-01-26 05:09:16 -08:00
* Cavern of Soul - Fixed a bug that caused that every spell could not be countered that was cast using the first (colorless) mana ability (fixes #391).
This commit is contained in:
parent
0356272cae
commit
1e7cfa086b
4 changed files with 34 additions and 4 deletions
|
|
@ -130,6 +130,7 @@ class CavernOfSoulsManaBuilder extends ConditionalManaBuilder {
|
|||
|
||||
@Override
|
||||
public ConditionalMana build(Object... options) {
|
||||
this.mana.setFlag(true); // indicates that the mana is from second ability
|
||||
return new CavernOfSoulsConditionalMana(this.mana);
|
||||
}
|
||||
|
||||
|
|
@ -169,7 +170,7 @@ class CavernOfSoulsManaCondition extends CreatureCastManaCondition {
|
|||
|
||||
class CavernOfSoulsWatcher extends WatcherImpl<CavernOfSoulsWatcher> {
|
||||
|
||||
public List<UUID> spells = new ArrayList<UUID>();
|
||||
public List<UUID> spells = new ArrayList<>();
|
||||
|
||||
public CavernOfSoulsWatcher() {
|
||||
super("ManaPaidFromCavernOfSoulsWatcher", WatcherScope.GAME);
|
||||
|
|
@ -188,7 +189,7 @@ class CavernOfSoulsWatcher extends WatcherImpl<CavernOfSoulsWatcher> {
|
|||
public void watch(GameEvent event, Game game) {
|
||||
if (event.getType() == GameEvent.EventType.MANA_PAYED) {
|
||||
MageObject object = game.getObject(event.getSourceId());
|
||||
if (object != null && object.getName().equals("Cavern of Souls")) {
|
||||
if (object != null && object.getName().equals("Cavern of Souls") && event.getFlag()) {
|
||||
spells.add(event.getTargetId());
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue