// OUTDOOR SECTION SCRIPT
//    Section: X = 0, Y = 6: Lava Ocean

beginoutdoorscript;

variables;

int choice,i,j,k;
string dlgstr;

body;

beginstate INIT_STATE;
// This state called whenever this section is loaded into memory.
break;

beginstate START_STATE;
// Starting state of the section, called every turn the party 
// stands inside this section until you change the state.
break;

beginstate 10;
	if (get_flag(18,3) == 0) {
		reset_dialog();
		add_dialog_str(0,"It is true. There was a passage this way, but it shows recent signs of an explosion: Dalaghant has blocked this exit out of the Lava Ocean. His curse was not without meaning.",0);
		add_dialog_str(1,"You take a moment, letting the reality sink in. There was once a way out via the west passage, now over-run with lava lizards and blocked. There was once a way out via this south passage, now over-run with undead and blocked.",0);
		add_dialog_str(2,"There must be something somewhere else. But where?",0);
		set_flag(18,3,run_dialog(1));
		}
break;

beginstate 11;
	if (get_flag(15,13) == 0)
		block_entry(1);
	else {
		if (get_flag(206,1) == 0) {
			set_flag(206,1,1);
			message_dialog("You look very closely at the wall here, and you notice that there is a very small passage to the other side. It is obscured by rocks, and you would not have noticed it if Kass had not told you that it was here.","");
			}
		}
break;

beginstate 12;
if (get_skill_total(16) < 17) {
	message_dialog("You find some strange-looking plants. Unfortunately, you don't know enough about Nature Lore to know what they are or how they might be used.","");
	end();
	}
	
if (get_flag(206,2) == 0) {
	reset_dialog();
	add_dialog_str(0,"You find a patch of Toadstools! Your knowledge of Nature Lore extends to how to pick them so that they will keep their vital parts that are useful in potions. Do you wish to pick them?",0);
	add_dialog_choice(0,"No. (Leave them alone.)");
	add_dialog_choice(1,"Yes. (Pick them.)");
	if (run_dialog(1) == 2) {
		set_flag(206,2,reward_give(218));
		reward_give(218);
		}
	}
else
	message_dialog("Toadstools grow back slowly, and these have not yet grown back.","");
break;

beginstate 13;
if (get_skill_total(16) < 17) {
	message_dialog("You find some strange-looking plants. Unfortunately, you don't know enough about Nature Lore to know what they are or how they might be used.","");
	end();
	}
	
if (get_flag(206,3) == 0) {
	reset_dialog();
	add_dialog_str(0,"You find a patch of Spiritual Herbs! Your knowledge of Nature Lore extends to how to pick them so that they will keep their vital parts that are useful in potions. Do you wish to pick them?",0);
	add_dialog_choice(0,"No. (Leave them alone.)");
	add_dialog_choice(1,"Yes. (Pick them.)");
	if (run_dialog(1) == 2) {
		set_flag(206,3,reward_give(215));
		reward_give(215);
		reward_give(215);
		}
	}
else
	message_dialog("Spiritual Herbs grow back slowly, and these have not yet grown back.","");
break;

beginstate 14;
if (get_skill_total(16) < 16) {
	message_dialog("You find some strange-looking plants. Unfortunately, you don't know enough about Nature Lore to know what they are or how they might be used.","");
	end();
	}
	
if (get_flag(206,4) == 0) {
	reset_dialog();
	add_dialog_str(0,"You find a patch of Energetic Herbs! Your knowledge of Nature Lore extends to how to pick them so that they will keep their vital parts that are useful in potions. Do you wish to pick them?",0);
	add_dialog_choice(0,"No. (Leave them alone.)");
	add_dialog_choice(1,"Yes. (Pick them.)");
	if (run_dialog(1) == 2) {
		set_flag(206,4,reward_give(216));
		reward_give(216);
		}
	}
else
	message_dialog("Energetic Herbs grow back slowly, and these have not yet grown back.","");
break;