mirror of
https://github.com/magefree/mage.git
synced 2025-12-20 02:30:08 -08:00
[EOE] Implement Melststrider's Resolve
This commit is contained in:
parent
a6f75f1eb5
commit
df7a97a0f0
3 changed files with 92 additions and 0 deletions
90
Mage.Sets/src/mage/cards/m/MeltstridersResolve.java
Normal file
90
Mage.Sets/src/mage/cards/m/MeltstridersResolve.java
Normal file
|
|
@ -0,0 +1,90 @@
|
||||||
|
package mage.cards.m;
|
||||||
|
|
||||||
|
import mage.abilities.Ability;
|
||||||
|
import mage.abilities.common.EntersBattlefieldTriggeredAbility;
|
||||||
|
import mage.abilities.common.SimpleStaticAbility;
|
||||||
|
import mage.abilities.effects.OneShotEffect;
|
||||||
|
import mage.abilities.effects.common.AttachEffect;
|
||||||
|
import mage.abilities.effects.common.combat.CantBeBlockedByMoreThanOneAttachedEffect;
|
||||||
|
import mage.abilities.effects.common.continuous.BoostEnchantedEffect;
|
||||||
|
import mage.abilities.keyword.EnchantAbility;
|
||||||
|
import mage.cards.CardImpl;
|
||||||
|
import mage.cards.CardSetInfo;
|
||||||
|
import mage.constants.AttachmentType;
|
||||||
|
import mage.constants.CardType;
|
||||||
|
import mage.constants.Outcome;
|
||||||
|
import mage.constants.SubType;
|
||||||
|
import mage.game.Game;
|
||||||
|
import mage.game.permanent.Permanent;
|
||||||
|
import mage.target.TargetPermanent;
|
||||||
|
import mage.target.common.TargetControlledCreaturePermanent;
|
||||||
|
import mage.target.common.TargetOpponentsCreaturePermanent;
|
||||||
|
|
||||||
|
import java.util.Optional;
|
||||||
|
import java.util.UUID;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @author TheElk801
|
||||||
|
*/
|
||||||
|
public final class MeltstridersResolve extends CardImpl {
|
||||||
|
|
||||||
|
public MeltstridersResolve(UUID ownerId, CardSetInfo setInfo) {
|
||||||
|
super(ownerId, setInfo, new CardType[]{CardType.ENCHANTMENT}, "{G}");
|
||||||
|
|
||||||
|
this.subtype.add(SubType.AURA);
|
||||||
|
|
||||||
|
// Enchant creature you control
|
||||||
|
TargetPermanent auraTarget = new TargetControlledCreaturePermanent();
|
||||||
|
this.getSpellAbility().addTarget(auraTarget);
|
||||||
|
this.getSpellAbility().addEffect(new AttachEffect(Outcome.BoostCreature));
|
||||||
|
this.addAbility(new EnchantAbility(auraTarget));
|
||||||
|
|
||||||
|
// When this Aura enters, enchanted creature fights up to one target creature an opponent controls.
|
||||||
|
Ability ability = new EntersBattlefieldTriggeredAbility(new MeltstridersResolveEffect());
|
||||||
|
ability.addTarget(new TargetOpponentsCreaturePermanent(0, 1));
|
||||||
|
this.addAbility(ability);
|
||||||
|
|
||||||
|
// Enchanted creature gets +0/+2 and can't be blocked by more than one creature.
|
||||||
|
ability = new SimpleStaticAbility(new BoostEnchantedEffect(0, 2));
|
||||||
|
ability.addEffect(new CantBeBlockedByMoreThanOneAttachedEffect(AttachmentType.AURA)
|
||||||
|
.setText("and can't be blocked by more than one creature"));
|
||||||
|
this.addAbility(ability);
|
||||||
|
}
|
||||||
|
|
||||||
|
private MeltstridersResolve(final MeltstridersResolve card) {
|
||||||
|
super(card);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public MeltstridersResolve copy() {
|
||||||
|
return new MeltstridersResolve(this);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
class MeltstridersResolveEffect extends OneShotEffect {
|
||||||
|
|
||||||
|
MeltstridersResolveEffect() {
|
||||||
|
super(Outcome.Benefit);
|
||||||
|
staticText = "enchanted creature fights up to one target creature an opponent controls";
|
||||||
|
}
|
||||||
|
|
||||||
|
private MeltstridersResolveEffect(final MeltstridersResolveEffect effect) {
|
||||||
|
super(effect);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public MeltstridersResolveEffect copy() {
|
||||||
|
return new MeltstridersResolveEffect(this);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public boolean apply(Game game, Ability source) {
|
||||||
|
Permanent permanent = Optional
|
||||||
|
.ofNullable(source.getSourcePermanentOrLKI(game))
|
||||||
|
.map(Permanent::getAttachedTo)
|
||||||
|
.map(game::getPermanent)
|
||||||
|
.orElse(null);
|
||||||
|
Permanent creature = game.getPermanent(getTargetPointer().getFirst(game, source));
|
||||||
|
return permanent != null && creature != null && permanent.fight(creature, source, game);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
@ -161,6 +161,7 @@ public final class EdgeOfEternities extends ExpansionSet {
|
||||||
cards.add(new SetCardInfo("Mechanozoa", 66, Rarity.COMMON, mage.cards.m.Mechanozoa.class));
|
cards.add(new SetCardInfo("Mechanozoa", 66, Rarity.COMMON, mage.cards.m.Mechanozoa.class));
|
||||||
cards.add(new SetCardInfo("Melded Moxite", 143, Rarity.COMMON, mage.cards.m.MeldedMoxite.class));
|
cards.add(new SetCardInfo("Melded Moxite", 143, Rarity.COMMON, mage.cards.m.MeldedMoxite.class));
|
||||||
cards.add(new SetCardInfo("Meltstrider Eulogist", 197, Rarity.UNCOMMON, mage.cards.m.MeltstriderEulogist.class));
|
cards.add(new SetCardInfo("Meltstrider Eulogist", 197, Rarity.UNCOMMON, mage.cards.m.MeltstriderEulogist.class));
|
||||||
|
cards.add(new SetCardInfo("Meltstrider's Resolve", 199, Rarity.UNCOMMON, mage.cards.m.MeltstridersResolve.class));
|
||||||
cards.add(new SetCardInfo("Memorial Team Leader", 144, Rarity.UNCOMMON, mage.cards.m.MemorialTeamLeader.class));
|
cards.add(new SetCardInfo("Memorial Team Leader", 144, Rarity.UNCOMMON, mage.cards.m.MemorialTeamLeader.class));
|
||||||
cards.add(new SetCardInfo("Mightform Harmonizer", 200, Rarity.RARE, mage.cards.m.MightformHarmonizer.class, NON_FULL_USE_VARIOUS));
|
cards.add(new SetCardInfo("Mightform Harmonizer", 200, Rarity.RARE, mage.cards.m.MightformHarmonizer.class, NON_FULL_USE_VARIOUS));
|
||||||
cards.add(new SetCardInfo("Mightform Harmonizer", 297, Rarity.RARE, mage.cards.m.MightformHarmonizer.class, NON_FULL_USE_VARIOUS));
|
cards.add(new SetCardInfo("Mightform Harmonizer", 297, Rarity.RARE, mage.cards.m.MightformHarmonizer.class, NON_FULL_USE_VARIOUS));
|
||||||
|
|
|
||||||
|
|
@ -59232,6 +59232,7 @@ Harmonious Grovestrider|Edge of Eternities|189|U|{3}{G}{G}|Creature - Beast|*|*|
|
||||||
Hemosymbic Mite|Edge of Eternities|190|U|{G}|Creature - Mite|1|1|Whenever this creature becomes tapped, another target creature you control gets +X/+X until end of turn, where X is this creature's power.|
|
Hemosymbic Mite|Edge of Eternities|190|U|{G}|Creature - Mite|1|1|Whenever this creature becomes tapped, another target creature you control gets +X/+X until end of turn, where X is this creature's power.|
|
||||||
Loading Zone|Edge of Eternities|196|R|{3}{G}|Enchantment|||If one or more counters would be put on a creature, Spacecraft, or Planet you control, twice that many of each of those kinds of counters are put on it instead.$Warp {G}|
|
Loading Zone|Edge of Eternities|196|R|{3}{G}|Enchantment|||If one or more counters would be put on a creature, Spacecraft, or Planet you control, twice that many of each of those kinds of counters are put on it instead.$Warp {G}|
|
||||||
Meltstrider Eulogist|Edge of Eternities|197|U|{2}{G}|Creature - Insect Soldier|3|3|Whenever a creature you control with a +1/+1 counter on it dies, draw a card.|
|
Meltstrider Eulogist|Edge of Eternities|197|U|{2}{G}|Creature - Insect Soldier|3|3|Whenever a creature you control with a +1/+1 counter on it dies, draw a card.|
|
||||||
|
Meltstrider's Resolve|Edge of Eternities|199|U|{G}|Enchantment - Aura|||Enchant creature you control$When this Aura enters, enchanted creature fights up to one target creature an opponent controls.$Enchanted creature gets +0/+2 and can't be blocked by more than one creature.|
|
||||||
Mightform Harmonizer|Edge of Eternities|200|R|{2}{G}{G}|Creature - Insect Druid|4|4|Landfall -- Whenever a land you control enters, double the power of target creature you control until end of turn.$Warp {2}{G}|
|
Mightform Harmonizer|Edge of Eternities|200|R|{2}{G}{G}|Creature - Insect Druid|4|4|Landfall -- Whenever a land you control enters, double the power of target creature you control until end of turn.$Warp {2}{G}|
|
||||||
Ouroboroid|Edge of Eternities|201|M|{2}{G}{G}|Creature - Plant Wurm|1|3|At the beginning of combat on your turn, put X +1/+1 counters on each creature you control, where X is this creature's power.|
|
Ouroboroid|Edge of Eternities|201|M|{2}{G}{G}|Creature - Plant Wurm|1|3|At the beginning of combat on your turn, put X +1/+1 counters on each creature you control, where X is this creature's power.|
|
||||||
Sami's Curiosity|Edge of Eternities|203|C|{G}|Sorcery|||You gain 2 life. Create a Lander token.|
|
Sami's Curiosity|Edge of Eternities|203|C|{G}|Sorcery|||You gain 2 life. Create a Lander token.|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue