diff --git a/src/scene/title_scene.rs b/src/scene/title_scene.rs index f94a80a..3c66f93 100644 --- a/src/scene/title_scene.rs +++ b/src/scene/title_scene.rs @@ -366,7 +366,7 @@ impl Scene for TitleScene { CurrentMenu::ChallengesMenu => (state.t("menus.main_menu.challenges")), CurrentMenu::ChallengeConfirmMenu | CurrentMenu::SaveSelectMenu => (state.t("menus.main_menu.start")), CurrentMenu::OptionMenu => (state.t("menus.main_menu.options")), - _ => unreachable!(), + CurrentMenu::MainMenu => unreachable!(), }; state.font.draw_colored_text_with_shadow_scaled( window_title.chars(), diff --git a/src/weapon/bullet.rs b/src/weapon/bullet.rs index abd271a..72ae6b8 100644 --- a/src/weapon/bullet.rs +++ b/src/weapon/bullet.rs @@ -726,10 +726,10 @@ impl Bullet { ); } - self.action_counter -= 1; if self.action_counter == 0 { self.cond.set_alive(false); } + self.action_counter = self.action_counter.saturating_sub(1); } fn tick_bubble_1(&mut self, state: &mut SharedGameState) { @@ -1368,10 +1368,10 @@ impl Bullet { ); } - self.action_counter -= 1; if self.action_counter == 0 { self.cond.set_alive(false); } + self.action_counter = self.action_counter.saturating_sub(1); } fn tick_nemesis(&mut self, state: &mut SharedGameState, npc_list: &NPCList) { diff --git a/src/weapon/mod.rs b/src/weapon/mod.rs index 4237019..f7ab8c5 100644 --- a/src/weapon/mod.rs +++ b/src/weapon/mod.rs @@ -131,14 +131,14 @@ impl Weapon { self.experience = self.experience.saturating_add(exp); if self.level == WeaponLevel::Level3 { - if self.experience > lvl_table[2] { + if self.experience >= lvl_table[2] { self.experience = lvl_table[2]; if player.equip.has_whimsical_star() && player.stars < 3 { player.stars += 1; } } - } else if self.experience > lvl_table[curr_level_idx] { + } else if self.experience >= lvl_table[curr_level_idx] { self.level = self.level.next(); self.experience = 0;