mirror of
https://github.com/correl/mage.git
synced 2025-01-13 19:11:33 +00:00
[SNC] Implemented Whack
This commit is contained in:
parent
e20ec7f5a7
commit
7f6bef2b5c
2 changed files with 56 additions and 0 deletions
55
Mage.Sets/src/mage/cards/w/Whack.java
Normal file
55
Mage.Sets/src/mage/cards/w/Whack.java
Normal file
|
@ -0,0 +1,55 @@
|
|||
package mage.cards.w;
|
||||
|
||||
import mage.ObjectColor;
|
||||
import mage.abilities.common.SimpleStaticAbility;
|
||||
import mage.abilities.condition.Condition;
|
||||
import mage.abilities.condition.common.SourceTargetsPermanentCondition;
|
||||
import mage.abilities.effects.common.continuous.BoostTargetEffect;
|
||||
import mage.abilities.effects.common.cost.SpellCostReductionSourceEffect;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.cards.CardSetInfo;
|
||||
import mage.constants.CardType;
|
||||
import mage.constants.Zone;
|
||||
import mage.filter.FilterPermanent;
|
||||
import mage.filter.common.FilterCreaturePermanent;
|
||||
import mage.filter.predicate.mageobject.ColorPredicate;
|
||||
import mage.target.common.TargetCreaturePermanent;
|
||||
|
||||
import java.util.UUID;
|
||||
|
||||
/**
|
||||
* @author TheElk801
|
||||
*/
|
||||
public final class Whack extends CardImpl {
|
||||
|
||||
private static final FilterPermanent filter
|
||||
= new FilterCreaturePermanent("a white creature");
|
||||
|
||||
static {
|
||||
filter.add(new ColorPredicate(ObjectColor.WHITE));
|
||||
}
|
||||
|
||||
private static final Condition condition = new SourceTargetsPermanentCondition(filter);
|
||||
|
||||
public Whack(UUID ownerId, CardSetInfo setInfo) {
|
||||
super(ownerId, setInfo, new CardType[]{CardType.SORCERY}, "{3}{B}");
|
||||
|
||||
// This spell costs {3} less to cast if it targets a white creature.
|
||||
this.addAbility(new SimpleStaticAbility(
|
||||
Zone.ALL, new SpellCostReductionSourceEffect(3, condition).setCanWorksOnStackOnly(true)
|
||||
).setRuleAtTheTop(true));
|
||||
|
||||
// Target creature gets -4/-4 until end of turn.
|
||||
this.getSpellAbility().addEffect(new BoostTargetEffect(-4, -4));
|
||||
this.getSpellAbility().addTarget(new TargetCreaturePermanent());
|
||||
}
|
||||
|
||||
private Whack(final Whack card) {
|
||||
super(card);
|
||||
}
|
||||
|
||||
@Override
|
||||
public Whack copy() {
|
||||
return new Whack(this);
|
||||
}
|
||||
}
|
|
@ -171,6 +171,7 @@ public final class StreetsOfNewCapenna extends ExpansionSet {
|
|||
cards.add(new SetCardInfo("Voice of the Vermin", 163, Rarity.UNCOMMON, mage.cards.v.VoiceOfTheVermin.class));
|
||||
cards.add(new SetCardInfo("Void Rend", 230, Rarity.RARE, mage.cards.v.VoidRend.class));
|
||||
cards.add(new SetCardInfo("Waterfront District", 259, Rarity.COMMON, mage.cards.w.WaterfrontDistrict.class));
|
||||
cards.add(new SetCardInfo("Whack", 99, Rarity.UNCOMMON, mage.cards.w.Whack.class));
|
||||
cards.add(new SetCardInfo("Witness Protection", 66, Rarity.COMMON, mage.cards.w.WitnessProtection.class));
|
||||
cards.add(new SetCardInfo("Workshop Warchief", 432, Rarity.RARE, mage.cards.w.WorkshopWarchief.class));
|
||||
cards.add(new SetCardInfo("Xander's Lounge", 260, Rarity.RARE, mage.cards.x.XandersLounge.class));
|
||||
|
|
Loading…
Reference in a new issue