From 388846c14e670544acb62c1f39823b096304e64a Mon Sep 17 00:00:00 2001 From: Shadow15510 Date: Sun, 22 Aug 2021 20:22:21 +0200 Subject: [PATCH] Fix bug when fight succeed --- asci_lib.py | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) diff --git a/asci_lib.py b/asci_lib.py index 7180f46..1b5ff3b 100644 --- a/asci_lib.py +++ b/asci_lib.py @@ -163,6 +163,7 @@ class Asci: self.stat[index] += event.stat[index] answer_selected = convert(self.screen.display_text(event.text)) + if event.answer and (0 < answer_selected <= event.answer): self.data[0] += answer_selected def _fight(self, direction): @@ -170,14 +171,8 @@ class Asci: # Run the fight if self._game_fight(self.data[0], self.data[1], x, y, self.stat): - event = read_event(self.data[0], self._game_event(self.data[0], self.data[1], x, y, self.stat)) + self._talk(direction) - # XP and stat modification - self.data[0] += event.xp_earned - for index in range(len(event.stat)): - self.stat[index] += event.stat[index] - - self.screen.display_text(event.text) def _get_map(self, direction): x, y = self._looked_case(direction)