diff --git a/Mage.Sets/src/mage/cards/l/Lictor.java b/Mage.Sets/src/mage/cards/l/Lictor.java new file mode 100644 index 0000000000..48cfef1873 --- /dev/null +++ b/Mage.Sets/src/mage/cards/l/Lictor.java @@ -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)); + } +} diff --git a/Mage.Sets/src/mage/sets/Warhammer40000.java b/Mage.Sets/src/mage/sets/Warhammer40000.java index 4a26ebaa7b..1419759d60 100644 --- a/Mage.Sets/src/mage/sets/Warhammer40000.java +++ b/Mage.Sets/src/mage/sets/Warhammer40000.java @@ -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)); diff --git a/Mage/src/main/java/mage/game/permanent/token/TyranidWarriorToken.java b/Mage/src/main/java/mage/game/permanent/token/TyranidWarriorToken.java index 709b90ae7c..3452899a97 100644 --- a/Mage/src/main/java/mage/game/permanent/token/TyranidWarriorToken.java +++ b/Mage/src/main/java/mage/game/permanent/token/TyranidWarriorToken.java @@ -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")); }