OpenMW
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
Namespaces | Functions
combat.cpp File Reference
#include "combat.hpp"
#include <components/misc/rng.hpp>
#include <components/sceneutil/positionattitudetransform.hpp>
#include "../mwbase/environment.hpp"
#include "../mwbase/world.hpp"
#include "../mwbase/mechanicsmanager.hpp"
#include "../mwbase/soundmanager.hpp"
#include "../mwbase/windowmanager.hpp"
#include "../mwworld/class.hpp"
#include "../mwworld/inventorystore.hpp"
#include "../mwworld/esmstore.hpp"
#include "npcstats.hpp"
#include "movement.hpp"
#include "spellcasting.hpp"
#include "difficultyscaling.hpp"
#include "actorutil.hpp"
Include dependency graph for combat.cpp:

Namespaces

 anonymous_namespace{combat.cpp}
 
 MWMechanics
 Game mechanics and NPC-AI.
 

Functions

float anonymous_namespace{combat.cpp}::signedAngleRadians (const osg::Vec3f &v1, const osg::Vec3f &v2, const osg::Vec3f &normal)
 
bool MWMechanics::applyOnStrikeEnchantment (const MWWorld::Ptr &attacker, const MWWorld::Ptr &victim, const MWWorld::Ptr &object, const osg::Vec3f &hitPosition, const bool fromProjectile)
 
bool MWMechanics::blockMeleeAttack (const MWWorld::Ptr &attacker, const MWWorld::Ptr &blocker, const MWWorld::Ptr &weapon, float damage, float attackStrength)
 
void MWMechanics::resistNormalWeapon (const MWWorld::Ptr &actor, const MWWorld::Ptr &attacker, const MWWorld::Ptr &weapon, float &damage)
 
void MWMechanics::projectileHit (const MWWorld::Ptr &attacker, const MWWorld::Ptr &victim, MWWorld::Ptr weapon, const MWWorld::Ptr &projectile, const osg::Vec3f &hitPosition, float attackStrength)
 
float MWMechanics::getHitChance (const MWWorld::Ptr &attacker, const MWWorld::Ptr &victim, int skillValue)
 Get the chance (in percent) for attacker to successfully hit victim with a given weapon skill value. More...
 
void MWMechanics::applyElementalShields (const MWWorld::Ptr &attacker, const MWWorld::Ptr &victim)
 Applies damage to attacker based on the victim's elemental shields. More...
 
void MWMechanics::reduceWeaponCondition (float damage, bool hit, MWWorld::Ptr &weapon, const MWWorld::Ptr &attacker)
 
void MWMechanics::adjustWeaponDamage (float &damage, const MWWorld::Ptr &weapon, const MWWorld::Ptr &attacker)
 Adjust weapon damage based on its condition. A used weapon will be less effective. More...
 
void MWMechanics::getHandToHandDamage (const MWWorld::Ptr &attacker, const MWWorld::Ptr &victim, float &damage, bool &healthdmg, float attackStrength)
 
void MWMechanics::applyFatigueLoss (const MWWorld::Ptr &attacker, const MWWorld::Ptr &weapon, float attackStrength)
 Apply the fatigue loss incurred by attacking with the given weapon (weapon may be empty = hand-to-hand) More...
 
bool MWMechanics::isEnvironmentCompatible (const MWWorld::Ptr &attacker, const MWWorld::Ptr &victim)
 
float MWMechanics::getFightDistanceBias (const MWWorld::Ptr &actor1, const MWWorld::Ptr &actor2)