diff options
author | Gene Pasquet <dev@etenil.net> | 2025-05-18 09:53:38 +0100 |
---|---|---|
committer | Gene Pasquet <dev@etenil.net> | 2025-05-18 09:53:38 +0100 |
commit | dfaf786c1a7702f83de53d18fc5248117abfebc2 (patch) | |
tree | 27ec5f1123e0a6ab52517adf8fb3b84b4243a0dc /src/macroknight/entities.hy | |
parent | e30b2a81b48f5e86474aa2c38d7034d63c0b7c4e (diff) |
Licensing etc.
Diffstat (limited to 'src/macroknight/entities.hy')
-rw-r--r-- | src/macroknight/entities.hy | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/src/macroknight/entities.hy b/src/macroknight/entities.hy index 2ba77ea..b171069 100644 --- a/src/macroknight/entities.hy +++ b/src/macroknight/entities.hy @@ -1,3 +1,18 @@ +;;; Copyright (C) 2025 Gene Pasquet +;;; +;;; This program is free software: you can redistribute it and/or modify +;;; it under the terms of the GNU General Public License as published by +;;; the Free Software Foundation, either version 3 of the License, or +;;; (at your option) any later version. +;;; +;;; This program is distributed in the hope that it will be useful, +;;; but WITHOUT ANY WARRANTY; without even the implied warranty of +;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +;;; GNU General Public License for more details. +;;; +;;; You should have received a copy of the GNU General Public License +;;; along with this program. If not, see <https://www.gnu.org/licenses/>. + (require hyrule [case]) (import pygame.sprite [Sprite] pygame [Surface] @@ -5,6 +20,8 @@ utils [neg merge-moves Direction] enum [Enum]) +(defclass PlayerKilled [Exception]) + (defclass Entity [Sprite] ;;; Game entity (setv _fixed False) @@ -149,6 +166,7 @@ (when (and self.attacking (> ticks self.animate-end)) (setv self.animate-end 0) (setv self.attacking False) + (raise PlayerKilled) (.blit self._surf (get self.tiles 0) #(0 0))) (setv self._disp_surf |