Implemented Hunter's Edge

This commit is contained in:
Evan Kranzler 2020-06-16 22:11:04 -04:00
parent bc87348349
commit e3a1fee1ea
3 changed files with 39 additions and 35 deletions

View file

@ -1,19 +1,14 @@
package mage.cards.d;
import mage.abilities.Ability;
import mage.abilities.effects.OneShotEffect;
import mage.abilities.effects.common.DamageWithPowerFromOneToAnotherTargetEffect;
import mage.abilities.effects.common.counter.AddCountersTargetEffect;
import mage.cards.CardImpl;
import mage.cards.CardSetInfo;
import mage.constants.CardType;
import mage.constants.Outcome;
import mage.constants.TargetController;
import mage.counters.CounterType;
import mage.filter.FilterPermanent;
import mage.filter.common.FilterCreatureOrPlaneswalkerPermanent;
import mage.game.Game;
import mage.game.permanent.Permanent;
import mage.target.TargetPermanent;
import mage.target.common.TargetControlledCreaturePermanent;
@ -52,33 +47,3 @@ public final class DomrisAmbush extends CardImpl {
return new DomrisAmbush(this);
}
}
class DomrisAmbushEffect extends OneShotEffect {
DomrisAmbushEffect() {
super(Outcome.Benefit);
staticText = "Put a +1/+1 counter on target creature you control. " +
"Then that creature deals damage equal to its power " +
"to target creature or planeswalker you don't control.";
}
private DomrisAmbushEffect(final DomrisAmbushEffect effect) {
super(effect);
}
@Override
public DomrisAmbushEffect copy() {
return new DomrisAmbushEffect(this);
}
@Override
public boolean apply(Game game, Ability source) {
Permanent permanent = game.getPermanent(source.getFirstTarget());
if (permanent == null) {
return false;
}
permanent.addCounters(CounterType.P1P1.createInstance(), source, game);
game.getState().processAction(game);
return new DamageWithPowerFromOneToAnotherTargetEffect().apply(game, source);
}
}

View file

@ -0,0 +1,38 @@
package mage.cards.h;
import mage.abilities.effects.common.DamageWithPowerFromOneToAnotherTargetEffect;
import mage.abilities.effects.common.counter.AddCountersTargetEffect;
import mage.cards.CardImpl;
import mage.cards.CardSetInfo;
import mage.constants.CardType;
import mage.counters.CounterType;
import mage.filter.StaticFilters;
import mage.target.TargetPermanent;
import mage.target.common.TargetControlledCreaturePermanent;
import java.util.UUID;
/**
* @author TheElk801
*/
public final class HuntersEdge extends CardImpl {
public HuntersEdge(UUID ownerId, CardSetInfo setInfo) {
super(ownerId, setInfo, new CardType[]{CardType.SORCERY}, "{3}{G}");
// Put a +1/+1 counter on target creature you control. Then that creature deals damage equal to its power to target creature you don't control.
this.getSpellAbility().addEffect(new AddCountersTargetEffect(CounterType.P1P1.createInstance()));
this.getSpellAbility().addTarget(new TargetControlledCreaturePermanent());
this.getSpellAbility().addEffect(new DamageWithPowerFromOneToAnotherTargetEffect("that creature").concatBy("Then"));
this.getSpellAbility().addTarget(new TargetPermanent(StaticFilters.FILTER_CREATURE_YOU_DONT_CONTROL));
}
private HuntersEdge(final HuntersEdge card) {
super(card);
}
@Override
public HuntersEdge copy() {
return new HuntersEdge(this);
}
}

View file

@ -128,6 +128,7 @@ public final class CoreSet2021 extends ExpansionSet {
cards.add(new SetCardInfo("Hellkite Punisher", 151, Rarity.UNCOMMON, mage.cards.h.HellkitePunisher.class));
cards.add(new SetCardInfo("Heroic Intervention", 188, Rarity.RARE, mage.cards.h.HeroicIntervention.class));
cards.add(new SetCardInfo("Historian of Zhalfir", 325, Rarity.UNCOMMON, mage.cards.h.HistorianOfZhalfir.class));
cards.add(new SetCardInfo("Hunter's Edge", 189, Rarity.COMMON, mage.cards.h.HuntersEdge.class));
cards.add(new SetCardInfo("Igneous Cur", 153, Rarity.COMMON, mage.cards.i.IgneousCur.class));
cards.add(new SetCardInfo("Indulging Patrician", 219, Rarity.UNCOMMON, mage.cards.i.IndulgingPatrician.class));
cards.add(new SetCardInfo("Infernal Scarring", 105, Rarity.COMMON, mage.cards.i.InfernalScarring.class));