reworked player damage, enemy damage and enemy movement handling

changed the way the enemy handles taking damage, changed the way the
enemy checks if its dead, changed the way the player hurts the enemy,
fixed player damage and changed the way the enemy handles movement so
that its based on behavioral states(which allows us to have the enemy
movwe diferently depending on it state rather than its relative
position)