1
0
Fork 0
mirror of https://github.com/doukutsu-rs/doukutsu-rs synced 2024-11-17 19:32:43 +00:00

Added missing core action

This commit is contained in:
dawnDus 2022-01-19 18:50:33 -05:00
parent f676b73c0e
commit dd8f2dcf67
No known key found for this signature in database
GPG key ID: 972AABDE81848F21

View file

@ -66,8 +66,7 @@ impl NPC {
Ok(()) Ok(())
} }
pub(crate) fn tick_n218_core_giant_ball(&mut self, state: &mut SharedGameState) -> GameResult pub(crate) fn tick_n218_core_giant_ball(&mut self, state: &mut SharedGameState) -> GameResult {
{
self.x += self.vel_x; self.x += self.vel_x;
self.y += self.vel_y; self.y += self.vel_y;
@ -375,6 +374,24 @@ impl BossNPC {
let _ = npc_list.spawn(0x100, npc); let _ = npc_list.spawn(0x100, npc);
} }
self.parts[0].x += if self.parts[0].action_counter & 0x02 == 0 { 0x200 } else { -0x200 };
self.parts[0].x += if self.parts[0].x < 0x7E000 { 0x80 } else { -0x80 };
self.parts[0].y += if self.parts[0].y < 0x16000 { 0x80 } else { -0x80 };
}
600 | 601 => {
if self.parts[0].action_num == 600 {
self.parts[0].action_num = 601;
self.parts[4].action_num = 50;
self.parts[5].action_num = 50;
self.parts[8].npc_flags.set_invulnerable(false);
self.parts[9].npc_flags.set_invulnerable(false);
self.parts[10].npc_flags.set_invulnerable(false);
self.parts[11].npc_flags.set_invulnerable(false);
}
self.parts[0].action_counter += 1;
self.parts[0].x += if self.parts[0].action_counter & 0x02 == 0 { 0x800 } else { -0x800 };
} }
_ => {} _ => {}
} }
@ -485,11 +502,11 @@ impl BossNPC {
_ => {} _ => {}
} }
part.anim_rect = state.constants.npc.b04_core[part.anim_num as usize];
if part.action_num == 51 { if part.action_num == 51 {
part.anim_rect.bottom = part.action_counter + part.anim_rect.top; part.anim_rect.bottom = part.action_counter + part.anim_rect.top;
} }
part.anim_rect = state.constants.npc.b04_core[part.anim_num as usize];
} }
fn tick_b04_core_tail(&mut self, i: usize, state: &mut SharedGameState) { fn tick_b04_core_tail(&mut self, i: usize, state: &mut SharedGameState) {
@ -529,11 +546,11 @@ impl BossNPC {
_ => {} _ => {}
} }
part.anim_rect = state.constants.npc.b04_core[4 + part.anim_num as usize];
if part.action_num == 51 { if part.action_num == 51 {
part.anim_rect.bottom = part.action_counter + part.anim_rect.top; part.anim_rect.bottom = part.action_counter + part.anim_rect.top;
} }
part.anim_rect = state.constants.npc.b04_core[4 + part.anim_num as usize];
} }
fn tick_b04_core_small_head( fn tick_b04_core_small_head(