Implement exp_adj

The original source had remnants of a PC-specific experience gain adjustment, which
appeared to be intended as a debugging aid.

I've restored and implemented it, and used it on the debug party.
It doesn't necessary need to be relegated to only a debug feature, but for now, that's
good enough.
This commit is contained in:
2023-01-21 18:32:50 -05:00
parent 992cbdb22c
commit d83139eaa0
3 changed files with 17 additions and 6 deletions

View File

@@ -311,11 +311,11 @@ void award_xp(short pc_num,short amt,bool force) {
if(amt <= 0)
return;
// univ.party[pc_num].experience += (max(((amt * adjust) / 100), 0) * univ.party[pc_num].exp_adj) / 100;
// univ.party.total_xp_gained += (max(((amt * adjust) / 100), 0) * univ.party[pc_num].exp_adj) / 100;
univ.party[pc_num].experience += (max(((amt * adjust) / 100), 0) * 100) / 100;
univ.party.total_xp_gained += (max(((amt * adjust) / 100), 0) * 100) / 100;
amt = percent(amt, adjust);
amt = max(amt, 0);
amt = percent(amt, univ.party[pc_num].exp_adj);
univ.party[pc_num].experience += amt;
univ.party.total_xp_gained += amt;