From 67c32349f20e7247ace46d6f06fad25a1523f5be Mon Sep 17 00:00:00 2001 From: Shadow15510 Date: Sun, 14 Nov 2021 18:22:30 +0100 Subject: [PATCH] Fix bug on None type event --- asci_lib.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/asci_lib.py b/asci_lib.py index d636022..8b780a2 100644 --- a/asci_lib.py +++ b/asci_lib.py @@ -137,8 +137,6 @@ class Asci: # Get the event event = self._game_events_mapping[cell_content](data_copy, self.stat) - if not event: return - event = read_event(self.data[0], event) # data modification self.data[0] = data_copy[0] @@ -146,6 +144,9 @@ class Asci: if data_copy[2] != x: self.data[2] = data_copy[2] if data_copy[3] != y: self.data[3] = data_copy[3] + if not event: return + event = read_event(self.data[0], event) + # XP and stat modification self.data[0] += event.xp_earned for index, value in event.stat: