mirror of
https://github.com/bitburner-official/bitburner-src.git
synced 2024-11-27 01:53:48 +01:00
Merge pull request #994 from Tesseract1234567890/intFix
Fixed intelligence not resetting when b1t_flum3.exe is used from BN5 without having SF5
This commit is contained in:
commit
141f2a8331
@ -305,10 +305,28 @@ function createBitNodeYesNoEventListener(newBitNode, destroyedBitNode, flume=fal
|
|||||||
yesBtn.addEventListener("click", function() {
|
yesBtn.addEventListener("click", function() {
|
||||||
if (!flume) {
|
if (!flume) {
|
||||||
giveSourceFile(destroyedBitNode);
|
giveSourceFile(destroyedBitNode);
|
||||||
|
if (newBitNode === 5) {
|
||||||
|
if(Player.intelligence === 0) {
|
||||||
|
Player.intelligence = 1;
|
||||||
|
Player.updateSkillLevels();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
// If player used flume, subtract 300 int exp. The prestigeSourceFile()
|
// If player used flume, subtract 300 int exp. The prestigeSourceFile()
|
||||||
// function below grants 300 int exp, so this allows sets net gain to 0
|
// function below grants 300 int exp, so this allows sets net gain to 0
|
||||||
Player.gainIntelligenceExp(-300);
|
Player.gainIntelligenceExp(-300);
|
||||||
|
if(SourceFileFlags[5] === 0 || newBitNode !== 5) {
|
||||||
|
Player.intelligence = 0;
|
||||||
|
Player.intelligence_exp = 0;
|
||||||
|
Player.updateSkillLevels();
|
||||||
|
}
|
||||||
|
if (newBitNode === 5) {
|
||||||
|
if(Player.intelligence === 0) {
|
||||||
|
Player.intelligence = 1;
|
||||||
|
Player.updateSkillLevels();
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
redPillFlag = false;
|
redPillFlag = false;
|
||||||
var container = document.getElementById("red-pill-content");
|
var container = document.getElementById("red-pill-content");
|
||||||
|
@ -80,7 +80,7 @@ export function CharacterInfo(p: IPlayer): React.ReactElement {
|
|||||||
}
|
}
|
||||||
|
|
||||||
function Intelligence(): React.ReactElement {
|
function Intelligence(): React.ReactElement {
|
||||||
if (p.intelligence > 0) {
|
if (p.intelligence > 0 && (p.bitNodeN === 5 || SourceFileFlags[5] > 0)) {
|
||||||
return <tr key="5">
|
return <tr key="5">
|
||||||
<td>Intelligence:</td>
|
<td>Intelligence:</td>
|
||||||
<td style={{textAlign: 'right'}}>{numeralWrapper.formatSkill(p.intelligence)}</td>
|
<td style={{textAlign: 'right'}}>{numeralWrapper.formatSkill(p.intelligence)}</td>
|
||||||
|
Loading…
Reference in New Issue
Block a user