[M3C] Implement Aggressive Biomancy (#12401)

This commit is contained in:
Cameron Merkel 2024-06-06 18:23:24 -05:00 committed by GitHub
parent 976097e1e8
commit 668808a7d5
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 87 additions and 0 deletions

View file

@ -0,0 +1,85 @@
package mage.cards.a;
import java.util.UUID;
import mage.abilities.Ability;
import mage.abilities.common.EntersBattlefieldTriggeredAbility;
import mage.abilities.effects.OneShotEffect;
import mage.abilities.effects.common.CreateTokenCopyTargetEffect;
import mage.abilities.effects.common.FightTargetSourceEffect;
import mage.cards.CardImpl;
import mage.cards.CardSetInfo;
import mage.constants.CardType;
import mage.constants.Outcome;
import mage.filter.StaticFilters;
import mage.game.Game;
import mage.game.permanent.Permanent;
import mage.players.Player;
import mage.target.TargetPermanent;
import mage.target.common.TargetControlledCreaturePermanent;
import mage.target.targetpointer.FixedTarget;
/**
* @author Cguy7777
*/
public final class AggressiveBiomancy extends CardImpl {
public AggressiveBiomancy(UUID ownerId, CardSetInfo setInfo) {
super(ownerId, setInfo, new CardType[]{CardType.SORCERY}, "{X}{X}{G}{U}");
// Create X tokens that are copies of target creature you control, except they have
// "When this creature enters the battlefield, it fights up to one target creature you don't control."
this.getSpellAbility().addEffect(new AggressiveBiomancyEffect());
this.getSpellAbility().addTarget(new TargetControlledCreaturePermanent());
}
private AggressiveBiomancy(final AggressiveBiomancy card) {
super(card);
}
@Override
public AggressiveBiomancy copy() {
return new AggressiveBiomancy(this);
}
}
class AggressiveBiomancyEffect extends OneShotEffect {
AggressiveBiomancyEffect() {
super(Outcome.Copy);
this.staticText = "Create X tokens that are copies of target creature you control, " +
"except they have \"When this creature enters the battlefield, " +
"it fights up to one target creature you don't control.\"";
}
private AggressiveBiomancyEffect(final AggressiveBiomancyEffect effect) {
super(effect);
}
@Override
public boolean apply(Game game, Ability source) {
Player controller = game.getPlayer(source.getControllerId());
Permanent creatureToCopy = getTargetPointer().getFirstTargetPermanentOrLKI(game, source);
if (controller == null || creatureToCopy == null) {
return false;
}
Ability fightAbility = new EntersBattlefieldTriggeredAbility(
new FightTargetSourceEffect().setText("it fights up to one target creature you don't control"));
fightAbility.addTarget(new TargetPermanent(0, 1, StaticFilters.FILTER_CREATURE_YOU_DONT_CONTROL));
CreateTokenCopyTargetEffect effect = new CreateTokenCopyTargetEffect(
source.getControllerId(),
null,
false,
source.getManaCostsToPay().getX());
effect.addAdditionalAbilities(fightAbility);
effect.setTargetPointer(new FixedTarget(creatureToCopy, game));
return effect.apply(game, source);
}
@Override
public AggressiveBiomancyEffect copy() {
return new AggressiveBiomancyEffect(this);
}
}

View file

@ -29,6 +29,8 @@ public final class ModernHorizons3Commander extends ExpansionSet {
cards.add(new SetCardInfo("Aetherstorm Roc", 164, Rarity.RARE, mage.cards.a.AetherstormRoc.class));
cards.add(new SetCardInfo("Aethertide Whale", 175, Rarity.RARE, mage.cards.a.AethertideWhale.class));
cards.add(new SetCardInfo("Aetherworks Marvel", 281, Rarity.MYTHIC, mage.cards.a.AetherworksMarvel.class));
cards.add(new SetCardInfo("Aggressive Biomancy", 69, Rarity.RARE, mage.cards.a.AggressiveBiomancy.class, NON_FULL_USE_VARIOUS));
cards.add(new SetCardInfo("Aggressive Biomancy", 121, Rarity.RARE, mage.cards.a.AggressiveBiomancy.class, NON_FULL_USE_VARIOUS));
cards.add(new SetCardInfo("Akroma's Will", 165, Rarity.RARE, mage.cards.a.AkromasWill.class));
cards.add(new SetCardInfo("All Is Dust", 152, Rarity.MYTHIC, mage.cards.a.AllIsDust.class));
cards.add(new SetCardInfo("Altar of the Goyf", 282, Rarity.UNCOMMON, mage.cards.a.AltarOfTheGoyf.class));