mirror of
https://github.com/correl/mage.git
synced 2024-12-25 03:00:15 +00:00
[CLB] Implemented Zellix, Sanity Flayer
This commit is contained in:
parent
da6e5260ec
commit
e22648a385
6 changed files with 152 additions and 0 deletions
93
Mage.Sets/src/mage/cards/z/ZellixSanityFlayer.java
Normal file
93
Mage.Sets/src/mage/cards/z/ZellixSanityFlayer.java
Normal file
|
@ -0,0 +1,93 @@
|
|||
package mage.cards.z;
|
||||
|
||||
import mage.MageInt;
|
||||
import mage.abilities.Ability;
|
||||
import mage.abilities.TriggeredAbilityImpl;
|
||||
import mage.abilities.common.ChooseABackgroundAbility;
|
||||
import mage.abilities.common.SimpleActivatedAbility;
|
||||
import mage.abilities.costs.common.TapSourceCost;
|
||||
import mage.abilities.costs.mana.GenericManaCost;
|
||||
import mage.abilities.effects.common.CreateTokenEffect;
|
||||
import mage.abilities.effects.common.MillCardsTargetEffect;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.cards.CardSetInfo;
|
||||
import mage.constants.CardType;
|
||||
import mage.constants.SubType;
|
||||
import mage.constants.SuperType;
|
||||
import mage.constants.Zone;
|
||||
import mage.filter.StaticFilters;
|
||||
import mage.game.Game;
|
||||
import mage.game.events.GameEvent;
|
||||
import mage.game.events.MilledCardsEvent;
|
||||
import mage.game.permanent.token.Horror2Token;
|
||||
import mage.target.TargetPlayer;
|
||||
|
||||
import java.util.UUID;
|
||||
|
||||
/**
|
||||
* @author TheElk801
|
||||
*/
|
||||
public final class ZellixSanityFlayer extends CardImpl {
|
||||
|
||||
public ZellixSanityFlayer(UUID ownerId, CardSetInfo setInfo) {
|
||||
super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{2}{U}");
|
||||
|
||||
this.addSuperType(SuperType.LEGENDARY);
|
||||
this.subtype.add(SubType.HORROR);
|
||||
this.power = new MageInt(2);
|
||||
this.toughness = new MageInt(3);
|
||||
|
||||
// Hive Mind — Whenever a player mills one or more creature cards, you create a 1/1 black Horror creature token.
|
||||
this.addAbility(new ZellixSanityFlayerTriggeredAbility());
|
||||
|
||||
// {1}, {T}: Target player mills three cards.
|
||||
Ability ability = new SimpleActivatedAbility(new MillCardsTargetEffect(3), new GenericManaCost(1));
|
||||
ability.addCost(new TapSourceCost());
|
||||
ability.addTarget(new TargetPlayer());
|
||||
this.addAbility(ability);
|
||||
|
||||
// Choose a Background
|
||||
this.addAbility(ChooseABackgroundAbility.getInstance());
|
||||
}
|
||||
|
||||
private ZellixSanityFlayer(final ZellixSanityFlayer card) {
|
||||
super(card);
|
||||
}
|
||||
|
||||
@Override
|
||||
public ZellixSanityFlayer copy() {
|
||||
return new ZellixSanityFlayer(this);
|
||||
}
|
||||
}
|
||||
|
||||
class ZellixSanityFlayerTriggeredAbility extends TriggeredAbilityImpl {
|
||||
|
||||
ZellixSanityFlayerTriggeredAbility() {
|
||||
super(Zone.BATTLEFIELD, new CreateTokenEffect(new Horror2Token()));
|
||||
this.withFlavorWord("Hive Mind");
|
||||
}
|
||||
|
||||
private ZellixSanityFlayerTriggeredAbility(final ZellixSanityFlayerTriggeredAbility ability) {
|
||||
super(ability);
|
||||
}
|
||||
|
||||
@Override
|
||||
public ZellixSanityFlayerTriggeredAbility copy() {
|
||||
return new ZellixSanityFlayerTriggeredAbility(this);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean checkEventType(GameEvent event, Game game) {
|
||||
return event.getType() == GameEvent.EventType.MILLED_CARDS;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean checkTrigger(GameEvent event, Game game) {
|
||||
return ((MilledCardsEvent) event).getCards().count(StaticFilters.FILTER_CARD_CREATURE, game) > 0;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getTriggerPhrase() {
|
||||
return "Whenever a player mills one or more creature cards, you";
|
||||
}
|
||||
}
|
|
@ -306,6 +306,7 @@ public final class CommanderLegendsBattleForBaldursGate extends ExpansionSet {
|
|||
cards.add(new SetCardInfo("Young Blue Dragon", 106, Rarity.COMMON, mage.cards.y.YoungBlueDragon.class));
|
||||
cards.add(new SetCardInfo("Young Red Dragon", 210, Rarity.COMMON, mage.cards.y.YoungRedDragon.class));
|
||||
cards.add(new SetCardInfo("Your Temple Is Under Attack", 52, Rarity.COMMON, mage.cards.y.YourTempleIsUnderAttack.class));
|
||||
cards.add(new SetCardInfo("Zellix, Sanity Flayer", 652, Rarity.MYTHIC, mage.cards.z.ZellixSanityFlayer.class));
|
||||
cards.add(new SetCardInfo("Zevlor, Elturel Exile", 296, Rarity.RARE, mage.cards.z.ZevlorElturelExile.class));
|
||||
cards.add(new SetCardInfo("Zhentarim Bandit", 158, Rarity.COMMON, mage.cards.z.ZhentarimBandit.class));
|
||||
}
|
||||
|
|
|
@ -102,6 +102,7 @@ public class GameEvent implements Serializable {
|
|||
DAMAGE_PLAYER,
|
||||
MILL_CARDS,
|
||||
MILLED_CARD,
|
||||
MILLED_CARDS,
|
||||
/* DAMAGED_PLAYER
|
||||
targetId the id of the damaged player
|
||||
sourceId sourceId of the ability which caused the damage
|
||||
|
|
24
Mage/src/main/java/mage/game/events/MilledCardsEvent.java
Normal file
24
Mage/src/main/java/mage/game/events/MilledCardsEvent.java
Normal file
|
@ -0,0 +1,24 @@
|
|||
package mage.game.events;
|
||||
|
||||
import mage.abilities.Ability;
|
||||
import mage.cards.Cards;
|
||||
import mage.cards.CardsImpl;
|
||||
|
||||
import java.util.UUID;
|
||||
|
||||
/**
|
||||
* @author TheElk801
|
||||
*/
|
||||
public class MilledCardsEvent extends GameEvent {
|
||||
|
||||
private final Cards cards = new CardsImpl();
|
||||
|
||||
public MilledCardsEvent(Ability source, UUID playerId, Cards cards) {
|
||||
super(EventType.MILLED_CARDS, playerId, source, playerId);
|
||||
this.cards.addAll(cards);
|
||||
}
|
||||
|
||||
public Cards getCards() {
|
||||
return cards;
|
||||
}
|
||||
}
|
|
@ -0,0 +1,32 @@
|
|||
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 Horror2Token extends TokenImpl {
|
||||
|
||||
public Horror2Token() {
|
||||
super("Horror Token", "1/1 black Horror creature token");
|
||||
cardType.add(CardType.CREATURE);
|
||||
color.setBlack(true);
|
||||
subtype.add(SubType.HORROR);
|
||||
power = new MageInt(1);
|
||||
toughness = new MageInt(1);
|
||||
|
||||
availableImageSetCodes = Arrays.asList("CLB");
|
||||
}
|
||||
|
||||
public Horror2Token(final Horror2Token token) {
|
||||
super(token);
|
||||
}
|
||||
|
||||
public Horror2Token copy() {
|
||||
return new Horror2Token(this);
|
||||
}
|
||||
}
|
|
@ -4852,6 +4852,7 @@ public abstract class PlayerImpl implements Player, Serializable {
|
|||
for (Card card : cards.getCards(game)) {
|
||||
game.fireEvent(GameEvent.getEvent(GameEvent.EventType.MILLED_CARD, card.getId(), source, getId()));
|
||||
}
|
||||
game.fireEvent(new MilledCardsEvent(source, getId(), cards));
|
||||
return cards;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue