Skip to content

Implement rooms (Bottomless Pool // Locker Room) #13786

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 33 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
33 commits
Select commit Hold shift + click to select a range
b1c96aa
get rooms entering the battlefield
oscscull Jun 17, 2025
82f6025
gets etb working properly
oscscull Jun 18, 2025
c69cb9c
mostly working, needs text and mana costs to be perfected
oscscull Jun 19, 2025
1a29e7e
adds mana values
oscscull Jun 19, 2025
d634c3c
adds rules text hiding
oscscull Jun 19, 2025
b3e4fab
working except on rules text
oscscull Jun 22, 2025
d27f3bb
adds more needed stuff
oscscull Jun 25, 2025
0309c12
finish main room features
oscscull Jun 26, 2025
63f5e29
clean up, revert accidental formatting
oscscull Jun 26, 2025
6a9ff16
renames
oscscull Jul 3, 2025
f0ec5cc
Add first test, add matching code for rooms to test code
oscscull Jul 6, 2025
6240446
expand testing, fix issues
oscscull Jul 9, 2025
8c0eb8d
unneeded import
oscscull Jul 9, 2025
cc87208
fix name predicate edge case
oscscull Jul 10, 2025
159825a
add unlock test
oscscull Jul 10, 2025
4db99d5
simplify
oscscull Jul 10, 2025
08f8452
revert this. I don't know that the logic here was wrong - i need to c…
oscscull Jul 10, 2025
fc130c9
add flicker tests
oscscull Jul 10, 2025
947b55a
checkpoint up to failing test (copy not working)
oscscull Jul 19, 2025
57f304f
Get copy on stack working
oscscull Jul 20, 2025
524ec0f
Add clone test
oscscull Jul 20, 2025
f6943ca
Test name match (stack)
oscscull Jul 21, 2025
3b32f07
reanimate after counter
oscscull Jul 21, 2025
53463bd
on battlefield tests
oscscull Jul 21, 2025
49dbf27
add the pithing needle example
oscscull Jul 21, 2025
7f49d1a
Add test of changing one permanent into two rooms
oscscull Jul 21, 2025
13c6f3b
Don't think this is correct behaviour pinned in test. (Maybe I'm miss…
oscscull Jul 21, 2025
8a239cb
revert this (formatted accidentally)
oscscull Jul 21, 2025
c1db8f1
fix
oscscull Jul 21, 2025
52b846f
Merge remote-tracking branch 'upstream/master' into implement-rooms
oscscull Jul 21, 2025
2aa0784
add subtype to halves
oscscull Jul 22, 2025
75a347f
Merge remote-tracking branch 'upstream/master' into implement-rooms
oscscull Jul 22, 2025
3d054f6
fix subtype
oscscull Jul 22, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
53 changes: 53 additions & 0 deletions Mage.Sets/src/mage/cards/b/BottomlessPoolLockerRoom.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
package mage.cards.b;

import java.util.UUID;

import mage.abilities.common.DealsDamageToAPlayerAllTriggeredAbility;
import mage.abilities.common.UnlockThisDoorTriggeredAbility;
import mage.abilities.effects.common.DrawCardSourceControllerEffect;
import mage.abilities.effects.common.ReturnToHandTargetEffect;
import mage.cards.CardSetInfo;
import mage.cards.RoomCard;
import mage.constants.CardType;
import mage.constants.SetTargetPointer;
import mage.constants.SpellAbilityType;
import mage.constants.SubType;
import mage.constants.TargetController;
import mage.filter.StaticFilters;
import mage.target.common.TargetCreaturePermanent;

/**
* @author oscscull
*/
public final class BottomlessPoolLockerRoom extends RoomCard {

public BottomlessPoolLockerRoom(UUID ownerId, CardSetInfo setInfo) {
super(ownerId, setInfo,
new CardType[] { CardType.ENCHANTMENT },
"{U}", "{4}{U}", SpellAbilityType.SPLIT);
this.subtype.add(SubType.ROOM);

// Left half ability - "When you unlock this door" trigger (delayed triggered
// ability)
UnlockThisDoorTriggeredAbility left = new UnlockThisDoorTriggeredAbility(
new ReturnToHandTargetEffect(), false, true);
left.addTarget(new TargetCreaturePermanent(0, 1));

// Right half ability - "Whenever creatures you control deal combat damage"
DealsDamageToAPlayerAllTriggeredAbility right = new DealsDamageToAPlayerAllTriggeredAbility(
new DrawCardSourceControllerEffect(1),
StaticFilters.FILTER_CONTROLLED_A_CREATURE,
false, SetTargetPointer.PLAYER, true, true, TargetController.OPPONENT);

this.AddRoomAbilities(left, right);
}

private BottomlessPoolLockerRoom(final BottomlessPoolLockerRoom card) {
super(card);
}

@Override
public BottomlessPoolLockerRoom copy() {
return new BottomlessPoolLockerRoom(this);
}
}
70 changes: 70 additions & 0 deletions Mage.Sets/src/mage/cards/s/SurgicalSuiteHospitalRoom.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,70 @@
package mage.cards.s;

import java.util.UUID;

import mage.abilities.common.AttacksWithCreaturesTriggeredAbility;
import mage.abilities.common.UnlockThisDoorTriggeredAbility;
import mage.abilities.effects.common.ReturnFromGraveyardToBattlefieldTargetEffect;
import mage.abilities.effects.common.counter.AddCountersTargetEffect;
import mage.cards.CardSetInfo;
import mage.cards.RoomCard;
import mage.constants.CardType;
import mage.constants.ComparisonType;
import mage.constants.SpellAbilityType;
import mage.constants.SubType;
import mage.counters.CounterType;
import mage.filter.FilterCard;
import mage.filter.common.FilterCreatureCard;
import mage.filter.predicate.mageobject.ManaValuePredicate;
import mage.target.common.TargetAttackingCreature;
import mage.target.common.TargetCardInYourGraveyard;

/**
*
* @author oscscull
*/
public final class SurgicalSuiteHospitalRoom extends RoomCard {
private static final FilterCard filter = new FilterCreatureCard(
"creature card with mana value 3 or less from your graveyard");

static {
filter.add(new ManaValuePredicate(ComparisonType.FEWER_THAN, 4));
}

public SurgicalSuiteHospitalRoom(UUID ownerId, CardSetInfo setInfo) {
// Surgical Suite
// {1}{W}
// When you unlock this door, return target creature card with mana value 3 or
// less from your graveyard to the battlefield.
// Hospital Room
// {3}{W}
// Enchantment -- Room
// Whenever you attack, put a +1/+1 counter on target attacking creature.
super(ownerId, setInfo,
new CardType[] { CardType.ENCHANTMENT },
"{1}{W}", "{3}{W}", SpellAbilityType.SPLIT);
this.subtype.add(SubType.ROOM);

// Left half ability
UnlockThisDoorTriggeredAbility left = new UnlockThisDoorTriggeredAbility(
new ReturnFromGraveyardToBattlefieldTargetEffect(), false, true);
left.addTarget(new TargetCardInYourGraveyard(filter));

// Right half ability
AttacksWithCreaturesTriggeredAbility right = new AttacksWithCreaturesTriggeredAbility(
new AddCountersTargetEffect(CounterType.P1P1.createInstance()), 1
);
right.addTarget(new TargetAttackingCreature());

this.AddRoomAbilities(left, right);
}

private SurgicalSuiteHospitalRoom(final SurgicalSuiteHospitalRoom card) {
super(card);
}

@Override
public SurgicalSuiteHospitalRoom copy() {
return new SurgicalSuiteHospitalRoom(this);
}
}
2 changes: 2 additions & 0 deletions Mage.Sets/src/mage/sets/DuskmournHouseOfHorror.java
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,7 @@ private DuskmournHouseOfHorror() {
cards.add(new SetCardInfo("Blazemire Verge", 329, Rarity.RARE, mage.cards.b.BlazemireVerge.class, NON_FULL_USE_VARIOUS));
cards.add(new SetCardInfo("Bleeding Woods", 257, Rarity.COMMON, mage.cards.b.BleedingWoods.class));
cards.add(new SetCardInfo("Boilerbilges Ripper", 127, Rarity.COMMON, mage.cards.b.BoilerbilgesRipper.class));
cards.add(new SetCardInfo("Bottomless Pool // Locker Room", 43, Rarity.UNCOMMON, mage.cards.b.BottomlessPoolLockerRoom.class));
cards.add(new SetCardInfo("Break Down the Door", 170, Rarity.UNCOMMON, mage.cards.b.BreakDownTheDoor.class));
cards.add(new SetCardInfo("Broodspinner", 211, Rarity.UNCOMMON, mage.cards.b.Broodspinner.class));
cards.add(new SetCardInfo("Cackling Slasher", 85, Rarity.COMMON, mage.cards.c.CacklingSlasher.class));
Expand Down Expand Up @@ -317,6 +318,7 @@ private DuskmournHouseOfHorror() {
cards.add(new SetCardInfo("Stay Hidden, Stay Silent", 291, Rarity.UNCOMMON, mage.cards.s.StayHiddenStaySilent.class, NON_FULL_USE_VARIOUS));
cards.add(new SetCardInfo("Stay Hidden, Stay Silent", 74, Rarity.UNCOMMON, mage.cards.s.StayHiddenStaySilent.class, NON_FULL_USE_VARIOUS));
cards.add(new SetCardInfo("Strangled Cemetery", 268, Rarity.COMMON, mage.cards.s.StrangledCemetery.class));
cards.add(new SetCardInfo("Surgical Suite // Hospital Room", 34, Rarity.UNCOMMON, mage.cards.s.SurgicalSuiteHospitalRoom.class));
cards.add(new SetCardInfo("Swamp", 274, Rarity.LAND, mage.cards.basiclands.Swamp.class, FULL_ART_BFZ_VARIOUS));
cards.add(new SetCardInfo("Swamp", 281, Rarity.LAND, mage.cards.basiclands.Swamp.class, NON_FULL_USE_VARIOUS));
cards.add(new SetCardInfo("Swamp", 282, Rarity.LAND, mage.cards.basiclands.Swamp.class, NON_FULL_USE_VARIOUS));
Expand Down
Loading