Updated how spell triggers get information about the spell that triggered them.

This prevents countering the spell from removing the effect of the trigger.
This commit is contained in:
Evan Kranzler 2017-09-18 17:02:55 -04:00
parent e3245c496c
commit 7bb7754bb3
26 changed files with 69 additions and 61 deletions

View file

@ -445,6 +445,20 @@ public abstract class GameImpl implements Game, Serializable {
return null;
}
@Override
public Spell getSpell(UUID spellId) {
return state.getStack().getSpell(spellId);
}
@Override
public Spell getSpellOrLKIStack(UUID spellId) {
Spell spell = state.getStack().getSpell(spellId);
if (spell == null) {
spell = (Spell) this.getLastKnownInformation(spellId, Zone.STACK);
}
return spell;
}
@Override
public Permanent getPermanent(UUID permanentId) {
return state.getPermanent(permanentId);