mirror of
https://github.com/magefree/mage.git
synced 2026-01-22 19:29:59 -08:00
* Some minor updates.
This commit is contained in:
parent
5975074cc0
commit
e09141b1fc
2 changed files with 14 additions and 10 deletions
|
|
@ -79,17 +79,21 @@ class MaelstromNexusTriggeredAbility extends TriggeredAbilityImpl {
|
|||
super(ability);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean checkEventType(GameEvent event, Game game) {
|
||||
return event.getType() == GameEvent.EventType.SPELL_CAST;
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public boolean checkTrigger(GameEvent event, Game game) {
|
||||
if (event.getType() == GameEvent.EventType.SPELL_CAST) {
|
||||
Spell spell = game.getStack().getSpell(event.getTargetId());
|
||||
FirstSpellCastThisTurnWatcher watcher = (FirstSpellCastThisTurnWatcher) game.getState().getWatchers().get("FirstSpellCastThisTurn", this.getSourceId());
|
||||
if (spell != null
|
||||
&& watcher != null
|
||||
&& watcher.conditionMet()) {
|
||||
this.getEffects().get(0).setTargetPointer(new FixedTarget(spell.getSourceId()));
|
||||
return true;
|
||||
}
|
||||
Spell spell = game.getStack().getSpell(event.getTargetId());
|
||||
FirstSpellCastThisTurnWatcher watcher = (FirstSpellCastThisTurnWatcher) game.getState().getWatchers().get("FirstSpellCastThisTurn", this.getSourceId());
|
||||
if (spell != null
|
||||
&& watcher != null
|
||||
&& watcher.conditionMet()) {
|
||||
this.getEffects().get(0).setTargetPointer(new FixedTarget(spell.getSourceId()));
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue