"use strict";

DATA_SDS_DIALOGUE["Toto_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: "Toto",
		script: [
			{command:"buffer", text:"One... two... three... *yaaaaaawn*...\n"},
			{command:"wait"},
			{command:"return", retval:0},
		] // an array of options/commands which will be evaluated in sequence
	};

DATA_SDS_DIALOGUE["Toto_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: "Toto",
		script: [
			{command:"buffer", text:"Toto bored.  Want puppy.  Arf!  Arf arf!  ... boooooop.\n"},
			{command:"wait"},
			{command:"return", retval:0},
		] // an array of options/commands which will be evaluated in sequence
	};

DATA_SDS_DIALOGUE["Toto_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: "Toto",
		script: [
			{command:"buffer", text:"Belt?  Why want belt?  No can wear belt on head.  That look funny!\n"},
			{command:"wait"},
			{command:"return", retval:0},
		] // an array of options/commands which will be evaluated in sequence
	};

DATA_SDS_DIALOGUE["Toto_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: "Toto",
		script: [
			{command:"buffer", text:"Warm puppy, soft puppy, little ball of hat...\n"},
			{command:"wait"},
			{command:"return", retval:0},
		] // an array of options/commands which will be evaluated in sequence
	};

DATA_SDS_DIALOGUE["Toto_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: "Toto",
		script: [
			{command:"buffer", text:"*whiiiine*\n"},
			{command:"wait"},
			{command:"return", retval:0},
		] // an array of options/commands which will be evaluated in sequence
	};

DATA_SDS_DIALOGUE["Toto_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: "Toto",
		script: [
			{command:"buffer", text:"Warm puppy, soft puppy, little ball of hat...\n"},
			{command:"wait"},
			{command:"return", retval:0},
		] // an array of options/commands which will be evaluated in sequence
	};

DATA_SDS_DIALOGUE["Toto_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["Toto"] = function(){
		var retval = null;
		var line = 0;
		if (GLOBAL_SCRATCHPAD.check("Dlg_Toto_Line")){
			line = GLOBAL_SCRATCHPAD.check("Dlg_Toto_Line");
		}

		if (GLOBAL_DIARY.check(5,"AWAKE") && !GLOBAL_DIARY.check(5,"BOSS",true)){
			retval = "GD_Toto_c5_advice_"+line;
			line = Math.min(line+1,0);
		}
		else if (GLOBAL_DIARY.check(3,"TREASURE")){
			retval = "GD_Toto_c3_treasure_"+line;
			line = Math.min(line+1,0);
		}
		else if (GLOBAL_DIARY.check(3,"DRAINED_SEED")){
			retval = "GD_Toto_c3_drainseed_"+line;
			line = Math.min(line+1,0);
		}
		else if (GLOBAL_DIARY.check(3,"MET_BOBO")){
			retval = "GD_Toto_c3_metbobo_"+line;
			line = Math.min(line+1,3);
		}
		else{
			retval = "GD_Monkey_c3_metraviene_0";
		}
		GLOBAL_SCRATCHPAD.note("Dlg_Toto_Line",line);
		return retval;
	};
	