forked from External/mage
- Added ForetoldWatcher, ForetoldCondition. Added card from
weirddan455 [KHM] Poison the Cup that uses it.
This commit is contained in:
parent
dacf30f4b9
commit
68f2a3d032
5 changed files with 130 additions and 4 deletions
|
|
@ -0,0 +1,29 @@
|
|||
package mage.abilities.condition.common;
|
||||
|
||||
import mage.abilities.Ability;
|
||||
import mage.abilities.condition.Condition;
|
||||
import mage.game.Game;
|
||||
import mage.watchers.common.ForetoldWatcher;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author jeffwadsworth
|
||||
*/
|
||||
public enum ForetoldCondition implements Condition {
|
||||
|
||||
instance;
|
||||
|
||||
@Override
|
||||
public boolean apply(Game game, Ability source) {
|
||||
ForetoldWatcher watcher = game.getState().getWatcher(ForetoldWatcher.class);
|
||||
if (watcher != null) {
|
||||
return watcher.foretoldSpellWasCast(source.getSourceId());
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return "this card was foretold";
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue