Fix bug on None type event

This commit is contained in:
Shadow15510 2021-11-14 18:22:30 +01:00
parent e02c1e255b
commit 67c32349f2
1 changed files with 3 additions and 2 deletions

View File

@ -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: