Problems with Handling Dying, Stable, RP, etc.
I have been reading through the condition handling relating to nonlethal damage, death, dying, RP, etc. to try to better understand it, and I have noticed a number of issues with the CT in how it handles these states, as follows:
1. When Dying (Effects: Unconscious, Prone, Dying), if you apply nonlethal damage to a PC, they then have both the Dying and Stable conditions. Logically, if a character is dying, additional nonlethal damage should not make them Stable and Dying. So, the code needs to first check for the Dying condition in the effects array on application of non-lethal damage and not apply Stable if the PC or NPC is already Dying.
"JAROL!! YOU'RE DYING!! AUGH!!" *punches him in his unconscious face to stabilize him* :D
2. When an actor is in the Dying state (Effects: Unconcious, Prone, Dying), the code does not decrement RP at the end of that actor's turn each round, beginning with the next turn after the actor took the damage that put them in the dying state (assuming they don't take more damage in the same round when already at 0 hp).
3. The Massive Damage/Single Attack rule is not working correctly. At max fatigue and 0 Wnds, applying damage that is 2x hit points or greater should result in death from massive damage, but the CT sets the PC to Unconscious, Prone, Dying. For example, for a character with 24HP max at max fatigue state, applying 100 damage should kill the character, but it doesn't.
4. When already in the Dying state, an actor loses 1 RP for the first attack (assuming not massive damage) each round (seems to be working). Subsequently, that actor should only lose 1 RP if an attack in that round deals GREATER THAN 1/2 the max hp in damage. The code is currently applying the RP deduction when the damage = 1/2 max hp instead of > 1/2 max hp.
5. When dying as in #4, the code is deducting 1 RP when an actor takes nonlethal damage as the first attack. That shouldn't be happening. When at 0 hp, nonlethal damage basically does nothing per the rules and the PC stays at 0 hp. Since there is no hp damage, there is no RP deduction (and no RP deduction for nonlethal anyway).
6. When messing around with the above testing, I was able to get the code to put multiple Dying conditions (I think during the nonlethal testing, because it got confused about being Dying and Stable, then taking more lethal damage that converted Stable to Dying, but didn't remove the earlier Dying condition, etc.) in the tracker. As a general defensive coding measure, the code should check to see if a condition already exists before applying it again, whether it is Dying or some other condition so that multiples don't end up on the actor, regardless of how they got there. Maybe the player or GM applied something, for example.
I think that's everything I saw. If I notice anything else, I will post it here. I like the RP system buttons in the lower right of the Main sheet tab. Very helpful!