Przeglądaj źródła

Added some gameover messages

tags/v0.2.8
Fen Dweller 7 lat temu
rodzic
commit
c862c6d4e0
4 zmienionych plików z 10 dodań i 14 usunięć
  1. +2
    -0
      combat.js
  2. +6
    -3
      customs.js
  3. +2
    -0
      feast.js
  4. +0
    -11
      objects.js

+ 2
- 0
combat.js Wyświetl plik

@@ -460,6 +460,7 @@ function digestPlayerStomach(predator,damage=20) {
return [predator.description("The") + "'s stomach grinds over your body, swiftly digesting you."]; return [predator.description("The") + "'s stomach grinds over your body, swiftly digesting you."];
}, },
priority: 1, priority: 1,
gameover: function() { return "Digested by " + predator.description("a"); }
}; };
} }


@@ -471,5 +472,6 @@ function instakillPlayerStomach(pedator) {
}, },
priority: 1, priority: 1,
weight: function(attacker, defender) { return 1/3; }, weight: function(attacker, defender) { return 1/3; },
gameover: function() { return "Digested by " + predator.description("a"); }
}; };
} }

+ 6
- 3
customs.js Wyświetl plik

@@ -305,7 +305,8 @@ function tranceStomp(attacker) {
function(attacker, defender) { return defender.prefs.gore; } function(attacker, defender) { return defender.prefs.gore; }
], ],
priority: 1, 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, 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, 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"; }
}; };
} }




+ 2
- 0
feast.js Wyświetl plik

@@ -395,6 +395,8 @@ function respawn(respawnRoom) {
} else { } else {
deaths.push("Defeated by " + currentFoe.description("a") + " at " + renderTime(time) + " on day " + date); deaths.push("Defeated by " + currentFoe.description("a") + " at " + renderTime(time) + " on day " + date);
} }
} else {
deaths.push(killingBlow.gameover() + " at " + renderTime(time) + " on day " + date);
} }






+ 0
- 11
objects.js Wyświetl plik

@@ -5,17 +5,6 @@ function GameObject(name="Potato") {
this.actions = []; 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() { function Nerd() {
GameObject.call(this, "Nerd"); GameObject.call(this, "Nerd");
this.actions.push({ this.actions.push({


Ładowanie…
Anuluj
Zapisz