瀏覽代碼

addedd hp and maxHP getter

pull/1/head
myitinos 5 年之前
父節點
當前提交
4a851a8000
共有 1 個文件被更改,包括 15 次插入0 次删除
  1. +15
    -0
      class/character.hpp

+ 15
- 0
class/character.hpp 查看文件

@ -42,6 +42,21 @@ class Character
return hp > 0;
}
bool restoreHP()
{
this->hp = this->maxHp;
}
int checkHP()
{
return hp;
}
int getMaxHP()
{
return maxHp;
}
int defend(int dmg)
{
dmg -= def;

Loading…
取消
儲存