Characters focus on other characters when in combat - #938
Open
MrMelbert wants to merge 8 commits into
Open
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
When a mob punches, melees, shoots at, or throws something, they will "lock onto" whatever they hit.
This makes the mob constantly face the direction of their target, regardless of if either they or their target moves about.
This effect applies both to player mobs and to ai controlled mobs.
Though for player mobs, the "lock on" effect requires the player be in combat mode to activate.
It also has some additional exceptions (Doesn't lock onto invisible/stealthed mobs, requires line of sight...)
This my attempt to make combat look less like headless chickens running around.
If two combatants are engaged in mutual combat, they will attempt to keep each other in their field of view, instead of constantly doing twirls and twists to try to dodge attacks. However if one combatant is not interested in fighting (i.e. combat mode disabled) they will change direction like normal (so you don't weirdly maintain eye contact while running away).
(I guess this technically has some balance implications with the flash but it's probably actually an improvement because directional based combat is a coinflip currently)
This is inspired by strafe mode (from other downstreams) and strafe combat (from SS14). My thought process was making it an automatic process would make it play out more naturally instead of having to consciously think about it. (Who knows about what happens in practice though)