From 65c9d206dd5a358d465c15f2c8ad72b64e39403a Mon Sep 17 00:00:00 2001 From: KuMiShi Date: Sun, 25 Jan 2026 15:51:55 +0100 Subject: [PATCH] Adding Event Base --- event.py | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) create mode 100644 event.py diff --git a/event.py b/event.py new file mode 100644 index 0000000..78816bc --- /dev/null +++ b/event.py @@ -0,0 +1,18 @@ +from .serializable import Serializable +from .entity import Action, BonusAction + +import json + +class Event(Serializable): + def __init__(self, location:str, entities_objectives:dict[str,str]): + super().__init__() + self.location = location + self.entities_objectives = entities_objectives + self.description = "" + + def add_turn_event(self, event_text:str, action:Action, bonus:BonusAction): + event_dict = {} + event_dict['text'] = event_text + event_dict['action'] = action + event_dict['bonus'] = bonus + self.description += json.dumps(event_dict) \ No newline at end of file