[CLB] Implemented Bothersome Quasit

This commit is contained in:
Evan Kranzler 2022-05-31 08:48:49 -04:00
parent baf3ad18b5
commit b48a023a94
4 changed files with 86 additions and 11 deletions

View file

@ -0,0 +1,66 @@
package mage.cards.b;
import mage.MageInt;
import mage.abilities.Ability;
import mage.abilities.common.SimpleStaticAbility;
import mage.abilities.common.SpellCastControllerTriggeredAbility;
import mage.abilities.effects.common.combat.CantBlockAllEffect;
import mage.abilities.effects.common.combat.GoadTargetEffect;
import mage.abilities.keyword.MenaceAbility;
import mage.cards.CardImpl;
import mage.cards.CardSetInfo;
import mage.constants.CardType;
import mage.constants.Duration;
import mage.constants.SubType;
import mage.filter.StaticFilters;
import mage.filter.common.FilterCreaturePermanent;
import mage.filter.common.FilterOpponentsCreaturePermanent;
import mage.filter.predicate.permanent.GoadedPredicate;
import mage.target.common.TargetOpponentsCreaturePermanent;
import java.util.UUID;
/**
* @author TheElk801
*/
public final class BothersomeQuasit extends CardImpl {
private static final FilterCreaturePermanent filter
= new FilterOpponentsCreaturePermanent("goaded creatures your opponents control");
static {
filter.add(GoadedPredicate.instance);
}
public BothersomeQuasit(UUID ownerId, CardSetInfo setInfo) {
super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{2}{R}");
this.subtype.add(SubType.DEMON);
this.power = new MageInt(3);
this.toughness = new MageInt(2);
// Menace
this.addAbility(new MenaceAbility());
// Goaded creatures your opponents control can't block.
this.addAbility(new SimpleStaticAbility(
new CantBlockAllEffect(filter, Duration.WhileOnBattlefield)
));
// Whenever you cast a noncreature spell, goad target creature an opponent controls.
Ability ability = new SpellCastControllerTriggeredAbility(
new GoadTargetEffect(), StaticFilters.FILTER_SPELL_A_NON_CREATURE, false
);
ability.addTarget(new TargetOpponentsCreaturePermanent());
this.addAbility(ability);
}
private BothersomeQuasit(final BothersomeQuasit card) {
super(card);
}
@Override
public BothersomeQuasit copy() {
return new BothersomeQuasit(this);
}
}

View file

@ -14,7 +14,7 @@ import mage.constants.Outcome;
import mage.constants.SetTargetPointer;
import mage.constants.SubType;
import mage.filter.common.FilterCreaturePermanent;
import mage.filter.predicate.Predicate;
import mage.filter.predicate.permanent.GoadedPredicate;
import mage.game.Game;
import mage.game.permanent.Permanent;
import mage.players.Player;
@ -30,7 +30,7 @@ public final class VengefulAncestor extends CardImpl {
private static final FilterCreaturePermanent filter = new FilterCreaturePermanent("a goaded creature");
static {
filter.add(VengefulAncestorPredicate.instance);
filter.add(GoadedPredicate.instance);
}
public VengefulAncestor(UUID ownerId, CardSetInfo setInfo) {
@ -66,15 +66,6 @@ public final class VengefulAncestor extends CardImpl {
}
}
enum VengefulAncestorPredicate implements Predicate<Permanent> {
instance;
@Override
public boolean apply(Permanent input, Game game) {
return !input.getGoadingPlayers().isEmpty();
}
}
class VengefulAncestorEffect extends OneShotEffect {
VengefulAncestorEffect() {

View file

@ -60,6 +60,7 @@ public final class CommanderLegendsBattleForBaldursGate extends ExpansionSet {
cards.add(new SetCardInfo("Blessed Hippogriff", 11, Rarity.COMMON, mage.cards.b.BlessedHippogriff.class));
cards.add(new SetCardInfo("Bloodboil Sorcerer", 164, Rarity.UNCOMMON, mage.cards.b.BloodboilSorcerer.class));
cards.add(new SetCardInfo("Blur", 58, Rarity.COMMON, mage.cards.b.Blur.class));
cards.add(new SetCardInfo("Bothersome Quasit", 674, Rarity.RARE, mage.cards.b.BothersomeQuasit.class));
cards.add(new SetCardInfo("Bountiful Promenade", 348, Rarity.RARE, mage.cards.b.BountifulPromenade.class));
cards.add(new SetCardInfo("Bramble Sovereign", 218, Rarity.MYTHIC, mage.cards.b.BrambleSovereign.class));
cards.add(new SetCardInfo("Breath Weapon", 165, Rarity.COMMON, mage.cards.b.BreathWeapon.class));

View file

@ -0,0 +1,17 @@
package mage.filter.predicate.permanent;
import mage.filter.predicate.Predicate;
import mage.game.Game;
import mage.game.permanent.Permanent;
/**
* @author TheElk801
*/
public enum GoadedPredicate implements Predicate<Permanent> {
instance;
@Override
public boolean apply(Permanent input, Game game) {
return !input.getGoadingPlayers().isEmpty();
}
}