Parcourir la source

Adjusted statHealthCheck. Lalim heals when feeding

tags/v0.2.8
Fen Dweller il y a 7 ans
Parent
révision
a27e67ba5d
2 fichiers modifiés avec 5 ajouts et 4 suppressions
  1. +2
    -2
      combat.js
  2. +3
    -2
      customs.js

+ 2
- 2
combat.js Voir le fichier

@@ -27,8 +27,8 @@ function statCheck(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)
attackerPercent /= 2;


+ 3
- 2
customs.js Voir le fichier

@@ -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."];
}, requirements: [
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,
weight: function(attacker, defender) { return 0.5 + (5 - 5 * attacker.stamina / attacker.maxStamina); }
@@ -1389,7 +1389,8 @@ function lalimFeedDigest(attacker) {
attacker.str += 10;
attacker.dex += 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..."];
}, requirements: [
function(attacker, defender) { return isNormal(attacker) && isNormal(defender); },


Chargement…
Annuler
Enregistrer