"use strict";

DATA_SDS_DIALOGUE["Dodo_c3_metraviene_0"]=
	{ 
		x: DEFINE_DIALOGUE_BOX_LOWER.x,
		y: DEFINE_DIALOGUE_BOX_LOWER.y,
		width: DEFINE_DIALOGUE_BOX_LOWER.width,
		height: DEFINE_DIALOGUE_BOX_LOWER.height,
		pauses: false,
		blocks: true,
		title: "Dodo",
		script: [
			{command:"buffer", text:"I'm not here.\n"},
			{command:"wait"},
			{command:"return", retval:0},
		] // an array of options/commands which will be evaluated in sequence
	};

DATA_SDS_DIALOGUE["Dodo_c3_metbobo_0"]=
	{ 
		x: DEFINE_DIALOGUE_BOX_LOWER.x,
		y: DEFINE_DIALOGUE_BOX_LOWER.y,
		width: DEFINE_DIALOGUE_BOX_LOWER.width,
		height: DEFINE_DIALOGUE_BOX_LOWER.height,
		pauses: false,
		blocks: true,
		title: "Dodo",
		script: [
			{command:"buffer", text:"...\n"},
			{command:"wait"},
			{command:"buffer", text:"What?  You shouldn't be here either.\n"},
			{command:"wait"},
			{command:"return", retval:0},
		] // an array of options/commands which will be evaluated in sequence
	};

DATA_SDS_DIALOGUE["Dodo_c3_treasure_0"]=
	{ 
		x: DEFINE_DIALOGUE_BOX_LOWER.x,
		y: DEFINE_DIALOGUE_BOX_LOWER.y,
		width: DEFINE_DIALOGUE_BOX_LOWER.width,
		height: DEFINE_DIALOGUE_BOX_LOWER.height,
		pauses: false,
		blocks: true,
		title: "Dodo",
		script: [
			{command:"buffer", text:"Really, I'm the only one here who doesn't make sense.  Everyone else is just a joke.\n"},
			{command:"wait"},
			{command:"return", retval:0},
		] // an array of options/commands which will be evaluated in sequence
	};

DATA_SDS_DIALOGUE["Dodo_c4_treasure_0"]=
	{ 
		x: DEFINE_DIALOGUE_BOX_LOWER.x,
		y: DEFINE_DIALOGUE_BOX_LOWER.y,
		width: DEFINE_DIALOGUE_BOX_LOWER.width,
		height: DEFINE_DIALOGUE_BOX_LOWER.height,
		pauses: false,
		blocks: true,
		title: "Dodo",
		script: [
			{command:"buffer", text:"I like it here.  It's quiet.\n"},
			{command:"wait"},
			{command:"return", retval:0},
		] // an array of options/commands which will be evaluated in sequence
	};

DATA_SDS_DIALOGUE["Dodo_c4_treasure_1"]=
	{ 
		x: DEFINE_DIALOGUE_BOX_LOWER.x,
		y: DEFINE_DIALOGUE_BOX_LOWER.y,
		width: DEFINE_DIALOGUE_BOX_LOWER.width,
		height: DEFINE_DIALOGUE_BOX_LOWER.height,
		pauses: false,
		blocks: true,
		title: "Dodo",
		script: [
			{command:"buffer", text:"There's someone else in this game who likes hiding in impossible places.  Have you met him?  He makes fantastic tea.\n"},
			{command:"wait"},
			{command:"return", retval:0},
		] // an array of options/commands which will be evaluated in sequence
	};

DATA_SDS_DIALOGUE["Dodo_c4_treasure_2"]=
	{ 
		x: DEFINE_DIALOGUE_BOX_LOWER.x,
		y: DEFINE_DIALOGUE_BOX_LOWER.y,
		width: DEFINE_DIALOGUE_BOX_LOWER.width,
		height: DEFINE_DIALOGUE_BOX_LOWER.height,
		pauses: false,
		blocks: true,
		title: "Dodo",
		script: [
			{command:"buffer", text:"I said nothing.\n"},
			{command:"wait"},
			{command:"return", retval:0},
		] // an array of options/commands which will be evaluated in sequence
	};

DATA_SDS_DIALOGUE["Dodo_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: "Dodo",
		script: [
			{command:"buffer", text:"Go up, up, up the mountain ahead...\n"},
			{command:"wait"},
			{command:"clear"},
			{command:"return", retval:0},
		] // an array of options/commands which will be evaluated in sequence
	};

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

		if (GLOBAL_DIARY.check(5,"AWAKE") && !GLOBAL_DIARY.check(5,"BOSS",true)){
			retval = "GD_Dodo_c5_advice_"+line;
			line = Math.min(line+1,0);
		}
		else if (GLOBAL_DIARY.check(4,"TREASURE")){
			retval = "GD_Dodo_c4_treasure_"+line;
			line = Math.min(line+1,2);
		}
		else if (GLOBAL_DIARY.check(3,"TREASURE")){
			retval = "GD_Dodo_c3_treasure_"+line;
			line = Math.min(line+1,0);
		}
		else if (GLOBAL_DIARY.check(3,"MET_BOBO")){
			retval = "GD_Dodo_c3_metbobo_"+line;
			line = Math.min(line+1,0);
		}
		else{
			retval = "GD_Dodo_c3_metraviene_0";
		}
		GLOBAL_SCRATCHPAD.note("Dlg_Dodo_Line",line);
		return retval;
	};

