Examples of conditionMet()


Examples of mage.watchers.Watcher.conditionMet()

    }

    @Override
    public boolean isAvailable(Game game, Ability source) {
        Watcher watcher = game.getState().getWatchers().get("CreatureSpellCountered", source.getControllerId());
        if (watcher != null && watcher.conditionMet()) {
            return true;
        }
        return false;
    }
View Full Code Here

Examples of mage.watchers.Watcher.conditionMet()

    }

    @Override
    public boolean isAvailable(Game game, Ability source) {
        Watcher watcher = game.getState().getWatchers().get("LibrarySearched", source.getControllerId());
        if (watcher != null && watcher.conditionMet())
            return true;
        return false;
    }

    @Override
View Full Code Here

Examples of mage.watchers.Watcher.conditionMet()

    }

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

}
View Full Code Here

Examples of mage.watchers.Watcher.conditionMet()

    }

    @Override
    public boolean apply(Game game, Ability source) {
        Watcher watcher = game.getState().getWatchers().get("CreatureEnteredBattlefieldLastTurnWatcher", source.getSourceId());
        return watcher != null && watcher.conditionMet();
    }
}

class CreatureEnteredBattlefieldLastTurnWatcher extends Watcher {
View Full Code Here

Examples of mage.watchers.Watcher.conditionMet()

    @Override
    public boolean checkTrigger(GameEvent event, Game game) {
        if (event.getType() == EventType.SPELL_CAST && event.getPlayerId().equals(controllerId)) {
            Watcher watcher = game.getState().getWatchers().get("CreatureCast", controllerId);
            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.END_TURN_STEP_PRE) {
            Watcher watcher = game.getState().getWatchers().get("Morbid");
            return watcher.conditionMet();
        }
        return false;
    }

    @Override
View Full Code Here

Examples of mage.watchers.Watcher.conditionMet()

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

Examples of mage.watchers.Watcher.conditionMet()

    @Override
    public boolean apply(Game game, Ability source) {
        int damage = 3;
        Watcher watcher = game.getState().getWatchers().get("Morbid");
        if (watcher.conditionMet()) {
              damage = 5;
        }
        Permanent permanent = game.getPermanent(targetPointer.getFirst(game, source));
        if (permanent != null) {
            permanent.damage(damage, source.getSourceId(), game, false, true);
View Full Code Here

Examples of mage.watchers.Watcher.conditionMet()

    @Override
    public boolean apply(Game game, Ability source) {
        Watcher watcher = game.getState().getWatchers().get("LandPlayed", source.getControllerId());
        Player player = game.getPlayer(source.getTargets().get(0).getFirstTarget());
        Permanent creature = game.getPermanent(source.getTargets().get(1).getFirstTarget());
        if (watcher != null && watcher.conditionMet()) {
            if (player != null) {
                player.damage(3, source.getSourceId(), game, false, true);
            }
            if (creature != null) {
                creature.damage(3, source.getSourceId(), game, false, true);
View Full Code Here

Examples of mage.watchers.Watcher.conditionMet()

    @Override
    public boolean apply(Game game, Ability source) {
        Watcher watcher = game.getState().getWatchers().get("LandPlayed", source.getControllerId());
        Permanent target = (Permanent) game.getPermanent(source.getFirstTarget());
        if (target != null) {
            if (watcher != null && watcher.conditionMet()) {
                target.addPower(4);
                target.addToughness(4);
            }
            else{
                target.addPower(2);
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.