forked from External/mage
first batch of watcher naming
This commit is contained in:
parent
20a881a374
commit
efae1251f9
111 changed files with 177 additions and 179 deletions
|
|
@ -31,6 +31,7 @@ import mage.abilities.Ability;
|
|||
import mage.abilities.condition.Condition;
|
||||
import mage.game.Game;
|
||||
import mage.watchers.Watcher;
|
||||
import mage.watchers.common.MorbidWatcher;
|
||||
|
||||
/**
|
||||
* @author nantuko
|
||||
|
|
@ -41,7 +42,7 @@ public enum MorbidCondition implements Condition {
|
|||
|
||||
@Override
|
||||
public boolean apply(Game game, Ability source) {
|
||||
Watcher watcher = game.getState().getWatchers().get("Morbid");
|
||||
Watcher watcher = game.getState().getWatchers().get(MorbidWatcher.class.getSimpleName());
|
||||
return watcher.conditionMet();
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -49,7 +49,7 @@ public enum NoSpellsWereCastLastTurnCondition implements Condition {
|
|||
return false;
|
||||
}
|
||||
|
||||
CastSpellLastTurnWatcher watcher = (CastSpellLastTurnWatcher) game.getState().getWatchers().get(CastSpellLastTurnWatcher.class.getName());
|
||||
CastSpellLastTurnWatcher watcher = (CastSpellLastTurnWatcher) game.getState().getWatchers().get(CastSpellLastTurnWatcher.class.getSimpleName());
|
||||
// if any player cast spell, return false
|
||||
for (Integer count : watcher.getAmountOfSpellsCastOnPrevTurn().values()) {
|
||||
if (count > 0) {
|
||||
|
|
|
|||
|
|
@ -41,7 +41,7 @@ public enum TwoOrMoreSpellsWereCastLastTurnCondition implements Condition {
|
|||
|
||||
@Override
|
||||
public boolean apply(Game game, Ability source) {
|
||||
CastSpellLastTurnWatcher watcher = (CastSpellLastTurnWatcher) game.getState().getWatchers().get(CastSpellLastTurnWatcher.class.getName());
|
||||
CastSpellLastTurnWatcher watcher = (CastSpellLastTurnWatcher) game.getState().getWatchers().get(CastSpellLastTurnWatcher.class.getSimpleName());
|
||||
// if any player cast more than two spells, return true
|
||||
for (Integer count : watcher.getAmountOfSpellsCastOnPrevTurn().values()) {
|
||||
if (count >= 2) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue