Переглянути джерело

addedd hp and maxHP getter

master
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;

Завантаження…
Відмінити
Зберегти