diff --git a/src/npc/ai/hell.rs b/src/npc/ai/hell.rs index c49d938..a9b205c 100644 --- a/src/npc/ai/hell.rs +++ b/src/npc/ai/hell.rs @@ -555,10 +555,11 @@ impl NPC { self.action_num = 10 }; - if self.action_counter > 20 && (self.direction == Direction::Left && self.x <= player.x + 0x4000) - || (self.direction == Direction::Up && self.y <= player.y + 0x4000) - || (self.direction == Direction::Right && self.x <= player.x - 0x4000) - || (self.direction == Direction::Bottom && self.y <= player.y - 0x4000) + if self.action_counter > 20 + && ((self.direction == Direction::Left && self.x <= player.x + 0x4000) + || (self.direction == Direction::Up && self.y <= player.y + 0x4000) + || (self.direction == Direction::Right && self.x <= player.x - 0x4000) + || (self.direction == Direction::Bottom && self.y <= player.y - 0x4000)) { self.action_num = 10 } diff --git a/src/npc/boss/ballos.rs b/src/npc/boss/ballos.rs index cf8b84d..bab9941 100644 --- a/src/npc/boss/ballos.rs +++ b/src/npc/boss/ballos.rs @@ -568,6 +568,7 @@ impl NPC { flash.set_blink(); state.sound_manager.play_sfx(29); } + self.anim_num = self.anim_num.max(8); self.animate(1, 8, 9); } _ => (), diff --git a/src/npc/boss/heavy_press.rs b/src/npc/boss/heavy_press.rs index d0de8e2..8d4addc 100644 --- a/src/npc/boss/heavy_press.rs +++ b/src/npc/boss/heavy_press.rs @@ -88,7 +88,7 @@ impl BossNPC { if self.parts[0].action_num == 20 { self.parts[0].action_num = 21; self.parts[0].damage = 0; - self.parts[0].x = 0x14000; + self.parts[0].x = if !state.constants.is_switch { 0x14000 } else { 0x1A000 }; self.parts[0].y = 0x33A00; self.parts[0].npc_flags.set_solid_hard(false); self.parts[1].cond.set_alive(false); @@ -110,7 +110,7 @@ impl BossNPC { if self.parts[0].action_num == 30 { self.parts[0].action_num = 31; self.parts[0].anim_num = 2; - self.parts[0].x = 0x14000; + self.parts[0].x = if !state.constants.is_switch { 0x14000 } else { 0x1A000 }; self.parts[0].y = 0x8000; } self.parts[0].y += 0x800; diff --git a/src/scene/game_scene.rs b/src/scene/game_scene.rs index da298f6..05a5ad3 100644 --- a/src/scene/game_scene.rs +++ b/src/scene/game_scene.rs @@ -1351,7 +1351,9 @@ impl GameScene { self.hud_player2.tick(state, (&self.player2, &mut self.inventory_player2))?; self.boss_life_bar.tick(state, (&self.npc_list, &self.boss))?; - if self.player1.controller.trigger_inventory() { + if self.player1.controller.trigger_inventory() + && state.textscript_vm.state == TextScriptExecutionState::Ended + { state.textscript_vm.set_mode(ScriptMode::Inventory); self.player1.cond.set_interacted(false); }