M&B: Bannerlord 1.2.7
The horns sound, the ravens gather.
Loading...
Searching...
No Matches
TaleWorlds.MountAndBlade.ComponentInterfaces.AgentApplyDamageModel Class Referenceabstract

Inherits TaleWorlds.Core.GameModel.

Inherited by SandBox.GameComponents.SandboxAgentApplyDamageModel, TaleWorlds.MountAndBlade.CustomAgentApplyDamageModel, and TaleWorlds.MountAndBlade.MultiplayerAgentApplyDamageModel.

Public Member Functions

abstract float CalculateDamage (in AttackInformation attackInformation, in AttackCollisionData collisionData, in MissionWeapon weapon, float baseDamage)
 Calculates/modifies base damage when a weapon collides with it target. Perks and skill effects that increase base weapon damage can be implemented with this method.
 
abstract void DecideMissileWeaponFlags (Agent attackerAgent, MissionWeapon missileWeapon, ref WeaponFlags missileWeaponFlags)
 Overrides weapon flags for a missile weapon when it leaves the bow/crossbow or the user's hand. For example if a missile can penetrate shields, CanPenetrateShield flag can be added within this method.
 
abstract void CalculateDefendedBlowStunMultipliers (Agent attackerAgent, Agent defenderAgent, CombatCollisionResult collisionResult, WeaponComponentData attackerWeapon, WeaponComponentData defenderWeapon, out float attackerStunMultiplier, out float defenderStunMultiplier)
 Calculates stun multipliers when a defender agents successfully defends (by blocking, parrying etc.) against an attacker's weapon blow. This scales how long the defender and the attacker will play the stun animation. For example hitting a defender agent's shield with a one handed weapon while it is blocking will cause the attacker to stun momentarily. Perfect blocks (i.e. blocking an attack from the correct side at the right moment) should reduce defender's stun amount as well.
 
abstract float CalculateStaggerThresholdDamage (Agent defenderAgent, in Blow blow)
 Calculates stagger damage threshold damage for the given agent. If the agent is staggered by an attack then any combat animations it is currently performing will be stopped momentarily. If an attack fails to stagger an agent, the agent will still take the attack's damage but its current combat animation will continue.
 
abstract float CalculateAlternativeAttackDamage (BasicCharacterObject attackerCharacter, WeaponComponentData weapon)
 Calculates alternative attack damage (weapon bashes, shield bashes and kicks)
 
abstract float CalculatePassiveAttackDamage (BasicCharacterObject attackerCharacter, in AttackCollisionData collisionData, float baseDamage)
 Calculates/modifies passive attack damage (i.e. couched lance damage or spear brace damage)
 
abstract MeleeCollisionReaction DecidePassiveAttackCollisionReaction (Agent attacker, Agent defender, bool isFatalHit)
 Decides melee collision reaction for passive attacks (i.e. couched lance attacks or spear brace attacks) Passive attacks can hit one target or slice through multiple targets depending on the returned value.
 
abstract float CalculateShieldDamage (in AttackInformation attackInformation, float baseDamage)
 Calculates/modifies damage dealt to a shield.
 
abstract float GetDamageMultiplierForBodyPart (BoneBodyPartType bodyPart, DamageTypes type, bool isHuman, bool isMissile)
 Returns damage multiplier for a body part (i.e. certain body parts like neck & head can have higher multipliers for increase damage).
 
abstract bool CanWeaponIgnoreFriendlyFireChecks (WeaponComponentData weapon)
 Decides if the given weapon can ignore friendly fire checks and deal friendly fire damage.
 
abstract bool CanWeaponDismount (Agent attackerAgent, WeaponComponentData attackerWeapon, in Blow blow, in AttackCollisionData collisionData)
 Decides if the given weapon and blow can dismount its target.
 
abstract bool CanWeaponKnockback (Agent attackerAgent, WeaponComponentData attackerWeapon, in Blow blow, in AttackCollisionData collisionData)
 Decides if the given weapon and blow can knock back its target.
 
abstract bool CanWeaponKnockDown (Agent attackerAgent, Agent victimAgent, WeaponComponentData attackerWeapon, in Blow blow, in AttackCollisionData collisionData)
 Decides if the given weapon and blow can knock down its target.
 
abstract bool DecideCrushedThrough (Agent attackerAgent, Agent defenderAgent, float totalAttackEnergy, Agent.UsageDirection attackDirection, StrikeType strikeType, WeaponComponentData defendItem, bool isPassiveUsageHit)
 
abstract bool DecideAgentShrugOffBlow (Agent victimAgent, AttackCollisionData collisionData, in Blow blow)
 Decide if victim agent can successfully shrug off blow. Blows that are shrugged off does not deal damage and does not apply combat mechanics (knock back, knock down etc.)
 
