M&B: Bannerlord 1.2.9
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

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.
 
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.
 
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.
 
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.
 
float CalculateAlternativeAttackDamage (BasicCharacterObject attackerCharacter, WeaponComponentData weapon)
 Calculates alternative attack damage (weapon bashes, shield bashes and kicks)
 
float CalculatePassiveAttackDamage (BasicCharacterObject attackerCharacter, in AttackCollisionData collisionData, float baseDamage)
 Calculates/modifies passive attack damage (i.e. couched lance damage or spear brace damage)
 
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.
 
float CalculateShieldDamage (in AttackInformation attackInformation, float baseDamage)
 Calculates/modifies damage dealt to a shield.
 
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).
 
bool CanWeaponIgnoreFriendlyFireChecks (WeaponComponentData weapon)
 Decides if the given weapon can ignore friendly fire checks and deal friendly fire damage.
 
bool CanWeaponDismount (Agent attackerAgent, WeaponComponentData attackerWeapon, in Blow blow, in AttackCollisionData collisionData)
 Decides if the given weapon and blow can dismount its target.
 
bool CanWeaponKnockback (Agent attackerAgent, WeaponComponentData attackerWeapon, in Blow blow, in AttackCollisionData collisionData)
 Decides if the given weapon and blow can knock back its target.
 
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.
 
bool DecideCrushedThrough (Agent attackerAgent, Agent defenderAgent, float totalAttackEnergy, Agent.UsageDirection attackDirection, StrikeType strikeType, WeaponComponentData defendItem, bool isPassiveUsageHit)
 
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.)
 
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.
 
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.
 
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.
 
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.
 
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.
 
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.
 
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.
 
float GetHorseChargePenetration ()
 Returns knock down penetration for horse charge (trample) for defeating an enemy's knock down resistance.
 

Member Function Documentation

◆ CalculateDamage()

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

◆ DecideMissileWeaponFlags()

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

◆ CalculateDefendedBlowStunMultipliers()

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

◆ CalculateStaggerThresholdDamage()

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

◆ CalculateAlternativeAttackDamage()

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

◆ CalculatePassiveAttackDamage()

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

◆ DecidePassiveAttackCollisionReaction()

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

◆ CalculateShieldDamage()

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

◆ GetDamageMultiplierForBodyPart()

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

◆ CanWeaponIgnoreFriendlyFireChecks()

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

◆ CanWeaponDismount()

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

◆ CanWeaponKnockback()

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

◆ CanWeaponKnockDown()

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

◆ DecideCrushedThrough()

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

◆ DecideAgentShrugOffBlow()

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

◆ DecideAgentDismountedByBlow()

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

◆ DecideAgentKnockedBackByBlow()

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

◆ DecideAgentKnockedDownByBlow()

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

◆ DecideMountRearedByBlow()

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

◆ GetDismountPenetration()

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

◆ GetKnockBackPenetration()

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

◆ GetKnockDownPenetration()

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

◆ GetHorseChargePenetration()

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