mirror of
https://github.com/garbagemule/MobArena.git
synced 2024-11-26 04:25:21 +01:00
b0969c655c
The vanilla behavior for most mobs is that they just stop minding their targets' business if aggro is lost. The same applies to guardians and elder guardians. To prevent the pace of gameplay from stagnating, MobArena compensates for target loss by helping the mobs find a new target. The issue with this in terms of guardians is that breaking line of sight is the only way - besides killing it very quickly - to avoid taking damage from a guardian due to its lock-on laser attack. This means that guardians and elder guardians need to be excluded from the retargeting logic to make sense in an arena setting. This commit introduces a new EnumSet of EntityTypes to exclude from the retargeting logic. It is not a particularly pretty solution, especially not since ArenaListener is such a huge class already, but it does make it easier to add more mobs later down the road, and it does a slightly better job at giving way to a config setting at some point. For the Mobs Rework, a per-monster flag like `auto-retarget` or similar might be a much better solution, so it's possible to have encounters like a small batch of guardians that _don't_ lose their targets but have very little health, so the "race against time"-aspect can exist, but in a much more configurable way. Fixes #601 |
||
---|---|---|
.. | ||
main | ||
test |