Begin onequip
set on to 1
set hp0 to player.getav health
set hp1 to player.getav EnduranceCondition
set hp2 to player.getav PerceptionCondition
set hp3 to player.getav LeftAttackCondition
set hp4 to player.getav RightAttackCondition
set hp5 to player.getav LeftMobilityCondition
set hp6 to player.getav RightMobilityCondition
End
Begin onunequip
set on to 0
End
Begin gamemode
if on == 1
set dmg0 to hp0 - player.getav health
if dmg0 > 0
set dmg1 to hp1 - player.getav EnduranceCondition
set dmg2 to hp2 - player.getav PerceptionCondition
set dmg3 to hp3 - player.getav LeftAttackCondition
set dmg4 to hp4 - player.getav RightAttackCondition
set dmg5 to hp5 - player.getav LeftMobilityCondition
set dmg6 to hp6 - player.getav RightMobilityCondition
if dmg0 < 350
player.restoreav health dmg0
player.restoreav EnduranceCondition dmg1
player.restoreav PerceptionCondition dmg2
player.restoreav LeftAttackCondition dmg3
player.restoreav RightAttackCondition dmg4
player.restoreav LeftMobilityCondition dmg5
player.restoreav RightMobilityCondition dmg6
return
else
set hp0 to player.getav health
set hp1 to player.getav EnduranceCondition
set hp2 to player.getav PerceptionCondition
set hp3 to player.getav LeftAttackCondition
set hp4 to player.getav RightAttackCondition
set hp5 to player.getav LeftMobilityCondition
set hp6 to player.getav RightMobilityCondition
endif
endif
endif
End