Fix pop fattest wrinkler #618

This commit is contained in:
Daniël van Noord
2021-02-25 22:20:55 +01:00
parent db22e07d8e
commit 75bf3f5c17
2 changed files with 3 additions and 3 deletions

File diff suppressed because one or more lines are too long

View File

@@ -2182,7 +2182,7 @@ CM.Disp.AddMenuStats = function (title) {
const popFattestA = document.createElement('a'); const popFattestA = document.createElement('a');
popFattestA.textContent = 'Pop Single Fattest'; popFattestA.textContent = 'Pop Single Fattest';
popFattestA.className = 'option'; popFattestA.className = 'option';
popFattestA.onclick = function () { if (CM.Cache.WrinklersFattest[1]) Game.wrinklers[CM.Cache.WrinklersFattest[1]].hp = 0; }; popFattestA.onclick = function () { if (CM.Cache.WrinklersFattest[1] !== null) Game.wrinklers[CM.Cache.WrinklersFattest[1]].hp = 0; };
popFattestFrag.appendChild(popFattestA); popFattestFrag.appendChild(popFattestA);
stats.appendChild(CM.Disp.CreateStatsListing('basic', `Rewards of Popping Single Fattest Non-Shiny Wrinkler (id: ${CM.Cache.WrinklersFattest[1] !== null ? CM.Cache.WrinklersFattest[1] : 'None'})`, popFattestFrag)); stats.appendChild(CM.Disp.CreateStatsListing('basic', `Rewards of Popping Single Fattest Non-Shiny Wrinkler (id: ${CM.Cache.WrinklersFattest[1] !== null ? CM.Cache.WrinklersFattest[1] : 'None'})`, popFattestFrag));
} }
@@ -2857,7 +2857,7 @@ CM.Disp.CreateWrinklerButtons = function () {
popFattestA.id = 'PopFattestWrinklerButton'; popFattestA.id = 'PopFattestWrinklerButton';
popFattestA.textContent = 'Pop Single Fattest'; popFattestA.textContent = 'Pop Single Fattest';
popFattestA.className = 'option'; popFattestA.className = 'option';
popFattestA.onclick = function () { if (CM.Cache.WrinklersFattest[1]) Game.wrinklers[CM.Cache.WrinklersFattest[1]].hp = 0; }; popFattestA.onclick = function () { if (CM.Cache.WrinklersFattest[1] !== null) Game.wrinklers[CM.Cache.WrinklersFattest[1]].hp = 0; };
l('sectionLeftExtra').children[0].append(popFattestA); l('sectionLeftExtra').children[0].append(popFattestA);
}; };