mirror of
https://github.com/magefree/mage.git
synced 2026-01-10 21:02:08 -08:00
[FIC] Implement Chaos Shrine's Black Crystal
This commit is contained in:
parent
0cf13c9a7a
commit
02b1ff9ac5
2 changed files with 93 additions and 0 deletions
92
Mage.Sets/src/mage/cards/c/ChaosShrinesBlackCrystal.java
Normal file
92
Mage.Sets/src/mage/cards/c/ChaosShrinesBlackCrystal.java
Normal file
|
|
@ -0,0 +1,92 @@
|
|||
package mage.cards.c;
|
||||
|
||||
import mage.abilities.Ability;
|
||||
import mage.abilities.common.DiesCreatureTriggeredAbility;
|
||||
import mage.abilities.effects.OneShotEffect;
|
||||
import mage.abilities.effects.common.ExileTargetForSourceEffect;
|
||||
import mage.abilities.triggers.BeginningOfUpkeepTriggeredAbility;
|
||||
import mage.cards.Card;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.cards.CardSetInfo;
|
||||
import mage.constants.CardType;
|
||||
import mage.constants.Outcome;
|
||||
import mage.constants.SuperType;
|
||||
import mage.constants.Zone;
|
||||
import mage.counters.CounterType;
|
||||
import mage.counters.Counters;
|
||||
import mage.filter.StaticFilters;
|
||||
import mage.game.ExileZone;
|
||||
import mage.game.Game;
|
||||
import mage.players.Player;
|
||||
import mage.target.TargetCard;
|
||||
import mage.target.common.TargetCardInExile;
|
||||
import mage.util.CardUtil;
|
||||
|
||||
import java.util.UUID;
|
||||
|
||||
/**
|
||||
* @author TheElk801
|
||||
*/
|
||||
public final class ChaosShrinesBlackCrystal extends CardImpl {
|
||||
|
||||
public ChaosShrinesBlackCrystal(UUID ownerId, CardSetInfo setInfo) {
|
||||
super(ownerId, setInfo, new CardType[]{CardType.ARTIFACT}, "{3}{B}");
|
||||
|
||||
this.supertype.add(SuperType.LEGENDARY);
|
||||
|
||||
// Whenever a nontoken creature you control dies, exile it.
|
||||
this.addAbility(new DiesCreatureTriggeredAbility(
|
||||
new ExileTargetForSourceEffect(), false,
|
||||
StaticFilters.FILTER_CONTROLLED_CREATURE_NON_TOKEN, true
|
||||
));
|
||||
|
||||
// At the beginning of your upkeep, you may put a creature card exiled with Chaos Shrine's Black Crystal onto the battlefield under your control with a finality counter on it.
|
||||
this.addAbility(new BeginningOfUpkeepTriggeredAbility(new ChaosShrinesBlackCrystalEffect()));
|
||||
}
|
||||
|
||||
private ChaosShrinesBlackCrystal(final ChaosShrinesBlackCrystal card) {
|
||||
super(card);
|
||||
}
|
||||
|
||||
@Override
|
||||
public ChaosShrinesBlackCrystal copy() {
|
||||
return new ChaosShrinesBlackCrystal(this);
|
||||
}
|
||||
}
|
||||
|
||||
class ChaosShrinesBlackCrystalEffect extends OneShotEffect {
|
||||
|
||||
ChaosShrinesBlackCrystalEffect() {
|
||||
super(Outcome.Benefit);
|
||||
staticText = "you may put a creature card exiled with {this} " +
|
||||
"onto the battlefield under your control with a finality counter on it";
|
||||
}
|
||||
|
||||
private ChaosShrinesBlackCrystalEffect(final ChaosShrinesBlackCrystalEffect effect) {
|
||||
super(effect);
|
||||
}
|
||||
|
||||
@Override
|
||||
public ChaosShrinesBlackCrystalEffect copy() {
|
||||
return new ChaosShrinesBlackCrystalEffect(this);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean apply(Game game, Ability source) {
|
||||
Player player = game.getPlayer(source.getControllerId());
|
||||
ExileZone exileZone = game.getExile().getExileZone(CardUtil.getExileZoneId(game, source));
|
||||
if (player == null || exileZone == null) {
|
||||
return false;
|
||||
}
|
||||
TargetCard target = new TargetCardInExile(
|
||||
0, 1, StaticFilters.FILTER_CARD_CREATURE, exileZone.getId()
|
||||
);
|
||||
player.choose(Outcome.PutCreatureInPlay, target, source, game);
|
||||
Card card = game.getCard(target.getFirstTarget());
|
||||
if (card == null) {
|
||||
return false;
|
||||
}
|
||||
game.setEnterWithCounters(card.getId(), new Counters(CounterType.FINALITY.createInstance()));
|
||||
return player.moveCards(card, Zone.BATTLEFIELD, source, game);
|
||||
}
|
||||
}
|
||||
|
|
@ -86,6 +86,7 @@ public final class FinalFantasyCommander extends ExpansionSet {
|
|||
cards.add(new SetCardInfo("Champion's Helm", 337, Rarity.RARE, mage.cards.c.ChampionsHelm.class));
|
||||
cards.add(new SetCardInfo("Champions from Beyond", 101, Rarity.RARE, mage.cards.c.ChampionsFromBeyond.class, NON_FULL_USE_VARIOUS));
|
||||
cards.add(new SetCardInfo("Champions from Beyond", 11, Rarity.RARE, mage.cards.c.ChampionsFromBeyond.class, NON_FULL_USE_VARIOUS));
|
||||
cards.add(new SetCardInfo("Chaos Shrine's Black Crystal", 445, Rarity.RARE, mage.cards.c.ChaosShrinesBlackCrystal.class));
|
||||
cards.add(new SetCardInfo("Chaos Warp", 291, Rarity.RARE, mage.cards.c.ChaosWarp.class));
|
||||
cards.add(new SetCardInfo("Chasm Skulker", 262, Rarity.RARE, mage.cards.c.ChasmSkulker.class));
|
||||
cards.add(new SetCardInfo("Chocobo Camp", 462, Rarity.RARE, mage.cards.c.ChocoboCamp.class));
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue