feat: enemies now use weights on their attacks (#2004)

* feat: enemies now use weights on their attacks

tested that 8 times out of 10, in close range, spiders did a web attack instead of a melee attack, vs the prior behavior of always following a pattern

fixes #2002

* feedback
This commit is contained in:
David Markowitz
2026-06-18 23:27:14 -07:00
committed by GitHub
parent 0f17e1de3b
commit ce9d4e823c
4 changed files with 68 additions and 36 deletions

View File

@@ -4,12 +4,13 @@
#include "CDTable.h"
#include <cstdint>
#include <vector>
struct CDObjectSkills {
uint32_t objectTemplate; //!< The LOT of the item
uint32_t skillID; //!< The Skill ID of the object
uint32_t castOnType; //!< ???
uint32_t AICombatWeight; //!< ???
int32_t AICombatWeight; //!< ???
};
class CDObjectSkillsTable : public CDTable<CDObjectSkillsTable, std::vector<CDObjectSkills>> {
@@ -17,5 +18,6 @@ public:
void LoadValuesFromDatabase();
// Queries the table with a custom "where" clause
std::vector<CDObjectSkills> Query(std::function<bool(CDObjectSkills)> predicate);
std::vector<CDObjectSkills> Get(const LOT lot) const;
};