"use strict";

DATA_SDS_DIALOGUE["Lolo_c3_metbobo_0"]=
	{ 
		x: DEFINE_DIALOGUE_BOX_UPPER.x,
		y: DEFINE_DIALOGUE_BOX_UPPER.y,
		width: DEFINE_DIALOGUE_BOX_UPPER.width,
		height: DEFINE_DIALOGUE_BOX_UPPER.height,
		pauses: false,
		blocks: true,
		title: "Lolo",
		script: [
			{command:"buffer", text:"Lolo no like snake.  Snake get in way.\n"},
			{command:"wait"},
			{command:"return", retval:0},
		] // an array of options/commands which will be evaluated in sequence
	};

DATA_SDS_DIALOGUE["Lolo_c3_metbobo_1"]=
	{ 
		x: DEFINE_DIALOGUE_BOX_UPPER.x,
		y: DEFINE_DIALOGUE_BOX_UPPER.y,
		width: DEFINE_DIALOGUE_BOX_UPPER.width,
		height: DEFINE_DIALOGUE_BOX_UPPER.height,
		pauses: false,
		blocks: true,
		title: "Lolo",
		script: [
			{command:"buffer", text:"What?  You not part snake?  You part dragon?\n"},
			{command:"wait"},
			{command:"buffer", text:"Dragon worse!  Go back sleep!  Lolo not take stuff!\n"},
			{command:"wait"},
			{command:"return", retval:0},
		] // an array of options/commands which will be evaluated in sequence
	};

DATA_SDS_DIALOGUE["Lolo_c3_metbobo_2"]=
	{ 
		x: DEFINE_DIALOGUE_BOX_UPPER.x,
		y: DEFINE_DIALOGUE_BOX_UPPER.y,
		width: DEFINE_DIALOGUE_BOX_UPPER.width,
		height: DEFINE_DIALOGUE_BOX_UPPER.height,
		pauses: false,
		blocks: true,
		title: "Lolo",
		script: [
			{command:"buffer", text:"What Lolo talk about?  Lolo brave prince!  Lolo fight monster!  Keke!\n"},
			{command:"wait"},
			{command:"return", retval:0},
		] // an array of options/commands which will be evaluated in sequence
	};

DATA_SDS_DIALOGUE["Lolo_c3_metbobo_3"]=
	{ 
		x: DEFINE_DIALOGUE_BOX_UPPER.x,
		y: DEFINE_DIALOGUE_BOX_UPPER.y,
		width: DEFINE_DIALOGUE_BOX_UPPER.width,
		height: DEFINE_DIALOGUE_BOX_UPPER.height,
		pauses: false,
		blocks: true,
		title: "Lolo",
		script: [
			{command:"buffer", text:"...\n"},
			{command:"wait"},
			{command:"buffer", text:"...\n"},
			{command:"wait"},
			{command:"buffer", text:"...\n"},
			{command:"wait"},
			{command:"buffer", text:"Lolo no is prince.  Lolo just hear too many old story.  You know story?\n"},
			{command:"wait"},
			{command:"return", retval:0},
		] // an array of options/commands which will be evaluated in sequence
	};

DATA_SDS_DIALOGUE["Lolo_c3_metbobo_4"]=
	{ 
		x: DEFINE_DIALOGUE_BOX_UPPER.x,
		y: DEFINE_DIALOGUE_BOX_UPPER.y,
		width: DEFINE_DIALOGUE_BOX_UPPER.width,
		height: DEFINE_DIALOGUE_BOX_UPPER.height,
		pauses: false,
		blocks: true,
		title: "Lolo",
		script: [
			{command:"buffer", text:"So what snake-dragon lady do?\n"}, // 0
			{command:"wait"},
			{command:"chooseV", choices:{"Get seed":4, "Fight devil":7}},
			{command:"clear"},
			{command:"buffer", text:"Seed?  Seed sound boring.  Like Lolo story better.\n"}, // 4
			{command:"wait"},
			{command:"return", retval:0},
			{command:"buffer", text:"Keke!  Fight devil good story!  Go castle fight devil!\n"}, // 7
			{command:"wait"},
			{command:"buffer", text:"...but no castle nearby.  Lolo only know shrine.  Shrine out behind village.  Snake-dragon lady go there?\n"},
			{command:"wait"},
			{command:"return", retval:1},
		] // an array of options/commands which will be evaluated in sequence
	};

DATA_SDS_DIALOGUE["Lolo_c3_drainseed_0"]=
	{ 
		x: DEFINE_DIALOGUE_BOX_UPPER.x,
		y: DEFINE_DIALOGUE_BOX_UPPER.y,
		width: DEFINE_DIALOGUE_BOX_UPPER.width,
		height: DEFINE_DIALOGUE_BOX_UPPER.height,
		pauses: false,
		blocks: true,
		title: "Lolo",
		script: [
			{command:"buffer", text:"Kikiii!  Kikiiiii!!!\n"},
			{command:"buffer", text:"Home tree big crash!  Kikiii!\n"},
			{command:"wait"},
			{command:"return", retval:0},
		] // an array of options/commands which will be evaluated in sequence
	};

