[SPM] implement Strength of Will

This commit is contained in:
jmlundeen 2025-09-05 13:59:55 -05:00
parent d5a0a139a5
commit 2e70279485
2 changed files with 47 additions and 0 deletions

View file

@ -0,0 +1,45 @@
package mage.cards.s;
import mage.abilities.common.DealtDamageToSourceTriggeredAbility;
import mage.abilities.dynamicvalue.common.SavedDamageValue;
import mage.abilities.effects.common.continuous.GainAbilityTargetEffect;
import mage.abilities.effects.common.counter.AddCountersSourceEffect;
import mage.abilities.keyword.IndestructibleAbility;
import mage.cards.CardImpl;
import mage.cards.CardSetInfo;
import mage.constants.CardType;
import mage.counters.CounterType;
import mage.target.common.TargetControlledCreaturePermanent;
import java.util.UUID;
/**
*
* @author Jmlundeen
*/
public final class StrengthOfWill extends CardImpl {
public StrengthOfWill(UUID ownerId, CardSetInfo setInfo) {
super(ownerId, setInfo, new CardType[]{CardType.INSTANT}, "{1}{G}");
// Until end of turn, target creature you control gains indestructible and "Whenever this creature is dealt damage, put that many +1/+1 counters on it."
this.getSpellAbility().addEffect(new GainAbilityTargetEffect(IndestructibleAbility.getInstance())
.setText("Until end of turn, target creature you control gains indestructible"));
this.getSpellAbility().addEffect(new GainAbilityTargetEffect(
new DealtDamageToSourceTriggeredAbility(new AddCountersSourceEffect(CounterType.P1P1.createInstance(),SavedDamageValue.MANY), false))
.setText("\"Whenever this creature is dealt damage, put that many +1/+1 counters on it.\"")
.concatBy("and")
);
this.getSpellAbility().addTarget(new TargetControlledCreaturePermanent());
}
private StrengthOfWill(final StrengthOfWill card) {
super(card);
}
@Override
public StrengthOfWill copy() {
return new StrengthOfWill(this);
}
}

View file

@ -254,6 +254,8 @@ public final class MarvelsSpiderMan extends ExpansionSet {
cards.add(new SetCardInfo("Starling, Aerial Ally", 18, Rarity.COMMON, mage.cards.s.StarlingAerialAlly.class)); cards.add(new SetCardInfo("Starling, Aerial Ally", 18, Rarity.COMMON, mage.cards.s.StarlingAerialAlly.class));
cards.add(new SetCardInfo("Steel Wrecking Ball", 177, Rarity.COMMON, mage.cards.s.SteelWreckingBall.class)); cards.add(new SetCardInfo("Steel Wrecking Ball", 177, Rarity.COMMON, mage.cards.s.SteelWreckingBall.class));
cards.add(new SetCardInfo("Stegron the Dinosaur Man", 95, Rarity.COMMON, mage.cards.s.StegronTheDinosaurMan.class)); cards.add(new SetCardInfo("Stegron the Dinosaur Man", 95, Rarity.COMMON, mage.cards.s.StegronTheDinosaurMan.class));
cards.add(new SetCardInfo("Strength of Will", 118, Rarity.RARE, mage.cards.s.StrengthOfWill.class, NON_FULL_USE_VARIOUS));
cards.add(new SetCardInfo("Strength of Will", 267, Rarity.RARE, mage.cards.s.StrengthOfWill.class, NON_FULL_USE_VARIOUS));
cards.add(new SetCardInfo("Suburban Sanctuary", 185, Rarity.COMMON, mage.cards.s.SuburbanSanctuary.class)); cards.add(new SetCardInfo("Suburban Sanctuary", 185, Rarity.COMMON, mage.cards.s.SuburbanSanctuary.class));
cards.add(new SetCardInfo("Subway Train", 178, Rarity.COMMON, mage.cards.s.SubwayTrain.class)); cards.add(new SetCardInfo("Subway Train", 178, Rarity.COMMON, mage.cards.s.SubwayTrain.class));
cards.add(new SetCardInfo("Sudden Strike", 19, Rarity.UNCOMMON, mage.cards.s.SuddenStrike.class)); cards.add(new SetCardInfo("Sudden Strike", 19, Rarity.UNCOMMON, mage.cards.s.SuddenStrike.class));