mirror of
https://github.com/correl/mage.git
synced 2024-11-16 03:00:12 +00:00
Fixed rats of Rath and optimized Karplusan Strider.
This commit is contained in:
parent
263a9a9806
commit
81300cd90a
2 changed files with 6 additions and 8 deletions
|
@ -29,7 +29,6 @@ package mage.sets.modernmasters2015;
|
||||||
|
|
||||||
import java.util.UUID;
|
import java.util.UUID;
|
||||||
import mage.MageInt;
|
import mage.MageInt;
|
||||||
import mage.ObjectColor;
|
|
||||||
import mage.abilities.Ability;
|
import mage.abilities.Ability;
|
||||||
import mage.abilities.common.SimpleStaticAbility;
|
import mage.abilities.common.SimpleStaticAbility;
|
||||||
import mage.abilities.effects.ContinuousRuleModifyingEffectImpl;
|
import mage.abilities.effects.ContinuousRuleModifyingEffectImpl;
|
||||||
|
@ -108,12 +107,11 @@ class KarplusanStriderEffect extends ContinuousRuleModifyingEffectImpl {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public boolean applies(GameEvent event, Ability source, Game game) {
|
public boolean applies(GameEvent event, Ability source, Game game) {
|
||||||
|
if (event.getTargetId().equals(source.getSourceId())) {
|
||||||
Permanent targettedPermanent = game.getPermanent(event.getTargetId());
|
Permanent targettedPermanent = game.getPermanent(event.getTargetId());
|
||||||
Spell sourceSpell = game.getStack().getSpell(event.getSourceId());
|
Spell sourceSpell = game.getStack().getSpell(event.getSourceId());
|
||||||
if (targettedPermanent != null && sourceSpell != null && targettedPermanent.getId().equals(source.getSourceId())) {
|
if (targettedPermanent != null && sourceSpell != null) {
|
||||||
if (sourceSpell.getColor().contains(ObjectColor.BLUE)
|
return sourceSpell.getColor().isBlue() || sourceSpell.getColor().isBlack();
|
||||||
|| sourceSpell.getColor().contains(ObjectColor.BLACK)) {
|
|
||||||
return true;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return false;
|
return false;
|
||||||
|
|
|
@ -72,7 +72,7 @@ public class RatsOfRath extends CardImpl {
|
||||||
// {B}: Destroy target artifact, creature, or land you control.
|
// {B}: Destroy target artifact, creature, or land you control.
|
||||||
Effect effect = new DestroyTargetEffect();
|
Effect effect = new DestroyTargetEffect();
|
||||||
effect.setOutcome(Outcome.AIDontUseIt); // AI can't handle this
|
effect.setOutcome(Outcome.AIDontUseIt); // AI can't handle this
|
||||||
Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new DestroyTargetEffect(), new ColoredManaCost(ColoredManaSymbol.B));
|
Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, effect, new ColoredManaCost(ColoredManaSymbol.B));
|
||||||
ability.addTarget(new TargetControlledPermanent(filter));
|
ability.addTarget(new TargetControlledPermanent(filter));
|
||||||
this.addAbility(ability);
|
this.addAbility(ability);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue