浏览代码

Adjusted statHealthCheck. Lalim heals when feeding

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

+ 2
- 2
combat.js 查看文件

@@ -27,8 +27,8 @@ function statCheck(attacker, defender, stat) {
} }


function statHealthCheck(attacker, defender, stat) { function statHealthCheck(attacker, defender, stat) {
let attackerPercent = attacker.health / attacker.maxHealth;
let defenderPercent = defender.health / defender.maxHealth;
let attackerPercent = 0.5 + 0.5 * attacker.health / attacker.maxHealth;
let defenderPercent = 0.5 + 0.5 * defender.health / defender.maxHealth;


if (attacker.stamina <= 0) if (attacker.stamina <= 0)
attackerPercent /= 2; attackerPercent /= 2;


+ 3
- 2
customs.js 查看文件

@@ -1360,7 +1360,7 @@ function lalimFeed(attacker) {
return ["Lalim darts back, abruptly ripping open a tear in his shadowy realm - jaws lunging in and snapping up some unseen victim, yanking them from the world of light into his gullet. His noisy swallows and gulps mix with muffled whimpers and cries as he gulps them down."]; return ["Lalim darts back, abruptly ripping open a tear in his shadowy realm - jaws lunging in and snapping up some unseen victim, yanking them from the world of light into his gullet. His noisy swallows and gulps mix with muffled whimpers and cries as he gulps them down."];
}, requirements: [ }, requirements: [
function(attacker, defender) { return isNormal(attacker) && isNormal(defender); }, function(attacker, defender) { return isNormal(attacker) && isNormal(defender); },
function(attacker, defender) { return !attacker.flags.feeding && !attacker.flags.fed }
function(attacker, defender) { return !attacker.flags.feeding && !attacker.flags.fed; }
], ],
priority: 1, priority: 1,
weight: function(attacker, defender) { return 0.5 + (5 - 5 * attacker.stamina / attacker.maxStamina); } weight: function(attacker, defender) { return 0.5 + (5 - 5 * attacker.stamina / attacker.maxStamina); }
@@ -1389,7 +1389,8 @@ function lalimFeedDigest(attacker) {
attacker.str += 10; attacker.str += 10;
attacker.dex += 10; attacker.dex += 10;
attacker.con += 10; attacker.con += 10;
attacker.changeStamina(1000);
attacker.health += 100;
attacker.changeStamina(200);
return ["You watch in horror as that writhing bulge falls limp, loses substance...and digests completely. The monster seems invigorated by its meal..."]; return ["You watch in horror as that writhing bulge falls limp, loses substance...and digests completely. The monster seems invigorated by its meal..."];
}, requirements: [ }, requirements: [
function(attacker, defender) { return isNormal(attacker) && isNormal(defender); }, function(attacker, defender) { return isNormal(attacker) && isNormal(defender); },


正在加载...
取消
保存