diff --git a/src/editor/mod.rs b/src/editor/mod.rs index dbeb3ae..d3c3287 100644 --- a/src/editor/mod.rs +++ b/src/editor/mod.rs @@ -2,7 +2,7 @@ use std::cell::RefCell; use std::ops::Deref; use std::rc::Rc; -use imgui::{Image, MouseButton, Window, WindowFlags}; +use imgui::{Image, MouseButton, Window}; use crate::common::{Color, Rect}; use crate::components::background::Background; diff --git a/src/game/npc/boss/monster_x.rs b/src/game/npc/boss/monster_x.rs index 564c869..26cb5d9 100644 --- a/src/game/npc/boss/monster_x.rs +++ b/src/game/npc/boss/monster_x.rs @@ -263,6 +263,8 @@ impl BossNPC { self.parts[0].action_num = 11; self.parts[0].action_counter = 0; self.parts[0].action_counter2 = 0; + + self.parts[7].action_num = 2; } self.parts[0].action_counter += 1; @@ -551,11 +553,13 @@ impl BossNPC { self.parts[0].npc_flags.set_shootable(false); self.parts[i].anim_num = 2; } + 2 => { + self.parts[i].anim_num = 0; + } 10 | 11 => { if self.parts[i].action_num == 10 { self.parts[i].action_num = 11; self.parts[i].action_counter = (self.parts[i].target_x * 10 + 40) as u16; - self.parts[i].anim_num = 2; self.parts[0].npc_flags.set_shootable(true); } @@ -570,11 +574,15 @@ impl BossNPC { self.parts[i].anim_num = 0; } } + 40 => { + self.parts[0].npc_flags.set_shootable(false); + self.parts[i].anim_num = 0; + } _ => {} } - self.parts[7].x = self.parts[0].x; - self.parts[7].y = self.parts[0].y; + self.parts[i].x = self.parts[0].x; + self.parts[i].y = self.parts[0].y; self.parts[i].anim_rect = state.constants.npc.b03_monster_x[self.parts[i].anim_num as usize]; } @@ -803,7 +811,7 @@ impl BossNPC { if self.parts[i].target_x < 0 { self.parts[i].target_x = 0; self.parts[i].action_num = 0; - self.parts[7].action_num = 0; + self.parts[7].action_num = 40; self.parts[13].action_num = 0; self.parts[14].action_num = 0; self.parts[15].action_num = 0; diff --git a/src/game/npc/boss/sisters.rs b/src/game/npc/boss/sisters.rs index 81c67cc..8c0e220 100644 --- a/src/game/npc/boss/sisters.rs +++ b/src/game/npc/boss/sisters.rs @@ -225,7 +225,7 @@ impl BossNPC { 1020 => { self.parts[0].action_counter += 1; if self.parts[0].action_counter > 50 { - npc_list.kill_npcs_by_type(211, true, state); + npc_list.remove_by_type(211, state); self.parts[0].cond.set_alive(false); self.parts[1].cond.set_alive(false); @@ -261,7 +261,7 @@ impl BossNPC { } else { return; }; - + match part.action_num { 0 => { part.action_num = 1; @@ -316,7 +316,6 @@ impl BossNPC { part.hit_bounds.left = 0x2000; state.sound_manager.play_sfx(51); - npc_list.remove_by_type(211, state); } } 220 => { @@ -390,6 +389,9 @@ impl BossNPC { state.sound_manager.play_sfx(33); } } + 1000 => { + part.anim_num = 3; + } _ => (), } diff --git a/src/scene/editor_scene.rs b/src/scene/editor_scene.rs index d3d3e20..d9ae8e1 100644 --- a/src/scene/editor_scene.rs +++ b/src/scene/editor_scene.rs @@ -316,7 +316,7 @@ impl StageListWindow { self.visible = true; } - fn action(&mut self, state: &mut SharedGameState, ctx: &mut Context, ui: &mut imgui::Ui) { + fn action(&mut self, state: &mut SharedGameState, _ctx: &mut Context, ui: &mut imgui::Ui) { if !self.visible { return; }