From a70bbc738a8962a91aee21745aa773c0500d6886 Mon Sep 17 00:00:00 2001 From: Nat Quayle Nelson Date: Sun, 11 May 2025 10:27:01 -0500 Subject: [PATCH] 'Train who?' show skill points and disallow pcs w/ 0 --- src/game/boe.dlgutil.cpp | 2 +- src/game/boe.items.cpp | 14 ++++++++++++++ src/game/boe.items.hpp | 2 ++ 3 files changed, 17 insertions(+), 1 deletion(-) diff --git a/src/game/boe.dlgutil.cpp b/src/game/boe.dlgutil.cpp index 047bd1c9..0891c0b6 100644 --- a/src/game/boe.dlgutil.cpp +++ b/src/game/boe.dlgutil.cpp @@ -989,7 +989,7 @@ void handle_talk_node(int which_talk_entry, bool is_redo) { save_talk_str1 = "You conclude your training."; save_talk_str2 = ""; can_save_talk = false; - if((get_pc = select_pc(eSelectPC::ONLY_LIVING,"Train who?")) < 6) { + if((get_pc = select_pc(eSelectPC::ONLY_CAN_TRAIN,"Train who?")) < 6) { spend_xp(get_pc,1, nullptr); } goto RECORD_WHICH_NODE; diff --git a/src/game/boe.items.cpp b/src/game/boe.items.cpp index a74dfb8f..e3f2f50a 100644 --- a/src/game/boe.items.cpp +++ b/src/game/boe.items.cpp @@ -978,6 +978,16 @@ short select_pc(eSelectPC mode, std::string title, eSkill highlight_highest, boo can_pick = false; extra_info = "no item slot"; } + if(false) // Skip fallthrough past ONLY_CAN_TRAIN + BOOST_FALLTHROUGH; + case eSelectPC::ONLY_CAN_TRAIN: + if(univ.party[i].skill_pts){ + extra_info = std::to_string(univ.party[i].skill_pts) + " skill point"; + if(univ.party[i].skill_pts > 1) extra_info += "s"; + }else{ + extra_info = "no skill points"; + can_pick = false; + } BOOST_FALLTHROUGH; case eSelectPC::ONLY_LIVING: if(univ.party[i].main_status != eMainStatus::ALIVE) @@ -1043,6 +1053,10 @@ short select_pc(eSelectPC mode, std::string title, eSkill highlight_highest, boo ASB(" No one has lockpicks equipped."); print_buf(); } + if(mode == eSelectPC::ONLY_CAN_TRAIN){ + ASB(" No one has skill points."); + print_buf(); + } return 8; } diff --git a/src/game/boe.items.hpp b/src/game/boe.items.hpp index 23eee8db..12e306b9 100644 --- a/src/game/boe.items.hpp +++ b/src/game/boe.items.hpp @@ -52,6 +52,8 @@ enum class eSelectPC { ONLY_CAN_GIVE_FROM_ACTIVE, // Must have lockpicks equipped ONLY_CAN_LOCKPICK, + // Must have skill points + ONLY_CAN_TRAIN, ONLY_DEAD, }; // Prompt the player to choose a party member. Returns 0-5 for a pc, 6 for cancel, 7 for all, or 8 if no PCs fit the mode's filter.