This website works better with JavaScript.
Home
Explore
Help
Sign In
myitinos
/
HackTheGame-v001
Watch
1
Star
0
Fork
1
Code
Issues
0
Pull Requests
0
Releases
0
Wiki
Activity
Browse Source
addedd hp and maxHP getter
master
myitinos
5 years ago
parent
ef6b38d299
commit
4a851a8000
1 changed files
with
15 additions
and
0 deletions
Split View
Diff Options
Show Stats
Download Patch File
Download Diff File
+15
-0
class/character.hpp
+ 15
- 0
class/character.hpp
View File
@ -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
;
Write
Preview
Loading…
Cancel
Save