Change grafdiggers cage to use continuous rule modifying effect for 1st effect

This commit is contained in:
Dustin Conrad 2014-08-21 19:46:46 -04:00
parent 9536066ba4
commit 7c515ba60f

View file

@ -71,7 +71,7 @@ public class GrafdiggersCage extends CardImpl {
}
}
class GrafdiggersCageEffect extends ReplacementEffectImpl {
class GrafdiggersCageEffect extends ContinuousRuleModifiyingEffectImpl {
public GrafdiggersCageEffect() {
super(Duration.WhileOnBattlefield, Outcome.Benefit);
@ -92,15 +92,10 @@ class GrafdiggersCageEffect extends ReplacementEffectImpl {
return true;
}
@Override
public boolean replaceEvent(GameEvent event, Ability source, Game game) {
return true;
}
@Override
public boolean applies(GameEvent event, Ability source, Game game) {
if (event instanceof ZoneChangeEvent) {
ZoneChangeEvent zEvent = (ZoneChangeEvent)event;
ZoneChangeEvent zEvent = (ZoneChangeEvent) event;
if (zEvent.getToZone() == Zone.BATTLEFIELD && (zEvent.getFromZone() == Zone.GRAVEYARD || zEvent.getFromZone() == Zone.LIBRARY)) {
Card card = game.getCard(zEvent.getTargetId());
if (card != null && card.getCardType().contains(CardType.CREATURE)) {