mirror of
https://github.com/doukutsu-rs/doukutsu-rs
synced 2025-11-30 00:03:33 +00:00
Gaudi projectiles and red demon exp (Fixes #95)
This commit is contained in:
parent
f60440f877
commit
703413dcb6
|
|
@ -401,6 +401,7 @@ impl NPC {
|
||||||
self.anim_num = 2;
|
self.anim_num = 2;
|
||||||
state.quake_counter = 10;
|
state.quake_counter = 10;
|
||||||
state.sound_manager.play_sfx(72);
|
state.sound_manager.play_sfx(72);
|
||||||
|
self.create_xp_drop_custom(self.x, self.y, 19, state, npc_list);
|
||||||
|
|
||||||
npc_list.create_death_smoke(
|
npc_list.create_death_smoke(
|
||||||
self.x,
|
self.x,
|
||||||
|
|
|
||||||
|
|
@ -1145,14 +1145,12 @@ impl NPC {
|
||||||
}
|
}
|
||||||
|
|
||||||
pub(crate) fn tick_n174_gaudi_armored_projectile(&mut self, state: &mut SharedGameState) -> GameResult {
|
pub(crate) fn tick_n174_gaudi_armored_projectile(&mut self, state: &mut SharedGameState) -> GameResult {
|
||||||
if self.action_num == 0 && self.direction == Direction::Right {
|
match self.action_num {
|
||||||
|
0 | 1 => {
|
||||||
|
if self.direction == Direction::Right {
|
||||||
self.action_num = 2;
|
self.action_num = 2;
|
||||||
}
|
}
|
||||||
|
|
||||||
if self.action_num == 1 {
|
|
||||||
self.x += self.vel_x;
|
|
||||||
self.y += self.vel_y;
|
|
||||||
|
|
||||||
let mut hit = false;
|
let mut hit = false;
|
||||||
|
|
||||||
if self.flags.hit_left_wall() {
|
if self.flags.hit_left_wall() {
|
||||||
|
|
@ -1174,20 +1172,26 @@ impl NPC {
|
||||||
|
|
||||||
if hit {
|
if hit {
|
||||||
self.action_num = 2;
|
self.action_num = 2;
|
||||||
self.action_counter3 += 1;
|
self.action_counter2 += 1;
|
||||||
state.sound_manager.play_sfx(31);
|
state.sound_manager.play_sfx(31);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
2 => {
|
||||||
self.vel_y += 0x40;
|
self.vel_y += 0x40;
|
||||||
self.x += self.vel_x;
|
|
||||||
self.y += self.vel_y;
|
|
||||||
|
|
||||||
self.action_counter3 += 1;
|
if self.flags.hit_bottom_wall() {
|
||||||
if self.flags.hit_bottom_wall() && self.action_counter3 > 1 {
|
self.action_counter2 += 1;
|
||||||
|
if self.action_counter2 > 1 {
|
||||||
state.create_caret(self.x, self.y, CaretType::ProjectileDissipation, Direction::Left);
|
state.create_caret(self.x, self.y, CaretType::ProjectileDissipation, Direction::Left);
|
||||||
self.cond.set_alive(false);
|
self.cond.set_alive(false);
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
_ => (),
|
||||||
|
}
|
||||||
|
|
||||||
|
self.x += self.vel_x;
|
||||||
|
self.y += self.vel_y;
|
||||||
|
|
||||||
self.vel_y = self.vel_y.clamp(-0x5ff, 0x5ff);
|
self.vel_y = self.vel_y.clamp(-0x5ff, 0x5ff);
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue