1
0
Fork 0
mirror of https://github.com/doukutsu-rs/doukutsu-rs synced 2025-05-20 13:52:39 +00:00

Add offset for Balfrog adds (Fixes #99)

This commit is contained in:
dawnDus 2022-03-23 08:58:51 -04:00
parent e27d555bc6
commit 890c297437
No known key found for this signature in database
GPG key ID: 972AABDE81848F21

View file

@ -157,7 +157,7 @@ impl BossNPC {
let mut npc = NPC::create(110, &state.npc_table);
npc.cond.set_alive(true);
npc.x = self.parts[0].rng.range(4..16) as i32 * 0x2000;
npc.x = (self.parts[0].rng.range(4..16) + state.constants.game.tile_offset_x) as i32 * 0x2000;
npc.y = self.parts[0].rng.range(0..4) as i32 * 0x2000;
npc.direction = Direction::FacingPlayer;
@ -325,7 +325,7 @@ impl BossNPC {
let mut npc = NPC::create(110, &state.npc_table);
for _ in 0..6 {
npc.cond.set_alive(true);
npc.x = self.parts[0].rng.range(4..16) as i32 * 0x2000;
npc.x = (self.parts[0].rng.range(4..16) + state.constants.game.tile_offset_x) as i32 * 0x2000;
npc.y = self.parts[0].rng.range(0..4) as i32 * 0x2000;
npc.direction = Direction::FacingPlayer;