mirror of
https://github.com/correl/mage.git
synced 2024-12-26 11:09:27 +00:00
[40K] Implemented Imotekh, the Stormlord
This commit is contained in:
parent
515828eede
commit
d313bc7ad6
6 changed files with 116 additions and 51 deletions
|
@ -1,18 +1,13 @@
|
||||||
package mage.cards.d;
|
package mage.cards.d;
|
||||||
|
|
||||||
import mage.abilities.TriggeredAbilityImpl;
|
import mage.abilities.common.CardsLeaveGraveyardTriggeredAbility;
|
||||||
import mage.abilities.effects.common.CreateTokenEffect;
|
import mage.abilities.effects.common.CreateTokenEffect;
|
||||||
import mage.cards.Card;
|
|
||||||
import mage.cards.CardImpl;
|
import mage.cards.CardImpl;
|
||||||
import mage.cards.CardSetInfo;
|
import mage.cards.CardSetInfo;
|
||||||
import mage.constants.CardType;
|
import mage.constants.CardType;
|
||||||
import mage.constants.Zone;
|
import mage.filter.StaticFilters;
|
||||||
import mage.game.Game;
|
|
||||||
import mage.game.events.GameEvent;
|
|
||||||
import mage.game.events.ZoneChangeGroupEvent;
|
|
||||||
import mage.game.permanent.token.BatToken;
|
import mage.game.permanent.token.BatToken;
|
||||||
|
|
||||||
import java.util.Objects;
|
|
||||||
import java.util.UUID;
|
import java.util.UUID;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -24,7 +19,9 @@ public final class DesecratedTomb extends CardImpl {
|
||||||
super(ownerId, setInfo, new CardType[]{CardType.ARTIFACT}, "{3}");
|
super(ownerId, setInfo, new CardType[]{CardType.ARTIFACT}, "{3}");
|
||||||
|
|
||||||
// Whenever one or more creature cards leave your graveyard, create a 1/1 black Bat creature token with flying.
|
// Whenever one or more creature cards leave your graveyard, create a 1/1 black Bat creature token with flying.
|
||||||
this.addAbility(new DesecratedTombTriggeredAbility());
|
this.addAbility(new CardsLeaveGraveyardTriggeredAbility(
|
||||||
|
new CreateTokenEffect(new BatToken()), StaticFilters.FILTER_CARD_CREATURES
|
||||||
|
));
|
||||||
}
|
}
|
||||||
|
|
||||||
private DesecratedTomb(final DesecratedTomb card) {
|
private DesecratedTomb(final DesecratedTomb card) {
|
||||||
|
@ -36,45 +33,3 @@ public final class DesecratedTomb extends CardImpl {
|
||||||
return new DesecratedTomb(this);
|
return new DesecratedTomb(this);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
class DesecratedTombTriggeredAbility extends TriggeredAbilityImpl {
|
|
||||||
|
|
||||||
DesecratedTombTriggeredAbility() {
|
|
||||||
super(Zone.BATTLEFIELD, new CreateTokenEffect(new BatToken()), false);
|
|
||||||
}
|
|
||||||
|
|
||||||
private DesecratedTombTriggeredAbility(final DesecratedTombTriggeredAbility ability) {
|
|
||||||
super(ability);
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public boolean checkEventType(GameEvent event, Game game) {
|
|
||||||
return event.getType() == GameEvent.EventType.ZONE_CHANGE_GROUP;
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public boolean checkTrigger(GameEvent event, Game game) {
|
|
||||||
ZoneChangeGroupEvent zEvent = (ZoneChangeGroupEvent) event;
|
|
||||||
return zEvent != null
|
|
||||||
&& Zone.GRAVEYARD == zEvent.getFromZone()
|
|
||||||
&& Zone.GRAVEYARD != zEvent.getToZone()
|
|
||||||
&& zEvent.getCards() != null
|
|
||||||
&& zEvent.getCards()
|
|
||||||
.stream()
|
|
||||||
.filter(Objects::nonNull)
|
|
||||||
.filter(card -> card.isCreature(game))
|
|
||||||
.map(Card::getOwnerId)
|
|
||||||
.anyMatch(getControllerId()::equals);
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public DesecratedTombTriggeredAbility copy() {
|
|
||||||
return new DesecratedTombTriggeredAbility(this);
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public String getRule() {
|
|
||||||
return "Whenever one or more creature cards leave your graveyard, " +
|
|
||||||
"create a 1/1 black Bat creature token with flying.";
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
62
Mage.Sets/src/mage/cards/i/ImotekhTheStormlord.java
Normal file
62
Mage.Sets/src/mage/cards/i/ImotekhTheStormlord.java
Normal file
|
@ -0,0 +1,62 @@
|
||||||
|
package mage.cards.i;
|
||||||
|
|
||||||
|
import mage.MageInt;
|
||||||
|
import mage.abilities.Ability;
|
||||||
|
import mage.abilities.common.BeginningOfCombatTriggeredAbility;
|
||||||
|
import mage.abilities.common.CardsLeaveGraveyardTriggeredAbility;
|
||||||
|
import mage.abilities.effects.common.CreateTokenEffect;
|
||||||
|
import mage.abilities.effects.common.continuous.BoostTargetEffect;
|
||||||
|
import mage.abilities.effects.common.continuous.GainAbilityTargetEffect;
|
||||||
|
import mage.abilities.keyword.MenaceAbility;
|
||||||
|
import mage.cards.CardImpl;
|
||||||
|
import mage.cards.CardSetInfo;
|
||||||
|
import mage.constants.CardType;
|
||||||
|
import mage.constants.SubType;
|
||||||
|
import mage.constants.SuperType;
|
||||||
|
import mage.constants.TargetController;
|
||||||
|
import mage.filter.StaticFilters;
|
||||||
|
import mage.game.permanent.token.NecronWarriorToken;
|
||||||
|
import mage.target.TargetPermanent;
|
||||||
|
|
||||||
|
import java.util.UUID;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @author TheElk801
|
||||||
|
*/
|
||||||
|
public final class ImotekhTheStormlord extends CardImpl {
|
||||||
|
|
||||||
|
public ImotekhTheStormlord(UUID ownerId, CardSetInfo setInfo) {
|
||||||
|
super(ownerId, setInfo, new CardType[]{CardType.ARTIFACT, CardType.CREATURE}, "{2}{B}{B}");
|
||||||
|
|
||||||
|
this.addSuperType(SuperType.LEGENDARY);
|
||||||
|
this.subtype.add(SubType.NECRON);
|
||||||
|
this.power = new MageInt(3);
|
||||||
|
this.toughness = new MageInt(3);
|
||||||
|
|
||||||
|
// Phaeron -- Whenever one or more artifact cards leave your graveyard, create two 2/2 black Necron Warrior artifact creature tokens.
|
||||||
|
this.addAbility(new CardsLeaveGraveyardTriggeredAbility(
|
||||||
|
new CreateTokenEffect(new NecronWarriorToken(), 2),
|
||||||
|
StaticFilters.FILTER_CARD_ARTIFACTS
|
||||||
|
).withFlavorWord("Phaeron"));
|
||||||
|
|
||||||
|
// Grand Strategist -- At the beginning of combat on your turn, another target creature you control gets +2/+2 and gains menace until end of turn.
|
||||||
|
Ability ability = new BeginningOfCombatTriggeredAbility(
|
||||||
|
new BoostTargetEffect(2, 2)
|
||||||
|
.setText("another target creature you control gets +2/+2"),
|
||||||
|
TargetController.YOU, false
|
||||||
|
);
|
||||||
|
ability.addEffect(new GainAbilityTargetEffect(new MenaceAbility(false))
|
||||||
|
.setText("and gains menace until end of turn"));
|
||||||
|
ability.addTarget(new TargetPermanent(StaticFilters.FILTER_CONTROLLED_ANOTHER_CREATURE));
|
||||||
|
this.addAbility(ability.withFlavorWord("Grand Strategist"));
|
||||||
|
}
|
||||||
|
|
||||||
|
private ImotekhTheStormlord(final ImotekhTheStormlord card) {
|
||||||
|
super(card);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public ImotekhTheStormlord copy() {
|
||||||
|
return new ImotekhTheStormlord(this);
|
||||||
|
}
|
||||||
|
}
|
|
@ -27,6 +27,7 @@ public final class Warhammer40000 extends ExpansionSet {
|
||||||
cards.add(new SetCardInfo("Deathleaper, Terror Weapon", 115, Rarity.RARE, mage.cards.d.DeathleaperTerrorWeapon.class));
|
cards.add(new SetCardInfo("Deathleaper, Terror Weapon", 115, Rarity.RARE, mage.cards.d.DeathleaperTerrorWeapon.class));
|
||||||
cards.add(new SetCardInfo("Fabricate", 181, Rarity.RARE, mage.cards.f.Fabricate.class));
|
cards.add(new SetCardInfo("Fabricate", 181, Rarity.RARE, mage.cards.f.Fabricate.class));
|
||||||
cards.add(new SetCardInfo("Hardened Scales", 215, Rarity.RARE, mage.cards.h.HardenedScales.class));
|
cards.add(new SetCardInfo("Hardened Scales", 215, Rarity.RARE, mage.cards.h.HardenedScales.class));
|
||||||
|
cards.add(new SetCardInfo("Imotekh the Stormlord", 5, Rarity.MYTHIC, mage.cards.i.ImotekhTheStormlord.class));
|
||||||
cards.add(new SetCardInfo("Inquisitor Greyfax", 3, Rarity.MYTHIC, mage.cards.i.InquisitorGreyfax.class));
|
cards.add(new SetCardInfo("Inquisitor Greyfax", 3, Rarity.MYTHIC, mage.cards.i.InquisitorGreyfax.class));
|
||||||
cards.add(new SetCardInfo("Sol Ring", 249, Rarity.UNCOMMON, mage.cards.s.SolRing.class));
|
cards.add(new SetCardInfo("Sol Ring", 249, Rarity.UNCOMMON, mage.cards.s.SolRing.class));
|
||||||
}
|
}
|
||||||
|
|
|
@ -4,6 +4,8 @@ import mage.abilities.TriggeredAbilityImpl;
|
||||||
import mage.abilities.effects.Effect;
|
import mage.abilities.effects.Effect;
|
||||||
import mage.cards.Card;
|
import mage.cards.Card;
|
||||||
import mage.constants.Zone;
|
import mage.constants.Zone;
|
||||||
|
import mage.filter.FilterCard;
|
||||||
|
import mage.filter.StaticFilters;
|
||||||
import mage.game.Game;
|
import mage.game.Game;
|
||||||
import mage.game.events.GameEvent;
|
import mage.game.events.GameEvent;
|
||||||
import mage.game.events.ZoneChangeGroupEvent;
|
import mage.game.events.ZoneChangeGroupEvent;
|
||||||
|
@ -15,13 +17,21 @@ import java.util.Objects;
|
||||||
*/
|
*/
|
||||||
public class CardsLeaveGraveyardTriggeredAbility extends TriggeredAbilityImpl {
|
public class CardsLeaveGraveyardTriggeredAbility extends TriggeredAbilityImpl {
|
||||||
|
|
||||||
|
private final FilterCard filter;
|
||||||
|
|
||||||
public CardsLeaveGraveyardTriggeredAbility(Effect effect) {
|
public CardsLeaveGraveyardTriggeredAbility(Effect effect) {
|
||||||
|
this(effect, StaticFilters.FILTER_CARD_CARDS);
|
||||||
|
}
|
||||||
|
|
||||||
|
public CardsLeaveGraveyardTriggeredAbility(Effect effect, FilterCard filter) {
|
||||||
super(Zone.BATTLEFIELD, effect, false);
|
super(Zone.BATTLEFIELD, effect, false);
|
||||||
setTriggerPhrase("Whenever one or more cards leave your graveyard, ");
|
this.filter = filter;
|
||||||
|
setTriggerPhrase("Whenever one or more " + filter + " leave your graveyard, ");
|
||||||
}
|
}
|
||||||
|
|
||||||
private CardsLeaveGraveyardTriggeredAbility(final CardsLeaveGraveyardTriggeredAbility ability) {
|
private CardsLeaveGraveyardTriggeredAbility(final CardsLeaveGraveyardTriggeredAbility ability) {
|
||||||
super(ability);
|
super(ability);
|
||||||
|
this.filter = ability.filter;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
@ -39,6 +49,7 @@ public class CardsLeaveGraveyardTriggeredAbility extends TriggeredAbilityImpl {
|
||||||
&& zEvent.getCards()
|
&& zEvent.getCards()
|
||||||
.stream()
|
.stream()
|
||||||
.filter(Objects::nonNull)
|
.filter(Objects::nonNull)
|
||||||
|
.filter(card -> filter.match(card, getControllerId(), this, game))
|
||||||
.map(Card::getOwnerId)
|
.map(Card::getOwnerId)
|
||||||
.anyMatch(this::isControlledBy);
|
.anyMatch(this::isControlledBy);
|
||||||
}
|
}
|
||||||
|
|
|
@ -255,6 +255,7 @@ public enum SubType {
|
||||||
NAGA("Naga", SubTypeSet.CreatureType),
|
NAGA("Naga", SubTypeSet.CreatureType),
|
||||||
NAUTILUS("Nautilus", SubTypeSet.CreatureType),
|
NAUTILUS("Nautilus", SubTypeSet.CreatureType),
|
||||||
NAUTOLAN("Nautolan", SubTypeSet.CreatureType, true), // Star Wars
|
NAUTOLAN("Nautolan", SubTypeSet.CreatureType, true), // Star Wars
|
||||||
|
NECRON("Necron", SubTypeSet.CreatureType),
|
||||||
NEIMOIDIAN("Neimoidian", SubTypeSet.CreatureType, true), // Star Wars
|
NEIMOIDIAN("Neimoidian", SubTypeSet.CreatureType, true), // Star Wars
|
||||||
NEPHILIM("Nephilim", SubTypeSet.CreatureType),
|
NEPHILIM("Nephilim", SubTypeSet.CreatureType),
|
||||||
NIGHTMARE("Nightmare", SubTypeSet.CreatureType),
|
NIGHTMARE("Nightmare", SubTypeSet.CreatureType),
|
||||||
|
|
|
@ -0,0 +1,35 @@
|
||||||
|
package mage.game.permanent.token;
|
||||||
|
|
||||||
|
import mage.MageInt;
|
||||||
|
import mage.constants.CardType;
|
||||||
|
import mage.constants.SubType;
|
||||||
|
|
||||||
|
import java.util.Arrays;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @author TheElk801
|
||||||
|
*/
|
||||||
|
public final class NecronWarriorToken extends TokenImpl {
|
||||||
|
|
||||||
|
public NecronWarriorToken() {
|
||||||
|
super("Necron Warrior Token", "2/2 black Necron Warrior artifact creature token");
|
||||||
|
cardType.add(CardType.ARTIFACT);
|
||||||
|
cardType.add(CardType.CREATURE);
|
||||||
|
color.setBlack(true);
|
||||||
|
subtype.add(SubType.NECRON);
|
||||||
|
subtype.add(SubType.WARRIOR);
|
||||||
|
power = new MageInt(2);
|
||||||
|
toughness = new MageInt(2);
|
||||||
|
|
||||||
|
availableImageSetCodes.addAll(Arrays.asList("40K"));
|
||||||
|
}
|
||||||
|
|
||||||
|
public NecronWarriorToken(final NecronWarriorToken token) {
|
||||||
|
super(token);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public NecronWarriorToken copy() {
|
||||||
|
return new NecronWarriorToken(this);
|
||||||
|
}
|
||||||
|
}
|
Loading…
Reference in a new issue