[MH2] Implement Damn

This commit is contained in:
jmharmon 2021-05-29 12:15:53 -07:00 committed by GitHub
parent d00a63c47d
commit d732773259
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -0,0 +1,40 @@
package mage.cards.d;
import mage.abilities.costs.mana.ManaCostsImpl;
import mage.abilities.effects.common.DestroyAllEffect;
import mage.abilities.effects.common.DestroyTargetEffect;
import mage.abilities.keyword.OverloadAbility;
import mage.cards.CardImpl;
import mage.cards.CardSetInfo;
import mage.constants.CardType;
import mage.target.common.TargetCreaturePermanent;
import static mage.filter.StaticFilters.FILTER_PERMANENT_CREATURES;
import java.util.UUID;
/**
* @author jmharmon
*/
public final class Damn extends CardImpl {
public Damn(UUID ownerId, CardSetInfo setInfo) {
super(ownerId, setInfo, new CardType[]{CardType.SORCERY}, "{B}{B}");
// Destroy target creature. A creature destroyed this way cant be regenerated.
this.getSpellAbility().addTarget(new TargetCreaturePermanent());
this.getSpellAbility().addEffect(new DestroyTargetEffect(true));
// Overload {2}{W}{W} (You may cast this spell for its overload cost. If you do, change its text by replacing all instances of target with each.)
this.addAbility(new OverloadAbility(this, new DestroyAllEffect(FILTER_PERMANENT_CREATURES, true), new ManaCostsImpl("{2}{W}{W")));
}
private Damn(final Damn card) {
super(card);
}
@Override
public Damn copy() {
return new Damn(this);
}
}