summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authornsensfel <SpamShield0@noot-noot.org>2017-11-28 17:14:02 +0100
committernsensfel <SpamShield0@noot-noot.org>2017-11-28 17:14:02 +0100
commitf539b7072c357339328d9bfd54f1f1ed51828586 (patch)
treeb6205dd79c78090831e812aceac177d2a9f35d28 /src/character_instance.erl
parent80358376b9300a0d73cb8b62dfa9fdd65240ca66 (diff)
Trying to tidy up this mess.
Diffstat (limited to 'src/character_instance.erl')
-rw-r--r--src/character_instance.erl40
1 files changed, 0 insertions, 40 deletions
diff --git a/src/character_instance.erl b/src/character_instance.erl
deleted file mode 100644
index e1cf7fe..0000000
--- a/src/character_instance.erl
+++ /dev/null
@@ -1,40 +0,0 @@
--module(character_instance).
--export
-(
- [
- set_location/3,
- mod_health/3,
- is_dead/1, % is_alive is reserved.
- get_location/1,
- get_owner/1
- ]
-).
-
--include("timed_cache_data.hrl").
-
-set_location (CharInst, X, Y) ->
- CharInst#character_instance
- {
- x = X,
- y = Y
- }.
-
-mod_health (CharInst, MaxHealth, HealthMod) ->
- NewHealth = (CharInst#character_instance.health + HealthMod),
- if
- (NewHealth < 0) ->
- CharInst#character_instance{ health = 0 };
-
- (NewHealth > MaxHealth) ->
- CharInst#character_instance{ health = MaxHealth };
-
- true ->
- CharInst#character_instance{ health = NewHealth }
- end.
-
-is_dead (CharInst) -> (CharInst#character_instance.health == 0).
-
-get_location (CharInst) ->
- {CharInst#character_instance.x, CharInst#character_instance.y}.
-
-get_owner (CharInst) -> CharInst#character_instance.team.