1
0
Fork 0
mirror of https://github.com/doukutsu-rs/doukutsu-rs synced 2025-03-20 08:59:22 +00:00

Fixed Curly/Toroko+/Undead Core bugs

This commit is contained in:
dawnDus 2022-04-19 19:39:36 -04:00
parent b626472f10
commit b94b20bf76
No known key found for this signature in database
GPG key ID: 972AABDE81848F21
3 changed files with 3 additions and 2 deletions

View file

@ -562,7 +562,7 @@ impl BossNPC {
self.parts[5].anim_num = 0; self.parts[5].anim_num = 0;
} }
if self.parts[0].life + 150 < self.parts[0].action_counter if self.parts[0].life + 150 < self.parts[19].action_counter
|| self.parts[0].action_counter > 400 || self.parts[0].action_counter > 400
|| self.parts[0].life < 200 || self.parts[0].life < 200
{ {

View file

@ -404,6 +404,7 @@ impl SharedGameState {
} }
pub fn process_debug_keys(&mut self, key_code: ScanCode) { pub fn process_debug_keys(&mut self, key_code: ScanCode) {
#[cfg(not(debug_assertions))]
if !self.settings.debug_mode { if !self.settings.debug_mode {
return; return;
} }

View file

@ -84,7 +84,7 @@ impl BulletManager {
} }
pub fn count_bullets_type_idx_all(&self, type_idx: u16) -> usize { pub fn count_bullets_type_idx_all(&self, type_idx: u16) -> usize {
self.bullets.iter().filter(|b| (b.btype.saturating_sub(2) / 3) == type_idx).count() self.bullets.iter().filter(|b| (b.btype.saturating_add(2) / 3) == type_idx).count()
} }
pub fn count_bullets_multi(&self, btypes: &[u16], player_id: TargetPlayer) -> usize { pub fn count_bullets_multi(&self, btypes: &[u16], player_id: TargetPlayer) -> usize {