Fixed error of CastFromHandCondition.

This commit is contained in:
LevelX2 2016-03-01 21:41:05 +01:00
parent 6299425c1d
commit 385313bd64

View file

@ -37,11 +37,11 @@ public class CastFromHandWatcher extends Watcher {
step = null; step = null;
} }
if (event.getType() == GameEvent.EventType.SPELL_CAST && event.getZone().equals(Zone.HAND)) { if (event.getType() == GameEvent.EventType.SPELL_CAST && event.getZone().equals(Zone.HAND)) {
if (step == null) {
step = game.getTurn().getStep(); step = game.getTurn().getStep();
Spell spell = (Spell) game.getObject(event.getTargetId());
if (this.getSourceId().equals(spell.getSourceId())) {
condition = true;
} }
Spell spell = (Spell) game.getObject(event.getTargetId());
spellsCastFromHand.add(spell.getSourceId());
} }
} }