Move encumbrance calculation functions into cPlayer

This commit is contained in:
2019-11-24 13:37:54 -05:00
parent 060be4dd42
commit 3302dd68b7
9 changed files with 42 additions and 44 deletions

View File

@@ -347,7 +347,7 @@ static void display_pc_info(cDialog& me, const short pc) {
me[boost::lexical_cast<std::string>(skill)].setText(to_draw.str());
to_draw.str("");
}
me["encumb"].setTextToNum(total_encumbrance(pc));
me["encumb"].setTextToNum(univ.party[pc].armor_encumbrance());
me["name"].setText(univ.party[pc].name);
me["lvl"].setTextToNum(univ.party[pc].level);
me["xp"].setTextToNum(univ.party[pc].experience);
@@ -363,7 +363,7 @@ static void display_pc_info(cDialog& me, const short pc) {
auto& weap1 = weapons.first;
auto& weap2 = weapons.second;
hit_adj = univ.party[pc].stat_adj(eSkill::DEXTERITY) * 5 - (total_encumbrance(pc)) * 5
hit_adj = univ.party[pc].stat_adj(eSkill::DEXTERITY) * 5 - (univ.party[pc].armor_encumbrance()) * 5
+ 5 * minmax(-8,8,univ.party[pc].status[eStatus::BLESS_CURSE]);
if(!univ.party[pc].traits[eTrait::AMBIDEXTROUS] && weap2)
hit_adj -= 25;