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;
}
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].life < 200
{

View File

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

View File

@ -84,7 +84,7 @@ impl BulletManager {
}
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 {