[J25] Implement Hurska Sweet-Tooth

This commit is contained in:
theelk801 2024-11-12 10:30:39 -05:00
parent 43cdf845d5
commit 93d412406d
3 changed files with 65 additions and 7 deletions

View file

@ -0,0 +1,57 @@
package mage.cards.h;
import mage.MageInt;
import mage.abilities.common.AttacksTriggeredAbility;
import mage.abilities.common.GainLifeControllerTriggeredAbility;
import mage.abilities.common.delayed.ReflexiveTriggeredAbility;
import mage.abilities.costs.mana.ManaCostsImpl;
import mage.abilities.dynamicvalue.common.SavedGainedLifeValue;
import mage.abilities.effects.common.CreateTokenEffect;
import mage.abilities.effects.common.DoWhenCostPaid;
import mage.abilities.effects.common.continuous.BoostTargetEffect;
import mage.cards.CardImpl;
import mage.cards.CardSetInfo;
import mage.constants.CardType;
import mage.constants.SubType;
import mage.constants.SuperType;
import mage.game.permanent.token.FoodToken;
import mage.target.common.TargetCreaturePermanent;
import java.util.UUID;
/**
* @author TheElk801
*/
public final class HurskaSweetTooth extends CardImpl {
public HurskaSweetTooth(UUID ownerId, CardSetInfo setInfo) {
super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{2}{G}");
this.supertype.add(SuperType.LEGENDARY);
this.subtype.add(SubType.BEAR);
this.power = new MageInt(3);
this.toughness = new MageInt(3);
// Whenever Hurska Sweet-Tooth attacks, create a Food token.
this.addAbility(new AttacksTriggeredAbility(new CreateTokenEffect(new FoodToken())));
// Whenever you gain life, you may pay {G/W}. When you do, target creature gets +X/+X until end of turn, where X is the amount of life you gained.
ReflexiveTriggeredAbility ability = new ReflexiveTriggeredAbility(
new BoostTargetEffect(SavedGainedLifeValue.MANY, SavedGainedLifeValue.MANY)
.setText("target creature gets +X/+X until end of turn, where X is the amount of life you gained"), false
);
ability.addTarget(new TargetCreaturePermanent());
this.addAbility(new GainLifeControllerTriggeredAbility(
new DoWhenCostPaid(ability, new ManaCostsImpl<>("{G/W}"), "Pay {G/W}?")
));
}
private HurskaSweetTooth(final HurskaSweetTooth card) {
super(card);
}
@Override
public HurskaSweetTooth copy() {
return new HurskaSweetTooth(this);
}
}

View file

@ -349,6 +349,7 @@ public final class FoundationsJumpstart extends ExpansionSet {
cards.add(new SetCardInfo("Howling Banshee", 119, Rarity.UNCOMMON, mage.cards.h.HowlingBanshee.class)); cards.add(new SetCardInfo("Howling Banshee", 119, Rarity.UNCOMMON, mage.cards.h.HowlingBanshee.class));
cards.add(new SetCardInfo("Hungry Megasloth", 21, Rarity.UNCOMMON, mage.cards.h.HungryMegasloth.class)); cards.add(new SetCardInfo("Hungry Megasloth", 21, Rarity.UNCOMMON, mage.cards.h.HungryMegasloth.class));
cards.add(new SetCardInfo("Hunter's Edge", 671, Rarity.COMMON, mage.cards.h.HuntersEdge.class)); cards.add(new SetCardInfo("Hunter's Edge", 671, Rarity.COMMON, mage.cards.h.HuntersEdge.class));
cards.add(new SetCardInfo("Hurska Sweet-Tooth", 53, Rarity.MYTHIC, mage.cards.h.HurskaSweetTooth.class));
cards.add(new SetCardInfo("Impeccable Timing", 209, Rarity.COMMON, mage.cards.i.ImpeccableTiming.class)); cards.add(new SetCardInfo("Impeccable Timing", 209, Rarity.COMMON, mage.cards.i.ImpeccableTiming.class));
cards.add(new SetCardInfo("Incorrigible Youths", 564, Rarity.UNCOMMON, mage.cards.i.IncorrigibleYouths.class)); cards.add(new SetCardInfo("Incorrigible Youths", 564, Rarity.UNCOMMON, mage.cards.i.IncorrigibleYouths.class));
cards.add(new SetCardInfo("Indomitable Will", 210, Rarity.COMMON, mage.cards.i.IndomitableWill.class)); cards.add(new SetCardInfo("Indomitable Will", 210, Rarity.COMMON, mage.cards.i.IndomitableWill.class));

View file

@ -46,13 +46,13 @@ public class GainLifeControllerTriggeredAbility extends TriggeredAbilityImpl {
@Override @Override
public boolean checkTrigger(GameEvent event, Game game) { public boolean checkTrigger(GameEvent event, Game game) {
if (event.getPlayerId().equals(this.getControllerId())) { if (!isControlledBy(event.getPlayerId())) {
this.getEffects().setValue(SavedGainedLifeValue.VALUE_KEY, event.getAmount()); return false;
if (setTargetPointer) {
this.getEffects().setTargetPointer(new FixedTarget(event.getPlayerId()));
}
return true;
} }
return false; this.getEffects().setValue(SavedGainedLifeValue.VALUE_KEY, event.getAmount());
if (setTargetPointer) {
this.getEffects().setTargetPointer(new FixedTarget(event.getPlayerId()));
}
return true;
} }
} }