abstract bool DecideAgentDismountedByBlow (Agent attackerAgent, Agent victimAgent, in AttackCollisionData collisionData, WeaponComponentData attackerWeapon, in Blow blow)
 Decide if a mounted victim can be dismounted by a blow. Victim must be a mounted human.
 
abstract bool DecideAgentKnockedBackByBlow (Agent attackerAgent, Agent victimAgent, in AttackCollisionData collisionData, WeaponComponentData attackerWeapon, in Blow blow)
 Decides if a victim can be knocked back by a blow. Only applies to agents on foot. Victim must not be mounted.
 
abstract bool DecideAgentKnockedDownByBlow (Agent attackerAgent, Agent victimAgent, in AttackCollisionData collisionData, WeaponComponentData attackerWeapon, in Blow blow)
 Decides if a victim can be knocked down by a blow. Only applies to agents on foot. Victim must not be mounted.
 
abstract bool DecideMountRearedByBlow (Agent attackerAgent, Agent victimAgent, in AttackCollisionData collisionData, WeaponComponentData attackerWeapon, in Blow blow)
 Decides if mount can be reared by a blow (i.e. a polearm thrust attack). Victim must be a mount.
 
abstract float GetDismountPenetration (Agent attackerAgent, WeaponComponentData attackerWeapon, in Blow blow, in AttackCollisionData collisionData)
 Returns dismount penetration of a blow used for defeating an enemy's dismount resistance.
 
abstract float GetKnockBackPenetration (Agent attackerAgent, WeaponComponentData attackerWeapon, in Blow blow, in AttackCollisionData collisionData)
 Returns knock back penetration of a blow used for defeating an enemy's knockback resistance.
 
abstract float GetKnockDownPenetration (Agent attackerAgent, WeaponComponentData attackerWeapon, in Blow blow, in AttackCollisionData collisionData)
 Returns knock down penetration of a blow used for defeating an enemy's knock down resistance.
 
abstract float GetHorseChargePenetration ()
 Returns knock down penetration for horse charge (trample) for defeating an enemy's knock down resistance.
 

Member Function Documentation

◆ CalculateDamage()

abstract float TaleWorlds.MountAndBlade.ComponentInterfaces.AgentApplyDamageModel.CalculateDamage ( in AttackInformation  attackInformation,
in AttackCollisionData  collisionData,
in MissionWeapon  weapon,
float  baseDamage 
)
pure virtual

◆ DecideMissileWeaponFlags()

abstract void TaleWorlds.MountAndBlade.ComponentInterfaces.AgentApplyDamageModel.DecideMissileWeaponFlags ( Agent  attackerAgent,
MissionWeapon  missileWeapon,
ref WeaponFlags  missileWeaponFlags 
)
pure virtual

◆ CalculateDefendedBlowStunMultipliers()

abstract void TaleWorlds.MountAndBlade.ComponentInterfaces.AgentApplyDamageModel.CalculateDefendedBlowStunMultipliers ( Agent  attackerAgent,
Agent  defenderAgent,
CombatCollisionResult  collisionResult,
WeaponComponentData  attackerWeapon,
WeaponComponentData  defenderWeapon,
out float  attackerStunMultiplier,
out float  defenderStunMultiplier 
)
pure virtual

◆ CalculateStaggerThresholdDamage()

abstract float TaleWorlds.MountAndBlade.ComponentInterfaces.AgentApplyDamageModel.CalculateStaggerThresholdDamage ( Agent  defenderAgent,
in Blow  blow 
)
pure virtual

◆ CalculateAlternativeAttackDamage()

abstract float TaleWorlds.MountAndBlade.ComponentInterfaces.AgentApplyDamageModel.CalculateAlternativeAttackDamage ( BasicCharacterObject  attackerCharacter,
WeaponComponentData  weapon 
)
pure virtual

◆ CalculatePassiveAttackDamage()

abstract float TaleWorlds.MountAndBlade.ComponentInterfaces.AgentApplyDamageModel.CalculatePassiveAttackDamage ( BasicCharacterObject  attackerCharacter,
in AttackCollisionData  collisionData,
float  baseDamage 
)
pure virtual

◆ DecidePassiveAttackCollisionReaction()

abstract MeleeCollisionReaction TaleWorlds.MountAndBlade.ComponentInterfaces.AgentApplyDamageModel.DecidePassiveAttackCollisionReaction ( Agent  attacker,
Agent  defender,
bool  isFatalHit 
)
pure virtual

◆ CalculateShieldDamage()

abstract float TaleWorlds.MountAndBlade.ComponentInterfaces.AgentApplyDamageModel.CalculateShieldDamage ( in AttackInformation  attackInformation,
float  baseDamage 
)
pure virtual

◆ GetDamageMultiplierForBodyPart()

abstract float TaleWorlds.MountAndBlade.ComponentInterfaces.AgentApplyDamageModel.GetDamageMultiplierForBodyPart ( BoneBodyPartType  bodyPart,
DamageTypes  type,
bool  isHuman,
bool  isMissile 
)
pure virtual

