luciensadi / AwakeMUD

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

More drug fixes #716

Closed jdevnull closed 11 months ago

jdevnull commented 11 months ago

The previous version set edge = 2 when transitioning into addiction in order to guarantee that forced withdrawal would face at least one withdrawal test instead of automatically succeeding from edge 1. But that had the unintended consequence of also increasing the overall time to complete withdrawal. Also, because edge was always reduced in withdrawal before the withdrawal test, the removal of edge increases from forced drug use meant that a character undergoing forced withdrawal could fail every test and still successfully complete withdrawal.

This PR fixes the above, returning to the previous edge = 1 when transitioning into addiction, and instead changes the order of operations for process_withdrawal; the test now happens first (or automatic success if in guided withdrawal), and edge is reduced only if successful.

Second, this PR now updates GET_DRUG_LAST_WITHDRAWAL_TICK alongside GET_DRUG_LAST_FIX on drug onset instead of when entering withdrawal, to more accurately reflect how Fix Factor is described in M&M pg 109.

This PR also replaces the nonfunctional time until withdrawal ends with the time until the next withdrawal test in status information.

luciensadi commented 11 months ago

Looks good, thanks!