Skip to content

Commit

Permalink
Remove debug invincibility
Browse files Browse the repository at this point in the history
  • Loading branch information
stefandevai committed Apr 26, 2020
1 parent a3a5af7 commit 285184f
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
4 changes: 4 additions & 0 deletions source/header.fnl
Original file line number Diff line number Diff line change
Expand Up @@ -4,3 +4,7 @@
;; script: fennel
;; input: keyboard
;; saveid: AmethystWaters

;; NOTE: This code is minified in order to save space. You
;; can find the full source code on GitHub:
;; https://github.com/stefandevai/amethyst-waters
4 changes: 2 additions & 2 deletions source/main.fnl
Original file line number Diff line number Diff line change
Expand Up @@ -900,8 +900,8 @@
(tset *player*
:hurt (fn [self damage]
(when (and (not= self.state :hurt) (not= *game-state* "game-over"))
(dec self.health 0)
;(dec self.health (math.max 1 (r (- damage 5) damage)))
;(dec self.health 0)
(dec self.health (math.max 1 (r (- damage 5) damage)))
(if (<= self.health 0)
(do (global *time-elapsed* 0)
(set self.state :dead)
Expand Down

0 comments on commit 285184f

Please sign in to comment.