浏览代码

Added some gameover messages

tags/v0.2.8
Fen Dweller 7 年前
父节点
当前提交
c862c6d4e0
共有 4 个文件被更改,包括 10 次插入14 次删除
  1. +2
    -0
      combat.js
  2. +6
    -3
      customs.js
  3. +2
    -0
      feast.js
  4. +0
    -11
      objects.js

+ 2
- 0
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"); }
};
}

+ 6
- 3
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"; }
};
}



+ 2
- 0
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);
}




+ 0
- 11
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({


正在加载...
取消
保存