Difference between revisions of "Combat damage h.nss"
From Dragon Age Toolset Wiki
(Created page with '=== Overview === combat_damage_h.nss handles the core rule resolution logic for non-spell damage. === Notable Functions === ==== Combat_Damage_GetBackstabDamage ==== Determ...') |
(→Combat_Damage_GetBackstabDamage) |
||
Line 21: | Line 21: | ||
// ------------------------------------------------------------------------- | // ------------------------------------------------------------------------- | ||
− | // Exploit Weakness: Backstab Damage | + | // Exploit Weakness: Backstab Damage + max(CUN-10,0) / 3.0 |
// ------------------------------------------------------------------------- | // ------------------------------------------------------------------------- | ||
if (HasAbility(oAttacker,ABILITY_TALENT_EXPLOIT_WEAKNESS)) | if (HasAbility(oAttacker,ABILITY_TALENT_EXPLOIT_WEAKNESS)) |
Revision as of 19:19, 28 October 2009
Overview
combat_damage_h.nss handles the core rule resolution logic for non-spell damage.
Notable Functions
Combat_Damage_GetBackstabDamage
Determines the backstab damage given attacker, weapon and attack damage. Note: This function was slightly modified from the toolset version to remove some non-essential elements for clarity.
float Combat_Damage_GetBackstabDamage(object oAttacker, object oWeapon, float fDamage) { // ------------------------------------------------------------------------ // Each backstab is an auto crit. // ------------------------------------------------------------------------ fDamage *= GetCriticalDamageModifier(oAttacker); // ------------------------------------------------------------------------- // Exploit Weakness: Backstab Damage + max(CUN-10,0) / 3.0 // ------------------------------------------------------------------------- if (HasAbility(oAttacker,ABILITY_TALENT_EXPLOIT_WEAKNESS)) { float fBase = MaxF(0.0,(GetAttributeModifier(oAttacker,PROPERTY_ATTRIBUTE_CUNNING)/3.0)) ; float fMod = MaxF(0.2,RandomFloat()); fDamage += (fBase * fMod); } return fDamage; }