#include <define.h>

//#define NAME                    SCRIPT_

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



procedure start;
#include <push.h>
procedure initialize;
procedure look_at_p_proc;
procedure explode;

import variable table_ptr;

variable new_tile;


procedure start
begin
	if (script_action == map_enter_proc) then begin
		call initialize;
	end
	else begin
		if (script_action == timed_event_proc) then begin
			call explode;
		end
		else begin
			if (script_action == use_proc) then begin
				call explode;
			end
		end
	end
end

procedure initialize
begin
	table_ptr := self_obj;
end

procedure look_at_p_proc
begin
end

procedure explode
begin
	new_tile := tile_num_in_direction(tile_num(self_obj), 1, 1);
	explosion(new_tile, elevation(self_obj), 0);
	float_msg(self_obj, message_str(SCRIPT_WORKROOM, random(108, 115)), FLOAT_MSG_YELLOW);
end