Przeglądaj źródła

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

tags/v0.7.0
Fen Dweller 7 lat temu
rodzic
commit
a1cd4d399e
2 zmienionych plików z 10 dodań i 31 usunięć
  1. +8
    -28
      game.js
  2. +2
    -3
      stroll.html

+ 8
- 28
game.js Wyświetl plik

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


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


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


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


let newHeight = macro.height; let newHeight = macro.height;
let newMass = macro.mass; 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]); 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() { function resetSettings() {
document.forms.namedItem("custom-species-form").reset(); document.forms.namedItem("custom-species-form").reset();
updateAllPreviews(); updateAllPreviews();
@@ -3865,7 +3846,6 @@ window.addEventListener('load', function(event) {
document.getElementById("button-units").addEventListener("click",toggle_units); document.getElementById("button-units").addEventListener("click",toggle_units);
document.getElementById("button-verbose").addEventListener("click",toggle_verbose); document.getElementById("button-verbose").addEventListener("click",toggle_verbose);
document.getElementById("button-arousal").addEventListener("click",toggle_arousal); 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-options").addEventListener("click",toggleDarkMode);
document.getElementById("button-dark-mode-game").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); }); 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); document.getElementById("button-load-preset").addEventListener("click",loadPreset);




+ 2
- 3
stroll.html Wyświetl plik

@@ -171,14 +171,13 @@
<button class="growth-amount" id="button-growth-1.1">1.1x</button> <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-1.5">1.5x</button>
<button class="growth-amount" id="button-growth-2">2x</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-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>


<div class="stat-container"> <div class="stat-container">
<button class="stat-button" id="button-look">Look Around</button> <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> <button class="stat-button" id="button-stats">Stats</button>
</div> </div>
</div> </div>


Ładowanie…
Anuluj
Zapisz