MysteriousMilk / NS2_CombatPlusPlus

Recreation of Natural Selection Combat mode with with some tweaks and enhancements.
MIT License
6 stars 5 forks source link

Scale assist XP with damage done #28

Open keatsandyeats opened 6 years ago

keatsandyeats commented 6 years ago

Currently, the amount of assist XP awarded only depends on the dying player's rank. Should it also depend on the amount of damage you dealt?

The computation is already being done, but is unused: https://github.com/MysteriousMilk/NS2_CombatPlusPlus/blob/13b043c7fe97648862504ad0c60756f4fb4161da/source/lua/CPPPointGiverMixin.lua#L73

MysteriousMilk commented 6 years ago

Sounds reasonable to me.

MysteriousMilk commented 6 years ago

The following function should be modified to take in a damage fraction: https://github.com/MysteriousMilk/NS2_CombatPlusPlus/blob/fa51c126e7bdfba960e4e5c0f3faace42f1a3b39/source/lua/CombatScoreMixin.lua#L164

I'd like to ensure that at least a base xp amount is given for an assist but also award players who deal most of the damage but do not get the killing blow. So we'll calculate two values in the function above: base assist xp (currently already calculated) and assist xp that is scaled by the damage fraction. Use the ConditionalValue function to return the value that is greater.