[WOE] Implement Cheeky House-Mouse (#10945)

This commit is contained in:
Susucre 2023-08-23 05:14:04 +02:00 committed by GitHub
parent 4d3daaa5fa
commit 65dba6c92d
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 55 additions and 4 deletions

View file

@ -0,0 +1,53 @@
package mage.cards.c;
import mage.MageInt;
import mage.abilities.effects.common.combat.CantBeBlockedTargetEffect;
import mage.abilities.effects.common.continuous.BoostTargetEffect;
import mage.cards.AdventureCard;
import mage.cards.CardSetInfo;
import mage.constants.CardType;
import mage.constants.ComparisonType;
import mage.constants.Duration;
import mage.constants.SubType;
import mage.filter.common.FilterCreaturePermanent;
import mage.filter.predicate.mageobject.PowerPredicate;
import mage.target.common.TargetControlledCreaturePermanent;
import java.util.UUID;
/**
* @author Susucr
*/
public final class CheekyHouseMouse extends AdventureCard {
private static final FilterCreaturePermanent filter =
new FilterCreaturePermanent("creatures with power 3 or greater");
static {
filter.add(new PowerPredicate(ComparisonType.OR_GREATER, 3));
}
public CheekyHouseMouse(UUID ownerId, CardSetInfo setInfo) {
super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, new CardType[]{CardType.SORCERY}, "{W}", "Squeak By", "{W}");
this.subtype.add(SubType.MOUSE);
this.power = new MageInt(2);
this.toughness = new MageInt(1);
// Squeak By
// Target creature you control gets +1/+1 until end of turn. It can't be blocked by creatures with power 3 or greater this turn.
this.getSpellCard().getSpellAbility().addEffect(new BoostTargetEffect(1, 1));
this.getSpellCard().getSpellAbility().addEffect(new CantBeBlockedTargetEffect(filter, Duration.EndOfTurn)
.setText("it can't be blocked by creatures with power 3 or greater this turn"));
this.getSpellCard().getSpellAbility().addTarget(new TargetControlledCreaturePermanent());
}
private CheekyHouseMouse(final CheekyHouseMouse card) {
super(card);
}
@Override
public CheekyHouseMouse copy() {
return new CheekyHouseMouse(this);
}
}

View file

@ -45,6 +45,7 @@ public final class WildsOfEldraine extends ExpansionSet {
cards.add(new SetCardInfo("Chancellor of Tales", 45, Rarity.UNCOMMON, mage.cards.c.ChancellorOfTales.class)); cards.add(new SetCardInfo("Chancellor of Tales", 45, Rarity.UNCOMMON, mage.cards.c.ChancellorOfTales.class));
cards.add(new SetCardInfo("Charmed Clothier", 6, Rarity.COMMON, mage.cards.c.CharmedClothier.class)); cards.add(new SetCardInfo("Charmed Clothier", 6, Rarity.COMMON, mage.cards.c.CharmedClothier.class));
cards.add(new SetCardInfo("Charming Scoundrel", 124, Rarity.RARE, mage.cards.c.CharmingScoundrel.class)); cards.add(new SetCardInfo("Charming Scoundrel", 124, Rarity.RARE, mage.cards.c.CharmingScoundrel.class));
cards.add(new SetCardInfo("Cheeky House-Mouse", 7, Rarity.UNCOMMON, mage.cards.c.CheekyHouseMouse.class));
cards.add(new SetCardInfo("Conceited Witch", 84, Rarity.COMMON, mage.cards.c.ConceitedWitch.class)); cards.add(new SetCardInfo("Conceited Witch", 84, Rarity.COMMON, mage.cards.c.ConceitedWitch.class));
cards.add(new SetCardInfo("Cruel Somnophage", 222, Rarity.RARE, mage.cards.c.CruelSomnophage.class)); cards.add(new SetCardInfo("Cruel Somnophage", 222, Rarity.RARE, mage.cards.c.CruelSomnophage.class));
cards.add(new SetCardInfo("Cursed Courtier", 9, Rarity.UNCOMMON, mage.cards.c.CursedCourtier.class)); cards.add(new SetCardInfo("Cursed Courtier", 9, Rarity.UNCOMMON, mage.cards.c.CursedCourtier.class));

View file

@ -25,17 +25,14 @@ public class CantBeBlockedTargetEffect extends RestrictionEffect {
public CantBeBlockedTargetEffect(Duration duration) { public CantBeBlockedTargetEffect(Duration duration) {
this(StaticFilters.FILTER_PERMANENT_CREATURE, duration); this(StaticFilters.FILTER_PERMANENT_CREATURE, duration);
this.staticText = null;
} }
public CantBeBlockedTargetEffect(FilterCreaturePermanent filter, Duration duration) { public CantBeBlockedTargetEffect(FilterCreaturePermanent filter, Duration duration) {
super(duration, Outcome.Benefit); super(duration, Outcome.Benefit);
this.filter = filter; this.filter = filter;
staticText = new StringBuilder("{this} can't be blocked ")
.append(filter.getMessage().startsWith("except by") ? "" : "by ").append(filter.getMessage()).toString();
} }
public CantBeBlockedTargetEffect(CantBeBlockedTargetEffect effect) { protected CantBeBlockedTargetEffect(final CantBeBlockedTargetEffect effect) {
super(effect); super(effect);
this.filter = effect.filter; this.filter = effect.filter;
} }