I coded up a patch to make poison cause various status ailments (attached). The way this works is, when you're poisoned, you have a chance to contract a status ailment for a single turn (except for stunning, which affects you for 10 turns). Increasing the poison timer increases the range of effects possible, but not the duration. Here's the cutoff points and odds:
This table is included at the top of the new function process_poison in dungeon.c.
Note that only one effect can occur on any given turn, so if you get hallucination, for example, then you won't vomit. Also note that melee poison attacks raise the timer by d(mlvl), while poison breaths and spells increase it by d(damage) + 10.
Additionally, I've modified the status line to mark the player as "heavily poisoned" once the timer becomes more than 100.
I tested by rolling up a wizard and summoning a bunch of hairy molds, then letting them smack me around.
Some notes:
* When triggering the hallucination effect, my custom message "Poison blurs your vision!" is followed up by "You feel drugged!", which seems to be a forced side-effect of inc_timed(TMD_IMAGE). I guess seeing things could be equated with being drugged? Seems weird though.
* Speaking of which, it would be nice if we could unify hallucination labeling. We have TMD_IMAGE, MSG_DRUGGED, and in-game the effect is referred to as "Halluc" on the status line. Similarly, while most status effects end in "ed" (e.g. MSG_CONFUSED, MSG_PARALYZED), we also have MSG_BLIND and TMD_BLIND.
* I'm not certain my use of message() is correct, so I'd appreciate someone checking that.
* I'm pretty certain that the code reflects the odds breakdown I describe in the comments, but I'd like someone to double-check. Also, if you know of a way to implement this that doesn't require you to e.g. update every conditional if you want to change how common hallucination is, please let me know / change it.
* I have little idea if this is balanced. In my testing, the nasty side effects were very rare; whether that means they should be made more common is hard to say. Mostly you hallucinate a lot and occasionally get confused.
Code:
* Min poison timer value status ailment % chance each turn * 10 hallucinate 10 * 20 confuse 8 * 40 blind 6 * 50 additional poison 5 * 80 stun 6 * 100 vomit 2 * 150 paralyze 1 * 200 drain physical stat 1
Note that only one effect can occur on any given turn, so if you get hallucination, for example, then you won't vomit. Also note that melee poison attacks raise the timer by d(mlvl), while poison breaths and spells increase it by d(damage) + 10.
Additionally, I've modified the status line to mark the player as "heavily poisoned" once the timer becomes more than 100.
I tested by rolling up a wizard and summoning a bunch of hairy molds, then letting them smack me around.
Some notes:
* When triggering the hallucination effect, my custom message "Poison blurs your vision!" is followed up by "You feel drugged!", which seems to be a forced side-effect of inc_timed(TMD_IMAGE). I guess seeing things could be equated with being drugged? Seems weird though.
* Speaking of which, it would be nice if we could unify hallucination labeling. We have TMD_IMAGE, MSG_DRUGGED, and in-game the effect is referred to as "Halluc" on the status line. Similarly, while most status effects end in "ed" (e.g. MSG_CONFUSED, MSG_PARALYZED), we also have MSG_BLIND and TMD_BLIND.
* I'm not certain my use of message() is correct, so I'd appreciate someone checking that.
* I'm pretty certain that the code reflects the odds breakdown I describe in the comments, but I'd like someone to double-check. Also, if you know of a way to implement this that doesn't require you to e.g. update every conditional if you want to change how common hallucination is, please let me know / change it.
* I have little idea if this is balanced. In my testing, the nasty side effects were very rare; whether that means they should be made more common is hard to say. Mostly you hallucinate a lot and occasionally get confused.
Comment