mirror of
https://github.com/doukutsu-rs/doukutsu-rs
synced 2025-03-24 19:09:22 +00:00
commit
87792972d0
src
|
@ -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
|
||||
}
|
||||
|
|
|
@ -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);
|
||||
}
|
||||
_ => (),
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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);
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue