Skip to content

Commit

Permalink
Merge pull request #6246 from Card-Forge/opened-rooms
Browse files Browse the repository at this point in the history
Add Rampaging Soulrager
  • Loading branch information
Hanmac authored Oct 8, 2024
2 parents 28e2627 + ca9f6c2 commit 065cf48
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 1 deletion.
14 changes: 13 additions & 1 deletion forge-game/src/main/java/forge/game/ability/AbilityUtils.java
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
import com.google.common.base.Functions;
import com.google.common.collect.*;
import com.google.common.math.IntMath;

import forge.card.CardStateName;
import forge.card.CardType;
import forge.card.ColorSet;
Expand Down Expand Up @@ -2510,6 +2509,19 @@ public static int xCount(Card c, final String s, final CardTraitBase ctb) {
return doXMath(CardLists.getValidCardCount(game.getLeftGraveyardThisTurn(), validFilter, player, c, ctb), expr, c, ctb);
}

// Count$UnlockedDoors <Valid>
if (sq[0].startsWith("UnlockedDoors")) {
final String[] workingCopy = l[0].split(" ", 2);
final String validFilter = workingCopy[1];

int unlocked = 0;
for (Card doorCard : CardLists.getValidCards(player.getCardsIn(ZoneType.Battlefield), validFilter, player, c, ctb)) {
unlocked += doorCard.getUnlockedRooms().size();
}

return doXMath(unlocked, expr, c, ctb);
}

// Manapool
if (sq[0].startsWith("ManaPool")) {
final String color = l[0].split(":")[1];
Expand Down
7 changes: 7 additions & 0 deletions forge-gui/res/cardsfolder/upcoming/rampaging_soulrager.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
Name:Rampaging Soulrager
ManaCost:2 R
Types:Creature Spirit
PT:1/4
S:Mode$ Continuous | Affected$ Card.Self | AddPower$ 3 | CheckSVar$ X | SVarCompare$ GE2 | Description$ CARDNAME gets +3/+0 as long as there are two or more unlocked doors among Rooms you control.
SVar:X:Count$UnlockedDoors Card.Room+YouCtrl
Oracle:Rampaging Soulrager gets +3/+0 as long as there are two or more unlocked doors among Rooms you control.

0 comments on commit 065cf48

Please sign in to comment.