Browse Source

Adjusted how growth works (just a multiple, not 1.02^times)

tags/v0.7.0
Fen Dweller 7 years ago
parent
commit
a1cd4d399e
2 changed files with 10 additions and 31 deletions
  1. +8
    -28
      game.js
  2. +2
    -3
      stroll.html

+ 8
- 28
game.js View File

@@ -3192,13 +3192,13 @@ function grow_pick(times) {
}
}

function grow(times=1)
function grow(factor=1)
{

let oldHeight = macro.height;
let oldMass = macro.mass;

macro.scale *= Math.pow(1.02,times);
macro.scale *= factor;

let newHeight = macro.height;
let newMass = macro.mass;
@@ -3277,25 +3277,6 @@ function grow_ass(times=1)
update(["Power surges through you as your ass swells by " + length(diameterDelta, unit, false),newline]);
}

function grow_lots()
{
let oldHeight = macro.height;
let oldMass = macro.mass;

macro.scale *= 100;

let newHeight = macro.height;
let newMass = macro.mass;

let heightDelta = newHeight - oldHeight;
let massDelta = newMass - oldMass;

let heightStr = length(heightDelta, unit);
let massStr = mass(massDelta, unit);

update(["Power surges through you as you grow " + heightStr + " taller and gain " + massStr + " of mass",newline]);
}

function resetSettings() {
document.forms.namedItem("custom-species-form").reset();
updateAllPreviews();
@@ -3865,7 +3846,6 @@ window.addEventListener('load', function(event) {
document.getElementById("button-units").addEventListener("click",toggle_units);
document.getElementById("button-verbose").addEventListener("click",toggle_verbose);
document.getElementById("button-arousal").addEventListener("click",toggle_arousal);
document.getElementById("button-grow-lots").addEventListener("click",grow_lots);

document.getElementById("button-dark-mode-options").addEventListener("click",toggleDarkMode);
document.getElementById("button-dark-mode-game").addEventListener("click",toggleDarkMode);
@@ -3879,12 +3859,12 @@ window.addEventListener('load', function(event) {
button.addEventListener("click", function() { grow_part_pick(button.id); });
});

document.getElementById("button-growth-1.1").addEventListener("click",function() { grow_pick(1); });
document.getElementById("button-growth-1.5").addEventListener("click",function() { grow_pick(5); });
document.getElementById("button-growth-2").addEventListener("click",function() { grow_pick(10); });
document.getElementById("button-growth-3").addEventListener("click",function() { grow_pick(20); });
document.getElementById("button-growth-5").addEventListener("click",function() { grow_pick(40); });
document.getElementById("button-growth-10").addEventListener("click",function() { grow_pick(90); });
document.getElementById("button-growth-1.1").addEventListener("click",function() { grow_pick(1.1); });
document.getElementById("button-growth-1.5").addEventListener("click",function() { grow_pick(1.5); });
document.getElementById("button-growth-2").addEventListener("click",function() { grow_pick(2); });
document.getElementById("button-growth-5").addEventListener("click",function() { grow_pick(5); });
document.getElementById("button-growth-20").addEventListener("click",function() { grow_pick(20); });
document.getElementById("button-growth-100").addEventListener("click",function() { grow_pick(100); });

document.getElementById("button-load-preset").addEventListener("click",loadPreset);



+ 2
- 3
stroll.html View File

@@ -171,14 +171,13 @@
<button class="growth-amount" id="button-growth-1.1">1.1x</button>
<button class="growth-amount" id="button-growth-1.5">1.5x</button>
<button class="growth-amount" id="button-growth-2">2x</button>
<button class="growth-amount" id="button-growth-3">3x</button>
<button class="growth-amount" id="button-growth-5">5x</button>
<button class="growth-amount" id="button-growth-10">10x</button>
<button class="growth-amount" id="button-growth-20">20x</button>
<button class="growth-amount" id="button-growth-100">100x</button>
</div>

<div class="stat-container">
<button class="stat-button" id="button-look">Look Around</button>
<button class="stat-button" id="button-grow-lots">SUPER BIG</button>
<button class="stat-button" id="button-stats">Stats</button>
</div>
</div>


Loading…
Cancel
Save