From 8105083749d60423b793311ed6412be24f12578b Mon Sep 17 00:00:00 2001 From: Andrew Roberts Date: Sat, 31 Aug 2024 16:45:07 -0400 Subject: [PATCH 1/2] better swf changes --- src/main/java/chronoMods/bingo/Caller.java | 410 ++++++---- .../chronoMods/bingo/SendBingoPatches.java | 749 +++++++++++------- .../chronoMods/ui/lobby/NewGameScreen.java | 3 + .../resources/chrono/localization/eng/ui.json | 346 ++++---- 4 files changed, 875 insertions(+), 633 deletions(-) diff --git a/src/main/java/chronoMods/bingo/Caller.java b/src/main/java/chronoMods/bingo/Caller.java index a99c415..7ea2b91 100644 --- a/src/main/java/chronoMods/bingo/Caller.java +++ b/src/main/java/chronoMods/bingo/Caller.java @@ -12,198 +12,262 @@ import java.util.ArrayList; import java.util.Collections; -public class Caller -{ +public class Caller { + + /** + * A map containing all bingo goals and their corresponding indices. To get + * a specific bingo goal: 1. Use BINGO_GOALS.get("Goal Description") to get + * the index of a specific goal. 2. Use BINGO_GOALS.entrySet() to iterate + * over all goals and their indices. 3. To get all goal descriptions: + * BINGO_GOALS.keySet() 4. To get all goal indices: BINGO_GOALS.values() + * + * Goals are combined from EASY, MED, and HARD arrays in that order. Indices + * 0-24 are EASY goals, 25-49 are MED goals, and 50-74 are HARD goals. + */ + // public static final java.util.Map BINGO_GOALS = new java.util.HashMap() { + // { + // String[] allBingo = java.util.stream.Stream.of(EASY, MED, HARD) + // .flatMap(java.util.stream.Stream::of) + // .toArray(String[]::new); + // for (int i = 0; i < allBingo.length; i++) { + // put(allBingo[i], i); + // } + // } + // }; + + /** + * A list of bingo goal indices that should be excluded from the card + * generation. easy indices are 0-24 + // */ + // public static final int[] EASY_BINGO_BLOCKLIST = { + // // Add more entries here as needed + // }; + + // /** + // * A list of medium bingo goal indices that should be excluded from the card + // * generation. medium indices are 25-49 + // */ + // public static final int[] MEDIUM_BINGO_BLOCKLIST = { + // // Add more entries here as needed + // }; + + // /** + // * A list of hard bingo goal indices that should be excluded from the card + // * generation. hard indices are 50-74 + // */ + // public static final int[] HARD_BINGO_BLOCKLIST = { + // // Add more entries here as needed + // }; + public static final String[] EASY = CardCrawlGame.languagePack.getUIString("EasyBingo").TEXT; public static final String[] MED = CardCrawlGame.languagePack.getUIString("MedBingo").TEXT; public static final String[] HARD = CardCrawlGame.languagePack.getUIString("HardBingo").TEXT; public static long bingoSeed = 0; - // In order to allow for different 'difficulties', we group bingos into Easy, Medium, and Hard. - // We can then make sliding scales for how many goals of each type are on a bingo card. + // In order to allow for different 'difficulties', we group bingos into Easy, + // Medium, and Hard. + // We can then make sliding scales for how many goals of each type are on a + // bingo card. public static ArrayList notifications = new ArrayList(); public static void bingoNotificationQueue() { - if (notifications.size() > 0) { - if (AbstractDungeon.topLevelEffects.size() == 0) { - AbstractDungeon.topLevelEffectsQueue.add(notifications.get(0)); - notifications.remove(0); - } - } + if (notifications.size() > 0) { + if (AbstractDungeon.topLevelEffects.size() == 0) { + AbstractDungeon.topLevelEffectsQueue.add(notifications.get(0)); + notifications.remove(0); + } + } } - // Accepts the number of Easy, Medium, and Hard in any given column. Should add up to five. + // Accepts the number of Easy, Medium, and Hard in any given column. Should add + // up to five. public static int[][] makeBingoCard(int easy, int med, int hard) { - if (easy+med+hard != 5) { TogetherManager.log("Bingo Card not correct size."); } - - int[][] card = new int[5][5]; - - com.megacrit.cardcrawl.random.Random rng; - if (NewMenuButtons.newGameScreen.uniqueBoardToggle.isTicked()) - if (NewMenuButtons.newGameScreen.teamsToggle.isTicked()) - rng = new com.megacrit.cardcrawl.random.Random(Caller.bingoSeed, TogetherManager.getCurrentUser().team); - else - rng = new com.megacrit.cardcrawl.random.Random(); - else - rng = new com.megacrit.cardcrawl.random.Random(Caller.bingoSeed); + // Check if the sum of the columns is 5 + if (easy + med + hard != 5) { + TogetherManager.log("Bingo Card not correct size."); + } + // NOTE TO SELF: If i'm removing cards from the easy pool, I can't have all the + // squares generated from the easy pool. + + int[][] card = new int[5][5]; + + com.megacrit.cardcrawl.random.Random rng; + if (NewMenuButtons.newGameScreen.uniqueBoardToggle.isTicked()) { + if (NewMenuButtons.newGameScreen.teamsToggle.isTicked()) { + rng = new com.megacrit.cardcrawl.random.Random(Caller.bingoSeed, TogetherManager.getCurrentUser().team); + } else { + rng = new com.megacrit.cardcrawl.random.Random(); + } + } else { + rng = new com.megacrit.cardcrawl.random.Random(Caller.bingoSeed); + } + + // Persistent Pools + ArrayList easyPool = makeSequence(0, 24); + // here, i want to remove cards that are on the "block list" + ArrayList medPool = makeSequence(25, 49); + ArrayList hardPool = makeSequence(50, 74); + + for (int x = 0; x < 5; x++) { + int y = 0; + for (Integer column : makeBingoColumn(rng, easy, med, hard, easyPool, medPool, hardPool)) { + card[x][y] = column; + y++; + } + } + + return card; + } + public static ArrayList makeSequence(int begin, int end) { + ArrayList ret = new ArrayList<>(end - begin + 1); + for (int i = begin; i <= end; i++) { + ret.add(i); + } + return ret; + } - // Persistent Pools - ArrayList easyPool = makeSequence(0,24); - ArrayList medPool = makeSequence(25,49); - ArrayList hardPool = makeSequence(50,74); + public static ArrayList makeBingoColumn(com.megacrit.cardcrawl.random.Random rng, int easy, int med, + int hard, ArrayList easyPool, ArrayList medPool, ArrayList hardPool) { + ArrayList column = new ArrayList(); + + int rn = 0; + + // Make the board. I hate that java has no 'remove and return the removed value' + for (int x = 0; x < easy; x++) { + rn = rng.random(easyPool.size() - 1); + column.add(easyPool.get(rn)); + easyPool.remove(rn); + } + + for (int x = 0; x < med; x++) { + rn = rng.random(medPool.size() - 1); + column.add(medPool.get(rn)); + medPool.remove(rn); + } + + for (int x = 0; x < hard; x++) { + rn = rng.random(hardPool.size() - 1); + column.add(hardPool.get(rn)); + hardPool.remove(rn); + } + + Collections.shuffle(column, new java.util.Random(rng.random(1000000))); + return column; + } - for (int x = 0; x < 5; x++) { - int y = 0; - for (Integer column : makeBingoColumn(rng, easy, med, hard, easyPool, medPool, hardPool)) { - card[x][y] = column; - y++; - } - } + public static int isWin(Texture[][] bingoCard) { + + // Blackout lines + if (NewMenuButtons.newGameScreen.blackoutToggle.isTicked()) { + for (int x = 0; x < bingoCard.length; ++x) { + for (int y = 0; y < bingoCard[0].length; ++y) { + if (bingoCard[x][y] == null) { + return 0; + } // If any node is not a hit, stop checking + if (x == 4 && y == 4) { + return 13; + } // If you reach the end and they're all true, we've got a blackout bingo. + // Blackout is 13 + } + } + } else { + + // Horizontal lines + for (int x = 0; x < bingoCard.length; ++x) { + for (int y = 0; y < bingoCard[x].length; ++y) { + if (bingoCard[x][y] == null) { + break; + } // If one in line is not hit, move to the next line + if (y == 4) { + return x + 1; + } // If you reach the end and they're all true, we've got a bingo. Horiz bingos + // are 1-5 + } + } + + // Vertical lines + for (int y = 0; y < bingoCard[0].length; ++y) { + for (int x = 0; x < bingoCard.length; ++x) { + if (bingoCard[x][y] == null) { + break; + } // If one in line is not hit, move to the next line + if (x == 4) { + return y + 6; + } // If you reach the end and they're all true, we've got a bingo. Vert bingos are + // 6-10 + } + } + + // Diagonal lines + for (int x = 0; x < bingoCard.length; ++x) { + if (bingoCard[x][x] == null) { + break; + } // If one in line is not hit, move to the next line + if (x == 4) { + return 11; + } // If you reach the end and they're all true, we've got a bingo. Diag are 11-12 + } + + for (int x = 0; x < bingoCard.length; ++x) { + if (bingoCard[x][bingoCard.length - x - 1] == null) { + break; + } // If one in line is not hit, move to the next line + if (x == 4) { + return 12; + } // If you reach the end and they're all true, we've got a bingo. Diag are 11-12 + } + } + + // No Bingos + return 0; + } - return card; + public static int countMarks(Texture[][] card) { + int markCount = 0; + for (Texture[] row : card) { + for (Texture mark : row) { + if (mark != null) { + markCount++; + } + } + } + + return markCount; } - public static ArrayList makeSequence(int begin, int end) { - ArrayList ret = new ArrayList<>(end - begin + 1); - for (int i=begin; i<=end; i++) { - ret.add(i); - } - return ret; - } - - public static ArrayList makeBingoColumn(com.megacrit.cardcrawl.random.Random rng, int easy, int med, int hard, ArrayList easyPool, ArrayList medPool, ArrayList hardPool) { - ArrayList column = new ArrayList(); - - int rn = 0; - - // Make the board. I hate that java has no 'remove and return the removed value' - for (int x = 0; x < easy; x++) { - rn = rng.random(easyPool.size()-1); - column.add(easyPool.get(rn)); - easyPool.remove(rn); - } - - for (int x = 0; x < med; x++) { - rn = rng.random(medPool.size()-1); - column.add(medPool.get(rn)); - medPool.remove(rn); - } - - for (int x = 0; x < hard; x++) { - rn = rng.random(hardPool.size()-1); - column.add(hardPool.get(rn)); - hardPool.remove(rn); - } - - Collections.shuffle(column, new java.util.Random(rng.random(1000000))); - return column; + public static boolean markCard(RemotePlayer player, int rule) { + Texture m = TogetherManager.bingoMark; + if (player.bingoMark != null) { + m = player.bingoMark; + } + + for (int x = 0; x < player.bingoCardIndices.length; ++x) { + for (int y = 0; y < player.bingoCardIndices[x].length; ++y) { + if (player.bingoCardIndices[x][y] == rule) { + if (player.bingoCard[x][y] == null) { + for (RemotePlayer p : ((BingoPlayerWidget) player.widget).teamPlayers) { + p.bingoCard[x][y] = m; + } + return true; + } + } + } + } + return false; } - public static int isWin(Texture[][] bingoCard) { - - // Blackout lines - if (NewMenuButtons.newGameScreen.blackoutToggle.isTicked()){ - for (int x = 0; x < bingoCard.length; ++x) { - for (int y = 0; y < bingoCard[0].length; ++y) { - if (bingoCard[x][y] == null) { return 0; } // If any node is not a hit, stop checking - if (x == 4 && y == 4) { return 13; } // If you reach the end and they're all true, we've got a blackout bingo. Blackout is 13 - } - } - } - else { - - // Horizontal lines - for (int x = 0; x < bingoCard.length; ++x) { - for (int y = 0; y < bingoCard[x].length; ++y) { - if (bingoCard[x][y] == null) { - break; - } // If one in line is not hit, move to the next line - if (y == 4) { - return x + 1; - } // If you reach the end and they're all true, we've got a bingo. Horiz bingos are 1-5 - } - } - - // Vertical lines - for (int y = 0; y < bingoCard[0].length; ++y) { - for (int x = 0; x < bingoCard.length; ++x) { - if (bingoCard[x][y] == null) { - break; - } // If one in line is not hit, move to the next line - if (x == 4) { - return y + 6; - } // If you reach the end and they're all true, we've got a bingo. Vert bingos are 6-10 - } - } - - // Diagonal lines - for (int x = 0; x < bingoCard.length; ++x) { - if (bingoCard[x][x] == null) { - break; - } // If one in line is not hit, move to the next line - if (x == 4) { - return 11; - } // If you reach the end and they're all true, we've got a bingo. Diag are 11-12 - } - - for (int x = 0; x < bingoCard.length; ++x) { - if (bingoCard[x][bingoCard.length - x - 1] == null) { - break; - } // If one in line is not hit, move to the next line - if (x == 4) { - return 12; - } // If you reach the end and they're all true, we've got a bingo. Diag are 11-12 - } - } - - - - - // No Bingos - return 0; - } - - public static int countMarks(Texture[][] card) { - int markCount = 0; - for (Texture[] row : card) - for (Texture mark : row) - if (mark != null) - markCount++; - - return markCount; - } - - public static boolean markCard(RemotePlayer player, int rule) { - Texture m = TogetherManager.bingoMark; - if (player.bingoMark != null) - m = player.bingoMark; - - for (int x = 0; x < player.bingoCardIndices.length; ++x) { - for(int y = 0; y < player.bingoCardIndices[x].length; ++y) { - if (player.bingoCardIndices[x][y] == rule) { - if (player.bingoCard[x][y] == null) { - for (RemotePlayer p : ((BingoPlayerWidget)player.widget).teamPlayers) - p.bingoCard[x][y] = m; - return true; - } - } - } - } - return false; - } - - public static boolean isMarked(int rule) { - RemotePlayer player = TogetherManager.getCurrentUser(); - for (int x = 0; x < player.bingoCardIndices.length; ++x) { - for(int y = 0; y < player.bingoCardIndices[x].length; ++y) { - if (player.bingoCardIndices[x][y] == rule) { - return player.bingoCard[x][y] != null; - } - } - } - return true; - } + public static boolean isMarked(int rule) { + RemotePlayer player = TogetherManager.getCurrentUser(); + for (int x = 0; x < player.bingoCardIndices.length; ++x) { + for (int y = 0; y < player.bingoCardIndices[x].length; ++y) { + if (player.bingoCardIndices[x][y] == rule) { + return player.bingoCard[x][y] != null; + } + } + } + return true; + } } diff --git a/src/main/java/chronoMods/bingo/SendBingoPatches.java b/src/main/java/chronoMods/bingo/SendBingoPatches.java index 3c20f16..cbe6e34 100644 --- a/src/main/java/chronoMods/bingo/SendBingoPatches.java +++ b/src/main/java/chronoMods/bingo/SendBingoPatches.java @@ -1,9 +1,12 @@ package chronoMods.bingo; -import basemod.ReflectionHacks; -import basemod.interfaces.StartActSubscriber; -import chronoMods.TogetherManager; -import chronoMods.network.NetworkHelper; +import java.util.ArrayList; +import java.util.Collections; +import java.util.HashMap; +import java.util.List; +import java.util.stream.Collectors; +import java.util.stream.Stream; + import com.evacipated.cardcrawl.modthespire.lib.SpirePatch; import com.megacrit.cardcrawl.actions.GameActionManager; import com.megacrit.cardcrawl.actions.common.ApplyPowerAction; @@ -17,7 +20,7 @@ import com.megacrit.cardcrawl.dungeons.AbstractDungeon; import com.megacrit.cardcrawl.map.MapRoomNode; import com.megacrit.cardcrawl.monsters.AbstractMonster; -import com.megacrit.cardcrawl.monsters.beyond.Transient; +import com.megacrit.cardcrawl.monsters.city.Chosen; import com.megacrit.cardcrawl.powers.AbstractPower; import com.megacrit.cardcrawl.powers.FocusPower; import com.megacrit.cardcrawl.powers.PoisonPower; @@ -42,12 +45,11 @@ import com.megacrit.cardcrawl.vfx.ObtainKeyEffect; import com.megacrit.cardcrawl.vfx.UpgradeShineEffect; -import java.util.ArrayList; -import java.util.Collections; -import java.util.HashMap; -import java.util.List; -import java.util.stream.Collectors; -import java.util.stream.Stream; +import basemod.ReflectionHacks; +import basemod.interfaces.StartActSubscriber; +import chronoMods.TogetherManager; +import chronoMods.network.NetworkHelper; + public class SendBingoPatches implements StartActSubscriber { @@ -68,170 +70,191 @@ public static void Bingo(int bingo) { } public void receiveStartAct() { - if (TogetherManager.gameMode != TogetherManager.mode.Bingo) { return; } + if (TogetherManager.gameMode != TogetherManager.mode.Bingo) { + return; + } // Need to receive Bingo Rules from Host - Caller.makeBingoCard(1,3,1); + Caller.makeBingoCard(1, 3, 1); NetworkHelper.sendData(NetworkHelper.dataType.Bingo); } - // Achievement Unlock Bingos - @SpirePatch(clz = VictoryScreen.class, method=SpirePatch.CONSTRUCTOR) + @SpirePatch(clz = VictoryScreen.class, method = SpirePatch.CONSTRUCTOR) public static class bingoBeatHeart { + public static void Postfix(VictoryScreen __instance) { - if (TogetherManager.gameMode != TogetherManager.mode.Bingo) { return; } + if (TogetherManager.gameMode != TogetherManager.mode.Bingo) { + return; + } Bingo(29); switch (AbstractDungeon.player.chosenClass) { - case IRONCLAD: - Bingo(50); - break; - case THE_SILENT: - Bingo(51); - break; - case DEFECT: - Bingo(52); - break; - case WATCHER: - Bingo(53); - break; - } - - if (AbstractDungeon.player.masterDeck.pauperCheck()) + case IRONCLAD: + Bingo(50); + break; + case THE_SILENT: + Bingo(51); + break; + case DEFECT: + Bingo(52); + break; + case WATCHER: + Bingo(53); + break; + } + + if (AbstractDungeon.player.masterDeck.pauperCheck()) { Bingo(54); - - if (AbstractDungeon.player.maxHealth == AbstractDungeon.player.currentHealth) + } + + if (AbstractDungeon.player.maxHealth == AbstractDungeon.player.currentHealth) { Bingo(74); + } // These happen if you beat the heart OR Act 3, as long as you win - if (CardCrawlGame.playtime <= 1800.0F) + if (CardCrawlGame.playtime <= 1800.0F) { Bingo(65); - if (AbstractDungeon.player.masterDeck.size() <= 5) - Bingo(48); - if (AbstractDungeon.player.masterDeck.size() >= 35) - Bingo(49); - if (AbstractDungeon.player.masterDeck.size() >= 50) - Bingo(66); - if (AbstractDungeon.player.relics.size() == 1) + } + if (AbstractDungeon.player.masterDeck.size() >= 50) { + Bingo(66); + } + if (AbstractDungeon.player.relics.size() == 1) { Bingo(64); - if (AbstractDungeon.player.masterDeck.cursedCheck()) + } + if (AbstractDungeon.player.masterDeck.cursedCheck()) { Bingo(68); - if (CardCrawlGame.metricData.campfire_rested == 0) + } + if (CardCrawlGame.metricData.campfire_rested == 0) { Bingo(55); - if (CardCrawlGame.metricData.campfire_upgraded == 0) + } + if (CardCrawlGame.metricData.campfire_upgraded == 0) { Bingo(71); - if (Collections.frequency(CardCrawlGame.metricData.path_taken, "E") <= 0) + } + if (Collections.frequency(CardCrawlGame.metricData.path_taken, "E") <= 0) { Bingo(72); + } } } - @SpirePatch(clz = AbstractMonster.class, method="onFinalBossVictoryLogic") + @SpirePatch(clz = AbstractMonster.class, method = "onFinalBossVictoryLogic") public static class bingoBeatAct3 { + public static void Postfix(AbstractMonster __instance) { - if (TogetherManager.gameMode != TogetherManager.mode.Bingo) { return; } + if (TogetherManager.gameMode != TogetherManager.mode.Bingo) { + return; + } if (AbstractDungeon.ascensionLevel < 20 || AbstractDungeon.bossList.size() != 2) { - Bingo(0); - - switch (AbstractDungeon.player.chosenClass) { - case IRONCLAD: - Bingo(25); - break; - case THE_SILENT: - Bingo(26); - break; - case DEFECT: - Bingo(27); - break; - case WATCHER: - Bingo(28); - break; - } - // These happen if you beat the heart OR Act 3, as long as you win - if (CardCrawlGame.playtime <= 1800.0F) + if (CardCrawlGame.playtime <= 1800.0F) { Bingo(65); - if (AbstractDungeon.player.masterDeck.size() <= 5) - Bingo(48); - if (AbstractDungeon.player.masterDeck.size() >= 35) - Bingo(49); - if (AbstractDungeon.player.masterDeck.size() >= 50) - Bingo(66); - if (AbstractDungeon.player.relics.size() == 1) + } + if (AbstractDungeon.player.masterDeck.size() <= 5) { + Bingo(48); + } + if (AbstractDungeon.player.masterDeck.size() >= 35) { + Bingo(49); + } + if (AbstractDungeon.player.masterDeck.size() >= 50) { + Bingo(66); + } + if (AbstractDungeon.player.relics.size() == 1) { Bingo(64); - if (AbstractDungeon.player.masterDeck.cursedCheck()) + } + if (AbstractDungeon.player.masterDeck.cursedCheck()) { Bingo(68); - if (CardCrawlGame.metricData.campfire_rested == 0) + } + if (CardCrawlGame.metricData.campfire_rested == 0) { Bingo(55); - if (CardCrawlGame.metricData.campfire_upgraded == 0) + } + if (CardCrawlGame.metricData.campfire_upgraded == 0) { Bingo(71); - if (Collections.frequency(CardCrawlGame.metricData.path_taken, "E") <= 0) + } + if (Collections.frequency(CardCrawlGame.metricData.path_taken, "E") <= 0) { Bingo(72); + } boolean noDamage = true; for (HashMap combat : CardCrawlGame.metricData.damage_taken) { - if (combat.get("damage") > 0 && combat.get("floor") > (AbstractDungeon.actNum -1) * 16 && AbstractDungeon.actNum != 4) + if (combat.get("damage") > 0 && combat.get("floor") > (AbstractDungeon.actNum - 1) * 16 && AbstractDungeon.actNum != 4) { noDamage = false; + } } - if (noDamage) + if (noDamage) { Bingo(73); + } } } } - @SpirePatch(clz = ObtainKeyEffect.class, method=SpirePatch.CONSTRUCTOR) + @SpirePatch(clz = ObtainKeyEffect.class, method = SpirePatch.CONSTRUCTOR) public static class bingoKeys { + public static void Postfix(ObtainKeyEffect __instance, ObtainKeyEffect.KeyColor keyColor) { - if (TogetherManager.gameMode != TogetherManager.mode.Bingo) { return; } + if (TogetherManager.gameMode != TogetherManager.mode.Bingo) { + return; + } switch (keyColor) { - case RED: - Bingo(1); - break; - case GREEN: - Bingo(3); - break; - case BLUE: - Bingo(2); - break; + case RED: + Bingo(1); + break; + case GREEN: + Bingo(3); + break; + case BLUE: + Bingo(2); + break; } } } - @SpirePatch(clz = Transient.class, method="die") - public static class bingoTransient { - public static void Postfix(Transient __instance) { - if (TogetherManager.gameMode != TogetherManager.mode.Bingo) { return; } + @SpirePatch(clz = Chosen.class, method = "die") + public static class bingoChosen { + + public static void Postfix(Chosen __instance) { + if (TogetherManager.gameMode != TogetherManager.mode.Bingo) { + return; + } Bingo(47); } } - @SpirePatch(clz = FocusPower.class, method="stackPower") + @SpirePatch(clz = FocusPower.class, method = "stackPower") public static class bingoFocus { + public static void Postfix(FocusPower __instance, int stackAmount) { - if (TogetherManager.gameMode != TogetherManager.mode.Bingo) { return; } + if (TogetherManager.gameMode != TogetherManager.mode.Bingo) { + return; + } - if (__instance.amount >= 25) + if (__instance.amount >= 11) { Bingo(46); + } } } - @SpirePatch(clz = GameActionManager.class, method="getNextAction") + @SpirePatch(clz = GameActionManager.class, method = "getNextAction") public static class bingoCardPlays { + public static void Postfix(GameActionManager __instance) { - if (TogetherManager.gameMode != TogetherManager.mode.Bingo) { return; } + if (TogetherManager.gameMode != TogetherManager.mode.Bingo) { + return; + } - if (__instance.cardsPlayedThisTurn.size() == 25) + if (__instance.cardsPlayedThisTurn.size() == 25) { Bingo(44); + } - if (__instance.cardsPlayedThisTurn.size() == 12) + if (__instance.cardsPlayedThisTurn.size() == 12) { Bingo(21); + } int shivCount = 0; for (AbstractCard i : __instance.cardsPlayedThisTurn) { @@ -240,306 +263,412 @@ public static void Postfix(GameActionManager __instance) { if (shivCount == 10) { Bingo(42); break; - } + } } - } + } } } - @SpirePatch(clz = AbstractRoom.class, method="endBattle") + @SpirePatch(clz = AbstractRoom.class, method = "endBattle") public static class bingoEndBattle { + public static void Prefix(AbstractRoom __instance) { - if (TogetherManager.gameMode != TogetherManager.mode.Bingo) { return; } + if (TogetherManager.gameMode != TogetherManager.mode.Bingo) { + return; + } - if (AbstractDungeon.player.currentHealth == 1) + if (AbstractDungeon.player.currentHealth == 1) { Bingo(31); + } int attackCount = 0; int skillCount = 0; for (AbstractCard c : AbstractDungeon.actionManager.cardsPlayedThisCombat) { - if (c.type == AbstractCard.CardType.ATTACK) { - attackCount++; - break; - } - if (c.type == AbstractCard.CardType.SKILL) - skillCount++; - } - - if (attackCount == 0) + if (c.type == AbstractCard.CardType.ATTACK) { + attackCount++; + break; + } + if (c.type == AbstractCard.CardType.SKILL) { + skillCount++; + } + } + + if (attackCount == 0) { Bingo(30); + } - if (skillCount == 0) + if (skillCount == 0) { Bingo(5); + } } } - @SpirePatch(clz = AbstractMonster.class, method="onBossVictoryLogic") + @SpirePatch(clz = AbstractMonster.class, method = "onBossVictoryLogic") public static class bingoBossVictory { + public static void Postfix(AbstractMonster __instance) { - if (TogetherManager.gameMode != TogetherManager.mode.Bingo) { return; } + if (TogetherManager.gameMode != TogetherManager.mode.Bingo) { + return; + } - if (GameActionManager.turn <= 1) + if (GameActionManager.turn <= 3) { Bingo(45); - if (GameActionManager.damageReceivedThisCombat - GameActionManager.hpLossThisCombat <= 0) + } + if (GameActionManager.damageReceivedThisCombat - GameActionManager.hpLossThisCombat <= 0) { Bingo(22); + } boolean noDamage = true; for (HashMap combat : CardCrawlGame.metricData.damage_taken) { - if (combat.get("damage") > 0 && combat.get("floor") > (AbstractDungeon.actNum -1) * 16 && AbstractDungeon.actNum != 4) + if (combat.get("damage") > 0 && combat.get("floor") > (AbstractDungeon.actNum - 1) * 16 && AbstractDungeon.actNum != 4) { noDamage = false; + } } - if (noDamage) + if (noDamage) { Bingo(73); + } for (AbstractCard c : AbstractDungeon.player.masterDeck.group) { - if (c.rarity != AbstractCard.CardRarity.BASIC) - if (c.color != AbstractCard.CardColor.COLORLESS && c.color != AbstractCard.CardColor.CURSE) + if (c.rarity != AbstractCard.CardRarity.BASIC) { + if (c.color != AbstractCard.CardColor.COLORLESS && c.color != AbstractCard.CardColor.CURSE) { return; + } + } } Bingo(70); } } - @SpirePatch(clz = PoisonLoseHpAction.class, method="update") + @SpirePatch(clz = PoisonLoseHpAction.class, method = "update") public static class bingoPoisonKill { + public static void Postfix(PoisonLoseHpAction __instance) { - if (TogetherManager.gameMode != TogetherManager.mode.Bingo) { return; } + if (TogetherManager.gameMode != TogetherManager.mode.Bingo) { + return; + } - if (AbstractPlayer.poisonKillCount == 3) + if (AbstractPlayer.poisonKillCount == 2) { Bingo(20); + } } } - @SpirePatch(clz = EnergyPanel.class, method="addEnergy") + @SpirePatch(clz = EnergyPanel.class, method = "addEnergy") public static class bingoEnergy { + public static void Postfix(int e) { - if (TogetherManager.gameMode != TogetherManager.mode.Bingo) { return; } + if (TogetherManager.gameMode != TogetherManager.mode.Bingo) { + return; + } - if (EnergyPanel.totalCount >= 9) + if (EnergyPanel.totalCount >= 9) { Bingo(38); + } } } - @SpirePatch(clz = AbstractCreature.class, method="addBlock") + @SpirePatch(clz = AbstractCreature.class, method = "addBlock") public static class bingoBlock { + public static void Postfix(AbstractCreature __instance, int blockAmount) { - if (TogetherManager.gameMode != TogetherManager.mode.Bingo) { return; } + if (TogetherManager.gameMode != TogetherManager.mode.Bingo) { + return; + } - if (__instance.currentBlock >= 99 && __instance.isPlayer) - Bingo(40); - if (__instance.currentBlock == 999) + if (__instance.currentBlock >= 99 && __instance.isPlayer) { + Bingo(40); + } + if (__instance.currentBlock == 999) { Bingo(63); + } } } - @SpirePatch(clz = PoisonPower.class, method="stackPower") + @SpirePatch(clz = PoisonPower.class, method = "stackPower") public static class bingoPoisonStack { + public static void Postfix(PoisonPower __instance, int stackAmount) { - if (TogetherManager.gameMode != TogetherManager.mode.Bingo) { return; } + if (TogetherManager.gameMode != TogetherManager.mode.Bingo) { + return; + } - if (__instance.amount >= 99) - Bingo(41); + if (__instance.amount >= 99) { + Bingo(41); + } } } - @SpirePatch(clz = StrengthPower.class, method="stackPower") + @SpirePatch(clz = StrengthPower.class, method = "stackPower") public static class bingoStrengthStack { + public static void Postfix(StrengthPower __instance, int stackAmount) { - if (TogetherManager.gameMode != TogetherManager.mode.Bingo) { return; } + if (TogetherManager.gameMode != TogetherManager.mode.Bingo) { + return; + } - if (__instance.amount >= 50) - Bingo(39); + if (__instance.amount >= 25) { + Bingo(39); + } } } - @SpirePatch(clz = AbstractDungeon.class, method="checkForPactAchievement") + @SpirePatch(clz = AbstractDungeon.class, method = "checkForPactAchievement") public static class bingoExhaust { + public static void Postfix(AbstractDungeon __instance) { - if (TogetherManager.gameMode != TogetherManager.mode.Bingo) { return; } + if (TogetherManager.gameMode != TogetherManager.mode.Bingo) { + return; + } - if (AbstractDungeon.player != null) - if (AbstractDungeon.player.exhaustPile.size() >= 20) - Bingo(62); + if (AbstractDungeon.player != null) { + if (AbstractDungeon.player.exhaustPile.size() >= 20) { + Bingo(62); + } + } } } - @SpirePatch(clz = CardGroup.class, method="update") + @SpirePatch(clz = CardGroup.class, method = "update") public static class bingoSmolHand { + public static void Postfix(CardGroup __instance) { - if (TogetherManager.gameMode != TogetherManager.mode.Bingo) { return; } + if (TogetherManager.gameMode != TogetherManager.mode.Bingo) { + return; + } - if (AbstractDungeon.player.hand.size() + AbstractDungeon.player.drawPile.size() + AbstractDungeon.player.discardPile.size() <= 3 && - (AbstractDungeon.getCurrRoom()).phase == AbstractRoom.RoomPhase.COMBAT && (AbstractDungeon.getCurrRoom()).monsters != null && - !(AbstractDungeon.getCurrRoom()).monsters.areMonstersBasicallyDead() && AbstractDungeon.floorNum > 3) - Bingo(61); + if (AbstractDungeon.player.hand.size() + AbstractDungeon.player.drawPile.size() + AbstractDungeon.player.discardPile.size() <= 3 + && (AbstractDungeon.getCurrRoom()).phase == AbstractRoom.RoomPhase.COMBAT && (AbstractDungeon.getCurrRoom()).monsters != null + && !(AbstractDungeon.getCurrRoom()).monsters.areMonstersBasicallyDead() && AbstractDungeon.floorNum > 3) { + Bingo(61); + } - if (AbstractDungeon.player.hand.size() == 10) + if (AbstractDungeon.player.hand.size() == 10) { Bingo(15); + } } } - @SpirePatch(clz = UpgradeShineEffect.class, method="clank") + @SpirePatch(clz = UpgradeShineEffect.class, method = "clank") public static class bingoUpgrade { + public static void Postfix(UpgradeShineEffect __instance, float x, float y) { - if (TogetherManager.gameMode != TogetherManager.mode.Bingo) { return; } + if (TogetherManager.gameMode != TogetherManager.mode.Bingo) { + return; + } - if (!AbstractDungeon.player.masterDeck.hasUpgradableCards()) - Bingo(43); + if (!AbstractDungeon.player.masterDeck.hasUpgradableCards()) { + Bingo(43); + } } } - @SpirePatch(clz = AbstractPlayer.class, method="bottledCardUpgradeCheck") + @SpirePatch(clz = AbstractPlayer.class, method = "bottledCardUpgradeCheck") public static class bingoUpgradeB { + public static void Postfix(AbstractPlayer __instance, AbstractCard c) { - if (TogetherManager.gameMode != TogetherManager.mode.Bingo) { return; } + if (TogetherManager.gameMode != TogetherManager.mode.Bingo) { + return; + } - if (!AbstractDungeon.player.masterDeck.hasUpgradableCards()) - Bingo(43); + if (!AbstractDungeon.player.masterDeck.hasUpgradableCards()) { + Bingo(43); + } } } - @SpirePatch(clz = RestOption.class, method="useOption") + @SpirePatch(clz = RestOption.class, method = "useOption") public static class bingoRest { + public static void Postfix(RestOption __instance) { - if (TogetherManager.gameMode != TogetherManager.mode.Bingo) { return; } + if (TogetherManager.gameMode != TogetherManager.mode.Bingo) { + return; + } - if (AbstractDungeon.player.currentHealth == AbstractDungeon.player.maxHealth) - Bingo(4); + if (AbstractDungeon.player.currentHealth == AbstractDungeon.player.maxHealth) { + Bingo(4); + } } } - @SpirePatch(clz = CardGroup.class, method="removeCard", paramtypez = {AbstractCard.class}) + @SpirePatch(clz = CardGroup.class, method = "removeCard", paramtypez = {AbstractCard.class}) public static class bingoRemoval { + public static void Postfix(CardGroup __instance, AbstractCard c) { - if (TogetherManager.gameMode != TogetherManager.mode.Bingo) { return; } + if (TogetherManager.gameMode != TogetherManager.mode.Bingo) { + return; + } - if (__instance.type != CardGroup.CardGroupType.MASTER_DECK) { return; } + if (__instance.type != CardGroup.CardGroupType.MASTER_DECK) { + return; + } - if (c.rarity == AbstractCard.CardRarity.RARE) - Bingo(11); + if (c.rarity == AbstractCard.CardRarity.UNCOMMON) { + Bingo(11); // remove an uncommon card + } - if (!AbstractDungeon.player.masterDeck.hasUpgradableCards()) - Bingo(43); + if (!AbstractDungeon.player.masterDeck.hasUpgradableCards()) { + Bingo(43); + } boolean nostrikes = true; boolean nodefends = true; boolean nostarter = true; for (AbstractCard card : AbstractDungeon.player.masterDeck.group) { - if (card.tags.contains(AbstractCard.CardTags.STARTER_STRIKE)) + if (card.tags.contains(AbstractCard.CardTags.STARTER_STRIKE)) { nostrikes = false; + } - if (card.tags.contains(AbstractCard.CardTags.STARTER_DEFEND)) + if (card.tags.contains(AbstractCard.CardTags.STARTER_DEFEND)) { nodefends = false; + } - if (card.rarity == AbstractCard.CardRarity.BASIC) + if (card.rarity == AbstractCard.CardRarity.BASIC) { nostarter = false; + } } - if (nostrikes) - Bingo(13); + if (nostrikes) { + Bingo(13); + } - if (nostrikes && nodefends) - Bingo(35); + if (nostrikes && nodefends) { + Bingo(35); + } - if (nostarter) - Bingo(57); + if (nostarter) { + Bingo(57); + } } } - @SpirePatch(clz = PandorasBox.class, method="onEquip") + @SpirePatch(clz = PandorasBox.class, method = "onEquip") public static class bingoPandorasBox { + public static void Postfix(PandorasBox __instance) { - if (TogetherManager.gameMode != TogetherManager.mode.Bingo) { return; } + if (TogetherManager.gameMode != TogetherManager.mode.Bingo) { + return; + } boolean nostrikes = true; boolean nodefends = true; boolean nostarter = true; for (AbstractCard card : AbstractDungeon.player.masterDeck.group) { - if (card.tags.contains(AbstractCard.CardTags.STARTER_STRIKE)) + if (card.tags.contains(AbstractCard.CardTags.STARTER_STRIKE)) { nostrikes = false; + } - if (card.tags.contains(AbstractCard.CardTags.STARTER_DEFEND)) + if (card.tags.contains(AbstractCard.CardTags.STARTER_DEFEND)) { nodefends = false; + } - if (card.rarity == AbstractCard.CardRarity.BASIC) + if (card.rarity == AbstractCard.CardRarity.BASIC) { nostarter = false; + } } - if (nostrikes) - Bingo(13); + if (nostrikes) { + Bingo(13); + } - if (nostrikes && nodefends) - Bingo(35); + if (nostrikes && nodefends) { + Bingo(35); + } - if (nostarter) - Bingo(57); + if (nostarter) { + Bingo(57); + } } } - @SpirePatch(clz = AbstractPlayer.class, method="gainGold") + @SpirePatch(clz = AbstractPlayer.class, method = "gainGold") public static class bingoGold { + public static void Postfix(AbstractPlayer __instance, int amount) { - if (TogetherManager.gameMode != TogetherManager.mode.Bingo) { return; } + if (TogetherManager.gameMode != TogetherManager.mode.Bingo) { + return; + } - if (AbstractDungeon.player.gold >= 300) - Bingo(14); + if (AbstractDungeon.player.gold >= 300) { + Bingo(14); + } - if (AbstractDungeon.player.gold >= 1200) - Bingo(36); + if (AbstractDungeon.player.gold >= 1200) { + Bingo(36); + } - if (AbstractDungeon.player.gold >= 1500) - Bingo(58); + if (AbstractDungeon.player.gold >= 1500) { + Bingo(58); + } } } - @SpirePatch(clz = AbstractRelic.class, method="obtain") + @SpirePatch(clz = AbstractRelic.class, method = "obtain") public static class bingoGetRelic { + public static void Postfix(AbstractRelic __instance) { - if (TogetherManager.gameMode != TogetherManager.mode.Bingo) { return; } + if (TogetherManager.gameMode != TogetherManager.mode.Bingo) { + return; + } - if (AbstractDungeon.player.relics.size() >= 25) - Bingo(24); + if (AbstractDungeon.player.relics.size() >= 25) { + Bingo(24); + } - if (__instance.relicId.equals("Spirit Poop")) - Bingo(69); + if (__instance.relicId.equals("Spirit Poop")) { + Bingo(69); + } } } - @SpirePatch(clz = ShopScreen.class, method="update") + @SpirePatch(clz = ShopScreen.class, method = "update") public static class bingoShop { + public static void Postfix(ShopScreen __instance) { - if (TogetherManager.gameMode != TogetherManager.mode.Bingo) { return; } + if (TogetherManager.gameMode != TogetherManager.mode.Bingo) { + return; + } - if (((ArrayList)ReflectionHacks.getPrivate(__instance, ShopScreen.class, "relics")).size() == 0) - if (!Caller.isMarked(34)) + if (((ArrayList) ReflectionHacks.getPrivate(__instance, ShopScreen.class, "relics")).size() == 0) { + if (!Caller.isMarked(34)) { Bingo(34); + } + } - if (((ArrayList)ReflectionHacks.getPrivate(__instance, ShopScreen.class, "potions")).size() == 0) - if (!Caller.isMarked(12)) - Bingo(12); + if (((ArrayList) ReflectionHacks.getPrivate(__instance, ShopScreen.class, "potions")).size() == 0) { + if (!Caller.isMarked(12)) { + Bingo(12); + } + } - if (__instance.coloredCards.size() == 0 && __instance.colorlessCards.size() == 0) - if (!Caller.isMarked(56)) - Bingo(56); + if (__instance.coloredCards.size() == 0 && __instance.colorlessCards.size() == 0) { + if (!Caller.isMarked(56)) { + Bingo(56); + } + } } } - @SpirePatch(clz = BossRelicSelectScreen.class, method="noPick") + @SpirePatch(clz = BossRelicSelectScreen.class, method = "noPick") public static class bingoBossRelicSkip { + public static void Postfix(BossRelicSelectScreen __instance) { - if (TogetherManager.gameMode != TogetherManager.mode.Bingo) { return; } + if (TogetherManager.gameMode != TogetherManager.mode.Bingo) { + return; + } - Bingo(32); + Bingo(32); } } - @SpirePatch(clz = MonsterRoomBoss.class, method="onPlayerEntry") + @SpirePatch(clz = MonsterRoomBoss.class, method = "onPlayerEntry") public static class bingoEnterBoss { - public static void Postfix(MonsterRoomBoss __instance) { - if (TogetherManager.gameMode != TogetherManager.mode.Bingo) { return; } + public static void Postfix(MonsterRoomBoss __instance) { + if (TogetherManager.gameMode != TogetherManager.mode.Bingo) { + return; + } boolean lefty = true; boolean righty = true; @@ -551,8 +680,9 @@ public static void Postfix(MonsterRoomBoss __instance) { boolean leftmost = true; int lastIndex = 6; for (int r = 0; r < row.size(); r++) { - if (row.get(r).hasEdges()) + if (row.get(r).hasEdges()) { lastIndex = r; + } } for (MapRoomNode node : row) { @@ -560,14 +690,18 @@ public static void Postfix(MonsterRoomBoss __instance) { if (node.hasEdges()) { if (node.taken) { - if (node.room.getMapSymbol().equals("E")) + if (node.room.getMapSymbol().equals("E")) { Elites++; - if (node.room.getMapSymbol().equals("?")) + } + if (node.room.getMapSymbol().equals("?")) { Events++; - if (!leftmost) + } + if (!leftmost) { lefty = false; - if (row.indexOf(node) != lastIndex) + } + if (row.indexOf(node) != lastIndex) { righty = false; + } } leftmost = false; @@ -575,23 +709,31 @@ public static void Postfix(MonsterRoomBoss __instance) { } } - if (lefty) + if (lefty) { Bingo(8); - if (righty) + } + if (righty) { Bingo(9); - if (Elites == 0) + } + if (Elites == 0) { Bingo(18); - if (Elites >= 5) + } + if (Elites >= 5) { Bingo(60); - if (Events == 0) + } + if (Events == 0) { Bingo(10); + } } } - @SpirePatch(clz = AbstractDungeon.class, method="nextRoomTransition", paramtypez = {SaveFile.class}) + @SpirePatch(clz = AbstractDungeon.class, method = "nextRoomTransition", paramtypez = {SaveFile.class}) public static class bingoLeaveRoom { + public static void Prefix(AbstractDungeon __instance, SaveFile saveFile) { - if (TogetherManager.gameMode != TogetherManager.mode.Bingo) { return; } + if (TogetherManager.gameMode != TogetherManager.mode.Bingo) { + return; + } if (AbstractDungeon.currMapNode.room instanceof MonsterRoomElite) { TogetherManager.log("Left an Elite Room"); @@ -607,99 +749,158 @@ public static void Prefix(AbstractDungeon __instance, SaveFile saveFile) { } } - @SpirePatch(clz = DungeonTransitionScreen.class, method="setAreaName") + @SpirePatch(clz = DungeonTransitionScreen.class, method = "setAreaName") public static class bingoNewAct { + public static void Prefix(DungeonTransitionScreen __instance, String key) { - if (TogetherManager.gameMode != TogetherManager.mode.Bingo || !CardCrawlGame.isInARun()) { return; } + if (TogetherManager.gameMode != TogetherManager.mode.Bingo || !CardCrawlGame.isInARun()) { + return; + } + + if (key.equals("TheBeyond")) { + Bingo(0); // reach Act 3 + + switch (AbstractDungeon.player.chosenClass) { + case IRONCLAD: + Bingo(25); + break; + case THE_SILENT: + Bingo(26); + break; + case DEFECT: + Bingo(27); + break; + case WATCHER: + Bingo(28); + break; + } - if (AbstractDungeon.player.masterDeck.pauperCheck() && key.equals("TheCity")) + // Reach Act 3 with a 10 card deck or smaller + if (AbstractDungeon.player.masterDeck.size() <= 10) { + Bingo(48); + } + // Reach Act 3 with a 25 card deck + if (AbstractDungeon.player.masterDeck.size() >= 25) { + Bingo(49); + } + } + + if (AbstractDungeon.player.masterDeck.pauperCheck() && key.equals("TheCity")) { Bingo(7); - if (AbstractDungeon.player.masterDeck.pauperCheck() && key.equals("TheBeyond")) + } + if (AbstractDungeon.player.masterDeck.pauperCheck() && key.equals("TheBeyond")) { Bingo(33); + } } } - @SpirePatch(clz = Soul.class, method="obtain") + @SpirePatch(clz = Soul.class, method = "obtain") public static class bingoGetCard { + public static void Postfix(Soul __instance, AbstractCard card) { - if (TogetherManager.gameMode != TogetherManager.mode.Bingo) { return; } + if (TogetherManager.gameMode != TogetherManager.mode.Bingo) { + return; + } - if (AbstractDungeon.player.masterDeck.fullSetCheck() >= 1) + if (AbstractDungeon.player.masterDeck.fullSetCheck() >= 1) { Bingo(23); + } // First cards you obtain are attacks, powers, skills CardGroup noBasics = new CardGroup(CardGroup.CardGroupType.UNSPECIFIED); for (AbstractCard cardB : AbstractDungeon.player.masterDeck.group) { - if (cardB.rarity != AbstractCard.CardRarity.BASIC) - noBasics.addToBottom(cardB); - } + if (cardB.rarity != AbstractCard.CardRarity.BASIC) { + noBasics.addToBottom(cardB); + } + } int attacks = noBasics.getAttacks().size(); int skills = noBasics.getSkills().size(); int powers = noBasics.getPowers().size(); - if (attacks >= 4 && skills == 0 && powers == 0) - Bingo(16); + if (attacks >= 4 && skills == 0 && powers == 0) { + Bingo(16); + } - if (attacks == 0 && skills >= 3 && powers == 0) - Bingo(37); + if (attacks == 0 && skills >= 3 && powers == 0) { + Bingo(37); + } - if (attacks == 0 && skills == 0 && powers >= 2) - Bingo(59); + if (attacks == 0 && skills == 0 && powers >= 2) { + Bingo(59); + } } } - @SpirePatch(clz = EventRoom.class, method="onPlayerEntry") + @SpirePatch(clz = EventRoom.class, method = "onPlayerEntry") public static class bingoEventEnter { + public static void Prefix(EventRoom __instance) { - if (TogetherManager.gameMode != TogetherManager.mode.Bingo) { return; } + if (TogetherManager.gameMode != TogetherManager.mode.Bingo) { + return; + } - if (AbstractDungeon.eventRng.counter > 14) + if (AbstractDungeon.eventRng.counter > 14) { Bingo(67); + } } } - @SpirePatch(clz = AbstractCreature.class, method="addPower") + @SpirePatch(clz = AbstractCreature.class, method = "addPower") public static class bingoAddPower { + public static void Postfix(AbstractCreature _instance, AbstractPower powerToApply) { - if (TogetherManager.gameMode != TogetherManager.mode.Bingo) { return; } + if (TogetherManager.gameMode != TogetherManager.mode.Bingo) { + return; + } if (_instance.isPlayer) { int buffCount = 0; for (AbstractPower p : _instance.powers) { - if (p.type == AbstractPower.PowerType.BUFF) - buffCount++; - } - if (buffCount >= 10) - Bingo(19); - } + if (p.type == AbstractPower.PowerType.BUFF) { + buffCount++; + } + } + if (buffCount >= 4) { + Bingo(19); + } + } } } - @SpirePatch(clz = ApplyPowerAction.class, method="update") + @SpirePatch(clz = ApplyPowerAction.class, method = "update") public static class bingoAddPowerTwo { + public static void Postfix(ApplyPowerAction _instance) { - if (TogetherManager.gameMode != TogetherManager.mode.Bingo) { return; } + if (TogetherManager.gameMode != TogetherManager.mode.Bingo) { + return; + } if (_instance.target != null && _instance.target.isPlayer && _instance.isDone) { int buffCount = 0; for (AbstractPower p : _instance.target.powers) { - if (p.type == AbstractPower.PowerType.BUFF) - buffCount++; - } - if (buffCount >= 10) - Bingo(19); - } + if (p.type == AbstractPower.PowerType.BUFF) { + buffCount++; + } + } + if (buffCount >= 10) { + Bingo(19); + } + } } } - @SpirePatch(clz = TopPanel.class, method="destroyPotion") + @SpirePatch(clz = TopPanel.class, method = "destroyPotion") public static class bingoPotions { + public static void Postfix(TopPanel __instance, int slot) { - if (TogetherManager.gameMode != TogetherManager.mode.Bingo) { return; } + if (TogetherManager.gameMode != TogetherManager.mode.Bingo) { + return; + } - if (Collections.frequency(CardCrawlGame.metricData.potions_floor_usage, Integer.valueOf(AbstractDungeon.floorNum)) >= AbstractDungeon.player.potionSlots) + if (Collections.frequency(CardCrawlGame.metricData.potions_floor_usage, Integer.valueOf(AbstractDungeon.floorNum)) >= AbstractDungeon.player.potionSlots) { Bingo(17); + } } } -} \ No newline at end of file +} diff --git a/src/main/java/chronoMods/ui/lobby/NewGameScreen.java b/src/main/java/chronoMods/ui/lobby/NewGameScreen.java index fcb6733..cbd78ed 100644 --- a/src/main/java/chronoMods/ui/lobby/NewGameScreen.java +++ b/src/main/java/chronoMods/ui/lobby/NewGameScreen.java @@ -491,12 +491,15 @@ public void embark() { if (TogetherManager.gameMode == TogetherManager.mode.Bingo) { switch (bingoDifficulty.getSelectedIndex()) { case 0: + // Quick: 4 easy, 1 medium, 0 hard TogetherManager.getCurrentUser().bingoCardIndices = Caller.makeBingoCard(4,1,0); break; case 1: + // Normal: 3 easy, 2 medium, 0 hard TogetherManager.getCurrentUser().bingoCardIndices = Caller.makeBingoCard(3,2,0); break; case 2: + // Hard: 1 easy, 3 medium, 1 hard TogetherManager.getCurrentUser().bingoCardIndices = Caller.makeBingoCard(1,3,1); break; case 3: diff --git a/src/main/resources/chrono/localization/eng/ui.json b/src/main/resources/chrono/localization/eng/ui.json index 2244302..51c74d0 100644 --- a/src/main/resources/chrono/localization/eng/ui.json +++ b/src/main/resources/chrono/localization/eng/ui.json @@ -3,7 +3,7 @@ "TEXT": [ "Versus", "Co-op", - "Bingo" + "Bingo" ] }, "PlayerWidgets": { @@ -12,7 +12,7 @@ "Disconnected" ] }, - "RichPresence": { + "RichPresence": { "TEXT": [ "Multiplayer Versus Lobby", "Multiplayer Co-op Lobby", @@ -21,7 +21,7 @@ "%s Co-op with %d on %dF", "%s with %s Versus on %dF", "Spire with Friends by Chronometrics", - "Playing Bingo" + "Playing Bingo" ] }, "Tips": { @@ -59,54 +59,54 @@ }, "NeowRewards": { "TEXT": [ - "[ #gRemove #gAscender's #gBane ]", - "[ #gRemove #g2 #gCards ]", - "[ #gUpgrade #g3 #grandom #gCards ]", - "[ #gObtain #g3 #gUncommon #gor #gbetter #gPotions #gand #ga #gPotion #gSlot ]", - "[ #gUpgrade #gyour #gstarting #gRelic ]", - "[ #gObtain #ga #grandom #gshop #gRelic ]", - "[ #gObtain #ga #grandom #gRelic #gspecific #gto #gyour #gcharacter ]", - "[ #gObtain #g2 #grandom #gupgraded #gCards ]", - "[ #rLose #ra #rPotion #rSlot ]", - "[ #rRemove #ra #rbasic #rclass #rcard. ]", - "[ #rGain #ra #rStrike. ]", + "[ #gRemove #gAscender's #gBane ]", + "[ #gRemove #g2 #gCards ]", + "[ #gUpgrade #g3 #grandom #gCards ]", + "[ #gObtain #g3 #gUncommon #gor #gbetter #gPotions #gand #ga #gPotion #gSlot ]", + "[ #gUpgrade #gyour #gstarting #gRelic ]", + "[ #gObtain #ga #grandom #gshop #gRelic ]", + "[ #gObtain #ga #grandom #gRelic #gspecific #gto #gyour #gcharacter ]", + "[ #gObtain #g2 #grandom #gupgraded #gCards ]", + "[ #rLose #ra #rPotion #rSlot ]", + "[ #rRemove #ra #rbasic #rclass #rcard. ]", + "[ #rGain #ra #rStrike. ]", "[ #rGain #ra #rDefend. ]", - "[ #rMax #rHand #rSize #rdecreased #rto #r8. ]", - "[ #rNo #rAct #r1 #rTreasure #rChest. ]", + "[ #rMax #rHand #rSize #rdecreased #rto #r8. ]", + "[ #rNo #rAct #r1 #rTreasure #rChest. ]", "[ #rNo #rAct #r1 #rPre-Boss #rRest #rSite. ]", - "[ #rAct #rone #revents #rbecome #rmonsters. ]", - "[ #rObtain #r2 #rDazeds. ]", - "[ #rObtain #r2 #rSlimeds. ]", - "[ #rObtain #r3 #rShivs. ]", - "[ #rTransform #rAscender's #rBane. ]", - "[ #rNo #rPenalty. ]", + "[ #rAct #rone #revents #rbecome #rmonsters. ]", + "[ #rObtain #r2 #rDazeds. ]", + "[ #rObtain #r2 #rSlimeds. ]", + "[ #rObtain #r3 #rShivs. ]", + "[ #rTransform #rAscender's #rBane. ]", + "[ #rNo #rPenalty. ]", "[ #gFirst #gFloor #gbecomes #ga #gTreasure #gRoom. ]", - "Take Potions", - "[ #gReplace #ga #gStrike #gand #gDefend #gwith #gclass #gbasics. ]", - "[ #gDraft #gtwo #gcards. ]", - "[ #gSwap #gyour #gstarting #gRelic #gwith #gRitual #gDagger. ]", - "[ #rObtain #rGremlin #rVisage. ]", + "Take Potions", + "[ #gReplace #ga #gStrike #gand #gDefend #gwith #gclass #gbasics. ]", + "[ #gDraft #gtwo #gcards. ]", + "[ #gSwap #gyour #gstarting #gRelic #gwith #gRitual #gDagger. ]", + "[ #rObtain #rGremlin #rVisage. ]", "[ #rGain #rAscender's #rBane. ]", - "[ #yDraft #ytwo #ycards #yfrom #ythe #ylinked #yplayer. ]", - "[ #yDraft #ya #yrare #ycard #yfrom #ythe #ylinked #yplayer. ]", - "[ #yYou #ywill #ysee #yboth #ylinked #ycharacter's #ycards. ]", - "[ #yInfuse #yeach #yother's #yStarter #ycards. ]", + "[ #yDraft #ytwo #ycards #yfrom #ythe #ylinked #yplayer. ]", + "[ #yDraft #ya #yrare #ycard #yfrom #ythe #ylinked #yplayer. ]", + "[ #yYou #ywill #ysee #yboth #ylinked #ycharacter's #ycards. ]", + "[ #yInfuse #yeach #yother's #yStarter #ycards. ]", "[ #yInfuse #yeach #yother's #yfirst #yfour #ycard #ydrafts. ]", - "[ #yMerge #ytwo #ycommon #ycard #yfrom #yeach #yplayer. ]", - "[ #yDraft #yand #ymerge #yan #yuncommon #ycard #yfrom #yeach #yplayer. ]", - "[ #gColorless #gcards #gappear #gin #grewards #gand #gshops. ]", - "[ #rCurses #rappear #rin #rrewards #rand #rshops. ]", - "[ #yLink #yyour #ycharacter #yStarter #yrelic #yeffects. ]", - "[ Unused ]", - "Draft Cards", + "[ #yMerge #ytwo #ycommon #ycard #yfrom #yeach #yplayer. ]", + "[ #yDraft #yand #ymerge #yan #yuncommon #ycard #yfrom #yeach #yplayer. ]", + "[ #gColorless #gcards #gappear #gin #grewards #gand #gshops. ]", + "[ #rCurses #rappear #rin #rrewards #rand #rshops. ]", + "[ #yLink #yyour #ycharacter #yStarter #yrelic #yeffects. ]", + "[ Unused ]", + "Draft Cards", "[ #gChoose #gtwo #gCards #gfrom", // New Text "[ #gChoose #ga #grare #gCard #gfrom", // New Text "[ #gChoose #gtwo #gInfusions #gfrom", // New Text - "[ #gInfuse #gthe #gfirst #gfour #gCard #gdrafts #gwith",// New Text - "[ #gObtain #gtwo #gcommon #gmerge #gCards #gfrom",// New Text - "[ #gChoose #gan #guncommon #gmerge #gCard #gfrom",// New Text - "[ #gChoose #ga #gcolorless #gCard #gto #gmerge #gwith #ga #gstarter. ]",// New Text - "[ #gObtain #ga #grare #gcolorless #gCard #gto #gmerge #gwith #ga #gstarter. ]"// New Text + "[ #gInfuse #gthe #gfirst #gfour #gCard #gdrafts #gwith", // New Text + "[ #gObtain #gtwo #gcommon #gmerge #gCards #gfrom", // New Text + "[ #gChoose #gan #guncommon #gmerge #gCard #gfrom", // New Text + "[ #gChoose #ga #gcolorless #gCard #gto #gmerge #gwith #ga #gstarter. ]", // New Text + "[ #gObtain #ga #grare #gcolorless #gCard #gto #gmerge #gwith #ga #gstarter. ]" // New Text ] }, "Lobby": { @@ -114,13 +114,13 @@ "Join", "Character", "The chosen character for the run. NL NL In Versus, everyone plays the same character. In Co-op, each player can choose their own character.", - "Ascension Level", + "Ascension Level", "The Ascension Level that everyone will be playing at.", "Heart Run", "If enabled, this run will finish with an Act 4 Heart kill. Disabling this finishes the run after Act 3.", - "Neow Bonus", + "Neow Bonus", "The run begins with a 4 option choice from Neow. Disabling it skips the choice.", - "Ironman", + "Ironman", "No retries are allowed this run. When disabled, dying will reset players to the start without reseting their clock.", "Rules", "Players", @@ -137,14 +137,14 @@ "Custom", "Custom Mode", "Set Custom Modifiers for use during the run.", - "Teams", - "Bingo can be played with arbitrary sized teams of players. NL NL Click the colour next to your name to change teams.", - "Unique Boards", + "Teams", + "Bingo can be played with arbitrary sized teams of players. NL NL Click the colour next to your name to change teams.", + "Unique Boards", "When checked, each team or player will have a unique board", - "Difficulty", - "Each column will have a distribution of easy, medium, and hard goals. Each difficulty increase makes the goals harder, teams are recommended for higher difficulties.", - "Enter Team Name", - "Hard Mode", + "Difficulty", + "Each column will have a distribution of easy, medium, and hard goals. Each difficulty increase makes the goals harder, teams are recommended for higher difficulties.", + "Enter Team Name", + "Hard Mode", "Hard Mode increases difficulty of Co-op. Dying will now generate curses. Enemies can have burning bonuses. The first player to fight the Act Boss will face a extra difficult burning version. Watcher's starter deck now has Just Lucky instead of Eruption.", "Blackout", "When checked, all squares of the board must be fulfilled in order to win" @@ -159,7 +159,7 @@ "Empty Rooms", "It seems as if you are not the first one to pass this way." ] - }, + }, "Splits": { "TEXT": [ "Splits", @@ -193,16 +193,16 @@ " Gold", "2x ", "Upgrade Starter Relic NL ", - "New Run", - "Bingo continues until someone wins!\nChoose a character and start a new run.", - "Choose a character and start a new run.", - "Bingo!", - "Leave Game", - "Next Run", - "Disconnect", - "Change Character", - "The game isn't over until someone gets a Bingo! \r You can start a new run with a new character at any time.", - "Disconnect and leave the game. You will not be able to resume this game." + "New Run", + "Bingo continues until someone wins!\nChoose a character and start a new run.", + "Choose a character and start a new run.", + "Bingo!", + "Leave Game", + "Next Run", + "Disconnect", + "Change Character", + "The game isn't over until someone gets a Bingo! \r You can start a new run with a new character at any time.", + "Disconnect and leave the game. You will not be able to resume this game." ] }, "TeamRelic": { @@ -223,20 +223,20 @@ "Did you forget a birthday? Send a gift anyways.", "N'loth gives gifts and so can you.", "If you can't pay, get them to send @you@ something.", - "Who's it going to?", - "What's the destination.", - "Can't expect to pay before I know where it goes.", - "Choose a friend, friend.", - "Is this for me or someone else.", - "Pick a name.", - "I'll have it delivered right away.", - "I'll be sure not to damage it.", - "Overnight delivery guaranteed.", - "Neither Blizzard nor Zap will stop this delivery.", - "This is the only way to sneak goods past the Sentries.", - "Collect your packages", - "Reroll", - "Rerolls the inventory, refreshing all the available items in the Courier." + "Who's it going to?", + "What's the destination.", + "Can't expect to pay before I know where it goes.", + "Choose a friend, friend.", + "Is this for me or someone else.", + "Pick a name.", + "I'll have it delivered right away.", + "I'll be sure not to damage it.", + "Overnight delivery guaranteed.", + "Neither Blizzard nor Zap will stop this delivery.", + "This is the only way to sneak goods past the Sentries.", + "Collect your packages", + "Reroll", + "Rerolls the inventory, refreshing all the available items in the Courier." ] }, "Death": { @@ -269,7 +269,7 @@ "Network": { "TEXT": [ "Disconnected", - "You were booted from the lobby by the host (and took 5 damage).", + "You were booted from the lobby by the host (and took 5 damage).", "Your connection to the Steam Server was lost, multiplayer will be unavailable.", "All Alone", "You are the last player remaining in the game.", @@ -290,7 +290,7 @@ " relics to reroll and send away." ] }, - "ConfigScreen": { + "ConfigScreen": { "TEXT": [ "Bingo", "Choose an image to display as your bingo stamp.", @@ -298,7 +298,7 @@ "Choose Image" ] }, - "Chat": { + "Chat": { "TEXT": [ "Available Colours", "Add a hashtag and a letter before a word to colour it. NL NL -#y #yYellow NL -#r #rRed NL -#p #pPurple NL -#g #gGreen NL -#b #bBlue", @@ -309,7 +309,7 @@ "( Press Tab to chat )" ] }, - "BingoDifficulty": { + "BingoDifficulty": { "TEXT": [ "Quick (1 player per team)", "Easy (1-2 players per team)", @@ -318,91 +318,91 @@ "Long (4+ players per team)" ] }, - "EasyBingo": { - "TEXT": [ - "Beat Act 3", - "Get the Red Key", - "Get the Blue Key", - "Get the Green Key", - "Rest at a Campfire while at Full Health", - "Win a Combat without playing Skills", - "Skip a relic from an Elite", - "Take no Rares until Act 2", - "Stay Left for an Act", - "Stay Right for an Act", - "Take no Events in an Act", - "Remove a Rare Card", - "Buy all three potions in a Shop", - "Remove all your Strikes", - "Have over 300 gold", - "Have a full hand", - "First four cards you obtain are Attacks", - "Use all your potion slots in the same turn", - "Fight no Elites in an Act", - "Have 10 or more buffs during combat.", // Powerful - "Defeat 3 enemies with Poison in a single combat.", // Plague - "Play 12 Cards in one turn", - "Defeat a boss without taking any damage.", // Perfect - "Have four of the same card.", - "Have 25 or more Relics" + "EasyBingo": { + "TEXT": [ + "Reach Act 3", // 0 + "Get the Red Key", // 1 + "Get the Blue Key", // 2 + "Get the Green Key", // 3 + "Rest at a Campfire while at Full Health", // 4 + "Win a Combat without playing Skills", // 5 + "Skip a relic from an Elite", // 6 + "Take no Rares until Act 2", // 7 + "Stay Left for an Act", // 8 + "Stay Right for an Act", // 9 + "Take no Events in an Act", // 10 + "Remove an Uncommon Card", // 11 + "Buy all three potions in a Shop", // 12 + "Remove all your Strikes", // 13 + "Have over 300 gold", // 14 + "Have a full hand", // 15 + "First four cards you obtain are Attacks", // 16 + "Use all your potion slots in the same turn", // 17 + "Fight no Elites in an Act", // 18 + "Have 4 or more buffs during combat.", // Powerful // 19 + "Defeat 3 enemies with Poison in a single combat.", // Plague // 20 + "Play 12 Cards in one turn", // 21 + "Defeat a boss without taking any damage.", // Perfect // 22 + "Have four of the same card.", // 23 + "Have 25 or more Relics" // 24 ] }, "MedBingo": { "TEXT": [ - "Beat Act 3 as Ironclad", - "Beat Act 3 as Silent", - "Beat Act 3 as Defect", - "Beat Act 3 as Watcher", - "Beat the Heart", - "Win a Combat without playing Attacks", // Come At Me - "Win a Combat with 1 Health left", // Shrug It Off - "Skip a Boss Relic", - "Take no Rares until Act 3", - "Buy all three Relics in a Shop", - "Remove all Strikes and Defends", - "Have over 1200 gold", - "First three cards you obtain are Skills", - "Have 9 Energy during a single turn of combat.", // Adrenaline - "Have 50 or more Strength during combat.", // Jaxxed - "Have 99 or more Block during combat.", // Impervious - "Apply 99 or more Poison on a single enemy.", // Catalyst - "Play 10 Shivs in a single turn.", // Ninja - "Have your entire deck upgraded", - "Play 25 cards in a single turn.", // Infinity - "Defeat a boss on turn 1.", // You are Nothing - "Have 25 or more Focus during combat.", // Focused - "Kill Transient", // The Transient - "Beat the game with a 5 card deck or smaller.", // Minimalist - "Win with a 35 card deck or bigger" + "Reach Act 3 as Ironclad", // 0 + "Reach Act 3 as Silent", // 1 + "Reach Act 3 as Defect", // 2 + "Reach Act 3 as Watcher", // 3 + "Beat the Heart", // 4 + "Win a Combat without playing Attacks", // Come At Me // 5 + "Win a Combat with 1 Health left", // Shrug It Off // 6 + "Skip a Boss Relic", // 7 + "Take no Rares until Act 3", // 8 + "Buy all three Relics in a Shop", // 9 + "Remove all Strikes and Defends", // 10 + "Have over 1200 gold", // 11 + "First three cards you obtain are Skills", // 12 + "Have 9 Energy during a single turn of combat.", // Adrenaline // 13 + "Have 25 or more Strength during combat.", // Jaxxed // 14 + "Have 99 or more Block during combat.", // Impervious // 15 + "Apply 99 or more Poison on a single enemy.", // Catalyst // 16 + "Play 10 Shivs in a single turn.", // Ninja // 17 + "Have your entire deck upgraded", // 18 + "Play 25 cards in a single turn.", // Infinity // 19 + "Defeat a boss in 3 turns or less.", // You are Nothing // 20 + "Have 11 or more Focus during combat.", // Focused // 21 + "Kill Chosen", // Kill Chosen // 22 + "Reach act 3 with a 10 card deck or smaller.", // Minimalist // 23 + "Reach act 3 with a 30 card deck or bigger" // 24 ] }, "HardBingo": { "TEXT": [ - "Beat the Heart as Ironclad", - "Beat the Heart as Silent", - "Beat the Heart as Defect", - "Beat the Heart as Watcher", - "Beat the Heart with no Rares", - "Win without Resting", - "Buy all seven Cards in a Shop", - "Remove all Starter Cards", - "Have over 1500 gold", - "First two cards you obtain are Powers", - "Fight five Elites in an Act", - "Have 3 or fewer cards in hand, draw, and discard pile combined", // Purity - "Exhaust 20 cards in a single combat.", // The Pact - "Have 999 Block.", // Barricaded - "Beat the game with a single relic.", // Who Needs Relics? - "Beat the game in under 30 minutes.", // Speed Climber - "Win with a 50 card deck or bigger", - "Travel to 15 Event rooms", - "Win with 5 Curses", - "Own Spirit Poop", - "Have only Colorless or Starter Cards after any Boss", - "Win without ever Upgrading at a Fire", - "Win but fight no Elites", - "Beat Act 1, 2 or 3 without taking damage", - "Perfect Clear the Heart" + "Beat the Heart as Ironclad", // 0 + "Beat the Heart as Silent", // 1 + "Beat the Heart as Defect", // 2 + "Beat the Heart as Watcher", // 3 + "Beat the Heart with no Rares", // 4 + "Win without Resting", // 5 + "Buy all seven Cards in a Shop", // 6 + "Remove all Starter Cards", // 7 + "Have over 1500 gold", // 8 + "First two cards you obtain are Powers", // 9 + "Fight five Elites in an Act", // 10 + "Have 3 or fewer cards in hand, draw, and discard pile combined", // Purity // 11 + "Exhaust 20 cards in a single combat.", // The Pact // 12 + "Have 999 Block.", // Barricaded // 13 + "Beat the game with a single relic.", // Who Needs Relics? // 14 + "Beat the game in under 30 minutes.", // Speed Climber // 15 + "Win with a 50 card deck or bigger", // 16 + "Travel to 15 Event rooms", // 17 + "Win with 5 Curses", // 18 + "Own Spirit Poop", // 19 + "Have only Colorless or Starter Cards after any Boss", // 20 + "Win without ever Upgrading at a Fire", // 21 + "Win but fight no Elites", // 22 + "Beat Act 1, 2 or 3 without taking damage", // 23 + "Perfect Clear the Heart" // 24 ] }, "HardModeSafetyPanel": { @@ -414,72 +414,46 @@ "Hearth": { "TEXT": [ "Choose the horror of your Heart", - "Normal Heart", "", - // Boss Infusions "Slime Boss", "All Heart statuses are Slimed. Adds 5 more slimed when the Heart buffs.", - "Guardian", "The Heart comes with 3 Thorns.", - "Hexaghost", "All Heart statuses are Burns. Burns are upgraded when the Heart buffs.", - - "Champ", "The Heart starts gains 10 Block every turn, which increases by 10 each time the Heart buffs.", - "Collector", "The Heart has two Torch Heads. When the Heart buffs, add 7 Strength and revive any dead Torch Heads.", - "Bronze Automaton", "Has two Bronze Orbs. Steals your rarest card when it Smites.", - - "Time Eater", "Everytime you play 12 cards versus the Heart, end your turn and it gains 1 strength.", - "Awakened One", "Whenever you play a Power card versus the Heart, it gains 1 strength.", - "Donu Deca", "Whenever the Heart uses Smite, add 5 more statuses to the Draw Pile.", - - // Elite Infusions "Gremlin Nob", "Has Angry 1 on it's first turn and buff turns", - "Sentries", "Puts Dazes into your deck every non-attack turn.", - "Lagavulin", "Debuffs your Strength and Dexterity on non-attack turns", - - "Slavers", "Heart does Weak, adds Wounds, or casts entangle on it's turns.", - "Book of Stabbing", "Big attack is now a multi attack. Starts with the woundy status", - "Gremlin Leader", "Summons gremlin gang below itself, refreshes it every buff turn", - - "Giant Head", "Double health, but has slow", - "Nemesis", "Intangible during non-attack turns", - "Reptomancer", "Summons Daggers every turn", - - "Spire Elites", "Status go onto the top of your deck" ] @@ -693,4 +667,4 @@ "Draw 1 card." ] } -} +} \ No newline at end of file From 41456be86471a9c4cafd0e4a261620eb2e4da504 Mon Sep 17 00:00:00 2001 From: Andrew Roberts Date: Mon, 4 Nov 2024 22:09:02 -0500 Subject: [PATCH 2/2] update spire with friends bingo to be more balanced --- .m2/settings.xml | 20 ++++ DEV.md | 19 ++++ DEVjavaconfig.json | 9 ++ pom.xml | 7 ++ settings.xml | 20 ++++ .../chronoMods/bingo/SendBingoPatches.java | 23 +++- .../chronoMods/ui/lobby/NewGameScreen.java | 53 +++++---- .../resources/chrono/localization/eng/ui.json | 106 +++++++++--------- 8 files changed, 177 insertions(+), 80 deletions(-) create mode 100644 .m2/settings.xml create mode 100644 DEV.md create mode 100644 DEVjavaconfig.json create mode 100644 settings.xml diff --git a/.m2/settings.xml b/.m2/settings.xml new file mode 100644 index 0000000..dd6fb28 --- /dev/null +++ b/.m2/settings.xml @@ -0,0 +1,20 @@ + + + + inject-sts-paths + + /Users/priyaghose/Library/Application Support/Steam/steamapps/common/SlayTheSpire/SlayTheSpire.app/Contents/Resources + /Users/priyaghose/Library/Application Support/Steam/steamapps/workshop/content/646570/1605060445/ModTheSpire.jar + /Users/priyaghose/Library/Application Support/Steam/steamapps/workshop/content/646570/1605833019/BaseMod.jar + /Users/priyaghose/Library/Application Support/Steam/steamapps/workshop/content/646570/1610056683/Downfall.jar + /Users/priyaghose/Library/Application Support/Steam/steamapps/workshop/content/646570/2855937000/AscensionPlus.jar + + /Users/priyaghose/coding/Spire-with-Friends/output/ + + + + + + inject-sts-paths + + \ No newline at end of file diff --git a/DEV.md b/DEV.md new file mode 100644 index 0000000..991d288 --- /dev/null +++ b/DEV.md @@ -0,0 +1,19 @@ + +# Mod the Spire Loacation +~/Library/Application Support/Steam/steamapps/workshop/content/646570/1605060445/ModTheSpire.jar + + +# BaseMod Location +~/Library/Application Support/Steam/steamapps/workshop/content/646570/1605833019/BaseMod.jar + +# Downfall Location +~/Library/Application Support/Steam/steamapps/workshop/content/646570/1610056683/Downfall.jar + +# SpireWithFriends Location +~/Library/Application Support/Steam/steamapps/workshop/content/646570/2395241968/Spire with Friends.jar + +# StSLib location +~/Library/Application Support/Steam/steamapps/workshop/content/646570/160915850/StSLib.jar + +# desktop-1.0.jar location +~/Library/Application Support/Steam/steamapps/common/SlayTheSpire/SlayTheSpire.app/Contents/Resource/desktop-1.0.jar \ No newline at end of file diff --git a/DEVjavaconfig.json b/DEVjavaconfig.json new file mode 100644 index 0000000..55db37e --- /dev/null +++ b/DEVjavaconfig.json @@ -0,0 +1,9 @@ +{ + "java.configuration.runtimeArgs": [ + "-Dinstall-root=~/Library/Application Support/Steam/steamapps/common/SlayTheSpire/SlayTheSpire.app/Contents/Resource", + "-Dmts-jar-path=~/Library/Application Support/Steam/steamapps/workshop/content/646570/1605060445/ModTheSpire.jar", + "-Dbasemod-jar-path=~/Library/Application Support/Steam/steamapps/workshop/content/646570/1605833019/BaseMod.jar", + "-Ddownfall-jar-path=~/Library/Application Support/Steam/steamapps/workshop/content/646570/1610056683/Downfall.jar", + "-Dswf-output-path=~/Library/Application Support/Steam/steamapps/workshop/content/646570/2395241968/Spire with Friends.jar" + ] +} \ No newline at end of file diff --git a/pom.xml b/pom.xml index 66ea104..c0d251a 100755 --- a/pom.xml +++ b/pom.xml @@ -16,6 +16,13 @@ 3.1.11 1.2 v0.5.5 + /Users/priyaghose/Library/Application Support/Steam/steamapps/common/SlayTheSpire/SlayTheSpire.app/Contents/Resources + /Users/priyaghose/Library/Application Support/Steam/steamapps/workshop/content/646570/1605060445/ModTheSpire.jar + /Users/priyaghose/Library/Application Support/Steam/steamapps/workshop/content/646570/1605833019/BaseMod.jar + /Users/priyaghose/Library/Application Support/Steam/steamapps/workshop/content/646570/1610056683/Downfall.jar + /Users/priyaghose/Library/Application Support/Steam/steamapps/workshop/content/646570/2855937000/AscensionPlus.jar + + /Users/priyaghose/coding/Spire-with-Friends/output/ diff --git a/settings.xml b/settings.xml new file mode 100644 index 0000000..dd6fb28 --- /dev/null +++ b/settings.xml @@ -0,0 +1,20 @@ + + + + inject-sts-paths + + /Users/priyaghose/Library/Application Support/Steam/steamapps/common/SlayTheSpire/SlayTheSpire.app/Contents/Resources + /Users/priyaghose/Library/Application Support/Steam/steamapps/workshop/content/646570/1605060445/ModTheSpire.jar + /Users/priyaghose/Library/Application Support/Steam/steamapps/workshop/content/646570/1605833019/BaseMod.jar + /Users/priyaghose/Library/Application Support/Steam/steamapps/workshop/content/646570/1610056683/Downfall.jar + /Users/priyaghose/Library/Application Support/Steam/steamapps/workshop/content/646570/2855937000/AscensionPlus.jar + + /Users/priyaghose/coding/Spire-with-Friends/output/ + + + + + + inject-sts-paths + + \ No newline at end of file diff --git a/src/main/java/chronoMods/bingo/SendBingoPatches.java b/src/main/java/chronoMods/bingo/SendBingoPatches.java index cbe6e34..4256233 100644 --- a/src/main/java/chronoMods/bingo/SendBingoPatches.java +++ b/src/main/java/chronoMods/bingo/SendBingoPatches.java @@ -21,6 +21,7 @@ import com.megacrit.cardcrawl.map.MapRoomNode; import com.megacrit.cardcrawl.monsters.AbstractMonster; import com.megacrit.cardcrawl.monsters.city.Chosen; +import com.megacrit.cardcrawl.monsters.city.ShelledParasite; import com.megacrit.cardcrawl.powers.AbstractPower; import com.megacrit.cardcrawl.powers.FocusPower; import com.megacrit.cardcrawl.powers.PoisonPower; @@ -226,6 +227,18 @@ public static void Postfix(Chosen __instance) { } } + @SpirePatch(clz = ShelledParasite.class, method = "usePreBattleAction") + public static class bingoShelledParasite { + + public static void Postfix(ShelledParasite __instance) { + if (TogetherManager.gameMode != TogetherManager.mode.Bingo) { + return; + } + + Bingo(29); + } + } + @SpirePatch(clz = FocusPower.class, method = "stackPower") public static class bingoFocus { @@ -502,7 +515,7 @@ public static void Postfix(CardGroup __instance, AbstractCard c) { return; } - if (c.rarity == AbstractCard.CardRarity.UNCOMMON) { + if (c.rarity == AbstractCard.CardRarity.RARE) { Bingo(11); // remove an uncommon card } @@ -612,7 +625,7 @@ public static void Postfix(AbstractRelic __instance) { return; } - if (AbstractDungeon.player.relics.size() >= 25) { + if (AbstractDungeon.player.relics.size() >= 15) { Bingo(24); } @@ -779,8 +792,8 @@ public static void Prefix(DungeonTransitionScreen __instance, String key) { if (AbstractDungeon.player.masterDeck.size() <= 10) { Bingo(48); } - // Reach Act 3 with a 25 card deck - if (AbstractDungeon.player.masterDeck.size() >= 25) { + // Reach Act 3 with a 30 card deck + if (AbstractDungeon.player.masterDeck.size() >= 30) { Bingo(49); } } @@ -883,7 +896,7 @@ public static void Postfix(ApplyPowerAction _instance) { buffCount++; } } - if (buffCount >= 10) { + if (buffCount >= 4) { Bingo(19); } } diff --git a/src/main/java/chronoMods/ui/lobby/NewGameScreen.java b/src/main/java/chronoMods/ui/lobby/NewGameScreen.java index cbd78ed..7dd8c3d 100644 --- a/src/main/java/chronoMods/ui/lobby/NewGameScreen.java +++ b/src/main/java/chronoMods/ui/lobby/NewGameScreen.java @@ -1,16 +1,11 @@ package chronoMods.ui.lobby; -import ascensionplus.AscensionPlusMain; -import chronoMods.TogetherManager; -import chronoMods.bingo.Caller; -import chronoMods.coop.drawable.Button; -import chronoMods.network.NetworkHelper; -import chronoMods.network.RemotePlayer; -import chronoMods.ui.deathScreen.NewDeathScreenPatches; -import chronoMods.ui.hud.BingoPlayerWidget; -import chronoMods.ui.hud.RemotePlayerWidget; -import chronoMods.ui.hud.TopPanelPlayerPanels; -import chronoMods.ui.mainMenu.NewMenuButtons; +import java.util.ArrayList; +import java.util.HashMap; +import java.util.Map; +import java.util.function.Function; +import java.util.stream.Collectors; + import com.badlogic.gdx.graphics.Color; import com.badlogic.gdx.graphics.g2d.SpriteBatch; import com.evacipated.cardcrawl.modthespire.Loader; @@ -22,7 +17,13 @@ import com.megacrit.cardcrawl.core.Settings; import com.megacrit.cardcrawl.daily.mods.AbstractDailyMod; import com.megacrit.cardcrawl.dungeons.AbstractDungeon; -import com.megacrit.cardcrawl.helpers.*; +import com.megacrit.cardcrawl.helpers.FontHelper; +import com.megacrit.cardcrawl.helpers.Hitbox; +import com.megacrit.cardcrawl.helpers.ImageMaster; +import com.megacrit.cardcrawl.helpers.ModHelper; +import com.megacrit.cardcrawl.helpers.SeedHelper; +import com.megacrit.cardcrawl.helpers.ShaderHelper; +import com.megacrit.cardcrawl.helpers.TipHelper; import com.megacrit.cardcrawl.helpers.controller.CInputActionSet; import com.megacrit.cardcrawl.helpers.input.InputHelper; import com.megacrit.cardcrawl.localization.UIStrings; @@ -36,13 +37,19 @@ import com.megacrit.cardcrawl.screens.options.DropdownMenu; import com.megacrit.cardcrawl.screens.options.DropdownMenuListener; import com.megacrit.cardcrawl.ui.buttons.GridSelectConfirmButton; -import downfall.patches.EvilModeCharacterSelect; -import java.util.ArrayList; -import java.util.HashMap; -import java.util.Map; -import java.util.function.Function; -import java.util.stream.Collectors; +import ascensionplus.AscensionPlusMain; +import chronoMods.TogetherManager; +import chronoMods.bingo.Caller; +import chronoMods.coop.drawable.Button; +import chronoMods.network.NetworkHelper; +import chronoMods.network.RemotePlayer; +import chronoMods.ui.deathScreen.NewDeathScreenPatches; +import chronoMods.ui.hud.BingoPlayerWidget; +import chronoMods.ui.hud.RemotePlayerWidget; +import chronoMods.ui.hud.TopPanelPlayerPanels; +import chronoMods.ui.mainMenu.NewMenuButtons; +import downfall.patches.EvilModeCharacterSelect; public class NewGameScreen implements DropdownMenuListener @@ -499,14 +506,16 @@ public void embark() { TogetherManager.getCurrentUser().bingoCardIndices = Caller.makeBingoCard(3,2,0); break; case 2: - // Hard: 1 easy, 3 medium, 1 hard - TogetherManager.getCurrentUser().bingoCardIndices = Caller.makeBingoCard(1,3,1); + // Hard: 2 easy, 3 medium, 0 hard + TogetherManager.getCurrentUser().bingoCardIndices = Caller.makeBingoCard(2,3,0); break; case 3: - TogetherManager.getCurrentUser().bingoCardIndices = Caller.makeBingoCard(0,3,2); + // Very Hard: 1 easy, 3 medium, 1 hard + TogetherManager.getCurrentUser().bingoCardIndices = Caller.makeBingoCard(1,3,1); break; case 4: - TogetherManager.getCurrentUser().bingoCardIndices = Caller.makeBingoCard(0,1,4); + // Impossible: 0 easy, 1 medium, 4 hard + TogetherManager.getCurrentUser().bingoCardIndices = Caller.makeBingoCard(0,2,3); break; default: TogetherManager.getCurrentUser().bingoCardIndices = Caller.makeBingoCard(1,3,1); diff --git a/src/main/resources/chrono/localization/eng/ui.json b/src/main/resources/chrono/localization/eng/ui.json index 51c74d0..b8ae058 100644 --- a/src/main/resources/chrono/localization/eng/ui.json +++ b/src/main/resources/chrono/localization/eng/ui.json @@ -331,7 +331,7 @@ "Stay Left for an Act", // 8 "Stay Right for an Act", // 9 "Take no Events in an Act", // 10 - "Remove an Uncommon Card", // 11 + "Remove a Rare Card", // 11 "Buy all three potions in a Shop", // 12 "Remove all your Strikes", // 13 "Have over 300 gold", // 14 @@ -340,69 +340,69 @@ "Use all your potion slots in the same turn", // 17 "Fight no Elites in an Act", // 18 "Have 4 or more buffs during combat.", // Powerful // 19 - "Defeat 3 enemies with Poison in a single combat.", // Plague // 20 + "Defeat 2 enemies with Poison in a single combat.", // Plague // 20 "Play 12 Cards in one turn", // 21 "Defeat a boss without taking any damage.", // Perfect // 22 "Have four of the same card.", // 23 - "Have 25 or more Relics" // 24 + "Have 15 or more Relics" // 24 ] }, "MedBingo": { "TEXT": [ - "Reach Act 3 as Ironclad", // 0 - "Reach Act 3 as Silent", // 1 - "Reach Act 3 as Defect", // 2 - "Reach Act 3 as Watcher", // 3 - "Beat the Heart", // 4 - "Win a Combat without playing Attacks", // Come At Me // 5 - "Win a Combat with 1 Health left", // Shrug It Off // 6 - "Skip a Boss Relic", // 7 - "Take no Rares until Act 3", // 8 - "Buy all three Relics in a Shop", // 9 - "Remove all Strikes and Defends", // 10 - "Have over 1200 gold", // 11 - "First three cards you obtain are Skills", // 12 - "Have 9 Energy during a single turn of combat.", // Adrenaline // 13 - "Have 25 or more Strength during combat.", // Jaxxed // 14 - "Have 99 or more Block during combat.", // Impervious // 15 - "Apply 99 or more Poison on a single enemy.", // Catalyst // 16 - "Play 10 Shivs in a single turn.", // Ninja // 17 - "Have your entire deck upgraded", // 18 - "Play 25 cards in a single turn.", // Infinity // 19 - "Defeat a boss in 3 turns or less.", // You are Nothing // 20 - "Have 11 or more Focus during combat.", // Focused // 21 - "Kill Chosen", // Kill Chosen // 22 - "Reach act 3 with a 10 card deck or smaller.", // Minimalist // 23 - "Reach act 3 with a 30 card deck or bigger" // 24 + "Reach Act 3 as Ironclad", // 25 + "Reach Act 3 as Silent", // 26 + "Reach Act 3 as Defect", // 27 + "Reach Act 3 as Watcher", // 28 + "Beat the Heart or Encounter Shelled Parasite", // 29 + "Win a Combat without playing Attacks", // Come At Me // 30 + "Win a Combat with 1 Health left", // Shrug It Off // 31 + "Skip a Boss Relic", // 32 + "Take no Rares until Act 3", // 33 + "Buy all three Relics in a Shop", // 34 + "Remove all Strikes and Defends", // 35 + "Have over 1200 gold", // 36 + "First three cards you obtain are Skills", // 37 + "Have 9 Energy during a single turn of combat.", // Adrenaline // 38 + "Have 25 or more Strength during combat.", // Jaxxed // 39 + "Have 99 or more Block during combat.", // Impervious // 40 + "Apply 99 or more Poison on a single enemy.", // Catalyst // 41 + "Play 10 Shivs in a single turn.", // Ninja // 42 + "Have your entire deck upgraded", // 43 + "Play 25 cards in a single turn.", // Infinity // 44 + "Defeat a boss in 3 turns or less.", // You are Nothing // 45 + "Have 11 or more Focus during combat.", // Focused // 46 + "Kill Chosen", // Kill Chosen // 47 + "Reach act 3 with a 10 card deck or smaller.", // Minimalist // 48 + "Reach act 3 with a 30 card deck or bigger" // 49 ] }, "HardBingo": { "TEXT": [ - "Beat the Heart as Ironclad", // 0 - "Beat the Heart as Silent", // 1 - "Beat the Heart as Defect", // 2 - "Beat the Heart as Watcher", // 3 - "Beat the Heart with no Rares", // 4 - "Win without Resting", // 5 - "Buy all seven Cards in a Shop", // 6 - "Remove all Starter Cards", // 7 - "Have over 1500 gold", // 8 - "First two cards you obtain are Powers", // 9 - "Fight five Elites in an Act", // 10 - "Have 3 or fewer cards in hand, draw, and discard pile combined", // Purity // 11 - "Exhaust 20 cards in a single combat.", // The Pact // 12 - "Have 999 Block.", // Barricaded // 13 - "Beat the game with a single relic.", // Who Needs Relics? // 14 - "Beat the game in under 30 minutes.", // Speed Climber // 15 - "Win with a 50 card deck or bigger", // 16 - "Travel to 15 Event rooms", // 17 - "Win with 5 Curses", // 18 - "Own Spirit Poop", // 19 - "Have only Colorless or Starter Cards after any Boss", // 20 - "Win without ever Upgrading at a Fire", // 21 - "Win but fight no Elites", // 22 - "Beat Act 1, 2 or 3 without taking damage", // 23 - "Perfect Clear the Heart" // 24 + "Beat the Heart as Ironclad", // 50 + "Beat the Heart as Silent", // 51 + "Beat the Heart as Defect", // 52 + "Beat the Heart as Watcher", // 53 + "Beat the Heart with no Rares", // 54 + "Win without Resting", // 55 + "Buy all seven Cards in a Shop", // 56 + "Remove all Starter Cards", // 57 + "Have over 1500 gold", // 58 + "First two cards you obtain are Powers", // 59 + "Fight five Elites in an Act", // 60 + "Have 3 or fewer cards in hand, draw, and discard pile combined", // Purity // 61 + "Exhaust 20 cards in a single combat.", // The Pact // 62 + "Have 999 Block.", // Barricaded // 63 + "Beat the game with a single relic.", // Who Needs Relics? // 64 + "Beat the game in under 30 minutes.", // Speed Climber // 65 + "Win with a 50 card deck or bigger", // 66 + "Travel to 15 Event rooms", // 67 + "Win with 5 Curses", // 68 + "Own Spirit Poop", // 69 + "Have only Colorless or Starter Cards after any Boss", // 70 + "Win without ever Upgrading at a Fire", // 71 + "Win but fight no Elites", // 72 + "Beat Act 1, 2 or 3 without taking damage", // 73 + "Perfect Clear the Heart" // 74 ] }, "HardModeSafetyPanel": {