[DSK] Implement Unholy Annex // Ritual Chamber

This commit is contained in:
PurpleCrowbar 2025-10-17 21:17:00 +01:00
parent d63cfa56f8
commit 94471f3126
5 changed files with 127 additions and 0 deletions

View file

@ -2546,6 +2546,7 @@ public class ScryfallImageSupportTokens {
// DSK
put("DSK/Beast", "https://api.scryfall.com/cards/tdsk/3?format=image");
put("DSK/Demon", "https://api.scryfall.com/cards/tdsk/9?format=image");
put("DSK/Emblem Kaito", "https://api.scryfall.com/cards/tdsk/17/en?format=image");
put("DSK/Everywhere", "https://api.scryfall.com/cards/tdsk/16?format=image");
put("DSK/Glimmer", "https://api.scryfall.com/cards/tdsk/4?format=image");

View file

@ -0,0 +1,92 @@
package mage.cards.u;
import mage.abilities.Ability;
import mage.abilities.common.UnlockThisDoorTriggeredAbility;
import mage.abilities.condition.common.PermanentsOnTheBattlefieldCondition;
import mage.abilities.decorator.ConditionalOneShotEffect;
import mage.abilities.effects.OneShotEffect;
import mage.abilities.effects.common.CreateTokenEffect;
import mage.abilities.effects.common.DrawCardSourceControllerEffect;
import mage.abilities.effects.common.LoseLifeSourceControllerEffect;
import mage.abilities.hint.ConditionHint;
import mage.abilities.triggers.BeginningOfEndStepTriggeredAbility;
import mage.cards.CardSetInfo;
import mage.cards.RoomCard;
import mage.constants.CardType;
import mage.constants.Outcome;
import mage.constants.SpellAbilityType;
import mage.constants.SubType;
import mage.filter.common.FilterControlledPermanent;
import mage.game.Game;
import mage.game.permanent.token.Demon66Token;
import mage.players.Player;
import java.util.UUID;
/**
* @author PurpleCrowbar
*/
public final class UnholyAnnexRitualChamber extends RoomCard {
private static final FilterControlledPermanent filter = new FilterControlledPermanent("Demon");
static {
filter.add(SubType.DEMON.getPredicate());
}
public UnholyAnnexRitualChamber(UUID ownerId, CardSetInfo setInfo) {
super(ownerId, setInfo, new CardType[]{CardType.ENCHANTMENT}, "{2}{B}", "{3}{B}{B}", SpellAbilityType.SPLIT);
this.subtype.add(SubType.ROOM);
// Unholy Annex: At the beginning of your end step, draw a card. If you control a Demon, each opponent loses 2 life and you gain 2 life. Otherwise, you lose 2 life.
Ability left = new BeginningOfEndStepTriggeredAbility(new DrawCardSourceControllerEffect(1));
left.addEffect(new ConditionalOneShotEffect(
new UnholyAnnexDrainEffect(), new LoseLifeSourceControllerEffect(2),
new PermanentsOnTheBattlefieldCondition(filter), "If you control a Demon, each opponent loses 2 life and you gain 2 life. Otherwise, you lose 2 life"
));
left.addHint(new ConditionHint(new PermanentsOnTheBattlefieldCondition(filter), "You control a Demon"));
// Ritual Chamber: When you unlock this door, create a 6/6 black Demon creature token with flying.
Ability right = new UnlockThisDoorTriggeredAbility(new CreateTokenEffect(new Demon66Token()), false, false);
this.addRoomAbilities(left, right);
}
private UnholyAnnexRitualChamber(final UnholyAnnexRitualChamber card) {
super(card);
}
@Override
public UnholyAnnexRitualChamber copy() {
return new UnholyAnnexRitualChamber(this);
}
}
class UnholyAnnexDrainEffect extends OneShotEffect {
UnholyAnnexDrainEffect() {
super(Outcome.GainLife);
this.staticText = "each opponent loses 2 life and you gain 2 life";
}
private UnholyAnnexDrainEffect(final UnholyAnnexDrainEffect effect) {
super(effect);
}
@Override
public UnholyAnnexDrainEffect copy() {
return new UnholyAnnexDrainEffect(this);
}
@Override
public boolean apply(Game game, Ability source) {
for (UUID opponentId : game.getOpponents(source.getControllerId())) {
Player player = game.getPlayer(opponentId);
if (player != null) {
player.loseLife(2, game, source, false);
}
}
game.getPlayer(source.getControllerId()).gainLife(2, game, source);
return true;
}
}

View file

@ -365,6 +365,8 @@ public final class DuskmournHouseOfHorror extends ExpansionSet {
cards.add(new SetCardInfo("Undead Sprinter", 350, Rarity.RARE, mage.cards.u.UndeadSprinter.class, NON_FULL_USE_VARIOUS));
cards.add(new SetCardInfo("Under the Skin", 203, Rarity.UNCOMMON, mage.cards.u.UnderTheSkin.class, NON_FULL_USE_VARIOUS));
cards.add(new SetCardInfo("Under the Skin", 323, Rarity.UNCOMMON, mage.cards.u.UnderTheSkin.class, NON_FULL_USE_VARIOUS));
cards.add(new SetCardInfo("Unholy Annex // Ritual Chamber", 118, Rarity.RARE, mage.cards.u.UnholyAnnexRitualChamber.class, NON_FULL_USE_VARIOUS));
cards.add(new SetCardInfo("Unholy Annex // Ritual Chamber", 339, Rarity.RARE, mage.cards.u.UnholyAnnexRitualChamber.class, NON_FULL_USE_VARIOUS));
cards.add(new SetCardInfo("Unidentified Hovership", 305, Rarity.RARE, mage.cards.u.UnidentifiedHovership.class, NON_FULL_USE_VARIOUS));
cards.add(new SetCardInfo("Unidentified Hovership", 37, Rarity.RARE, mage.cards.u.UnidentifiedHovership.class, NON_FULL_USE_VARIOUS));
cards.add(new SetCardInfo("Unnerving Grasp", 80, Rarity.UNCOMMON, mage.cards.u.UnnervingGrasp.class));

View file

@ -0,0 +1,31 @@
package mage.game.permanent.token;
import mage.MageInt;
import mage.abilities.keyword.FlyingAbility;
import mage.constants.CardType;
import mage.constants.SubType;
/**
* @author PurpleCrowbar
*/
public final class Demon66Token extends TokenImpl {
public Demon66Token() {
super("Demon Token", "6/6 black Demon creature token with flying");
cardType.add(CardType.CREATURE);
color.setBlack(true);
subtype.add(SubType.DEMON);
power = new MageInt(6);
toughness = new MageInt(6);
addAbility(FlyingAbility.getInstance());
}
private Demon66Token(final Demon66Token token) {
super(token);
}
@Override
public Demon66Token copy() {
return new Demon66Token(this);
}
}

View file

@ -2782,6 +2782,7 @@
# DSK
|Generate|TOK:DSK|Beast|||BeastieToken|
|Generate|TOK:DSK|Demon|||Demon66Token|
|Generate|TOK:DSK|Everywhere|||EverywhereToken|
|Generate|TOK:DSK|Glimmer|||GlimmerToken|
|Generate|TOK:DSK|Gremlin|||Gremlin11Token|