[AFC] Implemented Midnight Pathlighter

This commit is contained in:
Evan Kranzler 2021-07-18 10:46:05 -04:00
parent 0200813db9
commit d4ef2ec414
3 changed files with 62 additions and 3 deletions

View file

@ -0,0 +1,58 @@
package mage.cards.m;
import mage.MageInt;
import mage.abilities.common.ControlledCreaturesDealCombatDamagePlayerTriggeredAbility;
import mage.abilities.common.SimpleStaticAbility;
import mage.abilities.effects.common.combat.CantBeBlockedByCreaturesAllEffect;
import mage.abilities.effects.keyword.VentureIntoTheDungeonEffect;
import mage.cards.CardImpl;
import mage.cards.CardSetInfo;
import mage.constants.CardType;
import mage.constants.Duration;
import mage.constants.SubType;
import mage.constants.SuperType;
import mage.filter.StaticFilters;
import mage.filter.common.FilterCreaturePermanent;
import mage.filter.predicate.Predicates;
import java.util.UUID;
/**
* @author TheElk801
*/
public final class MidnightPathlighter extends CardImpl {
private static final FilterCreaturePermanent filter
= new FilterCreaturePermanent("except by legendary creatures");
static {
filter.add(Predicates.not(SuperType.LEGENDARY.getPredicate()));
}
public MidnightPathlighter(UUID ownerId, CardSetInfo setInfo) {
super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{2}{W}{U}");
this.subtype.add(SubType.HUMAN);
this.subtype.add(SubType.WIZARD);
this.power = new MageInt(2);
this.toughness = new MageInt(3);
// Creatures you control can't be blocked except by legendary creatures.
this.addAbility(new SimpleStaticAbility(new CantBeBlockedByCreaturesAllEffect(
StaticFilters.FILTER_PERMANENT_CREATURES_CONTROLLED,
filter, Duration.WhileOnBattlefield
)));
// Whenever one or more creatures you control deal combat damage to a player, venture into the dungeon.
this.addAbility(new ControlledCreaturesDealCombatDamagePlayerTriggeredAbility(new VentureIntoTheDungeonEffect()));
}
private MidnightPathlighter(final MidnightPathlighter card) {
super(card);
}
@Override
public MidnightPathlighter copy() {
return new MidnightPathlighter(this);
}
}

View file

@ -138,6 +138,7 @@ public final class ForgottenRealmsCommander extends ExpansionSet {
cards.add(new SetCardInfo("Masterwork of Ingenuity", 209, Rarity.RARE, mage.cards.m.MasterworkOfIngenuity.class));
cards.add(new SetCardInfo("Merfolk Looter", 86, Rarity.UNCOMMON, mage.cards.m.MerfolkLooter.class));
cards.add(new SetCardInfo("Meteor Golem", 210, Rarity.UNCOMMON, mage.cards.m.MeteorGolem.class));
cards.add(new SetCardInfo("Midnight Pathlighter", 52, Rarity.RARE, mage.cards.m.MidnightPathlighter.class));
cards.add(new SetCardInfo("Mind Stone", 211, Rarity.UNCOMMON, mage.cards.m.MindStone.class));
cards.add(new SetCardInfo("Mishra's Factory", 248, Rarity.UNCOMMON, mage.cards.m.MishrasFactory.class));
cards.add(new SetCardInfo("Moonsilver Spear", 212, Rarity.RARE, mage.cards.m.MoonsilverSpear.class));

View file

@ -10,7 +10,6 @@ import mage.game.permanent.Permanent;
/**
* @author LevelX2
*/
public class CantBeBlockedByCreaturesAllEffect extends RestrictionEffect {
private final FilterCreaturePermanent filterBlockedBy;
@ -20,8 +19,9 @@ public class CantBeBlockedByCreaturesAllEffect extends RestrictionEffect {
super(duration);
this.filterCreatures = filterCreatures;
this.filterBlockedBy = filterBlockedBy;
staticText = new StringBuilder(filterCreatures.getMessage()).append(" can't be blocked ")
.append(filterBlockedBy.getMessage().startsWith("except by") ? "" : "by ").append(filterBlockedBy.getMessage()).toString();
staticText = filterCreatures.getMessage() + " can't be blocked "
+ (filterBlockedBy.getMessage().startsWith("except by") ? "" : "by ")
+ filterBlockedBy.getMessage();
}
public CantBeBlockedByCreaturesAllEffect(final CantBeBlockedByCreaturesAllEffect effect) {