From 00dc70db41cdfc3f55af66953b2f754e2d1044f1 Mon Sep 17 00:00:00 2001 From: Raz Date: Tue, 11 Jun 2019 10:57:27 +0200 Subject: [PATCH] Added command option to go directly to the current act's boss, do not pass go, do not collect 2000 gold. --- .../main/java/basemod/DevCommands/act/Act.java | 16 ++++++++++++++-- 1 file changed, 14 insertions(+), 2 deletions(-) diff --git a/mod/src/main/java/basemod/DevCommands/act/Act.java b/mod/src/main/java/basemod/DevCommands/act/Act.java index 6e73e2540..d4f49a4cb 100644 --- a/mod/src/main/java/basemod/DevCommands/act/Act.java +++ b/mod/src/main/java/basemod/DevCommands/act/Act.java @@ -9,6 +9,7 @@ import com.megacrit.cardcrawl.core.CardCrawlGame; import com.megacrit.cardcrawl.dungeons.*; import com.megacrit.cardcrawl.rooms.AbstractRoom; +import com.megacrit.cardcrawl.rooms.MonsterRoomBoss; import com.megacrit.cardcrawl.screens.DungeonTransitionScreen; import java.lang.reflect.Array; @@ -31,7 +32,7 @@ public static void initialize() { } } public static void addAct(String actID, int actNum) { - if(!acts.containsKey(actID)) { + if(!acts.containsKey(actID) && !actID.equalsIgnoreCase("boss")) { acts.put(actID, actNum); } else { BaseMod.logger.error("Act " + actID + " is already registered!"); @@ -46,7 +47,17 @@ public Act() { @Override public void execute(String[] tokens, int depth) { - if(acts.containsKey(tokens[depth])) { + if(tokens[depth].equalsIgnoreCase("boss")) { + DevConsole.log("Skipping to bossroom"); + AbstractDungeon.currMapNode.room = new MonsterRoomBoss(); + AbstractDungeon.getCurrRoom().onPlayerEntry(); + + AbstractDungeon.rs = AbstractDungeon.RenderScene.NORMAL; + + AbstractDungeon.combatRewardScreen.clear(); + AbstractDungeon.previousScreen = null; + AbstractDungeon.closeCurrentScreen(); + } else if(acts.containsKey(tokens[depth])) { try { DevConsole.log("Skipping to act " + tokens[depth]); @@ -69,6 +80,7 @@ public void execute(String[] tokens, int depth) { public ArrayList extraOptions(String[] tokens, int depth) { ArrayList tmp = new ArrayList<>(); + tmp.add("boss"); for(final String s : acts.keySet()) { tmp.add(s); }