1
0
Fork 0
mirror of https://github.com/OpenMW/openmw.git synced 2025-01-22 03:53:54 +00:00
openmw/components/gameplay/autocalcspell.hpp
cc9cii 6b00d4ad91 Move NPC autocalc to a separate component so that it can be shared between OpenMW and OpenCS.
- Vanilla behaviour mimic'd where possible, except copying over autocalc spells to the npc's spell list when the status changes
2015-06-24 21:05:59 +10:00

38 lines
943 B
C++

#ifndef COMPONENTS_GAMEPLAY_AUTOCALCSPELL_H
#define COMPONENTS_GAMEPLAY_AUTOCALCSPELL_H
#include <vector>
#include <components/esm/loadskil.hpp>
namespace ESM
{
struct Spell;
struct Race;
}
namespace GamePlay
{
class StoreWrap;
/// Contains algorithm for calculating an NPC's spells based on stats
std::vector<std::string> autoCalcNpcSpells(const int* actorSkills,
const int* actorAttributes, const ESM::Race* race, StoreWrap *store);
// Helpers
bool attrSkillCheck (const ESM::Spell* spell, const int* actorSkills, const int* actorAttributes, StoreWrap *store);
ESM::Skill::SkillEnum mapSchoolToSkill(int school);
void calcWeakestSchool(const ESM::Spell* spell,
const int* actorSkills, int& effectiveSchool, float& skillTerm, StoreWrap *store);
float calcAutoCastChance(const ESM::Spell* spell,
const int* actorSkills, const int* actorAttributes, int effectiveSchool, StoreWrap *store);
}
#endif