Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
genie_logiciel_2015
the_dungeon_project
Commits
481d1d6d
Commit
481d1d6d
authored
Jan 06, 2016
by
Enteocline
Browse files
Merge branch 'master' of gitlab.crans.org:genie_logiciel_2015/the_dungeon_project
parents
5a6d29cb
5317a4f0
Changes
1
Show whitespace changes
Inline
Side-by-side
src/core/gamestate/Being.java
View file @
481d1d6d
...
...
@@ -140,6 +140,9 @@ public class Being extends Entity {
* @return true if this is dead. false otherwise.
*/
public
boolean
takeDamage
(
int
damage
){
if
(
damage
>
0
)
{
addAction
(
Action
.
HIT
);
}
HP
=
Math
.
min
(
maxHP
,
Math
.
max
(
HP
-
damage
,
0
));
if
(
HP
==
0
){
Event
event
=
new
ToServerDeathEvent
(
this
.
getID
());
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment