Difference between revisions of "Combat h"

From Dragon Age Toolset Wiki
Jump to: navigation, search
m
m (Adding description (from script header), adding dynamic page lists, adding categories)
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]] <br>
+
[[Category:Include files from Core Game Resources]][[Category:Include files]]
[[CheckForDeathblow]] <br>
+
[[Combat_GetValidDeathblow]] <br>
+
[[Combat_GetAttackType]] <br>
+
[[Combat_GetFlankingBonus]] <br>
+
[[Combat_CheckBackStab]] <br>
+
[[Combat_GetAttackResult]] <br>
+
[[Combat_PerformAttack]] <br>
+
[[Combat_HandleCommandAttack]] <br>
+
[[Combat_HandleAttackImpact]] <br>
+
[[Combat_HandleAbilityAttackImpact]] <br>
+
[[Combat_HandleCreatureDisappear]] <br>
+
[[IsCombatHit]] <br>
+
--------------------------------------------------------------------<br>
+
Category: [[Core Includes]]
+

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