mirror of
https://github.com/magefree/mage.git
synced 2025-12-20 02:30:08 -08:00
[DSK] Implement Moldering Gym // Weight Room
This commit is contained in:
parent
42bde03b2a
commit
520c3a36e5
4 changed files with 69 additions and 36 deletions
44
Mage.Sets/src/mage/cards/m/MolderingGymWeightRoom.java
Normal file
44
Mage.Sets/src/mage/cards/m/MolderingGymWeightRoom.java
Normal 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);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
@ -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);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
|
||||||
|
|
@ -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));
|
||||||
|
|
|
||||||
|
|
@ -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) {
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue