if (fixed_param == 2) then begin
if (target_obj == dude_obj) then begin
if not(global_var(0)) then begin
if global_var(21) or global_var(34) then begin
variable Glowing := 0;
if global_var(21) and ((obj_pid(self_obj) == (16777216 + 16)) or (obj_pid(self_obj) == (16777216 + 182)) or (obj_pid(self_obj) == (16777216 + 183)) or (obj_pid(self_obj) == (16777216 + 160)) or (obj_pid(self_obj) == (16777216 + 161))) then begin// 16, 182, 183 = Glowing One // 160, 161 = Rad Rat
Glowing := 1;
end
if global_var(34) and ((obj_pid(self_obj) == (16777216 + 43)) or (obj_pid(self_obj) == (16777216 + 45)) or (obj_pid(self_obj) == (16777216 + 167)) or (obj_pid(self_obj) == (16777216 + 168))) then begin// 43, 168 = Centaur // 45, 167 = Floater
Glowing := 1;
end
if ((random(0, 3) + combat_difficulty + Glowing) >= 3) then begin// CHANCE TO RUN = Easy: 25%, 50% if glowing - Normal: 50%, 75% if glowing - Brutal: 75%, 100% if glowing
variable itemRightHand := 0;
variable RightHand_PID := 0;
itemRightHand := critter_inven_obj(self_obj, 1);
RightHand_PID := obj_pid(itemRightHand);
if ((RightHand_PID == 21) or (RightHand_PID == 234) or (RightHand_PID == -1)) then begin// Brass knuckles, Spiked knuckles, empty fists
variable LuckRoll := 0;
variable EnduranceRoll := 0;
LuckRoll := do_check(dude_obj, 6, 0);
EnduranceRoll := do_check(dude_obj, 2, 0);
rndRads := 0;
if not(is_success(LuckRoll)) and not(is_success(EnduranceRoll)) then begin
rndRads := random((2 + combat_difficulty + Glowing), (3 + combat_difficulty + Glowing));// EASY: 2-3 / 3-4 if glowing, NORMAL: 3-4 / 4-5 if glowing, BRUTAL: 4-5 / 5-6 if glowing
end
else begin
if (not(is_success(LuckRoll)) or not(is_success(EnduranceRoll))) then begin
rndRads := random((1 + combat_difficulty + Glowing), (2 + combat_difficulty + Glowing));// EASY: 1-2 / 2-3 if glowing, NORMAL: 2-3 / 3-4 if glowing, BRUTAL: 3-4 / 4-5 if glowing
end
else begin
if ((random(0, 2) + Glowing) > 1) then begin// Chance to run if both stat checks pass: 33%, 66% if glowing
rndRads := random((0 + combat_difficulty + Glowing), (1 + combat_difficulty + Glowing));// EASY: 0-1 / 1-2 if glowing, NORMAL: 1-2 / 2-3 if glowing, BRUTAL: 2-3 / 3-4 if glowing
end
end
end
if (rndRads > 0) then begin
call combat_rads_inc;
end
end
end
end
Glowing := 0;
end
end
end