procedure start;
#include "C:\Program Files (x86)\GOG.com\Fallout 2 Mapper\scripts\HEADERS\sfall.h"
#include "C:\Program Files (x86)\GOG.com\Fallout 2 Mapper\scripts\HEADERS\define.h"
procedure start begin
variable critter;
if game_loaded then begin
set_global_script_type(1);
set_global_script_repeat(100);
end else begin
foreach critter in list_as_array(LIST_CRITTERS) begin
if(critter!=dude_obj and get_critter_extra_stat(critter, STAT_unused)==0) then begin
if (get_critter_stat(critter, STAT_dmg_thresh)==0)then begin
set_critter_extra_stat(critter, STAT_unused, 1);
set_critter_extra_stat(critter, STAT_ac, (get_critter_stat(critter, STAT_ag)*3) + (get_critter_stat(critter, STAT_pe)*1) + (get_critter_stat(critter, STAT_en)*1));
end
else if (get_critter_stat(critter, STAT_dmg_thresh)>0) and (get_critter_stat(critter, STAT_dmg_thresh)^3) then begin
set_critter_extra_stat(critter, STAT_unused, 1);
set_critter_extra_stat(critter, STAT_ac, (get_critter_stat(critter, STAT_ag)*2.5) + (get_critter_stat(critter, STAT_pe)*1) + (get_critter_stat(critter, STAT_en)*1));
end
else if (get_critter_stat(critter, STAT_dmg_thresh)>=3) and (get_critter_stat(critter, STAT_dmg_thresh)^5) then begin
set_critter_extra_stat(critter, STAT_unused, 1);
set_critter_extra_stat(critter, STAT_ac, (get_critter_stat(critter, STAT_ag)*2) + (get_critter_stat(critter, STAT_pe)*1) + (get_critter_stat(critter, STAT_en)*0.8));
end
else if (get_critter_stat(critter, STAT_dmg_thresh)>=5) and (get_critter_stat(critter, STAT_dmg_thresh)^12) then begin
set_critter_extra_stat(critter, STAT_unused, 1);
set_critter_extra_stat(critter, STAT_ac, (get_critter_stat(critter, STAT_ag)*1.5) + (get_critter_stat(critter, STAT_pe)*1) + (get_critter_stat(critter, STAT_en)*0.5));
end
else if (get_critter_stat(critter, STAT_dmg_thresh)>=12) then begin
set_critter_extra_stat(critter, STAT_unused, 1);
set_critter_extra_stat(critter, STAT_ac, (get_critter_stat(critter, STAT_ag)*1) + (get_critter_stat(critter, STAT_pe)*0.5) + (get_critter_stat(critter, STAT_en)*1));
end
end
end
end
end