fixed Scorch Spitter not dealing damage when it attacks

This commit is contained in:
Evan Kranzler 2019-06-28 19:58:51 -04:00
parent c82d1867e3
commit 891199924e

View file

@ -2,6 +2,7 @@ package mage.cards.s;
import mage.MageInt;
import mage.abilities.TriggeredAbilityImpl;
import mage.abilities.effects.Effect;
import mage.abilities.effects.common.DamageTargetEffect;
import mage.cards.CardImpl;
import mage.cards.CardSetInfo;
@ -44,7 +45,7 @@ public final class ScorchSpitter extends CardImpl {
class ScorchSpitterTriggeredAbility extends TriggeredAbilityImpl {
ScorchSpitterTriggeredAbility() {
super(Zone.BATTLEFIELD, new DamageTargetEffect(1));
super(Zone.BATTLEFIELD, null);
}
private ScorchSpitterTriggeredAbility(final ScorchSpitterTriggeredAbility ability) {
@ -63,10 +64,11 @@ class ScorchSpitterTriggeredAbility extends TriggeredAbilityImpl {
@Override
public boolean checkTrigger(GameEvent event, Game game) {
if (sourceId.equals(event.getSourceId())) {
this.getEffects().get(0).setTargetPointer(
new FixedTarget(game.getCombat().getDefenderId(event.getTargetId()), game)
);
if (this.getSourceId().equals(event.getSourceId())) {
this.getEffects().clear();
Effect effect = new DamageTargetEffect(1);
effect.setTargetPointer(new FixedTarget(game.getCombat().getDefenderId(event.getSourceId()), game));
this.addEffect(effect);
return true;
}
return false;