Skip to content

Commit

Permalink
Update to weekly patch 18
Browse files Browse the repository at this point in the history
  • Loading branch information
daviscook477 committed Mar 31, 2018
1 parent ee6104b commit 2725b52
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 8 deletions.
3 changes: 3 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,9 @@ If you want a bigger challenge, use the *Chaos* button to bring up the *Chaotic

Once in game the custom climb will act like a daily climb. All of the mods are applied **and** you will not be able to save and quit without losing your progress.

## Known Bugs ##
1. When using the Balanced, Chaos, and Seed buttons trying to click on accept and cancel doesn't work. The workaround is to use enter and escape instead.

## Installation ##
1. If you have `ModTheSpire` already installed you can skip to step 5. Otherwise continue with step 2:
2. Download `ModTheSpire.jar` from the latest release (https://github.com/kiooeht/ModTheSpire/releases)
Expand Down
4 changes: 2 additions & 2 deletions src/main/java/customclimb/CustomClimb.java
Original file line number Diff line number Diff line change
Expand Up @@ -335,7 +335,7 @@ private void setupModLists() {
}

Field positiveModsField;
positiveModsField = ModHelper.class.getDeclaredField("positiveMods");
positiveModsField = ModHelper.class.getDeclaredField("cardMods");
positiveModsField.setAccessible(true);

for (Map.Entry<String, AbstractDailyMod> m :
Expand Down Expand Up @@ -791,7 +791,7 @@ private void buildDailyMods() {
DailyMods.enabledMods.addAll(appliedMods);
for (AbstractDailyMod m : appliedMods) {
if (m.positive) {
DailyMods.positiveMods.put(m.modID, true);
DailyMods.cardMods.put(m.modID, true);
} else {
DailyMods.negativeMods.put(m.modID, true);
}
Expand Down
12 changes: 6 additions & 6 deletions src/main/java/customclimb/modifiers/Charity.java
Original file line number Diff line number Diff line change
Expand Up @@ -35,8 +35,8 @@ public static class ShopInit {
public static void Postfix(Object __obj_instance, ArrayList<AbstractCard> coloredCards,
ArrayList<AbstractCard> colorlessCards) {
ShopScreen screen = (ShopScreen) __obj_instance;
if (((Boolean) DailyMods.positiveMods.get("Charity")) != null
&& ((Boolean) DailyMods.positiveMods.get("Charity")).booleanValue()) {
if (((Boolean) DailyMods.cardMods.get("Charity")) != null
&& ((Boolean) DailyMods.cardMods.get("Charity")).booleanValue()) {
screen.applyDiscount(MODIFIER);
}
}
Expand All @@ -50,8 +50,8 @@ public static class GetNewRelicPrice {
public static void Insert(Object __obj_instance, StoreRelic r, @ByRef int[] retVal) {
try {
ShopScreen screen = (ShopScreen) __obj_instance;
if (((Boolean) DailyMods.positiveMods.get("Charity")) != null
&& ((Boolean) DailyMods.positiveMods.get("Charity")).booleanValue()) {
if (((Boolean) DailyMods.cardMods.get("Charity")) != null
&& ((Boolean) DailyMods.cardMods.get("Charity")).booleanValue()) {
Method applyDiscountToRelic = screen.getClass().getDeclaredMethod("applyDiscountToRelic");
applyDiscountToRelic.setAccessible(true);
retVal[0] = (int) applyDiscountToRelic.invoke(screen, retVal[0], MODIFIER);
Expand All @@ -69,8 +69,8 @@ public static class GetNewPotionPrice {
public static void Insert(Object __obj_instance, StorePotion p, @ByRef int[] retVal) {
try {
ShopScreen screen = (ShopScreen) __obj_instance;
if (((Boolean) DailyMods.positiveMods.get("Charity")) != null
&& ((Boolean) DailyMods.positiveMods.get("Charity")).booleanValue()) {
if (((Boolean) DailyMods.cardMods.get("Charity")) != null
&& ((Boolean) DailyMods.cardMods.get("Charity")).booleanValue()) {
Method applyDiscountToRelic = screen.getClass().getDeclaredMethod("applyDiscountToRelic");
applyDiscountToRelic.setAccessible(true);
retVal[0] = (int) applyDiscountToRelic.invoke(screen, retVal[0], MODIFIER);
Expand Down

0 comments on commit 2725b52

Please sign in to comment.