mirror of
https://github.com/correl/mage.git
synced 2024-11-16 03:00:12 +00:00
Fixed Nine-Ringed Bo
This commit is contained in:
parent
29bf377e83
commit
a06822a03c
1 changed files with 10 additions and 16 deletions
|
@ -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;
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue