[DSK] Implement Moldering Gym // Weight Room

This commit is contained in:
theelk801 2025-12-07 14:16:30 -05:00
parent 42bde03b2a
commit 520c3a36e5
4 changed files with 69 additions and 36 deletions

View file

@ -0,0 +1,44 @@
package mage.cards.m;
import mage.abilities.common.UnlockThisDoorTriggeredAbility;
import mage.abilities.effects.common.search.SearchLibraryPutInPlayEffect;
import mage.abilities.effects.keyword.ManifestDreadEffect;
import mage.cards.CardSetInfo;
import mage.cards.RoomCard;
import mage.counters.CounterType;
import mage.filter.StaticFilters;
import mage.target.common.TargetCardInLibrary;
import java.util.UUID;
/**
* @author TheElk801
*/
public final class MolderingGymWeightRoom extends RoomCard {
public MolderingGymWeightRoom(UUID ownerId, CardSetInfo setInfo) {
super(ownerId, setInfo, "{2}{G}", "{5}{G}");
// Moldering Gym
// When you unlock this door, search your library for a basic land card, put it onto the battlefield tapped, then shuffle.
this.getLeftHalfCard().addAbility(new UnlockThisDoorTriggeredAbility(
new SearchLibraryPutInPlayEffect(
new TargetCardInLibrary(StaticFilters.FILTER_CARD_BASIC_LAND), true
), false, true
));
// Weight Room
// When you unlock this door, manifest dread, then put three +1/+1 counters on that creature.
this.getRightHalfCard().addAbility(new UnlockThisDoorTriggeredAbility(
new ManifestDreadEffect(CounterType.P1P1.createInstance(3)), false, false
));
}
private MolderingGymWeightRoom(final MolderingGymWeightRoom card) {
super(card);
}
@Override
public MolderingGymWeightRoom copy() {
return new MolderingGymWeightRoom(this);
}
}

View file

@ -1,17 +1,11 @@
package mage.cards.u; package mage.cards.u;
import mage.abilities.Ability;
import mage.abilities.common.UnlockThisDoorTriggeredAbility; import mage.abilities.common.UnlockThisDoorTriggeredAbility;
import mage.abilities.effects.OneShotEffect;
import mage.abilities.effects.keyword.ManifestDreadEffect; import mage.abilities.effects.keyword.ManifestDreadEffect;
import mage.abilities.effects.keyword.SurveilEffect; import mage.abilities.effects.keyword.SurveilEffect;
import mage.cards.CardSetInfo; import mage.cards.CardSetInfo;
import mage.cards.RoomCard; import mage.cards.RoomCard;
import mage.constants.Outcome;
import mage.counters.CounterType; import mage.counters.CounterType;
import mage.game.Game;
import mage.game.permanent.Permanent;
import mage.players.Player;
import java.util.UUID; import java.util.UUID;
@ -28,7 +22,7 @@ public final class UnderwaterTunnelSlimyAquarium extends RoomCard {
// Slimy Aquarium // Slimy Aquarium
// When you unlock this door, manifest dread, then put a +1/+1 counter on that creature. // When you unlock this door, manifest dread, then put a +1/+1 counter on that creature.
this.getRightHalfCard().addAbility(new UnlockThisDoorTriggeredAbility(new SlimyAquariumEffect(), false, false)); this.getRightHalfCard().addAbility(new UnlockThisDoorTriggeredAbility(new ManifestDreadEffect(CounterType.P1P1.createInstance()), false, false));
} }
private UnderwaterTunnelSlimyAquarium(final UnderwaterTunnelSlimyAquarium card) { private UnderwaterTunnelSlimyAquarium(final UnderwaterTunnelSlimyAquarium card) {
@ -40,30 +34,3 @@ public final class UnderwaterTunnelSlimyAquarium extends RoomCard {
return new UnderwaterTunnelSlimyAquarium(this); return new UnderwaterTunnelSlimyAquarium(this);
} }
} }
class SlimyAquariumEffect extends OneShotEffect {
SlimyAquariumEffect() {
super(Outcome.Benefit);
staticText = "manifest dread, then put a +1/+1 counter on that creature";
}
private SlimyAquariumEffect(final SlimyAquariumEffect effect) {
super(effect);
}
@Override
public SlimyAquariumEffect copy() {
return new SlimyAquariumEffect(this);
}
@Override
public boolean apply(Game game, Ability source) {
Player player = game.getPlayer(source.getControllerId());
if (player == null) {
return false;
}
Permanent permanent = ManifestDreadEffect.doManifestDread(player, source, game);
return permanent != null && permanent.addCounters(CounterType.P1P1.createInstance(), source, game);
}
}

View file

@ -228,6 +228,7 @@ 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("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));
cards.add(new SetCardInfo("Mountain", 275, Rarity.LAND, mage.cards.basiclands.Mountain.class, FULL_ART_BFZ_VARIOUS)); cards.add(new SetCardInfo("Mountain", 275, Rarity.LAND, mage.cards.basiclands.Mountain.class, FULL_ART_BFZ_VARIOUS));

View file

@ -7,6 +7,7 @@ import mage.cards.Cards;
import mage.cards.CardsImpl; import mage.cards.CardsImpl;
import mage.constants.Outcome; import mage.constants.Outcome;
import mage.constants.Zone; import mage.constants.Zone;
import mage.counters.Counter;
import mage.game.Game; import mage.game.Game;
import mage.game.events.ManifestedDreadEvent; import mage.game.events.ManifestedDreadEvent;
import mage.game.permanent.Permanent; import mage.game.permanent.Permanent;
@ -14,18 +15,28 @@ import mage.players.Player;
import mage.target.TargetCard; import mage.target.TargetCard;
import mage.target.common.TargetCardInLibrary; import mage.target.common.TargetCardInLibrary;
import java.util.Optional;
/** /**
* @author TheElk801 * @author TheElk801
*/ */
public class ManifestDreadEffect extends OneShotEffect { public class ManifestDreadEffect extends OneShotEffect {
private final Counter counter;
public ManifestDreadEffect() { public ManifestDreadEffect() {
this((Counter) null);
}
public ManifestDreadEffect(Counter counter) {
super(Outcome.Benefit); super(Outcome.Benefit);
staticText = "manifest dread"; this.counter = counter;
staticText = "manifest dread" + (counter != null ? ", then put " + counter.getDescription() + " on that creature" : "");
} }
private ManifestDreadEffect(final ManifestDreadEffect effect) { private ManifestDreadEffect(final ManifestDreadEffect effect) {
super(effect); super(effect);
this.counter = Optional.ofNullable(effect.counter).map(Counter::copy).orElse(null);
} }
@Override @Override
@ -36,7 +47,17 @@ public class ManifestDreadEffect extends OneShotEffect {
@Override @Override
public boolean apply(Game game, Ability source) { public boolean apply(Game game, Ability source) {
Player player = game.getPlayer(source.getControllerId()); Player player = game.getPlayer(source.getControllerId());
return player != null && doManifestDread(player, source, game) != null; if (player == null) {
return false;
}
Permanent permanent = doManifestDread(player, source, game);
if (permanent == null) {
return false;
}
if (counter != null) {
permanent.addCounters(counter, source, game);
}
return true;
} }
public static Permanent doManifestDread(Player player, Ability source, Game game) { public static Permanent doManifestDread(Player player, Ability source, Game game) {