forked from External/mage
Foxed some EntersBattlefieldTriggeredAbilities with Intervening-If-Clause not handled correctly.
This commit is contained in:
parent
b19b43c4c8
commit
570a6d92dc
9 changed files with 93 additions and 99 deletions
|
|
@ -6,7 +6,7 @@ import mage.constants.Zone;
|
|||
import mage.game.Game;
|
||||
import mage.game.permanent.Permanent;
|
||||
import mage.game.stack.Spell;
|
||||
import mage.watchers.Watcher;
|
||||
import mage.watchers.common.CastFromHandWatcher;
|
||||
|
||||
/**
|
||||
* Warning: CastFromHandWatcher must be installed to card for proper working.
|
||||
|
|
@ -31,9 +31,8 @@ public class CastFromHandCondition implements Condition {
|
|||
return false;
|
||||
}
|
||||
}
|
||||
// Probably watcher is no longer needed
|
||||
Watcher watcher = game.getState().getWatchers().get("CastFromHand", source.getSourceId());
|
||||
if (watcher != null && watcher.conditionMet()) {
|
||||
CastFromHandWatcher watcher = (CastFromHandWatcher) game.getState().getWatchers().get(CastFromHandWatcher.class.getName(), source.getSourceId());
|
||||
if (watcher != null && watcher.spellWasCastFromHand(source.getSourceId()) {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue