[DSK] Implement Mirror Room // Fractured Realm

This commit is contained in:
theelk801 2025-12-07 15:05:31 -05:00
parent cfc28b188e
commit 98f7613d20
2 changed files with 91 additions and 0 deletions

View file

@ -0,0 +1,89 @@
package mage.cards.m;
import mage.abilities.Ability;
import mage.abilities.common.SimpleStaticAbility;
import mage.abilities.common.UnlockThisDoorTriggeredAbility;
import mage.abilities.effects.ReplacementEffectImpl;
import mage.abilities.effects.common.CreateTokenCopyTargetEffect;
import mage.cards.CardSetInfo;
import mage.cards.RoomCard;
import mage.constants.Duration;
import mage.constants.Outcome;
import mage.constants.SubType;
import mage.game.Game;
import mage.game.events.GameEvent;
import mage.game.permanent.Permanent;
import mage.target.common.TargetControlledCreaturePermanent;
import mage.util.CardUtil;
import java.util.UUID;
/**
* @author TheElk801
*/
public final class MirrorRoomFracturedRealm extends RoomCard {
public MirrorRoomFracturedRealm(UUID ownerId, CardSetInfo setInfo) {
super(ownerId, setInfo, "{2}{U}", "{5}{U}{U}");
// Mirror Room
// When you unlock this door, create a token that's a copy of target creature you control, except it's a Reflection in addition to its other creature types.
Ability ability = new UnlockThisDoorTriggeredAbility(
new CreateTokenCopyTargetEffect()
.withAdditionalSubType(SubType.REFLECTION)
.setText("create a token that's a copy of target creature you control, " +
"except it's a Reflection in addition to its other creature types"),
false, true
);
ability.addTarget(new TargetControlledCreaturePermanent());
this.getLeftHalfCard().addAbility(ability);
// Fractured Realm
// If a triggered ability of a permanent you control triggers, that ability triggers an additional time.
this.getRightHalfCard().addAbility(new SimpleStaticAbility(new FracturedRealmEffect()));
}
private MirrorRoomFracturedRealm(final MirrorRoomFracturedRealm card) {
super(card);
}
@Override
public MirrorRoomFracturedRealm copy() {
return new MirrorRoomFracturedRealm(this);
}
}
class FracturedRealmEffect extends ReplacementEffectImpl {
FracturedRealmEffect() {
super(Duration.WhileOnBattlefield, Outcome.Benefit);
staticText = "if a triggered ability of a permanent you control triggers, " +
"that ability triggers an additional time";
}
private FracturedRealmEffect(final FracturedRealmEffect effect) {
super(effect);
}
@Override
public FracturedRealmEffect copy() {
return new FracturedRealmEffect(this);
}
@Override
public boolean checksEventType(GameEvent event, Game game) {
return event.getType() == GameEvent.EventType.NUMBER_OF_TRIGGERS;
}
@Override
public boolean applies(GameEvent event, Ability source, Game game) {
Permanent permanent = game.getPermanentOrLKIBattlefield(event.getSourceId());
return permanent != null && permanent.isControlledBy(source.getControllerId());
}
@Override
public boolean replaceEvent(GameEvent event, Ability source, Game game) {
event.setAmount(CardUtil.overflowInc(event.getAmount(), 1));
return false;
}
}

View file

@ -230,6 +230,8 @@ public final class DuskmournHouseOfHorror extends ExpansionSet {
cards.add(new SetCardInfo("Meathook Massacre II", 311, Rarity.MYTHIC, mage.cards.m.MeathookMassacreII.class, NON_FULL_USE_VARIOUS)); cards.add(new SetCardInfo("Meathook Massacre II", 311, Rarity.MYTHIC, mage.cards.m.MeathookMassacreII.class, NON_FULL_USE_VARIOUS));
cards.add(new SetCardInfo("Miasma Demon", 109, Rarity.UNCOMMON, mage.cards.m.MiasmaDemon.class)); cards.add(new SetCardInfo("Miasma Demon", 109, Rarity.UNCOMMON, mage.cards.m.MiasmaDemon.class));
cards.add(new SetCardInfo("Midnight Mayhem", 222, Rarity.UNCOMMON, mage.cards.m.MidnightMayhem.class)); cards.add(new SetCardInfo("Midnight Mayhem", 222, Rarity.UNCOMMON, mage.cards.m.MidnightMayhem.class));
cards.add(new SetCardInfo("Mirror Room // Fractured Realm", 67, Rarity.MYTHIC, mage.cards.m.MirrorRoomFracturedRealm.class, NON_FULL_USE_VARIOUS));
cards.add(new SetCardInfo("Mirror Room // Fractured Realm", 337, Rarity.MYTHIC, mage.cards.m.MirrorRoomFracturedRealm.class, NON_FULL_USE_VARIOUS));
cards.add(new SetCardInfo("Moldering Gym // Weight Room", 190, Rarity.COMMON, mage.cards.m.MolderingGymWeightRoom.class)); cards.add(new SetCardInfo("Moldering Gym // Weight Room", 190, Rarity.COMMON, mage.cards.m.MolderingGymWeightRoom.class));
cards.add(new SetCardInfo("Monstrous Emergence", 191, Rarity.COMMON, mage.cards.m.MonstrousEmergence.class)); cards.add(new SetCardInfo("Monstrous Emergence", 191, Rarity.COMMON, mage.cards.m.MonstrousEmergence.class));
cards.add(new SetCardInfo("Most Valuable Slayer", 144, Rarity.COMMON, mage.cards.m.MostValuableSlayer.class)); cards.add(new SetCardInfo("Most Valuable Slayer", 144, Rarity.COMMON, mage.cards.m.MostValuableSlayer.class));