[MOM] Implement Joyful Stormsculptor

This commit is contained in:
theelk801 2023-04-03 19:58:20 -04:00
parent 0c00125dfe
commit 4b71941d21
4 changed files with 118 additions and 0 deletions

View file

@ -0,0 +1,65 @@
package mage.cards.j;
import mage.MageInt;
import mage.abilities.Ability;
import mage.abilities.common.EntersBattlefieldTriggeredAbility;
import mage.abilities.common.SpellCastControllerTriggeredAbility;
import mage.abilities.effects.common.CreateTokenEffect;
import mage.abilities.effects.common.DamageAllEffect;
import mage.abilities.effects.common.DamagePlayersEffect;
import mage.abilities.keyword.ConvokeAbility;
import mage.cards.CardImpl;
import mage.cards.CardSetInfo;
import mage.constants.CardType;
import mage.constants.SubType;
import mage.constants.TargetController;
import mage.filter.FilterPermanent;
import mage.filter.FilterSpell;
import mage.filter.predicate.mageobject.AbilityPredicate;
import mage.filter.predicate.permanent.ProtectedByOpponentPredicate;
import mage.game.permanent.token.Elemental11BlueRedToken;
import java.util.UUID;
/**
* @author TheElk801
*/
public final class JoyfulStormsculptor extends CardImpl {
private static final FilterSpell filter = new FilterSpell("a spell that has convoke");
private static final FilterPermanent filter2 = new FilterPermanent();
static {
filter.add(new AbilityPredicate(ConvokeAbility.class));
filter2.add(CardType.BATTLE.getPredicate());
filter2.add(ProtectedByOpponentPredicate.instance);
}
public JoyfulStormsculptor(UUID ownerId, CardSetInfo setInfo) {
super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{3}{U}{R}");
this.subtype.add(SubType.HUMAN);
this.subtype.add(SubType.SHAMAN);
this.power = new MageInt(2);
this.toughness = new MageInt(3);
// When Joyful Stormsculptor enters the battlefield, create two 1/1 blue and red Elemental creature tokens.
this.addAbility(new EntersBattlefieldTriggeredAbility(new CreateTokenEffect(new Elemental11BlueRedToken(), 2)));
// Whenever you cast a spell that has convoke, Joyful Stormsculptor deals 1 damage to each opponent and each battle they protect.
Ability ability = new SpellCastControllerTriggeredAbility(
new DamagePlayersEffect(1, TargetController.OPPONENT), filter, false
);
ability.addEffect(new DamageAllEffect(1, filter2).setText("and each battle they protect"));
this.addAbility(ability);
}
private JoyfulStormsculptor(final JoyfulStormsculptor card) {
super(card);
}
@Override
public JoyfulStormsculptor copy() {
return new JoyfulStormsculptor(this);
}
}

View file

@ -61,6 +61,7 @@ public final class MarchOfTheMachine extends ExpansionSet {
cards.add(new SetCardInfo("Interdisciplinary Mascot", 326, Rarity.RARE, mage.cards.i.InterdisciplinaryMascot.class));
cards.add(new SetCardInfo("Into the Fire", 144, Rarity.RARE, mage.cards.i.IntoTheFire.class));
cards.add(new SetCardInfo("Island", 278, Rarity.LAND, mage.cards.basiclands.Island.class, NON_FULL_USE_VARIOUS));
cards.add(new SetCardInfo("Joyful Stormsculptor", 243, Rarity.UNCOMMON, mage.cards.j.JoyfulStormsculptor.class));
cards.add(new SetCardInfo("Jungle Hollow", 270, Rarity.COMMON, mage.cards.j.JungleHollow.class));
cards.add(new SetCardInfo("Merciless Repurposing", 117, Rarity.UNCOMMON, mage.cards.m.MercilessRepurposing.class));
cards.add(new SetCardInfo("Monastery Mentor", 28, Rarity.MYTHIC, mage.cards.m.MonasteryMentor.class));

View file

@ -0,0 +1,19 @@
package mage.filter.predicate.permanent;
import mage.filter.predicate.ObjectSourcePlayer;
import mage.filter.predicate.ObjectSourcePlayerPredicate;
import mage.game.Game;
import mage.game.permanent.Permanent;
/**
* @author TheElk801
*/
public enum ProtectedByOpponentPredicate implements ObjectSourcePlayerPredicate<Permanent> {
instance;
@Override
public boolean apply(ObjectSourcePlayer<Permanent> input, Game game) {
// TODO: Implement this
return false;
}
}

View file

@ -0,0 +1,33 @@
package mage.game.permanent.token;
import mage.MageInt;
import mage.constants.CardType;
import mage.constants.SubType;
import java.util.Arrays;
/**
* @author TheElk801
*/
public final class Elemental11BlueRedToken extends TokenImpl {
public Elemental11BlueRedToken() {
super("Elemental Token", "1/1 blue and red Elemental creature token");
cardType.add(CardType.CREATURE);
subtype.add(SubType.ELEMENTAL);
color.setBlue(true);
color.setRed(true);
power = new MageInt(1);
toughness = new MageInt(1);
availableImageSetCodes = Arrays.asList("MOM");
}
public Elemental11BlueRedToken(final Elemental11BlueRedToken token) {
super(token);
}
public Elemental11BlueRedToken copy() {
return new Elemental11BlueRedToken(this);
}
}