mirror of
https://github.com/magefree/mage.git
synced 2026-01-10 21:02:08 -08:00
[40K] Implemented Imotekh, the Stormlord
This commit is contained in:
parent
515828eede
commit
d313bc7ad6
6 changed files with 116 additions and 51 deletions
|
|
@ -4,6 +4,8 @@ import mage.abilities.TriggeredAbilityImpl;
|
|||
import mage.abilities.effects.Effect;
|
||||
import mage.cards.Card;
|
||||
import mage.constants.Zone;
|
||||
import mage.filter.FilterCard;
|
||||
import mage.filter.StaticFilters;
|
||||
import mage.game.Game;
|
||||
import mage.game.events.GameEvent;
|
||||
import mage.game.events.ZoneChangeGroupEvent;
|
||||
|
|
@ -15,13 +17,21 @@ import java.util.Objects;
|
|||
*/
|
||||
public class CardsLeaveGraveyardTriggeredAbility extends TriggeredAbilityImpl {
|
||||
|
||||
private final FilterCard filter;
|
||||
|
||||
public CardsLeaveGraveyardTriggeredAbility(Effect effect) {
|
||||
this(effect, StaticFilters.FILTER_CARD_CARDS);
|
||||
}
|
||||
|
||||
public CardsLeaveGraveyardTriggeredAbility(Effect effect, FilterCard filter) {
|
||||
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) {
|
||||
super(ability);
|
||||
this.filter = ability.filter;
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
@ -39,6 +49,7 @@ public class CardsLeaveGraveyardTriggeredAbility extends TriggeredAbilityImpl {
|
|||
&& zEvent.getCards()
|
||||
.stream()
|
||||
.filter(Objects::nonNull)
|
||||
.filter(card -> filter.match(card, getControllerId(), this, game))
|
||||
.map(Card::getOwnerId)
|
||||
.anyMatch(this::isControlledBy);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -255,6 +255,7 @@ public enum SubType {
|
|||
NAGA("Naga", SubTypeSet.CreatureType),
|
||||
NAUTILUS("Nautilus", SubTypeSet.CreatureType),
|
||||
NAUTOLAN("Nautolan", SubTypeSet.CreatureType, true), // Star Wars
|
||||
NECRON("Necron", SubTypeSet.CreatureType),
|
||||
NEIMOIDIAN("Neimoidian", SubTypeSet.CreatureType, true), // Star Wars
|
||||
NEPHILIM("Nephilim", 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…
Add table
Add a link
Reference in a new issue