Examples of conditionMet()


Examples of mage.watchers.Watcher.conditionMet()

    @Override
    public boolean apply(Game game, Ability source) {
        Permanent p = game.getPermanent(source.getSourceId());
        if (p != null) {
            Watcher watcher = game.getState().getWatchers().get("CastCreature", source.getSourceId());
            if (watcher != null && !watcher.conditionMet()) {
                return true;
            }
        }
        return false;
    }
View Full Code Here

Examples of mage.watchers.Watcher.conditionMet()

    @Override
    public boolean checkTrigger(GameEvent event, Game game) {
        if (event.getType() == GameEvent.EventType.SPELL_CAST && event.getPlayerId().equals(controllerId)) {
            Watcher watcher = game.getState().getWatchers().get("SecondSpellCast", controllerId);
            if (watcher != null && watcher.conditionMet()) {
                return true;
            }
        }
        return false;
    }
View Full Code Here

Examples of mage.watchers.common.BloodthirstWatcher.conditionMet()

    @Override
    public boolean apply(Game game, Ability source) {
        Player player = game.getPlayer(source.getControllerId());
        if (player != null) {
            BloodthirstWatcher watcher = (BloodthirstWatcher) game.getState().getWatchers().get("DamagedOpponents", source.getControllerId());
            if (watcher != null && watcher.conditionMet()) {
                Permanent p = game.getPermanent(source.getSourceId());
                if (p != null) {
                    p.addCounters(CounterType.P1P1.createInstance(amount), game);

                }
View Full Code Here

Examples of mage.watchers.common.BloodthirstWatcher.conditionMet()

    }

    @Override
    public boolean apply(Game game, Ability source) {
        BloodthirstWatcher watcher = (BloodthirstWatcher) game.getState().getWatchers().get("DamagedOpponents", source.getControllerId());
        return !watcher.conditionMet();
    }

    @Override
    public String toString() {
  return "if an opponent was dealt damage this turn";
View Full Code Here

Examples of mage.watchers.common.BloodthirstWatcher.conditionMet()

    }

    @Override
    public boolean applies(Permanent permanent, Ability source, Game game) {
        BloodthirstWatcher watcher = (BloodthirstWatcher) game.getState().getWatchers().get("DamagedOpponents", source.getControllerId());
        return !watcher.conditionMet();
    }
}
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.