1
0
Fork 0
mirror of https://github.com/doukutsu-rs/doukutsu-rs synced 2025-11-30 08:08:18 +00:00

Weapon XP and missile damage (fixes #116)

This commit is contained in:
dawnDus 2022-04-18 14:12:26 -04:00
parent 90900f01e1
commit 9b572190de
No known key found for this signature in database
GPG key ID: 972AABDE81848F21
3 changed files with 5 additions and 5 deletions

View file

@ -366,7 +366,7 @@ impl Scene for TitleScene {
CurrentMenu::ChallengesMenu => (state.t("menus.main_menu.challenges")), CurrentMenu::ChallengesMenu => (state.t("menus.main_menu.challenges")),
CurrentMenu::ChallengeConfirmMenu | CurrentMenu::SaveSelectMenu => (state.t("menus.main_menu.start")), CurrentMenu::ChallengeConfirmMenu | CurrentMenu::SaveSelectMenu => (state.t("menus.main_menu.start")),
CurrentMenu::OptionMenu => (state.t("menus.main_menu.options")), CurrentMenu::OptionMenu => (state.t("menus.main_menu.options")),
_ => unreachable!(), CurrentMenu::MainMenu => unreachable!(),
}; };
state.font.draw_colored_text_with_shadow_scaled( state.font.draw_colored_text_with_shadow_scaled(
window_title.chars(), window_title.chars(),

View file

@ -726,10 +726,10 @@ impl Bullet {
); );
} }
self.action_counter -= 1;
if self.action_counter == 0 { if self.action_counter == 0 {
self.cond.set_alive(false); self.cond.set_alive(false);
} }
self.action_counter = self.action_counter.saturating_sub(1);
} }
fn tick_bubble_1(&mut self, state: &mut SharedGameState) { fn tick_bubble_1(&mut self, state: &mut SharedGameState) {
@ -1368,10 +1368,10 @@ impl Bullet {
); );
} }
self.action_counter -= 1;
if self.action_counter == 0 { if self.action_counter == 0 {
self.cond.set_alive(false); 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) { fn tick_nemesis(&mut self, state: &mut SharedGameState, npc_list: &NPCList) {

View file

@ -131,14 +131,14 @@ impl Weapon {
self.experience = self.experience.saturating_add(exp); self.experience = self.experience.saturating_add(exp);
if self.level == WeaponLevel::Level3 { if self.level == WeaponLevel::Level3 {
if self.experience > lvl_table[2] { if self.experience >= lvl_table[2] {
self.experience = lvl_table[2]; self.experience = lvl_table[2];
if player.equip.has_whimsical_star() && player.stars < 3 { if player.equip.has_whimsical_star() && player.stars < 3 {
player.stars += 1; 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.level = self.level.next();
self.experience = 0; self.experience = 0;