1
0
mirror of https://gitlab.com/OpenMW/openmw.git synced 2025-01-30 21:32:42 +00:00
OpenMW/apps/openmw/mwmechanics/spellpriority.hpp

42 lines
1.2 KiB
C++
Raw Normal View History

#ifndef OPENMW_SPELL_PRIORITY_H
#define OPENMW_SPELL_PRIORITY_H
2019-02-19 01:10:55 +03:00
namespace ESM
{
struct Spell;
struct EffectList;
struct ENAMstruct;
}
2019-02-19 01:10:55 +03:00
namespace MWWorld
{
class Ptr;
}
namespace MWMechanics
{
// RangeTypes using bitflags to allow multiple range types, as can be the case with spells having multiple effects.
enum RangeTypes
{
Self = 0x1,
Touch = 0x10,
Target = 0x100
};
2022-09-22 21:26:05 +03:00
int getRangeTypes(const ESM::EffectList& effects);
2022-09-22 21:26:05 +03:00
float rateSpell(const ESM::Spell* spell, const MWWorld::Ptr& actor, const MWWorld::Ptr& enemy);
float rateMagicItem(const MWWorld::Ptr& ptr, const MWWorld::Ptr& actor, const MWWorld::Ptr& enemy);
float ratePotion(const MWWorld::Ptr& item, const MWWorld::Ptr& actor);
/// @note target may be empty
2022-09-22 21:26:05 +03:00
float rateEffect(const ESM::ENAMstruct& effect, const MWWorld::Ptr& actor, const MWWorld::Ptr& enemy);
/// @note target may be empty
float rateEffects(
const ESM::EffectList& list, const MWWorld::Ptr& actor, const MWWorld::Ptr& enemy, bool useSpellMult = true);
float vanillaRateSpell(const ESM::Spell* spell, const MWWorld::Ptr& actor, const MWWorld::Ptr& enemy);
}
#endif