diff --git a/feast.css b/feast.css index 8194126..00a054f 100644 --- a/feast.css +++ b/feast.css @@ -50,6 +50,13 @@ button { ); } +.stat-button { + width: 100px; + height: 50px; + font-size: 18px; + user-select: none; +} + .compass-button { width: 100px; height: 100px; diff --git a/feast.html b/feast.html index 7f68220..0502dda 100644 --- a/feast.html +++ b/feast.html @@ -26,7 +26,7 @@
- Welcome to Feast v0.2.0 + Welcome to Feast v0.2.1
  @@ -45,6 +45,7 @@
Imagination: 97
Candy Corn: 3
Emotions: 35/100
+
FOE @@ -156,7 +157,7 @@

- Welcome to Feast v0.2.0 + Welcome to Feast v0.2.1

diff --git a/feast.js b/feast.js index 72f2438..d9ce4d3 100644 --- a/feast.js +++ b/feast.js @@ -306,6 +306,7 @@ function start() { applySettings(generateSettings()); document.getElementById("create").style.display = "none"; document.getElementById("game").style.display = "block"; + document.getElementById("stat-button-status").addEventListener("click", status, false); loadActions(); loadCompass(); loadDialog(); @@ -591,6 +592,64 @@ function look() { update([currentRoom.description]); } +function status() { + let lines = []; + + lines.push("You are a " + player.species); + + lines.push(newline); + + if (player.stomach.contents.length > 0) { + lines.push("Your stomach bulges with prey."); + + player.stomach.contents.map(function(prey) { + let state = ""; + let healthRatio = prey.health / prey.maxHealth; + + if (healthRatio > 0.75) { + state = "is thrashing in your gut"; + } else if (healthRatio > 0.5) { + state = "is squirming in your belly"; + } else if (healthRatio > 0.25) { + state = "is pressing out at your stomach walls"; + } else if (healthRatio > 0) { + state = "is weakly squirming"; + } else { + state = "has stopped moving"; + } + + lines.push(prey.description("A") + " " + state); + }); + lines.push(newline); + } + + if (player.butt.contents.length > 0) { + lines.push("Your bowels churn with prey."); + + player.butt.contents.map(function(prey) { + let state = ""; + let healthRatio = prey.health / prey.maxHealth; + + if (healthRatio > 0.75) { + state = "is writhing in your bowels"; + } else if (healthRatio > 0.5) { + state = "is struggling against your intestines"; + } else if (healthRatio > 0.25) { + state = "is bulging out of your lower belly"; + } else if (healthRatio > 0) { + state = "is squirming weakly, slipping deeper and deeper"; + } else { + state = "has succumbed to your bowels"; + } + + lines.push(prey.description("A") + " " + state); + }); + lines.push(newline); + } + + update(lines); +} + let toSave = ["str","dex","con","name","species"]; function saveGame() { diff --git a/vore.js b/vore.js index 69a0077..5dff2f2 100644 --- a/vore.js +++ b/vore.js @@ -212,6 +212,8 @@ class Container { this.contents = []; // health/sec this.damageRate = 15*100/86400; + // health percent/sec + this.damageRatePercent = 1/86400; // kg/sec this.digestRate = 80/8640; @@ -221,9 +223,9 @@ class Container { let lines = []; this.contents.forEach(function(prey) { if (prey.health > 0) { - let damage = Math.min(prey.health, this.damageRate * time); + let damage = Math.min(prey.health, this.damageRate * time + this.damageRatePercent * prey.maxHealth * time); prey.health -= damage; - time -= damage / this.damageRate; + time -= damage / (this.damageRate + this.damageRatePercent * prey.maxHealth); if (prey.health + damage > 50 && prey.health <= 50) { lines.push(this.describeDamage(prey));