branchbefore/main/combat_revampcancel
24 Commits over 0 Days - ∞cph!
Started laying out the new combat AI (not at all functional yet)
Cleaned out most of the old AI and stats.
Basic implementation of fleeing calculation.
fixed threat calculation taking self and target into account more than once
Made some fixes to UnitIsBeingAttacked and the associated parts of Combat.
Added IsAttacking condition and used it to gate movement mode AI.
Exposed aggro ranges in CombatParameters and made them more reasonable on a few units.
Moved target observation to highest priority
removed IsAttacking conditions from movement mode AI because it's only true when actually hitting an enemy
Added a Targeting States enum to Combat to determine what we want to do about the current target.
Removed IsAttacking bool because we already have a States enum with an Attacking state.
Added back the AI for picking up thrown weapons (untested because I need that NRE fix from main)
remove null stats from the Stats component (because they probably got deleted)
WIP observing targets coming to an end after a while.
Various fixes to combat AI in the aim of getting it functional again.
Fixed some effects that still seemed to buff threat instead of bravery.
More observing WIP stuff.
Got combat basics working (at least 1v1 on nospawns...)
Bonus for current target when finding threat
fixed DSEs with no conditions in OR mode failing
fixed potential for units' threat to be accounted for twice when deciding to fight or flee