More fixes for ChampionOfLambholt and DungeonGeists

This commit is contained in:
magenoxx 2012-05-30 15:43:52 +04:00
parent e79f369144
commit 66a5143a53
2 changed files with 14 additions and 11 deletions

View file

@ -89,22 +89,22 @@ class ChampionOfLambholtEffect extends RestrictionEffect<ChampionOfLambholtEffec
@Override @Override
public boolean applies(Permanent permanent, Ability source, Game game) { public boolean applies(Permanent permanent, Ability source, Game game) {
Permanent sourcePermanent = game.getPermanent(source.getSourceId()); Permanent sourcePermanent = game.getPermanent(source.getSourceId());
if (sourcePermanent != null && permanent != null) { if (sourcePermanent != null && permanent.equals(sourcePermanent)) {
if (permanent.getPower().getValue() < sourcePermanent.getPower().getValue()) { return true;
return true;
}
} }
return false; return false;
} }
@Override
public boolean canBlock(Permanent attacker, Permanent blocker, Ability source, Game game) {
if (attacker != null && blocker != null) {
return blocker.getPower().getValue() > attacker.getPower().getValue();
}
return true;
}
@Override @Override
public ChampionOfLambholtEffect copy() { public ChampionOfLambholtEffect copy() {
return new ChampionOfLambholtEffect(this); return new ChampionOfLambholtEffect(this);
} }
@Override
public boolean canBlock(Permanent attacker, Permanent blocker, Ability source, Game game) {
return false;
}
} }

View file

@ -43,6 +43,7 @@ import mage.filter.common.FilterCreaturePermanent;
import mage.game.Game; import mage.game.Game;
import mage.game.events.GameEvent; import mage.game.events.GameEvent;
import mage.game.events.ZoneChangeEvent; import mage.game.events.ZoneChangeEvent;
import mage.target.Target;
import mage.target.common.TargetCreaturePermanent; import mage.target.common.TargetCreaturePermanent;
import mage.watchers.Watcher; import mage.watchers.Watcher;
import mage.watchers.WatcherImpl; import mage.watchers.WatcherImpl;
@ -75,7 +76,9 @@ public class DungeonGeists extends CardImpl<DungeonGeists> {
// When Dungeon Geists enters the battlefield, tap target creature an opponent controls. That creature doesn't untap during its controller's untap step for as long as you control Dungeon Geists. // When Dungeon Geists enters the battlefield, tap target creature an opponent controls. That creature doesn't untap during its controller's untap step for as long as you control Dungeon Geists.
Ability ability = new EntersBattlefieldTriggeredAbility(new TapTargetEffect(), false); Ability ability = new EntersBattlefieldTriggeredAbility(new TapTargetEffect(), false);
ability.addEffect(new DungeonGeistsEffect()); ability.addEffect(new DungeonGeistsEffect());
ability.addTarget(new TargetCreaturePermanent(filter)); Target target = new TargetCreaturePermanent(filter);
target.setRequired(true);
ability.addTarget(target);
this.addAbility(ability); this.addAbility(ability);
this.addWatcher(new DungeonGeistsWatcher()); this.addWatcher(new DungeonGeistsWatcher());
} }