Alef2008-05-20 01:59:18
I'm in the process of rewriting my system from scratch and with this comes the obvious step of making improvements.
I've clumsily added in clots and ruptures to the system I've been using for the majority of my time playing here, and due to this it's often messy, or inefficient. Not to mention my wound curing has been tweaked so many times, I barely recognise the code behind it.
So, it brings forward the question: What is the best way to handle all of this? A stringlist, using the various numbers to add affliction like states? Writing it like an autosipper, with the different states taking priority? Or is there something I'm missing?
I've clumsily added in clots and ruptures to the system I've been using for the majority of my time playing here, and due to this it's often messy, or inefficient. Not to mention my wound curing has been tweaked so many times, I barely recognise the code behind it.
So, it brings forward the question: What is the best way to handle all of this? A stringlist, using the various numbers to add affliction like states? Writing it like an autosipper, with the different states taking priority? Or is there something I'm missing?
Unknown2008-05-21 12:16:39
I'm sure many people write it all as one giant if/elseif block. I do mine as a priority string list of all the health-cured "afflictions" and break down the various conditions into levels/tiers. So, you can have wounds_critical_head or ruptures_lleg_5, etc. Only update the wound/rupture/numbness stuff when you're actually hit with an attack, not every prompt. (Figured that out the hard way.)