[40K] Implemented Lictor

This commit is contained in:
Evan Kranzler 2022-09-15 18:45:13 -04:00
parent e9684c86ac
commit 89eb256c16
3 changed files with 69 additions and 1 deletions

View file

@ -0,0 +1,65 @@
package mage.cards.l;
import mage.MageInt;
import mage.abilities.Ability;
import mage.abilities.common.EntersBattlefieldTriggeredAbility;
import mage.abilities.condition.Condition;
import mage.abilities.decorator.ConditionalInterveningIfTriggeredAbility;
import mage.abilities.effects.common.CreateTokenEffect;
import mage.abilities.keyword.FlashAbility;
import mage.cards.CardImpl;
import mage.cards.CardSetInfo;
import mage.constants.CardType;
import mage.constants.SubType;
import mage.game.Game;
import mage.game.permanent.token.TyranidToken;
import mage.game.permanent.token.TyranidWarriorToken;
import mage.watchers.common.CreatureEnteredControllerWatcher;
import java.util.UUID;
/**
* @author TheElk801
*/
public final class Lictor extends CardImpl {
public Lictor(UUID ownerId, CardSetInfo setInfo) {
super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{3}{G}");
this.subtype.add(SubType.TYRANID);
this.power = new MageInt(3);
this.toughness = new MageInt(3);
// Flash
this.addAbility(FlashAbility.getInstance());
// Pheromone Trail -- When Lictor enters the battlefield, if a creature entered the battlefield under an opponent's control this turn, create a 3/3 green Tyranid Warrior creature token with trample.
this.addAbility(new ConditionalInterveningIfTriggeredAbility(
new EntersBattlefieldTriggeredAbility(new CreateTokenEffect(new TyranidWarriorToken())),
LictorCondition.instance, "When {this} enters the battlefield, " +
"if a creature entered the battlefield under an opponent's control this turn, " +
"create a 3/3 green Tyranid Warrior creature token with trample."
).withFlavorWord("Pheromone Trail"), new CreatureEnteredControllerWatcher());
}
private Lictor(final Lictor card) {
super(card);
}
@Override
public Lictor copy() {
return new Lictor(this);
}
}
enum LictorCondition implements Condition {
instance;
@Override
public boolean apply(Game game, Ability source) {
return game
.getOpponents(source.getControllerId())
.stream()
.anyMatch(uuid -> CreatureEnteredControllerWatcher.enteredCreatureForPlayer(uuid, game));
}
}

View file

@ -79,6 +79,7 @@ public final class Warhammer40000 extends ExpansionSet {
cards.add(new SetCardInfo("Island", 308, Rarity.LAND, mage.cards.basiclands.Island.class, NON_FULL_USE_VARIOUS));
cards.add(new SetCardInfo("Kill! Maim! Burn!", 128, Rarity.RARE, mage.cards.k.KillMaimBurn.class));
cards.add(new SetCardInfo("Let the Galaxy Burn", 81, Rarity.RARE, mage.cards.l.LetTheGalaxyBurn.class));
cards.add(new SetCardInfo("Lictor", 94, Rarity.RARE, mage.cards.l.Lictor.class));
cards.add(new SetCardInfo("Lord of Change", 24, Rarity.RARE, mage.cards.l.LordOfChange.class));
cards.add(new SetCardInfo("Molten Slagheap", 284, Rarity.UNCOMMON, mage.cards.m.MoltenSlagheap.class));
cards.add(new SetCardInfo("Mountain", 315, Rarity.LAND, mage.cards.basiclands.Mountain.class, NON_FULL_USE_VARIOUS));

View file

@ -1,6 +1,7 @@
package mage.game.permanent.token;
import mage.MageInt;
import mage.abilities.keyword.TrampleAbility;
import mage.constants.CardType;
import mage.constants.SubType;
@ -12,13 +13,14 @@ import java.util.Arrays;
public final class TyranidWarriorToken extends TokenImpl {
public TyranidWarriorToken() {
super("Tyranid Warrior Token", "3/3 green Tyranid Warrior creature token");
super("Tyranid Warrior Token", "3/3 green Tyranid Warrior creature token with trample");
cardType.add(CardType.CREATURE);
color.setGreen(true);
subtype.add(SubType.TYRANID);
subtype.add(SubType.WARRIOR);
power = new MageInt(3);
toughness = new MageInt(3);
addAbility(TrampleAbility.getInstance());
availableImageSetCodes.addAll(Arrays.asList("40K"));
}