From 902c866f189101563b3eaf766702848628571b11 Mon Sep 17 00:00:00 2001 From: Aktanusa Date: Tue, 24 Apr 2018 20:39:58 -0400 Subject: [PATCH] Changed 'Pop All' button to pop only normal Wrinklers (Issue #140 & #171) --- CookieMonster.js | 4 ++-- src/Disp.js | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/CookieMonster.js b/CookieMonster.js index f83c062d..c721862a 100644 --- a/CookieMonster.js +++ b/CookieMonster.js @@ -1456,7 +1456,7 @@ CM.Disp.UpdateTitle = function() { CM.Disp.CollectWrinklers = function() { for (var i in Game.wrinklers) { - if (Game.wrinklers[i].sucked > 0) { + if (Game.wrinklers[i].sucked > 0 && Game.wrinklers[i].type == 0) { Game.wrinklers[i].hp = 0; } } @@ -1861,7 +1861,7 @@ CM.Disp.AddMenuStats = function(title) { var popAllFrag = document.createDocumentFragment(); popAllFrag.appendChild(document.createTextNode(Beautify(CM.Cache.WrinkBank) + ' ')); var popAllA = document.createElement('a'); - popAllA.textContent = 'Pop All'; + popAllA.textContent = 'Pop All Normal'; popAllA.className = 'option'; popAllA.onclick = function() { CM.Disp.CollectWrinklers(); }; popAllFrag.appendChild(popAllA); diff --git a/src/Disp.js b/src/Disp.js index fdf20015..418cd6db 100644 --- a/src/Disp.js +++ b/src/Disp.js @@ -906,7 +906,7 @@ CM.Disp.UpdateTitle = function() { CM.Disp.CollectWrinklers = function() { for (var i in Game.wrinklers) { - if (Game.wrinklers[i].sucked > 0) { + if (Game.wrinklers[i].sucked > 0 && Game.wrinklers[i].type == 0) { Game.wrinklers[i].hp = 0; } } @@ -1311,7 +1311,7 @@ CM.Disp.AddMenuStats = function(title) { var popAllFrag = document.createDocumentFragment(); popAllFrag.appendChild(document.createTextNode(Beautify(CM.Cache.WrinkBank) + ' ')); var popAllA = document.createElement('a'); - popAllA.textContent = 'Pop All'; + popAllA.textContent = 'Pop All Normal'; popAllA.className = 'option'; popAllA.onclick = function() { CM.Disp.CollectWrinklers(); }; popAllFrag.appendChild(popAllA);