Difference between revisions of "Combat h"

From Dragon Age Toolset Wiki
Jump to: navigation, search
(Created page with "===Includes:=== effects_h <br> items_h <br> combat_damage_h <br> ui_h <br> sys_soundset_h <br> ai_threat_h <br> 2da_constants_h <br> stats_core_h...")
 
m (moved Combat H to Combat h: Correcting case)
 
(3 intermediate revisions by 2 users not shown)
Line 1: Line 1:
===Includes:===
+
The [[combat_h]] include file holds the combat resolution logic for the tactic game.
  
[[effects_h]] <br>
+
Item specific functions are included from [[items_h]]. Damage specific functions (such as attack damage calculations and resists) are included from [[combat_damage_h]]
[[items_h]] <br>
+
[[combat_damage_h]] <br>
+
[[ui_h]] <br>
+
[[sys_soundset_h]] <br>
+
[[ai_threat_h]] <br>
+
[[2da_constants_h]] <br>
+
[[stats_core_h]] <br>
+
  
===Constants:===
+
Be aware that this is a core game resource - any change to this file has the potential to wreck the combat system so handle with care.
 +
 
 +
== References ==
 +
 
 +
* [[2da_constants_h]]
 +
* [[effects_h]]
 +
* [[combat_damage_h]]
 +
* [[items_h]]
 +
* [[stats_core_h]]
 +
* [[sys_soundset_h]]
 +
* [[ui_h]]
 +
 
 +
== Constants ==
 
<dascript>
 
<dascript>
 
const float ATTACK_LOOP_DURATION_INVALID = 999.0f;  
 
const float ATTACK_LOOP_DURATION_INVALID = 999.0f;  
 +
 +
// General bias in the system towards hits instead of misses.
 
const float ATTACK_HIT_BIAS = 4.0f;  
 
const float ATTACK_HIT_BIAS = 4.0f;  
// General bias in the system towards hits instead of misses.
 
  
 
const int ATTACK_TYPE_MELEE = 1;  
 
const int ATTACK_TYPE_MELEE = 1;  
 
const int ATTACK_TYPE_RANGED = 2;
 
const int ATTACK_TYPE_RANGED = 2;
  
 +
// at this % of health, any meelee attack may trigger the deathblow of special bosses;
 
const float SPECIAL_BOSS_DEATHBLOW_THRESHOLD = 0.04;  
 
const float SPECIAL_BOSS_DEATHBLOW_THRESHOLD = 0.04;  
// at this % of health, any meelee attack may trigger the deathblow of special bosses;
 
  
// -----------------------------------------------------------------------------
 
 
// Point blank range (no penalty range for bows)  
 
// Point blank range (no penalty range for bows)  
// -----------------------------------------------------------------------------
 
 
const float POINT_BLANK_RANGE = 8.0f;  
 
const float POINT_BLANK_RANGE = 8.0f;  
 
</dascript>
 
</dascript>
 +
== Structs ==
  
===Structs===
+
<DynamicPageList>
<dascript>
+
category    = Structs from combat_h
 
+
order       = ascending
// -----------------------------------------------------------------------------
+
ordermethod = sortkey
// Attack Result struct, used by Combat_PerformAttack* <br>
+
</DynamicPageList>
// -----------------------------------------------------------------------------
+
== Functions ==
struct CombatAttackResultStruct
+
{
+
 
+
    int    nAttackResult;      //  - COMBAT_RESULT_* constant
+
    int    nDeathblowType;
+
    float  fAttackDuration;  //  - Duration of the aim loop for ranged weapons
+
    effect  eImpactEffect;       //  - Impact Effect
+
};
+
</dascript>
+
 
+
  
===Functions===
+
<DynamicPageList>
 +
category    = Functions from combat_h
 +
order      = ascending
 +
ordermethod = sortkey
 +
</DynamicPageList>
  
[[Combat_GetAttackHand | int Combat_GetAttackHand(object oCreature = OBJECT_SELF)]] <br>
+
[[Category:Include files from Core Game Resources]][[Category:Include files]]
[[CheckForDeathblow | int CheckForDeathblow(object oAttacker, object oTarget)]] <br>
+
[[Combat_GetValidDeathblow | int Combat_GetValidDeathblow(object oAttacker, object oTarget)]] <br>
+
[[Combat_GetAttackType | int Combat_GetAttackType(object oAttacker, object oWeapon)]] <br>
+
[[Combat_GetFlankingBonus | float Combat_GetFlankingBonus(object oAttacker, object oTarget)]] <br>
+
[[Combat_CheckBackStab | int Combat_CheckBackstab(object oAttacker, object oTarget, object oWeapon, float fFlankingBonus)]] <br>
+
[[Combat_GetAttackResult | int Combat_GetAttackResult(object oAttacker, object oTarget, object oWeapon, float fBonus = 0.0f, int nAbility = 0)]] <br>
+
[[Combat_PerformAttack | struct CombatAttackResultStruct Combat_PerformAttack(object oAttacker, object oTarget, object oWeapon ,  float fDamageOverride = 0.0f, int nAbility = 0)]] <br>
+
[[Combat_HandleCommandAttack | int  Combat_HandleCommandAttack(object oAttacker, object oTarget, int nCommandSubType)]] <br>
+
[[Combat_HandleAttackImpact | void Combat_HandleAttackImpact(object oAttacker, object oTarget, int nAttackResult, effect eImpactEffect)]] <br>
+
[[Combat_HandleAbilityAttackImpact | void Combat_HandleAbilityAttackImpact(object oAttacker, object oTarget, int nAttackResult, float fDamage)]] <br>
+
[[Combat_HandleCreatureDisappear | void Combat_HandleCreatureDisappear(object oCreature, object oDisappearer)]] <br>
+
[[IsCombatHit | int IsCombatHit(int nAttackResult)]] <br>
+
--------------------------------------------------------------------<br>
+
Category: [[Core Includes]]
+

Latest revision as of 15:30, 7 August 2011

The combat_h include file holds the combat resolution logic for the tactic game.

Item specific functions are included from items_h. Damage specific functions (such as attack damage calculations and resists) are included from combat_damage_h

Be aware that this is a core game resource - any change to this file has the potential to wreck the combat system so handle with care.

References

Constants

const float ATTACK_LOOP_DURATION_INVALID = 999.0f; 
 
// General bias in the system towards hits instead of misses. 
const float ATTACK_HIT_BIAS = 4.0f; 
 
const int ATTACK_TYPE_MELEE = 1; 
const int ATTACK_TYPE_RANGED = 2;
 
// at this % of health, any meelee attack may trigger the deathblow of special bosses; 
const float SPECIAL_BOSS_DEATHBLOW_THRESHOLD = 0.04; 
 
// Point blank range (no penalty range for bows) 
const float POINT_BLANK_RANGE = 8.0f;

Structs

Functions