forked from External/mage
[SPM] Implement Spider-Islanders
This commit is contained in:
parent
f5902e8ee0
commit
3682805a80
5 changed files with 120 additions and 1 deletions
38
Mage.Sets/src/mage/cards/s/SpiderIslanders.java
Normal file
38
Mage.Sets/src/mage/cards/s/SpiderIslanders.java
Normal file
|
|
@ -0,0 +1,38 @@
|
||||||
|
package mage.cards.s;
|
||||||
|
|
||||||
|
import mage.MageInt;
|
||||||
|
import mage.abilities.keyword.MayhemAbility;
|
||||||
|
import mage.cards.CardImpl;
|
||||||
|
import mage.cards.CardSetInfo;
|
||||||
|
import mage.constants.CardType;
|
||||||
|
import mage.constants.SubType;
|
||||||
|
|
||||||
|
import java.util.UUID;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @author TheElk801
|
||||||
|
*/
|
||||||
|
public final class SpiderIslanders extends CardImpl {
|
||||||
|
|
||||||
|
public SpiderIslanders(UUID ownerId, CardSetInfo setInfo) {
|
||||||
|
super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{3}{R}");
|
||||||
|
|
||||||
|
this.subtype.add(SubType.SPIDER);
|
||||||
|
this.subtype.add(SubType.HORROR);
|
||||||
|
this.subtype.add(SubType.CITIZEN);
|
||||||
|
this.power = new MageInt(4);
|
||||||
|
this.toughness = new MageInt(3);
|
||||||
|
|
||||||
|
// Mayhem {1}{R}
|
||||||
|
this.addAbility(new MayhemAbility(this, "{1}{R}"));
|
||||||
|
}
|
||||||
|
|
||||||
|
private SpiderIslanders(final SpiderIslanders card) {
|
||||||
|
super(card);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public SpiderIslanders copy() {
|
||||||
|
return new SpiderIslanders(this);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
@ -4,11 +4,15 @@ import mage.cards.ExpansionSet;
|
||||||
import mage.constants.Rarity;
|
import mage.constants.Rarity;
|
||||||
import mage.constants.SetType;
|
import mage.constants.SetType;
|
||||||
|
|
||||||
|
import java.util.Arrays;
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @author TheElk801
|
* @author TheElk801
|
||||||
*/
|
*/
|
||||||
public final class MarvelsSpiderMan extends ExpansionSet {
|
public final class MarvelsSpiderMan extends ExpansionSet {
|
||||||
|
|
||||||
|
private static final List<String> unfinished = Arrays.asList("Electro's Bolt", "Spider-Islanders");
|
||||||
private static final MarvelsSpiderMan instance = new MarvelsSpiderMan();
|
private static final MarvelsSpiderMan instance = new MarvelsSpiderMan();
|
||||||
|
|
||||||
public static MarvelsSpiderMan getInstance() {
|
public static MarvelsSpiderMan getInstance() {
|
||||||
|
|
@ -55,6 +59,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-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-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-Ham, Peter Porker", 114, Rarity.RARE, mage.cards.s.SpiderHamPeterPorker.class));
|
||||||
|
cards.add(new SetCardInfo("Spider-Islanders", 91, Rarity.COMMON, mage.cards.s.SpiderIslanders.class));
|
||||||
cards.add(new SetCardInfo("Spider-Man Noir", 67, Rarity.UNCOMMON, mage.cards.s.SpiderManNoir.class));
|
cards.add(new SetCardInfo("Spider-Man Noir", 67, Rarity.UNCOMMON, mage.cards.s.SpiderManNoir.class));
|
||||||
cards.add(new SetCardInfo("Spider-Man, Brooklyn Visionary", 115, Rarity.COMMON, mage.cards.s.SpiderManBrooklynVisionary.class));
|
cards.add(new SetCardInfo("Spider-Man, Brooklyn Visionary", 115, Rarity.COMMON, mage.cards.s.SpiderManBrooklynVisionary.class));
|
||||||
cards.add(new SetCardInfo("Spider-Man, Web-Slinger", 16, Rarity.COMMON, mage.cards.s.SpiderManWebSlinger.class));
|
cards.add(new SetCardInfo("Spider-Man, Web-Slinger", 16, Rarity.COMMON, mage.cards.s.SpiderManWebSlinger.class));
|
||||||
|
|
@ -71,5 +76,7 @@ public final class MarvelsSpiderMan extends ExpansionSet {
|
||||||
cards.add(new SetCardInfo("Web Up", 21, Rarity.COMMON, mage.cards.w.WebUp.class));
|
cards.add(new SetCardInfo("Web Up", 21, Rarity.COMMON, mage.cards.w.WebUp.class));
|
||||||
cards.add(new SetCardInfo("Whoosh!", 48, Rarity.COMMON, mage.cards.w.Whoosh.class));
|
cards.add(new SetCardInfo("Whoosh!", 48, Rarity.COMMON, mage.cards.w.Whoosh.class));
|
||||||
cards.add(new SetCardInfo("Wild Pack Squad", 23, Rarity.COMMON, mage.cards.w.WildPackSquad.class));
|
cards.add(new SetCardInfo("Wild Pack Squad", 23, Rarity.COMMON, mage.cards.w.WildPackSquad.class));
|
||||||
|
|
||||||
|
cards.removeIf(setCardInfo -> unfinished.contains(setCardInfo.getName()));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
73
Mage/src/main/java/mage/abilities/keyword/MayhemAbility.java
Normal file
73
Mage/src/main/java/mage/abilities/keyword/MayhemAbility.java
Normal file
|
|
@ -0,0 +1,73 @@
|
||||||
|
package mage.abilities.keyword;
|
||||||
|
|
||||||
|
import mage.ApprovingObject;
|
||||||
|
import mage.MageIdentifier;
|
||||||
|
import mage.abilities.SpellAbility;
|
||||||
|
import mage.abilities.costs.mana.ManaCostsImpl;
|
||||||
|
import mage.cards.Card;
|
||||||
|
import mage.constants.SpellAbilityType;
|
||||||
|
import mage.constants.Zone;
|
||||||
|
import mage.game.Game;
|
||||||
|
import mage.players.Player;
|
||||||
|
import mage.watchers.common.CastSpellLastTurnWatcher;
|
||||||
|
|
||||||
|
import java.util.Set;
|
||||||
|
import java.util.UUID;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @author TheElk801
|
||||||
|
*/
|
||||||
|
public class MayhemAbility extends SpellAbility {
|
||||||
|
|
||||||
|
public static final String MAYHEM_ACTIVATION_VALUE_KEY = "mayhemActivation";
|
||||||
|
|
||||||
|
private final String rule;
|
||||||
|
|
||||||
|
public MayhemAbility(Card card, String manaString) {
|
||||||
|
super(card.getSpellAbility());
|
||||||
|
this.newId();
|
||||||
|
this.setCardName(card.getName() + " with Mayhem");
|
||||||
|
zone = Zone.GRAVEYARD;
|
||||||
|
spellAbilityType = SpellAbilityType.BASE_ALTERNATE;
|
||||||
|
|
||||||
|
this.clearManaCosts();
|
||||||
|
this.clearManaCostsToPay();
|
||||||
|
this.addCost(new ManaCostsImpl<>(manaString));
|
||||||
|
|
||||||
|
this.setRuleAtTheTop(true);
|
||||||
|
this.rule = "Surge " + manaString +
|
||||||
|
" <i>(You may cast this card from your graveyard for "+manaString+
|
||||||
|
" if you discarded it this turn. Timing rules still apply.)</i>";
|
||||||
|
}
|
||||||
|
|
||||||
|
protected MayhemAbility(final MayhemAbility ability) {
|
||||||
|
super(ability);
|
||||||
|
this.rule = ability.rule;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public ActivationStatus canActivate(UUID playerId, Game game) {
|
||||||
|
// TODO: Implement this
|
||||||
|
return super.canActivate(playerId,game);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public boolean activate(Game game, Set<MageIdentifier> allowedIdentifiers, boolean noMana) {
|
||||||
|
if (!super.activate(game, allowedIdentifiers, noMana)) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
this.setCostsTag(MAYHEM_ACTIVATION_VALUE_KEY, null);
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public MayhemAbility copy() {
|
||||||
|
return new MayhemAbility(this);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public String getRule() {
|
||||||
|
return rule;
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
@ -16,7 +16,7 @@ import mage.target.common.TargetControlledPermanent;
|
||||||
import java.util.Set;
|
import java.util.Set;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @author LevelX2
|
* @author TheElk801
|
||||||
*/
|
*/
|
||||||
public class WebSlingingAbility extends SpellAbility {
|
public class WebSlingingAbility extends SpellAbility {
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -84,6 +84,7 @@ Lifelink|instance|
|
||||||
Living metal|new|
|
Living metal|new|
|
||||||
Living weapon|new|
|
Living weapon|new|
|
||||||
Madness|cost|
|
Madness|cost|
|
||||||
|
Mayhem|card, manaString|
|
||||||
Melee|new|
|
Melee|new|
|
||||||
Menace|new|
|
Menace|new|
|
||||||
Mentor|new|
|
Mentor|new|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue