Added "combat_data" script function

Added a new argument to HOOK_COMBATDAMAGE.
Removed the check for valid objects from get/set_object_data functions.
Some code fixes.
This commit is contained in:
NovaRain
2020-10-08 13:49:58 +08:00
parent 2f750a8a4b
commit c71ca95665
10 changed files with 35 additions and 30 deletions
+2 -1
View File
@@ -174,6 +174,7 @@ int arg9 - Damage Multiplier (this is divided by 2, so a value of 3 does 1.
int arg10 - Number of bullets actually hit the target (1 for melee attacks)
int arg11 - The amount of knockback to the target
int arg12 - Attack Type (see ATKTYPE_* constants)
mixed arg13 - computed attack data (see C_ATTACK_* for offsets and use get/set_object_data functions to get/set the data)
int ret1 - The damage to the target
int ret2 - The damage to the attacker
@@ -619,7 +620,7 @@ int arg8 - bonus ranged damage from the perk
int arg9 - damage multiplier (this is divided by 2, so a value of 3 does 1.5x damage, and 8 does 4x damage. Usually it's 2; for critical hits, the value is taken from the critical table; with Silent Death perk and the corresponding attack conditions, the value will be doubled)
int arg10 - combat difficulty multiplier (125 - rough, 100 - normal, 75 - wimpy; for player or party members it's always 100)
int arg11 - the calculated amount of damage (usually 0, required when using multiple hook scripts to calculate damage and using the set_sfall_arg function)
mixed arg12 - computed attack results (see C_ATTACK_* for offsets and use get/set_object_data functions to get/set the data)
mixed arg12 - computed attack data (see C_ATTACK_* for offsets and use get/set_object_data functions to get/set the data)
int ret1 - the returned amount of damage