Help with progressive resitances

I have a character In my game who slowly becomes resistant to damage types the more of that type of damage they take, essentially at the start of the game the character has normal state and element resists but whenever they fall under a state or suffer damage of a certain element (regardless of the amount of damage) their resistance to the element or state increases by 1%, eventually reaching total immunity.
I also want to exclude one element and the death condition from these resistances.
I have no clue how to do this, or how to convey it in the menu, Does anyone know how i could do this?
Proration huh (your question is like a feature in certain online mobile game I played)*

*dont ask what game i mean

try to find Himework's script "progressive state" to make your question answered (but you need to do trial and error)

No script:
1.Make one skill and give it feature a common event and make it to hit one enemy
2.the common event you need to make:
i."force action" a skill which give the first state
ii. Make a conditional branch triggered by "enemy have the state from i skill"
Iii. if that condition fulfilled. Force action new skill which give another state
Iv. Under @else... line copy the i step and paste it

3. Make two skill and give a feature so it can give your enemy a state you want

Sry if it sounded too complicated. Try to send screenshoot and ask more ppl

Original thread: https://forums.rpgmakerweb.com/threads/help-with-progressive-resitances.125462/