[SPM] Implement Spider-Man, Web Slinger

This commit is contained in:
theelk801 2025-07-24 10:47:46 -04:00
parent a5e9796010
commit a4d90bae0f
4 changed files with 114 additions and 0 deletions

View file

@ -0,0 +1,40 @@
package mage.cards.s;
import mage.MageInt;
import mage.abilities.keyword.WebSlingingAbility;
import mage.cards.CardImpl;
import mage.cards.CardSetInfo;
import mage.constants.CardType;
import mage.constants.SubType;
import mage.constants.SuperType;
import java.util.UUID;
/**
* @author TheElk801
*/
public final class SpiderManWebSlinger extends CardImpl {
public SpiderManWebSlinger(UUID ownerId, CardSetInfo setInfo) {
super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{2}{W}");
this.supertype.add(SuperType.LEGENDARY);
this.subtype.add(SubType.SPIDER);
this.subtype.add(SubType.HUMAN);
this.subtype.add(SubType.HERO);
this.power = new MageInt(3);
this.toughness = new MageInt(3);
// Web-slinging {W}
this.addAbility(new WebSlingingAbility(this, "{W}"));
}
private SpiderManWebSlinger(final SpiderManWebSlinger card) {
super(card);
}
@Override
public SpiderManWebSlinger copy() {
return new SpiderManWebSlinger(this);
}
}

View file

@ -51,6 +51,7 @@ public final class MarvelsSpiderMan extends ExpansionSet {
cards.add(new SetCardInfo("Spider-Byte, Web Warden", 44, Rarity.UNCOMMON, mage.cards.s.SpiderByteWebWarden.class));
cards.add(new SetCardInfo("Spider-Gwen, Free Spirit", 90, Rarity.COMMON, mage.cards.s.SpiderGwenFreeSpirit.class));
cards.add(new SetCardInfo("Spider-Ham, Peter Porker", 114, Rarity.RARE, mage.cards.s.SpiderHamPeterPorker.class));
cards.add(new SetCardInfo("Spider-Man, Web-Slinger", 16, Rarity.COMMON, mage.cards.s.SpiderManWebSlinger.class));
cards.add(new SetCardInfo("Spider-Rex, Daring Dino", 116, Rarity.COMMON, mage.cards.s.SpiderRexDaringDino.class));
cards.add(new SetCardInfo("Starling, Aerial Ally", 18, Rarity.COMMON, mage.cards.s.StarlingAerialAlly.class));
cards.add(new SetCardInfo("Swamp", 196, Rarity.LAND, mage.cards.basiclands.Swamp.class, NON_FULL_USE_VARIOUS));

View file

@ -0,0 +1,72 @@
package mage.abilities.keyword;
import mage.MageIdentifier;
import mage.abilities.SpellAbility;
import mage.abilities.costs.common.ReturnToHandChosenControlledPermanentCost;
import mage.abilities.costs.mana.ManaCostsImpl;
import mage.cards.Card;
import mage.constants.SpellAbilityType;
import mage.constants.Zone;
import mage.filter.common.FilterControlledCreaturePermanent;
import mage.filter.common.FilterControlledPermanent;
import mage.filter.predicate.permanent.TappedPredicate;
import mage.game.Game;
import mage.target.common.TargetControlledPermanent;
import java.util.Set;
/**
* @author LevelX2
*/
public class WebSlingingAbility extends SpellAbility {
public static final String WEB_SLINGING_ACTIVATION_VALUE_KEY = "webSlingingActivation";
private static final FilterControlledPermanent filter = new FilterControlledCreaturePermanent("tapped creature you control");
static {
filter.add(TappedPredicate.TAPPED);
}
public WebSlingingAbility(Card card, String manaString) {
super(card.getSpellAbility());
this.newId();
this.setCardName(card.getName() + " with Web-slinging");
zone = Zone.HAND;
spellAbilityType = SpellAbilityType.BASE_ALTERNATE;
this.clearManaCosts();
this.clearManaCostsToPay();
this.addCost(new ManaCostsImpl<>(manaString));
this.addCost(new ReturnToHandChosenControlledPermanentCost(new TargetControlledPermanent(filter)));
this.setRuleAtTheTop(true);
}
protected WebSlingingAbility(final WebSlingingAbility ability) {
super(ability);
}
@Override
public boolean activate(Game game, Set<MageIdentifier> allowedIdentifiers, boolean noMana) {
if (!super.activate(game, allowedIdentifiers, noMana)) {
return false;
}
this.setCostsTag(WEB_SLINGING_ACTIVATION_VALUE_KEY, null);
return true;
}
@Override
public WebSlingingAbility copy() {
return new WebSlingingAbility(this);
}
@Override
public String getRule() {
StringBuilder sb = new StringBuilder("Web-slinging ");
sb.append(getManaCosts().getText());
sb.append(" <i>(You may cast this spell for ");
sb.append(getManaCosts().getText());
sb.append(" if you also return a tapped creature you control to its owner's hand.)</i>");
return sb.toString();
}
}

View file

@ -149,4 +149,5 @@ Vanishing|number|
Vigilance|instance|
Ward|cost|
Warp|card, manaString|
Web-slinging|card, manaString|
Wither|instance|