@Override public void init(Ability source, Game game) { super.init(source, game); affectedObjectList.add(new MageObjectReference(source.getSourceId(), game)); Spell creatureSpellCast = game.getSpell(targetPointer.getFirst(game, source)); if (creatureSpellCast != null && creatureSpellCast.getColor(game).hasColor()) { game.getState().setValue("opalTitanColor" + source.getSourceId(), creatureSpellCast.getColor(game)); } }
@Override public boolean applies(GameEvent event, Ability source, Game game) { if (event.getTargetId().equals(source.getSourceId())) { Permanent targettedPermanent = game.getPermanent(event.getTargetId()); Spell sourceSpell = game.getStack().getSpell(event.getSourceId()); if (targettedPermanent != null && sourceSpell != null) { return sourceSpell.getColor(game).isBlue() || sourceSpell.getColor(game).isBlack(); } } return false; } }
@Override public boolean checkTrigger(GameEvent event, Game game) { Spell spell = game.getStack().getSpell(event.getTargetId()); return spell != null && spell.getColor(game).isGreen(); }
@Override public boolean checkTrigger(GameEvent event, Game game) { Spell spell = game.getStack().getSpell(event.getTargetId()); return spell != null && spell.getColor(game).isRed(); }
@Override public boolean checkTrigger(GameEvent event, Game game) { Spell spell = game.getStack().getSpell(event.getTargetId()); return spell != null && spell.getColor(game).isBlue(); }
@Override public boolean checkTrigger(GameEvent event, Game game) { Spell spell = game.getStack().getSpell(event.getTargetId()); return spell != null && spell.getColor(game).isBlack(); }
@Override public boolean checkTrigger(GameEvent event, Game game) { Spell spell = game.getStack().getSpell(event.getTargetId()); return spell != null && spell.getColor(game).isBlue(); }
@Override public boolean checkTrigger(GameEvent event, Game game) { Spell spell = game.getStack().getSpell(event.getTargetId()); return spell != null && spell.getColor(game).isWhite(); }
@Override public boolean checkTrigger(GameEvent event, Game game) { Spell spell = game.getStack().getSpell(event.getTargetId()); return spell != null && spell.getColor(game).isGreen(); }
@Override public boolean checkTrigger(GameEvent event, Game game) { Spell spell = game.getStack().getSpell(event.getTargetId()); return spell != null && spell.getColor(game).isBlack(); }
@Override public boolean checkTrigger(GameEvent event, Game game) { Spell spell = game.getStack().getSpell(event.getTargetId()); return spell != null && spell.getColor(game).isGreen(); }
@Override public boolean checkTrigger(GameEvent event, Game game) { Spell spell = game.getStack().getSpell(event.getTargetId()); return spell != null && spell.getColor(game).isRed(); }
@Override public boolean checkTrigger(GameEvent event, Game game) { if (event.getPlayerId().equals(this.getControllerId())) { Spell spell = game.getStack().getSpell(event.getTargetId()); if (spell != null && spell.getColor(game).isBlack()) { return true; } } return false; }
@Override public boolean checkTrigger(GameEvent event, Game game) { if (event.getPlayerId().equals(this.getControllerId())) { Spell spell = game.getStack().getSpell(event.getTargetId()); ObjectColor color = (ObjectColor) game.getState().getValue(getSourceId() + "_color"); if (spell != null && color != null && spell.getColor(game).shares(color)) { return true; } } return false; }
@Override public boolean checkTrigger(GameEvent event, Game game) { if (event.getPlayerId().equals(this.getControllerId())) { Spell spell = game.getStack().getSpell(event.getTargetId()); ObjectColor color = (ObjectColor) game.getState().getValue(getSourceId() + "_color"); if (spell != null && color != null && spell.getColor(game).shares(color)) { return true; } } return false; }
@Override public boolean applies(GameEvent event, Ability source, Game game) { Card card = game.getCard(event.getSourceId()); if (card != null) { LastSpellCastWatcher watcher = game.getState().getWatcher(LastSpellCastWatcher.class); if (watcher != null && watcher.lastSpellCast != null) { return !card.getColor(game).intersection(watcher.lastSpellCast.getColor(game)).isColorless(); } } return false; }
@Override public boolean apply(Game game, Ability source) { Spell targetSpell = game.getStack().getSpell(source.getFirstTarget()); if(targetSpell != null && targetSpell.getColor(game).isBlue()){ game.getStack().counter(source.getFirstTarget(), source.getSourceId(), game); } return true; } }
@Override public boolean apply(Game game, Ability source) { Spell targetSpell = game.getStack().getSpell(source.getFirstTarget()); if (targetSpell != null && targetSpell.getColor(game).isBlue()) { game.getStack().counter(source.getFirstTarget(), source.getSourceId(), game); } return true; }
@Override public boolean apply(Game game, Ability source) { if (game.getStack().getSpell(source.getFirstTarget()).getColor(game).isRed()) { game.getStack().counter(source.getFirstTarget(), source.getSourceId(), game); } return true; }
@Override public boolean apply(Game game, Ability source) { Player controller = game.getPlayer(source.getControllerId()); Spell spell = game.getStack().getSpell(targetPointer.getFirst(game, source)); if (spell != null && controller != null) { Spell copy = spell.copySpell(source.getControllerId()); copy.getColor(game).setRed(true); game.getStack().push(copy); copy.chooseNewTargets(game, controller.getId()); game.fireEvent(new GameEvent(GameEvent.EventType.COPIED_STACKOBJECT, copy.getId(), spell.getId(), source.getControllerId())); return true; } return false; }