Some adjustments to item interesting strings

For weapons, negative bonus is now shown as "- 2" instead of as "+ -2".

For armour, the bonus is now accounted for and the numbers should match
what is actually calculated in damage_pc().

Thanks to @fosnola for noticing the armour discrepancy.
This commit is contained in:
2023-01-19 09:52:01 -05:00
parent 2d1bbe0058
commit 68ef066dca
2 changed files with 28 additions and 5 deletions

View File

@@ -35,3 +35,8 @@ inline void move_to_zero(T& val){
if(val > 0)
val--;
}
template<typename T>
inline T sgn(T val) {
return val == 0 ? 0 : std::copysign(1, val);
}