[MKM] Implement Pyrotechnic Performer (#11900)

This commit is contained in:
Cameron Merkel 2024-03-05 00:10:58 -06:00 committed by GitHub
parent 084effe2c1
commit 07405fca0f
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 89 additions and 1 deletions

View file

@ -0,0 +1,86 @@
package mage.cards.p;
import java.util.UUID;
import mage.MageInt;
import mage.abilities.Ability;
import mage.abilities.common.TurnedFaceUpAllTriggeredAbility;
import mage.abilities.effects.OneShotEffect;
import mage.constants.Outcome;
import mage.constants.SubType;
import mage.abilities.costs.mana.ManaCostsImpl;
import mage.abilities.keyword.DisguiseAbility;
import mage.cards.CardImpl;
import mage.cards.CardSetInfo;
import mage.constants.CardType;
import mage.filter.FilterPermanentThisOrAnother;
import mage.filter.StaticFilters;
import mage.game.Game;
import mage.game.permanent.Permanent;
import mage.players.Player;
/**
* @author Cguy7777
*/
public final class PyrotechnicPerformer extends CardImpl {
private static final FilterPermanentThisOrAnother filter = new FilterPermanentThisOrAnother(StaticFilters.FILTER_CONTROLLED_CREATURE, true);
public PyrotechnicPerformer(UUID ownerId, CardSetInfo setInfo) {
super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{1}{R}");
this.subtype.add(SubType.VIASHINO);
this.subtype.add(SubType.ASSASSIN);
this.power = new MageInt(3);
this.toughness = new MageInt(2);
// Disguise {R}
this.addAbility(new DisguiseAbility(this, new ManaCostsImpl<>("{R}")));
// Whenever Pyrotechnic Performer or another creature you control is turned face up, that creature deals damage equal to its power to each opponent.
this.addAbility(new TurnedFaceUpAllTriggeredAbility(new PyrotechnicPerformerEffect(), filter, true));
}
private PyrotechnicPerformer(final PyrotechnicPerformer card) {
super(card);
}
@Override
public PyrotechnicPerformer copy() {
return new PyrotechnicPerformer(this);
}
}
class PyrotechnicPerformerEffect extends OneShotEffect {
PyrotechnicPerformerEffect() {
super(Outcome.Damage);
staticText = "that creature deals damage equal to its power to each opponent";
}
private PyrotechnicPerformerEffect(final PyrotechnicPerformerEffect effect) {
super(effect);
}
@Override
public boolean apply(Game game, Ability source) {
Permanent turnedUpCreature = getTargetPointer().getFirstTargetPermanentOrLKI(game, source);
if (turnedUpCreature == null) {
return false;
}
for (UUID playerId : game.getOpponents(source.getControllerId())) {
Player opponent = game.getPlayer(playerId);
if (opponent == null) {
continue;
}
opponent.damage(turnedUpCreature.getPower().getValue(), turnedUpCreature.getId(), source, game);
}
return true;
}
@Override
public PyrotechnicPerformerEffect copy() {
return new PyrotechnicPerformerEffect(this);
}
}

View file

@ -12,7 +12,7 @@ import java.util.List;
*/
public final class MurdersAtKarlovManor extends ExpansionSet {
private static final List<String> unfinished = Arrays.asList("Aurelia's Vindicator", "Bubble Smuggler", "Coveted Falcon", "Crowd-Control Warden", "Expose the Culprit", "Fugitive Codebreaker", "Lumbering Laundry", "Museum Nightwatch", "Pyrotechnic Performer", "Unyielding Gatekeeper");
private static final List<String> unfinished = Arrays.asList("Aurelia's Vindicator", "Bubble Smuggler", "Coveted Falcon", "Crowd-Control Warden", "Expose the Culprit", "Fugitive Codebreaker", "Lumbering Laundry", "Museum Nightwatch", "Unyielding Gatekeeper");
private static final MurdersAtKarlovManor instance = new MurdersAtKarlovManor();
@ -207,6 +207,8 @@ public final class MurdersAtKarlovManor extends ExpansionSet {
cards.add(new SetCardInfo("Proft's Eidetic Memory", 67, Rarity.RARE, mage.cards.p.ProftsEideticMemory.class));
cards.add(new SetCardInfo("Public Thoroughfare", 265, Rarity.COMMON, mage.cards.p.PublicThoroughfare.class));
cards.add(new SetCardInfo("Push // Pull", 250, Rarity.UNCOMMON, mage.cards.p.PushPull.class));
cards.add(new SetCardInfo("Pyrotechnic Performer", 140, Rarity.RARE, mage.cards.p.PyrotechnicPerformer.class, NON_FULL_USE_VARIOUS));
cards.add(new SetCardInfo("Pyrotechnic Performer", 407, Rarity.RARE, mage.cards.p.PyrotechnicPerformer.class, NON_FULL_USE_VARIOUS));
cards.add(new SetCardInfo("Rakdos, Patron of Chaos", 224, Rarity.MYTHIC, mage.cards.r.RakdosPatronOfChaos.class));
cards.add(new SetCardInfo("Rakish Scoundrel", 225, Rarity.COMMON, mage.cards.r.RakishScoundrel.class));
cards.add(new SetCardInfo("Raucous Theater", 266, Rarity.RARE, mage.cards.r.RaucousTheater.class));