
switch(playerstate)

>Alive
check health

>Dying
check resStart inventory
give cantRes

>Reviving
check res inventory
take cantRes

>Died
remove resStart inventory