From 655796fb5e43af9700fd18985838f6dc5c6f4a79 Mon Sep 17 00:00:00 2001 From: Nat Quayle Nelson Date: Fri, 27 Dec 2024 13:27:26 -0600 Subject: [PATCH] line break to show all of identify message --- src/game/boe.party.cpp | 23 ++++++++++++++++++----- 1 file changed, 18 insertions(+), 5 deletions(-) diff --git a/src/game/boe.party.cpp b/src/game/boe.party.cpp index 3f113b26..f3b32b0b 100644 --- a/src/game/boe.party.cpp +++ b/src/game/boe.party.cpp @@ -579,18 +579,31 @@ void do_mage_spell(short pc_num,eSpell spell_num,bool freebie) { break; case eSpell::IDENTIFY: - // TODO: Cancel without spending points if there are no unidentified items - if(!freebie) + bool all_identified = true; + for(cPlayer& pc : univ.party) + for(cItem& item : pc.items) + all_identified &= item.ident; + + // Cancel without spending points if there are no unidentified items + if(!(freebie || all_identified)) univ.party[pc_num].cur_sp -= (*spell_num).cost; - if(!univ.scenario.is_legacy && is_town()) { - ASB("Select items to identify. Press Space when done."); + + if(!univ.scenario.is_legacy && is_town() && !all_identified) { + ASB("Select items to identify. Press Space"); + ASB(" when done."); overall_mode = MODE_ITEM_TARGET; stat_screen_mode = MODE_IDENTIFY; shop_identify_cost = 0; put_item_screen(stat_window); break; } - ASB("All of your items are identified."); + std::ostringstream sstr; + sstr << "All of your items are "; + if(all_identified){ + sstr << "already "; + } + sstr << "identified."; + ASB(sstr.str();); for(cPlayer& pc : univ.party) for(cItem& item : pc.items) item.ident = true;