DATA_SDS_DIALOGUE["Lolo_c3_drainseed_1"]=
	{ 
		x: DEFINE_DIALOGUE_BOX_UPPER.x,
		y: DEFINE_DIALOGUE_BOX_UPPER.y,
		width: DEFINE_DIALOGUE_BOX_UPPER.width,
		height: DEFINE_DIALOGUE_BOX_UPPER.height,
		pauses: false,
		blocks: true,
		title: "Lolo",
		script: [
			{command:"buffer", text:"Biiig crash!  Kikiki!\n"},
			{command:"buffer", text:"Chief jump biiiig up?\n"},
			{command:"wait"},
			{command:"return", retval:0},
		] // an array of options/commands which will be evaluated in sequence
	};

DATA_SDS_DIALOGUE["Lolo_c3_drainseed_2"]=
	{ 
		x: DEFINE_DIALOGUE_BOX_UPPER.x,
		y: DEFINE_DIALOGUE_BOX_UPPER.y,
		width: DEFINE_DIALOGUE_BOX_UPPER.width,
		height: DEFINE_DIALOGUE_BOX_UPPER.height,
		pauses: false,
		blocks: true,
		title: "Lolo",
		script: [
			{command:"buffer", text:"Lolo worry.  Snake lady leave, then, then Lolo see smoke!  In tree!  Up!  Up!\n"},
			{command:"wait"},
			{command:"buffer", text:"Then... CRASH!  Now no chief.  Where cheif??  Devil take chief?\n"},
			{command:"wait"},
			{command:"return", retval:0},
		] // an array of options/commands which will be evaluated in sequence
	};

DATA_SDS_DIALOGUE["Lolo_c3_drainseed_3"]=
	{ 
		x: DEFINE_DIALOGUE_BOX_UPPER.x,
		y: DEFINE_DIALOGUE_BOX_UPPER.y,
		width: DEFINE_DIALOGUE_BOX_UPPER.width,
		height: DEFINE_DIALOGUE_BOX_UPPER.height,
		pauses: false,
		blocks: true,
		title: "Lolo",
		script: [
			{command:"buffer", text:"Snake lady find chief!  Be hero!\n"},
			{command:"wait"},
			{command:"return", retval:0},
		] // an array of options/commands which will be evaluated in sequence
	};

DATA_SDS_DIALOGUE["Lolo_c3_boss_0"]=
	{ 
		x: DEFINE_DIALOGUE_BOX_UPPER.x,
		y: DEFINE_DIALOGUE_BOX_UPPER.y,
		width: DEFINE_DIALOGUE_BOX_UPPER.width,
		height: DEFINE_DIALOGUE_BOX_UPPER.height,
		pauses: false,
		blocks: true,
		title: "Lolo",
		script: [
			{command:"buffer", text:"Snake lady go up; trees shake; shiny thing fall down!  Splash!\n"},
			{command:"wait"},
			{command:"return", retval:0},
		] // an array of options/commands which will be evaluated in sequence
	};

DATA_SDS_DIALOGUE["Lolo_c3_treasure_0"]=
	{ 
		x: DEFINE_DIALOGUE_BOX_UPPER.x,
		y: DEFINE_DIALOGUE_BOX_UPPER.y,
		width: DEFINE_DIALOGUE_BOX_UPPER.width,
		height: DEFINE_DIALOGUE_BOX_UPPER.height,
		pauses: false,
		blocks: true,
		title: "Lolo",
		script: [
			{command:"buffer", text:"Lolo no pushy!  Just like organize room...\n"},
			{command:"wait"},
			{command:"return", retval:0},
		] // an array of options/commands which will be evaluated in sequence
	};
DATA_SDS_DIALOGUE["Lolo_c5_advice_0"]=
	{ 
		x: DEFINE_DIALOGUE_BOX_UPPER.x,
		y: DEFINE_DIALOGUE_BOX_UPPER.y,
		width: DEFINE_DIALOGUE_BOX_UPPER.width,
		height: DEFINE_DIALOGUE_BOX_UPPER.height,
		pauses: false,
		blocks: true,
		title: "Meli",
		script: [
			{command:"buffer", text:"(What do I even want with him?  I've already brought the monkeys enough trouble.)\n"},
			{command:"wait"},
			{command:"clear"},
			{command:"return", retval:0},
		] // an array of options/commands which will be evaluated in sequence
	};

Dialogue_getCurrentEvent["Lolo"] = function(){
		var retval = null;
		var line = 0;
		if (GLOBAL_SCRATCHPAD.check("Dlg_Lolo_Line")){
			line = GLOBAL_SCRATCHPAD.check("Dlg_Lolo_Line");
		}

		if (GLOBAL_DIARY.check(5,"AWAKE") && !GLOBAL_DIARY.check(5,"BOSS",true)){
			retval = "GD_Lolo_c5_advice_"+line;
			line = Math.min(line+1,0);
		}
		else if (GLOBAL_DIARY.check(3,"TREASURE")){
			retval = "GD_Lolo_c3_treasure_"+line;
			line = Math.min(line+1,0);
		}
		else if (GLOBAL_DIARY.check(3,"BOSS")){
			retval = "GD_Lolo_c3_boss_"+line;
			line = Math.min(line+1,0);
		}
		else if (GLOBAL_DIARY.check(3,"DRAINED_SEED")){
			retval = "GD_Lolo_c3_drainseed_"+line;
			line = Math.min(line+1,3);
		}
		else if (GLOBAL_DIARY.check(3,"MET_BOBO")){
			retval = "GD_Lolo_c3_metbobo_"+line;
			line = Math.min(line+1,4);
		}
		else{
			retval = "GD_Monkey_c3_metraviene_0";
		}
		GLOBAL_SCRATCHPAD.note("Dlg_Lolo_Line",line);
		return retval;
	};
	