FSM crash

Create issue
Issue #27 resolved
Jesse Kaukonen created an issue

I think it might be related to a bug in the SOS list. Wriggle was dead, but:

File "F:\lostsky\lost-sky-project\Story of a Lost Sky\battle_system\ai_fsm.py" , line 617, in think self.target = self.unit.map.all_units_by_name[self.unit.ai.sos_list[0]] KeyError: u'Wriggle'

Ran does 11 damage! Ran uses Danmaku - Fireball to attack Wriggle Wriggle uses Nature Magic - Poison Dust to counterattack Ran Miss! Ran got EXP: 3 Wriggle got EXP: 7 Wriggle is low on HP! Sending an SOS message to Firefly and going to retreat mod e! Asa's move - Target to heal: Asa Firefly - Switching to priority healing mode. Executing Poison Youmu takes damage from the poison Chen hits Wriggle Chen does 8 damage! Chen uses Danmaku - Leaf Crystal to attack Wriggle Wriggle uses Nature Magic - Poison Dust to counterattack Chen Wriggle hits Chen Wriggle does 7 damage! Chen got EXP: 5 Wriggle got EXP: 17 Asa's move - Target to heal: Asa Firefly got EXP: 5 Executing Poison Youmu takes damage from the poison Youmu hits Firefly Youmu does 16 damage! Youmu uses Danmaku - Dagger Throw to attack Firefly Youmu got EXP: 10 Ran hits Wriggle Critical hit! Ran does 24 damage! Ran uses Danmaku - Fireball to attack Wriggle Ran got EXP: 7 Miss! Chen uses Danmaku - Leaf Crystal to attack Firefly Chen got EXP: 2 Asa's move - Target to heal: Asa Traceback (most recent call last): File "srpg.py", line 101, in <module> engine.title_screen() File "F:\lostsky\lost-sky-project\Story of a Lost Sky\core_system\engine.py", line 1494, in title_screen self.launch_wm(True) File "F:\lostsky\lost-sky-project\Story of a Lost Sky\core_system\engine.py", line 1527, in launch_wm self.worldmap.navigate_loop(True) File "F:\lostsky\lost-sky-project\Story of a Lost Sky\worldmap_system\worldmap .py", line 434, in navigate_loop confirm_load = self.all_regions[tuple(self.player_pos)].navigate_loop(self.e ngine.player.wm_data['region_coords']) File "F:\lostsky\lost-sky-project\Story of a Lost Sky\worldmap_system\worldmap .py", line 1101, in navigate_loop input_flag = self.user_input() File "F:\lostsky\lost-sky-project\Story of a Lost Sky\worldmap_system\worldmap .py", line 1058, in user_input exit_flag = self.all_locations[tuple(self.player_pos)].menu_loop() File "F:\lostsky\lost-sky-project\Story of a Lost Sky\worldmap_system\worldmap .py", line 1278, in menu_loop self.all_events[menu_pos].execute() File "F:\lostsky\lost-sky-project\Story of a Lost Sky\worldmap_system\worldmap .py", line 1534, in execute battle_result = self.map.turn_loop() File "F:\lostsky\lost-sky-project\Story of a Lost Sky\battle_system\mapobj.py" , line 1545, in turn_loop unit.ai.execute_turn() File "F:\lostsky\lost-sky-project\Story of a Lost Sky\battle_system\ai_fsm.py" , line 45, in execute_turn self.current_state.think() File "F:\lostsky\lost-sky-project\Story of a Lost Sky\battle_system\ai_fsm.py" , line 617, in think self.target = self.unit.map.all_units_by_name[self.unit.ai.sos_list[0]] KeyError: u'Wriggle'

F:\lostsky\lost-sky-project\Story of a Lost Sky>

Comments (2)

  1. Rune Devros repo owner

    Fixed this one.

    Cause was the healer not recognizing that the unit calling for help was defeated. Added a refresh that'll remove defeated units from the list of units needing help.

  2. Log in to comment