mirror of
https://github.com/correl/mage.git
synced 2024-12-25 03:00:15 +00:00
[40K] Implemented Canoptek Scarab Swarm
This commit is contained in:
parent
5a3bc1e813
commit
4546766c1a
3 changed files with 126 additions and 0 deletions
91
Mage.Sets/src/mage/cards/c/CanoptekScarabSwarm.java
Normal file
91
Mage.Sets/src/mage/cards/c/CanoptekScarabSwarm.java
Normal file
|
@ -0,0 +1,91 @@
|
|||
package mage.cards.c;
|
||||
|
||||
import mage.MageInt;
|
||||
import mage.abilities.Ability;
|
||||
import mage.abilities.common.EntersBattlefieldTriggeredAbility;
|
||||
import mage.abilities.effects.OneShotEffect;
|
||||
import mage.abilities.keyword.FlyingAbility;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.cards.CardSetInfo;
|
||||
import mage.constants.CardType;
|
||||
import mage.constants.Outcome;
|
||||
import mage.constants.SubType;
|
||||
import mage.constants.Zone;
|
||||
import mage.filter.FilterCard;
|
||||
import mage.filter.predicate.Predicates;
|
||||
import mage.game.Game;
|
||||
import mage.game.permanent.token.InsectColorlessToken;
|
||||
import mage.players.Player;
|
||||
import mage.target.TargetPlayer;
|
||||
|
||||
import java.util.UUID;
|
||||
|
||||
/**
|
||||
* @author TheElk801
|
||||
*/
|
||||
public final class CanoptekScarabSwarm extends CardImpl {
|
||||
|
||||
public CanoptekScarabSwarm(UUID ownerId, CardSetInfo setInfo) {
|
||||
super(ownerId, setInfo, new CardType[]{CardType.ARTIFACT, CardType.CREATURE}, "{4}");
|
||||
|
||||
this.subtype.add(SubType.INSECT);
|
||||
this.power = new MageInt(1);
|
||||
this.toughness = new MageInt(1);
|
||||
|
||||
// Flying
|
||||
this.addAbility(FlyingAbility.getInstance());
|
||||
|
||||
// Feeder Mandibles -- When Canoptek Scarab Swarm enters the battlefield, exile target player's graveyard. For each artifact or land card exiled this way, create a 1/1 colorless Insect artifact creature token with flying.
|
||||
Ability ability = new EntersBattlefieldTriggeredAbility(new CanoptekScarabSwarmEffect());
|
||||
ability.addTarget(new TargetPlayer());
|
||||
this.addAbility(ability.withFlavorWord("Feeder Mandibles"));
|
||||
}
|
||||
|
||||
private CanoptekScarabSwarm(final CanoptekScarabSwarm card) {
|
||||
super(card);
|
||||
}
|
||||
|
||||
@Override
|
||||
public CanoptekScarabSwarm copy() {
|
||||
return new CanoptekScarabSwarm(this);
|
||||
}
|
||||
}
|
||||
|
||||
class CanoptekScarabSwarmEffect extends OneShotEffect {
|
||||
|
||||
private static final FilterCard filter = new FilterCard();
|
||||
|
||||
static {
|
||||
filter.add(Predicates.or(
|
||||
CardType.ARTIFACT.getPredicate(),
|
||||
CardType.LAND.getPredicate()
|
||||
));
|
||||
}
|
||||
|
||||
CanoptekScarabSwarmEffect() {
|
||||
super(Outcome.Benefit);
|
||||
staticText = "exile target player's graveyard. For each artifact or land card exiled this way, " +
|
||||
"create a 1/1 colorless Insect artifact creature token with flying";
|
||||
}
|
||||
|
||||
private CanoptekScarabSwarmEffect(final CanoptekScarabSwarmEffect effect) {
|
||||
super(effect);
|
||||
}
|
||||
|
||||
@Override
|
||||
public CanoptekScarabSwarmEffect copy() {
|
||||
return new CanoptekScarabSwarmEffect(this);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean apply(Game game, Ability source) {
|
||||
Player player = game.getPlayer(getTargetPointer().getFirst(game, source));
|
||||
if (player == null) {
|
||||
return false;
|
||||
}
|
||||
int count = player.getGraveyard().count(filter, game);
|
||||
player.moveCards(player.getGraveyard(), Zone.EXILED, source, game);
|
||||
new InsectColorlessToken().putOntoBattlefield(count, game, source);
|
||||
return true;
|
||||
}
|
||||
}
|
|
@ -50,6 +50,7 @@ public final class Warhammer40000 extends ExpansionSet {
|
|||
cards.add(new SetCardInfo("Bred for the Hunt", 222, Rarity.UNCOMMON, mage.cards.b.BredForTheHunt.class));
|
||||
cards.add(new SetCardInfo("Broodlord", 89, Rarity.RARE, mage.cards.b.Broodlord.class));
|
||||
cards.add(new SetCardInfo("Caged Sun", 231, Rarity.RARE, mage.cards.c.CagedSun.class));
|
||||
cards.add(new SetCardInfo("Canoptek Scarab Swarm", 150, Rarity.RARE, mage.cards.c.CanoptekScarabSwarm.class));
|
||||
cards.add(new SetCardInfo("Canoptek Spyder", 151, Rarity.RARE, mage.cards.c.CanoptekSpyder.class));
|
||||
cards.add(new SetCardInfo("Cave of Temptation", 267, Rarity.COMMON, mage.cards.c.CaveOfTemptation.class));
|
||||
cards.add(new SetCardInfo("Chaos Defiler", 110, Rarity.RARE, mage.cards.c.ChaosDefiler.class));
|
||||
|
|
|
@ -0,0 +1,34 @@
|
|||
package mage.game.permanent.token;
|
||||
|
||||
import mage.MageInt;
|
||||
import mage.abilities.keyword.FlyingAbility;
|
||||
import mage.constants.CardType;
|
||||
import mage.constants.SubType;
|
||||
|
||||
import java.util.Arrays;
|
||||
|
||||
/**
|
||||
* @author TheElk801
|
||||
*/
|
||||
public final class InsectColorlessToken extends TokenImpl {
|
||||
|
||||
public InsectColorlessToken() {
|
||||
super("Insect Token", "1/1 colorless Insect creature token with flying");
|
||||
cardType.add(CardType.CREATURE);
|
||||
subtype.add(SubType.INSECT);
|
||||
power = new MageInt(1);
|
||||
toughness = new MageInt(1);
|
||||
|
||||
addAbility(FlyingAbility.getInstance());
|
||||
|
||||
availableImageSetCodes = Arrays.asList("40K");
|
||||
}
|
||||
|
||||
public InsectColorlessToken(final InsectColorlessToken token) {
|
||||
super(token);
|
||||
}
|
||||
|
||||
public InsectColorlessToken copy() {
|
||||
return new InsectColorlessToken(this);
|
||||
}
|
||||
}
|
Loading…
Reference in a new issue