From 66ff040e38b3394e0aef1c109916154b5e9cceb2 Mon Sep 17 00:00:00 2001 From: Tesseract1234567890 Date: Fri, 4 Jun 2021 11:59:23 -0400 Subject: [PATCH 1/4] Attempt at fixing Int. not resetting on b1t_flum3.exe usage --- src/RedPill.js | 3 +++ src/ui/CharacterInfo.tsx | 2 +- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/src/RedPill.js b/src/RedPill.js index 987a49371..b008844d1 100644 --- a/src/RedPill.js +++ b/src/RedPill.js @@ -309,6 +309,9 @@ function createBitNodeYesNoEventListener(newBitNode, destroyedBitNode, flume=fal // If player used flume, subtract 300 int exp. The prestigeSourceFile() // function below grants 300 int exp, so this allows sets net gain to 0 Player.gainIntelligenceExp(-300); + if(SourceFileFlags[5] === 0) { + Player.intelligence = 0; + } } redPillFlag = false; var container = document.getElementById("red-pill-content"); diff --git a/src/ui/CharacterInfo.tsx b/src/ui/CharacterInfo.tsx index 04f29e4a0..91f335f8f 100644 --- a/src/ui/CharacterInfo.tsx +++ b/src/ui/CharacterInfo.tsx @@ -80,7 +80,7 @@ export function CharacterInfo(p: IPlayer): React.ReactElement { } function Intelligence(): React.ReactElement { - if (p.intelligence > 0) { + if (p.intelligence > 0 && (p.bitNodeN === 5 || SourceFileFlags[5] > 0)) { return Intelligence: {numeralWrapper.formatSkill(p.intelligence)} From fc5e0ea6a0543518ab7dc7691d5627630e2d7fe0 Mon Sep 17 00:00:00 2001 From: Tesseract1234567890 Date: Fri, 4 Jun 2021 12:02:26 -0400 Subject: [PATCH 2/4] Set intelligence_exp to 0 if player does not have SourceFile 5 on b1t_flum3.exe usage --- src/RedPill.js | 1 + 1 file changed, 1 insertion(+) diff --git a/src/RedPill.js b/src/RedPill.js index b008844d1..f3b245597 100644 --- a/src/RedPill.js +++ b/src/RedPill.js @@ -311,6 +311,7 @@ function createBitNodeYesNoEventListener(newBitNode, destroyedBitNode, flume=fal Player.gainIntelligenceExp(-300); if(SourceFileFlags[5] === 0) { Player.intelligence = 0; + Player.intelligence_exp = 0; } } redPillFlag = false; From f9ff45fbed274458513b2de41606dc12009f3fb7 Mon Sep 17 00:00:00 2001 From: Tesseract1234567890 Date: Fri, 4 Jun 2021 12:14:04 -0400 Subject: [PATCH 3/4] Attempt at making Int. available from start of BN5 --- src/RedPill.js | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/src/RedPill.js b/src/RedPill.js index f3b245597..94e7baa3a 100644 --- a/src/RedPill.js +++ b/src/RedPill.js @@ -305,6 +305,13 @@ function createBitNodeYesNoEventListener(newBitNode, destroyedBitNode, flume=fal yesBtn.addEventListener("click", function() { if (!flume) { giveSourceFile(destroyedBitNode); + if (newBitNode === 5) { + if(Player.intelligence === 0) { + Player.intelligence = 1; + Player.updateSkillLevels(); + } + } + } else { // If player used flume, subtract 300 int exp. The prestigeSourceFile() // function below grants 300 int exp, so this allows sets net gain to 0 @@ -312,6 +319,13 @@ function createBitNodeYesNoEventListener(newBitNode, destroyedBitNode, flume=fal if(SourceFileFlags[5] === 0) { Player.intelligence = 0; Player.intelligence_exp = 0; + Player.updateSkillLevels(); + } + if (newBitNode === 5) { + if(Player.intelligence === 0) { + Player.intelligence = 1; + Player.updateSkillLevels(); + } } } redPillFlag = false; From ed041743c28f2ac116a61d52da41a94b9e7f4ee3 Mon Sep 17 00:00:00 2001 From: Tesseract1234567890 Date: Fri, 4 Jun 2021 12:17:46 -0400 Subject: [PATCH 4/4] Allows player to keep int if bitfluming into SF5 from SF5 for some reason --- src/RedPill.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/RedPill.js b/src/RedPill.js index 94e7baa3a..c47997fd9 100644 --- a/src/RedPill.js +++ b/src/RedPill.js @@ -316,7 +316,7 @@ function createBitNodeYesNoEventListener(newBitNode, destroyedBitNode, flume=fal // If player used flume, subtract 300 int exp. The prestigeSourceFile() // function below grants 300 int exp, so this allows sets net gain to 0 Player.gainIntelligenceExp(-300); - if(SourceFileFlags[5] === 0) { + if(SourceFileFlags[5] === 0 || newBitNode !== 5) { Player.intelligence = 0; Player.intelligence_exp = 0; Player.updateSkillLevels();