Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
65 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
d2f4f5d
merge
oscscull Aug 31, 2025
6b3664f
remvoe unused event
oscscull Aug 31, 2025
cf64a1e
Merge branch 'master' into implement-rooms
oscscull Oct 8, 2025
cf0a50e
merge
oscscull Oct 8, 2025
b22b476
updates split card constructor (reorder)
oscscull Oct 10, 2025
ddd6c66
update to call super where we can
oscscull Oct 10, 2025
da68abb
renaming
oscscull Oct 10, 2025
0c469e0
update right / left condition thing
oscscull Oct 10, 2025
68d165e
unify unlock method
oscscull Oct 10, 2025
e7e3113
rejig comments
oscscull Oct 10, 2025
2a18c54
update test
oscscull Oct 10, 2025
3fd9849
make method names align
oscscull Oct 14, 2025
809cc25
add comment
oscscull Oct 14, 2025
e1d6a9f
getSourcePermanentIfItStillExists
oscscull Oct 14, 2025
f5333a9
updated test with sakashima
oscscull Oct 14, 2025
da54574
inline var
oscscull Oct 14, 2025
b83b239
simplify
oscscull Oct 14, 2025
5f1882b
undo bad formatting
oscscull Oct 14, 2025
fa5380f
past tense
oscscull Oct 14, 2025
3a0ea99
past tense
oscscull Oct 14, 2025
8bd6f14
update events
oscscull Oct 14, 2025
2762928
update to enum
oscscull Oct 14, 2025
824e374
verbiage + simplifications
oscscull Oct 14, 2025
48eb886
capitalization
oscscull Oct 14, 2025
9017b2c
comprehensive comments
oscscull Oct 14, 2025
1edbb1e
revert formatting
oscscull Oct 15, 2025
f1fdf63
indentation
oscscull Oct 15, 2025
6b44c38
comment events
oscscull Oct 15, 2025
ce1ad28
check door half in the right place
oscscull Oct 15, 2025
4b09679
renaming
oscscull Oct 15, 2025
5ea427d
unified characteristics class
oscscull Oct 15, 2025
ac65ae7
more formatting
oscscull Oct 15, 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
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
package org.mage.test.cards.cost.splitcards;

import mage.constants.CardType;
import mage.constants.PhaseStep;
import mage.constants.SubType;
import mage.constants.Zone;
import org.junit.Test;
import org.mage.test.serverside.base.CardTestPlayerBase;

/**
* @author oscscull
*/
public class RoomCardTest extends CardTestPlayerBase {
@Test
public void testETB() {
// Bottomless Pool {U} When you unlock this door, return up to one target creature to its owner’s hand.
// Locker Room {4}{U} Whenever one or more creatures you control deal combat damage to a player, draw a card.
addCard(Zone.HAND, playerA, "Bottomless Pool // Locker Room");
addCard(Zone.BATTLEFIELD, playerA, "Island", 1);
addCard(Zone.BATTLEFIELD, playerB, "Grizzly Bears", 2);
checkPlayableAbility("one land", 1, PhaseStep.PRECOMBAT_MAIN, playerA, "Cast Bottomless Pool", true);
castSpell(1, PhaseStep.PRECOMBAT_MAIN, playerA, "Bottomless Pool");
addTarget(playerA, "Grizzly Bears");
execute();
assertPermanentCount(playerB, "Grizzly Bears", 1);
assertHandCount(playerB, "Grizzly Bears", 1);
assertPermanentCount(playerA, "Bottomless Pool", 1);
assertType("Bottomless Pool", CardType.ENCHANTMENT, true);
assertSubtype("Bottomless Pool", SubType.ROOM);
}
}
10 changes: 10 additions & 0 deletions Mage.Tests/src/test/java/org/mage/test/player/TestPlayer.java
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@
import mage.cards.Card;
import mage.cards.Cards;
import mage.cards.CardsImpl;
import mage.cards.RoomCard;
import mage.cards.decks.Deck;
import mage.choices.Choice;
import mage.constants.*;
Expand Down Expand Up @@ -433,6 +434,15 @@ public boolean hasObjectTargetNameOrAlias(MageObject object, String nameOrAlias)
return true;
}

if (object instanceof RoomCard && object.getName().contains(" // ")) {
String[] sides = object.getName().split(" // ");
for (String side : sides) {
if (side.trim().equals(nameOrAlias)) {
return true;
}
}
}

// must search any names, even empty (face down cards)
if (CardUtil.haveSameNames(nameOrAlias, object.getName(), true)) {
return true;
Expand Down