Fixed Nine-Ringed Bo

This commit is contained in:
North 2012-09-03 15:18:06 +03:00
parent 29bf377e83
commit a06822a03c

View file

@ -35,7 +35,6 @@ import mage.Constants.Rarity;
import mage.Constants.Zone; import mage.Constants.Zone;
import mage.abilities.Ability; import mage.abilities.Ability;
import mage.abilities.common.ActivateAsSorceryActivatedAbility; import mage.abilities.common.ActivateAsSorceryActivatedAbility;
import mage.abilities.common.SimpleStaticAbility;
import mage.abilities.costs.common.TapSourceCost; import mage.abilities.costs.common.TapSourceCost;
import mage.abilities.effects.ReplacementEffectImpl; import mage.abilities.effects.ReplacementEffectImpl;
import mage.abilities.effects.common.DamageTargetEffect; import mage.abilities.effects.common.DamageTargetEffect;
@ -69,12 +68,10 @@ public class NineRingedBo extends CardImpl<NineRingedBo> {
// {T}: Nine-Ringed Bo deals 1 damage to target Spirit creature. If that creature would die this turn, exile it instead. // {T}: Nine-Ringed Bo deals 1 damage to target Spirit creature. If that creature would die this turn, exile it instead.
Ability ability = new ActivateAsSorceryActivatedAbility(Zone.BATTLEFIELD, new DamageTargetEffect(1), new TapSourceCost()); Ability ability = new ActivateAsSorceryActivatedAbility(Zone.BATTLEFIELD, new DamageTargetEffect(1), new TapSourceCost());
ability.addTarget(new TargetCreaturePermanent(filter)); ability.addTarget(new TargetCreaturePermanent(filter));
// If that creature would die this turn, exile it instead. ability.addEffect(new NineRingedBoEffect());
this.addAbility(ability); this.addAbility(ability);
this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new NineRingedBoEffect()));
this.addWatcher(new DamagedByWatcher()); this.addWatcher(new DamagedByWatcher());
} }
public NineRingedBo(final NineRingedBo card) { public NineRingedBo(final NineRingedBo card) {
@ -120,14 +117,11 @@ public class NineRingedBo extends CardImpl<NineRingedBo> {
@Override @Override
public boolean applies(GameEvent event, Ability source, Game game) { public boolean applies(GameEvent event, Ability source, Game game) {
if (event.getType() == EventType.ZONE_CHANGE && ((ZoneChangeEvent) event).isDiesEvent()) { if (event.getType() == EventType.ZONE_CHANGE && ((ZoneChangeEvent) event).isDiesEvent()) {
DamagedByWatcher watcher = DamagedByWatcher watcher = (DamagedByWatcher) game.getState().getWatchers().get("DamagedByWatcher", source.getSourceId());
(DamagedByWatcher) game.getState().getWatchers().get("DamagedByWatcher", source.getSourceId()); if (watcher != null) {
if (watcher != null)
return watcher.damagedCreatures.contains(event.getTargetId()); return watcher.damagedCreatures.contains(event.getTargetId());
} }
}
return false; return false;
} }
} }