From 2ffc3e4f2e760720c166934ca871abc249c9fc34 Mon Sep 17 00:00:00 2001 From: Shagnor Date: Sat, 31 Dec 2022 01:01:57 +1100 Subject: [PATCH] Fix summary calculation for statbot. --- blastmud_game/src/static_content/npc/statbot.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/blastmud_game/src/static_content/npc/statbot.rs b/blastmud_game/src/static_content/npc/statbot.rs index b7c2c14e..492cfe18 100644 --- a/blastmud_game/src/static_content/npc/statbot.rs +++ b/blastmud_game/src/static_content/npc/statbot.rs @@ -37,7 +37,7 @@ fn next_action_text(user: &User) -> String { let end = user.raw_stats.get(&StatType::Endurance).cloned().unwrap_or(8); let col = user.raw_stats.get(&StatType::Cool).cloned().unwrap_or(8); let tot = brn + sen + brw + refl + end + col; - let summary = format!("Brains: {}, Senses: {}, Brawn: {}, Reflexes: {}, Endurance: {}, Cool: {}. To spend: {}", brn, sen, brw, refl, end, col, tot - 48); + let summary = format!("Brains: {}, Senses: {}, Brawn: {}, Reflexes: {}, Endurance: {}, Cool: {}. To spend: {}", brn, sen, brw, refl, end, col, 62 - tot); match st { StatbotState::Brains => ansi!("I am Statbot, a robot servant of the empire, put here to help you choose how your body will function. The base body has 8 each of brains, senses, brawn, reflexes, endurance and cool - but you get 14 points of improvement. Each point spent lifts that stat by one. Your first job is to choose how much brainpower you will have. If you choose 8, you don't spend any points. There is a maximum of 15 - if you choose 15, you will spend 7 points and have 7 left for other stats.\n\n\tType -statbot brains 8 (or any other number) to set your brains to that number. You will be able to adjust your stats by sending me the new value, up until you leave here. Your stats now are: ").to_owned() + &summary, StatbotState::Senses => "".to_owned(),