Unit structure 0x31’s higher order nibble is the res bonus to add.
Could we potentially replicate this effect to increase other stats in the same phased-out manner?
Short answer: Yes, if we had more data/space.
Long answer: Not easily, since the unit structure is really packed. Basically, we would need to alter these routines to read some data from the structure and add that as a bonus. But we need a space to store the new bonus – though it’d be fairly simple to redirect the bonus to another stat. Then to make the diminishing effect we just need to find where the pure water effect is written to by and add our routine there. But again, we need another space in the unit struct to store that data.
On a related note, I have a guess that the lower nibble of this byte is the torch effect area, but I haven’t tested it.