mirror of
https://github.com/sfall-team/sfall.git
synced 2026-07-27 16:52:34 -07:00
Updated NPC combat control mod to work with BoxBarCount.
Added additional notes to HOOK_COMBATDAMAGE in hookscripts.txt.
This commit is contained in:
Binary file not shown.
@@ -21,6 +21,7 @@ variable
|
|||||||
pidList,
|
pidList,
|
||||||
displayName,
|
displayName,
|
||||||
displayNameColor,
|
displayNameColor,
|
||||||
|
maxBoxCount,
|
||||||
inControl := false,
|
inControl := false,
|
||||||
hasGeckoSkinning := false;
|
hasGeckoSkinning := false;
|
||||||
|
|
||||||
@@ -57,6 +58,7 @@ procedure combatturn_handler begin
|
|||||||
end
|
end
|
||||||
|
|
||||||
procedure gamemodechange_handler begin
|
procedure gamemodechange_handler begin
|
||||||
|
if has_trait(TRAIT_PERK, real_dude_obj, PERK_gecko_skinning_perk) then hasGeckoSkinning := true;
|
||||||
if not(get_game_mode BWAND COMBAT) then inControl := false;
|
if not(get_game_mode BWAND COMBAT) then inControl := false;
|
||||||
end
|
end
|
||||||
|
|
||||||
@@ -65,14 +67,15 @@ procedure start begin
|
|||||||
set_perk_ranks(PERK_gecko_skinning_perk, 1);
|
set_perk_ranks(PERK_gecko_skinning_perk, 1);
|
||||||
set_perk_level(PERK_gecko_skinning_perk, 999); // prevent it from appearing in the perk selection window
|
set_perk_level(PERK_gecko_skinning_perk, 999); // prevent it from appearing in the perk selection window
|
||||||
controlMode := GetConfig("CombatControl", "Mode", 0);
|
controlMode := GetConfig("CombatControl", "Mode", 0);
|
||||||
displayName := GetConfig("CombatControl", "DisplayName", 0);
|
|
||||||
displayNameColor := GetConfig("CombatControl", "DisplayNameColor", 0);
|
|
||||||
if (controlMode > 2) then controlMode := 0;
|
if (controlMode > 2) then controlMode := 0;
|
||||||
if (displayName < 5 or displayName > 9) then displayName := 0;
|
|
||||||
if (controlMode > 0) then begin
|
if (controlMode > 0) then begin
|
||||||
pidList := GetConfigListInt("CombatControl", "PIDList");
|
pidList := GetConfigListInt("CombatControl", "PIDList");
|
||||||
fix_array(pidList);
|
fix_array(pidList);
|
||||||
if has_trait(TRAIT_PERK, dude_obj, PERK_gecko_skinning_perk) then hasGeckoSkinning := true;
|
maxBoxCount := get_ini_setting("ddraw.ini|Misc|BoxBarCount") + 4;
|
||||||
|
displayName := GetConfig("CombatControl", "DisplayName", 0);
|
||||||
|
displayNameColor := GetConfig("CombatControl", "DisplayNameColor", 0);
|
||||||
|
if (maxBoxCount < 9) then maxBoxCount := 9;
|
||||||
|
if (displayName < 5 or displayName > maxBoxCount) then displayName := 0;
|
||||||
|
|
||||||
register_hook_proc(HOOK_COMBATTURN, combatturn_handler);
|
register_hook_proc(HOOK_COMBATTURN, combatturn_handler);
|
||||||
register_hook_proc(HOOK_GAMEMODECHANGE, gamemodechange_handler);
|
register_hook_proc(HOOK_GAMEMODECHANGE, gamemodechange_handler);
|
||||||
|
|||||||
@@ -162,8 +162,8 @@ critter arg1 - The target
|
|||||||
critter arg2 - The attacker
|
critter arg2 - The attacker
|
||||||
int arg3 - The amount of damage to the target
|
int arg3 - The amount of damage to the target
|
||||||
int arg4 - The amount of damage to the attacker
|
int arg4 - The amount of damage to the attacker
|
||||||
int arg5 - The special effect flags for the target
|
int arg5 - The special effect flags for the target (use bwand DAM_* to check specific flags)
|
||||||
int arg6 - The special effect flags for the attacker
|
int arg6 - The special effect flags for the attacker (use bwand DAM_* to check specific flags)
|
||||||
int arg7 - The weapon used in the attack
|
int arg7 - The weapon used in the attack
|
||||||
int arg8 - The bodypart that was struck
|
int arg8 - The bodypart that was struck
|
||||||
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, but with Silent Death perk and the corresponding attack conditions, it's 4; for critical hits, the value is taken from the critical table)
|
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, but with Silent Death perk and the corresponding attack conditions, it's 4; for critical hits, the value is taken from the critical table)
|
||||||
|
|||||||
Reference in New Issue
Block a user