mirror of
https://github.com/doukutsu-rs/doukutsu-rs
synced 2024-10-02 23:38:55 +00:00
commit
87792972d0
|
@ -555,10 +555,11 @@ impl NPC {
|
||||||
self.action_num = 10
|
self.action_num = 10
|
||||||
};
|
};
|
||||||
|
|
||||||
if self.action_counter > 20 && (self.direction == Direction::Left && self.x <= player.x + 0x4000)
|
if self.action_counter > 20
|
||||||
|| (self.direction == Direction::Up && self.y <= player.y + 0x4000)
|
&& ((self.direction == Direction::Left && self.x <= player.x + 0x4000)
|
||||||
|| (self.direction == Direction::Right && self.x <= player.x - 0x4000)
|
|| (self.direction == Direction::Up && self.y <= player.y + 0x4000)
|
||||||
|| (self.direction == Direction::Bottom && 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
|
self.action_num = 10
|
||||||
}
|
}
|
||||||
|
|
|
@ -568,6 +568,7 @@ impl NPC {
|
||||||
flash.set_blink();
|
flash.set_blink();
|
||||||
state.sound_manager.play_sfx(29);
|
state.sound_manager.play_sfx(29);
|
||||||
}
|
}
|
||||||
|
self.anim_num = self.anim_num.max(8);
|
||||||
self.animate(1, 8, 9);
|
self.animate(1, 8, 9);
|
||||||
}
|
}
|
||||||
_ => (),
|
_ => (),
|
||||||
|
|
|
@ -88,7 +88,7 @@ impl BossNPC {
|
||||||
if self.parts[0].action_num == 20 {
|
if self.parts[0].action_num == 20 {
|
||||||
self.parts[0].action_num = 21;
|
self.parts[0].action_num = 21;
|
||||||
self.parts[0].damage = 0;
|
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].y = 0x33A00;
|
||||||
self.parts[0].npc_flags.set_solid_hard(false);
|
self.parts[0].npc_flags.set_solid_hard(false);
|
||||||
self.parts[1].cond.set_alive(false);
|
self.parts[1].cond.set_alive(false);
|
||||||
|
@ -110,7 +110,7 @@ impl BossNPC {
|
||||||
if self.parts[0].action_num == 30 {
|
if self.parts[0].action_num == 30 {
|
||||||
self.parts[0].action_num = 31;
|
self.parts[0].action_num = 31;
|
||||||
self.parts[0].anim_num = 2;
|
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 = 0x8000;
|
||||||
}
|
}
|
||||||
self.parts[0].y += 0x800;
|
self.parts[0].y += 0x800;
|
||||||
|
|
|
@ -1351,7 +1351,9 @@ impl GameScene {
|
||||||
self.hud_player2.tick(state, (&self.player2, &mut self.inventory_player2))?;
|
self.hud_player2.tick(state, (&self.player2, &mut self.inventory_player2))?;
|
||||||
self.boss_life_bar.tick(state, (&self.npc_list, &self.boss))?;
|
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);
|
state.textscript_vm.set_mode(ScriptMode::Inventory);
|
||||||
self.player1.cond.set_interacted(false);
|
self.player1.cond.set_interacted(false);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue