File information

Last updated

Original upload

Created by

Kelnor277

Uploaded by

kelnor277

Virus scan

Safe to use

Tags for this mod

About this mod

Prevents wounds unless your soldier's health falls below base health.

Permissions and credits
Prevents Infirmary time unless your soldier's health falls below their Base Health. 
Examples: 
Soldier has 10 health and 100 total health. 
If at any point during the mission, your health drops below 10 health, you will get infirmary time = to that lowest health, 
If your health never drops below 10 health, then no infirmary time. 
Also, the time in the infirmary should be based on your remaining health vs your base health. 
The base game considers remaining health vs total health 
That's how it should work. If you're seeing something different please let me know so I can look into it. 
I'm looking into hooking flash to indicate base health vs max health with the health pips, but it's buried in native code so .... IDK yet. 
Classes overrode: 
+ModClassOverrides=(BaseGameClass="XGStrategy", ModClass="JASStrategy") 
++ModClassOverrides=(BaseGameClass="XComGameStateContext_StrategyGameRule", ModClass="JustAScratchStateContext_ScratchGameRule") 
Strategy game rule because that's when the game puts soldiers in the infirmary after a mission. 
XGStrategy because it calls a the static function of strategy game rule that I had to override. And it calls it by hard coded class name. Basically inside gamestate_unit, the game resets health to make sure you get infirmary time if you took any damage. Unfortunately you can't touch gamestates so I can't mess with that. So I just put the health back the way it was right before the infirmary check. 
Also, standard boiler plate, it's a first release and not well tested. Back up saves, it could break everything. 
Fixed bug that full healed crit wounded soldiers. 
Added safeguard to never set health to 0. It shouldn't happen, but never too safe.