1
0
Fork 0
mirror of https://github.com/correl/mage.git synced 2025-03-30 09:08:36 -09:00

[C21] Implemented Zaffai, Thunder Conductor

This commit is contained in:
Evan Kranzler 2021-04-14 09:39:58 -04:00
parent 816855f6ac
commit cefc841ce0
2 changed files with 89 additions and 0 deletions

View file

@ -0,0 +1,88 @@
package mage.cards.z;
import mage.MageInt;
import mage.abilities.Ability;
import mage.abilities.common.MagecraftAbility;
import mage.abilities.effects.OneShotEffect;
import mage.cards.CardImpl;
import mage.cards.CardSetInfo;
import mage.constants.CardType;
import mage.constants.Outcome;
import mage.constants.SubType;
import mage.constants.SuperType;
import mage.game.Game;
import mage.game.permanent.token.PrismariToken;
import mage.game.stack.Spell;
import mage.players.Player;
import mage.target.common.TargetOpponent;
import java.util.UUID;
/**
* @author TheElk801
*/
public final class ZaffaiThunderConductor extends CardImpl {
public ZaffaiThunderConductor(UUID ownerId, CardSetInfo setInfo) {
super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{2}{U}{R}");
this.addSuperType(SuperType.LEGENDARY);
this.subtype.add(SubType.HUMAN);
this.subtype.add(SubType.SHAMAN);
this.power = new MageInt(1);
this.toughness = new MageInt(4);
// Magecraft Whenever you cast or copy an instant or sorcery spell, scry 1. If that spell's mana value is 5 or greater, create a 4/4 blue and red Elemental creature token. If that spell's mana value is 10 or greater, Zaffai, Thunder Conductor deals 10 damage to an opponent chosen at random.
this.addAbility(new MagecraftAbility(new ZaffaiThunderConductorEffect()));
}
private ZaffaiThunderConductor(final ZaffaiThunderConductor card) {
super(card);
}
@Override
public ZaffaiThunderConductor copy() {
return new ZaffaiThunderConductor(this);
}
}
class ZaffaiThunderConductorEffect extends OneShotEffect {
ZaffaiThunderConductorEffect() {
super(Outcome.Benefit);
staticText = "scry 1. If that spell's mana value is 5 or greater, " +
"create a 4/4 blue and red Elemental creature token. If that spell's mana value is 10 or greater, " +
"{this} deals 10 damage to an opponent chosen at random";
}
private ZaffaiThunderConductorEffect(final ZaffaiThunderConductorEffect effect) {
super(effect);
}
@Override
public ZaffaiThunderConductorEffect copy() {
return new ZaffaiThunderConductorEffect(this);
}
@Override
public boolean apply(Game game, Ability source) {
Player player = game.getPlayer(source.getControllerId());
if (player == null) {
return false;
}
player.scry(1, source, game);
Spell spell = (Spell) getValue(MagecraftAbility.SPELL_KEY);
if (spell == null || spell.getConvertedManaCost() < 5) {
return false;
}
new PrismariToken().putOntoBattlefield(1, game, source, source.getControllerId());
if (spell.getConvertedManaCost() < 10) {
return true;
}
TargetOpponent target = new TargetOpponent(true);
player.chooseTarget(outcome, target, source, game);
Player opponent = game.getPlayer(target.getFirstTarget());
opponent.damage(10, source.getSourceId(), source, game);
return true;
}
}

View file

@ -318,6 +318,7 @@ public final class Commander2021Edition extends ExpansionSet {
cards.add(new SetCardInfo("Windborn Muse", 111, Rarity.RARE, mage.cards.w.WindbornMuse.class));
cards.add(new SetCardInfo("Witch's Clinic", 81, Rarity.RARE, mage.cards.w.WitchsClinic.class));
cards.add(new SetCardInfo("Yavimaya Coast", 409, Rarity.RARE, mage.cards.y.YavimayaCoast.class));
cards.add(new SetCardInfo("Zaffai, Thunder Conductor", 4, Rarity.MYTHIC, mage.cards.z.ZaffaiThunderConductor.class));
cards.add(new SetCardInfo("Zetalpa, Primal Dawn", 112, Rarity.RARE, mage.cards.z.ZetalpaPrimalDawn.class));
}
}