- Add sleeping guard feature and fixes to 1.14 (#4124)
Adds a new feature where guards occasionally fall asleep. Those guards are woken up by hitting them, which either the player or other nearby guards do. Less experienced guards fall asleep faster, while more experienced guards not as often. For the sleeping I've added a sleeping particle animation, which sleeping citizens now also use. The guards also are sitting down to sleep, using a tiny invisible entity to sit one, we can re-use it later for e.g. sitting in the restaurant.
Also added a vanilla particle for when a worker levels up, using the villagers particle. For guards I've reworked part of their targeting logic, fixing various targeting bugs, like the guard not stopping to chase after a while as intended.
Rebalanced the combat stats of ranger and knight a bit, knights no longer block 100% of the damage they'd take while waiting for their attack cooldown, instead they still take 50% of the damage. In return they've received higher health and lost their attackspeed scaling from level. So that the knight is more durable/less flexible and does less damage than the rangers. For applying the health modifiers I've moved that functionality out of the citizen into an utility class and added that health changes keep them on their current percent HP, so they no longer loose current hp on levelup. Also lowered their movementspeed a bit as they were getting too fast with levels.
Added a potion regeneration effect to guards which waiting at their blockhut for health regeneration.
Fixes: Fixed the guardtowers low health retrival button description Fixed a bug where a citizen could create a new path each tick while waiting for a delay. Fixed a bug where rangers would not attack when a target is exactly at their attack range's distance Fixed guards not targeting pvp-hostile players and their guards Various other fixes for guard targeting and their combat ai Guards armor now takes damage at the same rat...