diff --git a/combat.js b/combat.js index 4a0c931..1b02b5d 100644 --- a/combat.js +++ b/combat.js @@ -460,6 +460,7 @@ function digestPlayerStomach(predator,damage=20) { return [predator.description("The") + "'s stomach grinds over your body, swiftly digesting you."]; }, priority: 1, + gameover: function() { return "Digested by " + predator.description("a"); } }; } @@ -471,5 +472,6 @@ function instakillPlayerStomach(pedator) { }, priority: 1, weight: function(attacker, defender) { return 1/3; }, + gameover: function() { return "Digested by " + predator.description("a"); } }; } diff --git a/customs.js b/customs.js index 1ebede4..f0b6016 100644 --- a/customs.js +++ b/customs.js @@ -305,7 +305,8 @@ function tranceStomp(attacker) { function(attacker, defender) { return defender.prefs.gore; } ], priority: 1, - weight: function(attacker, defender) { return attacker.health / attacker.maxHealth > 0.5 ? 0 : 3; } + weight: function(attacker, defender) { return attacker.health / attacker.maxHealth > 0.5 ? 0 : 3; }, + gameover: function() { return "Crushed under Trance's paw"; } }; } @@ -352,7 +353,8 @@ function tranceGrappleMaul(attacker) { } ], priority: 1, - weight: function(attacker, defender) { return defender.health / defender.maxHealth; } + weight: function(attacker, defender) { return defender.health / defender.maxHealth; }, + gameover: function() { return "Mauled by Trance"; } }; } @@ -380,7 +382,8 @@ function tranceGrappleThroat(attacker) { } ], priority: 1, - weight: function(attacker, defender) { return defender.health / defender.maxHealth > attacker.health / attacker.maxHealth ? 2 : 0; } + weight: function(attacker, defender) { return defender.health / defender.maxHealth > attacker.health / attacker.maxHealth ? 2 : 0; }, + gameover: function() { return "Throat ripped out by Trance"; } }; } diff --git a/feast.js b/feast.js index ef976ab..cd0dadb 100644 --- a/feast.js +++ b/feast.js @@ -395,6 +395,8 @@ function respawn(respawnRoom) { } else { deaths.push("Defeated by " + currentFoe.description("a") + " at " + renderTime(time) + " on day " + date); } + } else { + deaths.push(killingBlow.gameover() + " at " + renderTime(time) + " on day " + date); } diff --git a/objects.js b/objects.js index 81b937a..2e8fc17 100644 --- a/objects.js +++ b/objects.js @@ -5,17 +5,6 @@ function GameObject(name="Potato") { this.actions = []; } -function Burger() { - GameObject.call(this, "Burger"); - this.actions.push({ - "name": "Punch Burger", - "action": function() { - player.health += 10; - update(["You punch the hamburger."]); - } - }); -} - function Nerd() { GameObject.call(this, "Nerd"); this.actions.push({