#include <define.h>

//#define NAME                    SCRIPT_

#include <command.h>
//#include <ModReact.h>



procedure start;
#include <push.h>
procedure computer00;

variable test;


procedure start
begin
	if (script_action == pickup_proc) then begin
		script_overrides;
		call computer00;
	end
	else begin
		if (script_action == look_at_proc) then begin
			script_overrides;
			display_msg(message_str(SCRIPT_COMPUTER, 100));
		end
	end
end

procedure computer00
begin
	if (has_skill(dude_obj, 12) > has_skill(dude_obj, 13)) then begin
		test := roll_vs_skill(dude_obj, 12, 0);
	end
	else begin
		test := roll_vs_skill(dude_obj, 13, 0);
	end
	if (is_success(test)) then begin
		display_msg(message_str(SCRIPT_COMPUTER, 101));
		if (is_critical(test)) then begin
			display_msg(message_str(SCRIPT_COMPUTER, 102));
		end
	end
	else begin
		display_msg(message_str(SCRIPT_COMPUTER, 103));
		if (is_critical(test)) then begin
			display_msg(message_str(SCRIPT_COMPUTER, 104));
			critter_dmg(dude_obj, 1, 0);
		end
	end
end