Closed MicroChasm closed 2 years ago
Try to implement by adding a state called Alert. If alert, and can see player, attack. Otherwise investigate last seen position.
Alert should likely track entity id of what alerted them.
What about if you attack a golem? My initial thought is that they should not be able to react in that turn, since then there would be no reason to sneak up on them if they can retaliate immediately.
However, most attacks stun for at least one turn, or turn the golem to rubble, so I'm not sure that this is actually a problem.
I put in a basic implementation of an alert state. We can play test and make sure that this is what we want.
Try this out again. I modified golem behavior to work more like the way I thought it already worked, where they can keep taking actions until they take up their turn.
I think that it is worth trying the change where golems cannot attack you on the turn that they notice you. This would prevent unavoidable damage-- it would be frustrating to have one health left and die without seeing the golem.
This would also buff walking, as the player could duck behind the walls after getting seen.