Difference between revisions of "Combat CheckBackStab"
From Dragon Age Toolset Wiki
Mouser9169 (Talk | contribs) m |
m (Fixing category) |
||
(2 intermediate revisions by one other user not shown) | |||
Line 1: | Line 1: | ||
Called by: | Called by: | ||
+ | |||
+ | Calls: | ||
Parameters: | Parameters: | ||
Variables: | Variables: | ||
+ | |||
+ | Returns: | ||
Used for: | Used for: | ||
Line 71: | Line 75: | ||
} | } | ||
</dascript> | </dascript> | ||
− | + | [[Category:Functions from combat_h]] | |
− | + |
Latest revision as of 15:31, 7 August 2011
Called by:
Calls:
Parameters:
Variables:
Returns:
Used for:
// ----------------------------------------------------------------------------- // Check if backstab conditions are true // ----------------------------------------------------------------------------- int Combat_CheckBackstab(object oAttacker, object oTarget, object oWeapon, float fFlankingBonus) { // ------------------------------------------------------------------------- // If we we are a rogue // ------------------------------------------------------------------------- if (!HasAbility(oAttacker, ABILITY_TALENT_HIDDEN_ROGUE)) { return FALSE; } if (!IsHumanoid(oAttacker)) { return FALSE; } // ------------------------------------------------------------------------- // And target is not immune // ------------------------------------------------------------------------- if (HasAbility(oTarget, ABILITY_TRAIT_CRITICAL_HIT_IMMUNITY)) { return FALSE; } // ------------------------------------------------------------------------- // And attacker does not use double strike mode // ------------------------------------------------------------------------- if (IsModalAbilityActive(oAttacker, ABILITY_TALENT_DUAL_WEAPON_DOUBLE_STRIKE)) { return FALSE; } // ------------------------------------------------------------------------- // We can only backstab if we are flanking. // ------------------------------------------------------------------------- if (fFlankingBonus>0.0) { return TRUE; } else { /* Coup de grace*/ if (HasAbility(oAttacker, ABILITY_TALENT_BACKSTAB)) { if (GetHasEffects(oTarget, EFFECT_TYPE_STUN)) { return TRUE; } else if (GetHasEffects(oTarget, EFFECT_TYPE_PARALYZE)) { return TRUE; } } } return FALSE; }