finish rewriting watchers

This commit is contained in:
igoudt 2017-04-29 11:58:47 +02:00
parent efae1251f9
commit b6fe6f772a
146 changed files with 233 additions and 235 deletions

View file

@ -58,7 +58,7 @@ public class CastOnlyIfYouHaveCastAnotherSpellEffect extends ContinuousRuleModif
@Override
public boolean applies(GameEvent event, Ability source, Game game) {
if (event.getSourceId().equals(source.getSourceId())) {
CastSpellLastTurnWatcher watcher = (CastSpellLastTurnWatcher) game.getState().getWatchers().get(CastSpellLastTurnWatcher.class.getName());
CastSpellLastTurnWatcher watcher = (CastSpellLastTurnWatcher) game.getState().getWatchers().get(CastSpellLastTurnWatcher.class.getSimpleName());
if (watcher != null && watcher.getAmountOfSpellsPlayerCastOnCurrentTurn(source.getControllerId()) == 0) {
return true;
}