◆ CanWeaponIgnoreFriendlyFireChecks()

abstract bool TaleWorlds.MountAndBlade.ComponentInterfaces.AgentApplyDamageModel.CanWeaponIgnoreFriendlyFireChecks ( WeaponComponentData  weapon)
pure virtual

◆ CanWeaponDismount()

abstract bool TaleWorlds.MountAndBlade.ComponentInterfaces.AgentApplyDamageModel.CanWeaponDismount ( Agent  attackerAgent,
WeaponComponentData  attackerWeapon,
in Blow  blow,
in AttackCollisionData  collisionData 
)
pure virtual

◆ CanWeaponKnockback()

abstract bool TaleWorlds.MountAndBlade.ComponentInterfaces.AgentApplyDamageModel.CanWeaponKnockback ( Agent  attackerAgent,
WeaponComponentData  attackerWeapon,
in Blow  blow,
in AttackCollisionData  collisionData 
)
pure virtual

◆ CanWeaponKnockDown()

abstract bool TaleWorlds.MountAndBlade.ComponentInterfaces.AgentApplyDamageModel.CanWeaponKnockDown ( Agent  attackerAgent,
Agent  victimAgent,
WeaponComponentData  attackerWeapon,
in Blow  blow,
in AttackCollisionData  collisionData 
)
pure virtual

◆ DecideCrushedThrough()

abstract bool TaleWorlds.MountAndBlade.ComponentInterfaces.AgentApplyDamageModel.DecideCrushedThrough ( Agent  attackerAgent,
Agent  defenderAgent,
float  totalAttackEnergy,
Agent.UsageDirection  attackDirection,
StrikeType  strikeType,
WeaponComponentData  defendItem,
bool  isPassiveUsageHit 
)
pure virtual

◆ DecideAgentShrugOffBlow()

abstract bool TaleWorlds.MountAndBlade.ComponentInterfaces.AgentApplyDamageModel.DecideAgentShrugOffBlow ( Agent  victimAgent,
AttackCollisionData  collisionData,
in Blow  blow 
)
pure virtual

◆ DecideAgentDismountedByBlow()

abstract bool TaleWorlds.MountAndBlade.ComponentInterfaces.AgentApplyDamageModel.DecideAgentDismountedByBlow ( Agent  attackerAgent,
Agent  victimAgent,
in AttackCollisionData  collisionData,
WeaponComponentData  attackerWeapon,
in Blow  blow 
)
pure virtual

◆ DecideAgentKnockedBackByBlow()

abstract bool TaleWorlds.MountAndBlade.ComponentInterfaces.AgentApplyDamageModel.DecideAgentKnockedBackByBlow ( Agent  attackerAgent,
Agent  victimAgent,
in AttackCollisionData  collisionData,
WeaponComponentData  attackerWeapon,
in Blow  blow 
)
pure virtual

◆ DecideAgentKnockedDownByBlow()

abstract bool TaleWorlds.MountAndBlade.ComponentInterfaces.AgentApplyDamageModel.DecideAgentKnockedDownByBlow ( Agent  attackerAgent,
Agent  victimAgent,
in AttackCollisionData  collisionData,
WeaponComponentData  attackerWeapon,
in Blow  blow 
)
pure virtual

◆ DecideMountRearedByBlow()

abstract bool TaleWorlds.MountAndBlade.ComponentInterfaces.AgentApplyDamageModel.DecideMountRearedByBlow ( Agent  attackerAgent,
Agent  victimAgent,
in AttackCollisionData  collisionData,
WeaponComponentData  attackerWeapon,
in Blow  blow 
)
pure virtual

◆ GetDismountPenetration()

abstract float TaleWorlds.MountAndBlade.ComponentInterfaces.AgentApplyDamageModel.GetDismountPenetration ( Agent  attackerAgent,
WeaponComponentData  attackerWeapon,
in Blow  blow,
in AttackCollisionData  collisionData 
)
pure virtual

◆ GetKnockBackPenetration()

abstract float TaleWorlds.MountAndBlade.ComponentInterfaces.AgentApplyDamageModel.GetKnockBackPenetration ( Agent  attackerAgent,
WeaponComponentData  attackerWeapon,
in Blow  blow,
in AttackCollisionData  collisionData 
)
pure virtual

◆ GetKnockDownPenetration()

abstract float TaleWorlds.MountAndBlade.ComponentInterfaces.AgentApplyDamageModel.GetKnockDownPenetration ( Agent  attackerAgent,
WeaponComponentData  attackerWeapon,
in Blow  blow,
in AttackCollisionData  collisionData 
)
pure virtual

◆ GetHorseChargePenetration()

abstract float TaleWorlds.MountAndBlade.ComponentInterfaces.AgentApplyDamageModel.GetHorseChargePenetration ( )
pure virtual