mirror of
https://github.com/doukutsu-rs/doukutsu-rs
synced 2025-01-04 01:57:51 +00:00
Partial fixes of bosses
This commit is contained in:
parent
5821f06928
commit
67fb32499f
|
@ -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;
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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;
|
||||
}
|
||||
_ => (),
|
||||
}
|
||||
|
||||
|
|
|
@ -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;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue