浏览代码

Merge branch 'master' into kuroodod-alley

tags/v0.2.8
Fen Dweller 7 年前
父节点
当前提交
75c757bb2e
共有 1 个文件被更改,包括 8 次插入0 次删除
  1. +8
    -0
      vore.js

+ 8
- 0
vore.js 查看文件

@@ -67,6 +67,14 @@ function Creature(name = "Creature", str = 10, dex = 10, con = 10) {
this.healthRate = 1 / 86400 * 4;
this.staminaRate = 1 / 86400 * 6;

this.healthPercentage = function() {
return this.health / this.maxHealth;
};

this.staminaPercentage = function() {
return this.stamina / this.maxStamina;
};

this.restoreHealth = function(time) {
this.health = Math.min(this.maxHealth, this.health + this.maxHealth * time * this.healthRate);
};


正在加载...
取消
保存