[MAT] Implement Jolrael, Voice of Zhalfir

This commit is contained in:
theelk801 2023-04-24 22:06:06 -04:00
parent ff115cad48
commit aba51aadfd
3 changed files with 120 additions and 1 deletions

View file

@ -0,0 +1,116 @@
package mage.cards.j;
import mage.MageInt;
import mage.abilities.Ability;
import mage.abilities.common.BeginningOfCombatTriggeredAbility;
import mage.abilities.common.DealsDamageToAPlayerAllTriggeredAbility;
import mage.abilities.effects.OneShotEffect;
import mage.abilities.effects.common.DrawCardSourceControllerEffect;
import mage.abilities.effects.common.continuous.BecomesCreatureTargetEffect;
import mage.abilities.keyword.FlyingAbility;
import mage.abilities.keyword.HasteAbility;
import mage.cards.CardImpl;
import mage.cards.CardSetInfo;
import mage.constants.*;
import mage.filter.FilterPermanent;
import mage.filter.StaticFilters;
import mage.filter.common.FilterControlledCreaturePermanent;
import mage.game.Game;
import mage.game.permanent.Permanent;
import mage.game.permanent.token.custom.CreatureToken;
import mage.players.Player;
import mage.target.TargetPermanent;
import mage.target.targetpointer.FixedTarget;
import java.util.Objects;
import java.util.Optional;
import java.util.Set;
import java.util.UUID;
/**
* @author TheElk801
*/
public final class JolraelVoiceOfZhalfir extends CardImpl {
private static final FilterPermanent filter
= new FilterControlledCreaturePermanent("a land creature you control");
static {
filter.add(CardType.LAND.getPredicate());
}
public JolraelVoiceOfZhalfir(UUID ownerId, CardSetInfo setInfo) {
super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{2}{G}{U}");
this.addSuperType(SuperType.LEGENDARY);
this.subtype.add(SubType.HUMAN);
this.subtype.add(SubType.DRUID);
this.power = new MageInt(3);
this.toughness = new MageInt(3);
// At the beginning of combat on your turn, up to one target land you control becomes an X/X green and blue Bird creature with flying and haste until end of turn, where X is the number of cards in your hand. It's still a land.
Ability ability = new BeginningOfCombatTriggeredAbility(
new JolraelVoiceOfZhalfirEffect(), TargetController.YOU, false
);
ability.addTarget(new TargetPermanent(
0, 1, StaticFilters.FILTER_CONTROLLED_PERMANENT_LAND
));
this.addAbility(ability);
// Whenever a land creature you control deals combat damage to a player, draw a card.
this.addAbility(new DealsDamageToAPlayerAllTriggeredAbility(
new DrawCardSourceControllerEffect(1), filter,
false, SetTargetPointer.NONE, true
));
}
private JolraelVoiceOfZhalfir(final JolraelVoiceOfZhalfir card) {
super(card);
}
@Override
public JolraelVoiceOfZhalfir copy() {
return new JolraelVoiceOfZhalfir(this);
}
}
class JolraelVoiceOfZhalfirEffect extends OneShotEffect {
JolraelVoiceOfZhalfirEffect() {
super(Outcome.Benefit);
staticText = "up to one target land you control becomes an X/X green and blue Bird creature with " +
"flying and haste until end of turn, where X is the number of cards in your hand. It's still a land";
}
private JolraelVoiceOfZhalfirEffect(final JolraelVoiceOfZhalfirEffect effect) {
super(effect);
}
@Override
public JolraelVoiceOfZhalfirEffect copy() {
return new JolraelVoiceOfZhalfirEffect(this);
}
@Override
public boolean apply(Game game, Ability source) {
int count = Optional
.of(source)
.map(Ability::getControllerId)
.map(game::getPlayer)
.filter(Objects::nonNull)
.map(Player::getHand)
.map(Set::size)
.orElse(0);
Permanent permanent = game.getPermanent(getTargetPointer().getFirst(game, source));
if (permanent == null) {
return false;
}
game.addEffect(new BecomesCreatureTargetEffect(
new CreatureToken(count, count, "", SubType.BIRD)
.withAbility(FlyingAbility.getInstance())
.withAbility(HasteAbility.getInstance()),
false, true, Duration.EndOfTurn
).setTargetPointer(new FixedTarget(permanent, game)), source);
return true;
}
}

