luciensadi / AwakeMUD

The Community Edition fork of the 'Awakened Worlds' Shadowrun 3 MUD codebase.
Other
55 stars 31 forks source link

Fix biotech treat math for non-morted chars #683

Closed jdevnull closed 1 year ago

jdevnull commented 1 year ago

Biotech treat is supposed to recover some number of boxes (see SR3 pg 129). One box has integer value 100, so values added to GET_PHYSICAL should be multiples of 100.

luciensadi commented 1 year ago

Thanks for the patch! However, the max physical values are already x100 (see handler.cpp lines 813-814), so this change actually causes them to immediately heal to full from any health.

jdevnull commented 1 year ago

Well, yes, but physical boxes are also multiplied by 100. As an example, since GET_MAX_PHYSICAL = 1000,

GET_PHYSICAL(vict) += (int)(GET_MAX_PHYSICAL(vict) / 1000);

is the same as

GET_PHYSICAL(vict) += 1;

but we actually want

GET_PHYSICAL(vict) += 100;

I tested this by suiciding a character that rolls 12+4(task pool) on biotech treat. I got the success message treating myself, but saw that my health didn't change.

jdevnull commented 1 year ago

Ah, I see the new house rule gets rid of this part of the mechanic entirely. Closing!