From dfaf786c1a7702f83de53d18fc5248117abfebc2 Mon Sep 17 00:00:00 2001 From: Gene Pasquet Date: Sun, 18 May 2025 09:53:38 +0100 Subject: Licensing etc. --- src/macroknight/entities.hy | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) (limited to 'src/macroknight/entities.hy') 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 . + (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 -- cgit v1.2.3