// TOWN SPECIAL ENCOUNTERS
//    Town 65: Lair of Sulfras

beginzonescript;

variables;

short im_hostile = 0;
short max_crime = 200;
short last_abil;
short counter = 0;
short set_ter = 0;

//12 345 78

body;

beginstate INIT_STATE;
	last_abil = get_current_tick();

//	set_name(,);
//	add_range_to_group(,,groupn);

	set_personality_name(1300,"Sulfras");

	set_name(30001,"Sentry Mutant");
	change_max_health(30001,200);
	set_aggression(30001,50);
	set_attack_bonus(30001,20);
	set_name(30002,"Sentry Mutant");
	change_max_health(30002,200);
	set_aggression(30002,50);
	set_attack_bonus(30002,20);
	
	set_level(30003,27);
	set_aggression(30003,60);
	
	set_level(30004,27);
	set_aggression(30004,60);
	
	set_level(30005,27);
	set_aggression(30005,60);
	
	set_name(6509,"Cultist Sancha");
	change_max_health(6509,200);
	set_boss_level(6509,1);
	set_attack_bonus(6509,1);
	
	set_name(30007,"Mad Infernal");
	change_max_health(30007,200);
	set_attack_bonus(30007,10);
	set_aggression(30007,40);
	
	set_name(6541,"Dominator Toana");
	set_boss_level(6541,1);
	set_new_abil(6541,5);
	
	add_ability(6521, 10, 201, 0);
	set_resistance(6521,6,100);
	add_ability(6522, 10, 202, 0);
	set_resistance(6522,1,100);
	add_ability(6523, 10, 203, 0);
	set_resistance(6523,0,100);
		
	set_crime_tolerance(max_crime);

	break;

beginstate EXIT_STATE;
break;

beginstate START_STATE;
	if (get_ran(1,0,100) < 10)
		give_char_text_bubble(6555,"Free me!");
	if (get_ran(1,0,100) < 10)
		give_char_text_bubble(6555,"My captors will die!");
	if (get_ran(1,0,100) < 10)
		give_char_text_bubble(6555,"I can reward you.");

	if ((char_ok(6555)) && (get_attitude(6555) < 10)) {
		clear_fields(44,14);
		clear_fields(45,14);
		clear_fields(46,14);
		clear_fields(44,15);
		clear_fields(45,15);
		clear_fields(46,15);
		clear_fields(44,16);
		clear_fields(45,16);
		clear_fields(46,16);
		}
	

break;

beginstate 10;
	if ((gf(65,9) > 0) && (get_terrain(0,41,22) != 0)) {
		set_terrain(0,41,22,0);
		set_terrain(0,42,22,0);
		set_terrain(0,41,21,0);
		make_field(0,40,23,2);
		ok_dlog(50,1);
		}
break;

beginstate 11;
break;

beginstate 12;
break;

beginstate 13;
break;

beginstate 14;
break;

//	print_str("");
//	set_terrain_string_range("",1);
//	set_terrain_string_range("The sign says - .",1);

