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