View file

@ -1,6 +1,7 @@
package mage.sets;
import mage.cards.ExpansionSet;
import mage.constants.Rarity;
import mage.constants.SetType;
/**
@ -19,5 +20,7 @@ public final class MarchOfTheMachineTheAftermath extends ExpansionSet {
this.blockName = "March of the Machine";
this.hasBasicLands = false;
this.hasBoosters = false; // temporary
cards.add(new SetCardInfo("Jolrael, Voice of Zhalfir", 33, Rarity.RARE, mage.cards.j.JolraelVoiceOfZhalfir.class));
}
}

View file

@ -48767,8 +48767,8 @@ Vineglimmer Snarl|March of the Machine Commander|444|R||Land|||As Vineglimmer Sn
Goro-Goro and Satoru|March of the Machine Commander|445|M|{U}{B}{R}|Legendary Creature - Goblin Human|3|4|Whenever one or more creatures you control that entered the battlefield this turn deal combat damage to a player, create a 5/5 red Dragon Spirit creature token with flying.${1}{R}: Creatures you control gain haste until end of turn.|
Katilda and Lier|March of the Machine Commander|446|M|{G}{W}{U}|Legendary Creature - Human|3|3|Whenever you cast a Human spell, target instant or sorcery card in your graveyard gains flashback until end of turn. The flashback cost is equal to its mana cost.|
Slimefoot and Squee|March of the Machine Commander|447|M|{B}{R}{G}|Legendary Creature - Fungus Goblin|3|3|Whenever Slimefoot and Squee enters the battlefield or attacks, create a 1/1 green Saproling creature token.${1}{B}{R}{G}, Sacrifice a Saproling: Return Slimefoot and Squee and up to one other target creature card from your graveyard to the battlefield. Activate only as a sorcery.|
Jolrael, Voice of Zhalfir|March of the Machine: The Aftermath|33|R|{2}{G}{U}|Legendary Creature - Human Druid|3|3|At the beginning of combat on your turn, up to one target land you control becomes an X/X green and blue Bird creature with flying and haste until end of turn, where X is the number of cards in your hand. It's still a land.$Whenever a land creature you control deals combat damage to a player, draw a card.|
The Kenriths' Royal Funeral|March of the Machine: The Aftermath|34|R|{2}{W}{B}|Legendary Enchantment|||When The Kenriths' Royal Funeral enters the battlefield, exile up to two target legendary creature cards from your graveyard. You draw X cards and you lose X life, where X is the greatest mana value among cards exiled this way.$Legendary spells you cast cost {1} less to cast for each card exiled with The Kenriths' Royal Funeral.|
Jolrael, Voice of Zhalfir|March of the Machine: The Aftermath|230|R|{2}{G}{U}|Legendary Creature - Human Druid|3|3|At the beginning of combat on your turn, up to one target land you control becomes an X/X green and blue Bird creature with flying and haste until end of turn, where X is the number of cards in your hand. It's still a land. Whenever a land creature you control deals combat damage to a player, draw a card.|
Frodo, Sauron's Bane|The Lord of the Rings: Tales of Middle-earth|18|R|{W}|Legendary Creature - Halfling Citizen|1|2|{W/B}{W/B}: If Frodo, Sauron's Bane is a Citizen, it becomes a Halfling Scout with base power and toughness 2/3 and lifelink.${B}{B}{B}: If Frodo is a Scout, it becomes a Halfling Rogue with "Whenever this creature deals combat damage to a player, that player loses the game if the Ring has tempted you four or more times this game. Otherwise, the Ring tempts you."|
Reprieve|The Lord of the Rings: Tales of Middle-earth|26|U|{1}{W}|Instant|||Return target spell to its owner's hand.$Draw a card.|
Samwise the Stouthearted|The Lord of the Rings: Tales of Middle-earth|28|U|{1}{W}|Legendary Creature - Halfling Peasant|2|1|Flash$When Samwise the Stouthearted enters the battlefield, choose up to one target permanent card in your graveyard that was put there from the battlefield this turn. Return it to your hand. Then the Ring tempts you.|