"use strict";

DATA_SDS_DIALOGUE["Yoyo_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: "Yoyo",
		script: [
			{command:"buffer", text:"Chief say belt make tail strong.  But Yoyo tail already strong!  Keke!\n"},
			{command:"wait"},
			{command:"return", retval:0},
		] // an array of options/commands which will be evaluated in sequence
	};

DATA_SDS_DIALOGUE["Yoyo_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: "Yoyo",
		script: [
			{command:"buffer", text:"Why chief need belt?  Cheif tail already strong!  Why bird lady need belt?  Bird lady have no tail!\n"},
			{command:"wait"},
			{command:"return", retval:0},
		] // an array of options/commands which will be evaluated in sequence
	};

DATA_SDS_DIALOGUE["Yoyo_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: "Yoyo",
		script: [
			{command:"buffer", text:"Why snake lady need belt?  Snake lady too big to hang from branch!  Branch break!  Keke!\n"},
			{command:"wait"},
			{command:"return", retval:0},
		] // an array of options/commands which will be evaluated in sequence
	};

DATA_SDS_DIALOGUE["Yoyo_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: "Yoyo",
		script: [
			{command:"buffer", text:"Hang from BIG branch?  Hmmm...  Need BIG tail!  Keke!  Not silly fish-snake tail!\n"},
			{command:"wait"},
			{command:"return", retval:0},
		] // an array of options/commands which will be evaluated in sequence
	};

DATA_SDS_DIALOGUE["Yoyo_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: "Yoyo",
		script: [
			{command:"buffer", text:"Forget belt.  Yoyo think snake lady look silly hanging upside-down anyway!  Keke!\n"},
			{command:"wait"},
			{command:"return", retval:0},
		] // an array of options/commands which will be evaluated in sequence
	};

DATA_SDS_DIALOGUE["Yoyo_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: "Yoyo",
		script: [
			{command:"buffer", text:"Up-down up-down up-down...\n"},
			{command:"buffer", text:"Yoyo go up, Yoyo come down!\n"},
			{command:"wait"},
			{command:"return", retval:0},
		] // an array of options/commands which will be evaluated in sequence
	};

DATA_SDS_DIALOGUE["Yoyo_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: "Yoyo",
		script: [
			{command:"buffer", text:"Up-down up-down up-down...\n"},
			{command:"buffer", text:"Chief go up, why chief no come down?\n"},
			{command:"wait"},
			{command:"return", retval:0},
		] // an array of options/commands which will be evaluated in sequence
	};

DATA_SDS_DIALOGUE["Yoyo_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: "Yoyo",
		script: [
			{command:"buffer", text:"Snake lady go up, belt come down.  No good hang on branch if break branch!\n"},
			{command:"wait"},
			{command:"return", retval:0},
		] // an array of options/commands which will be evaluated in sequence
	};

DATA_SDS_DIALOGUE["Yoyo_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: "Yoyo",
		script: [
			{command:"buffer", text:"Chief go up, belt go down, snake lady come up with belt...\n"},
			{command:"buffer", text:"Snake lady new chief?\n"},
			{command:"wait"},
			{command:"return", retval:0},
		] // an array of options/commands which will be evaluated in sequence
	};

DATA_SDS_DIALOGUE["Yoyo_c3_treasure_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: "Yoyo",
		script: [
			{command:"buffer", text:"Monkey King Snake Lady!\n"},
			{command:"buffer", text:"Monkey King Snake Lady!\n"},
			{command:"buffer", text:"Kekekeke!\n"},
			{command:"wait"},
			{command:"return", retval:0},
		] // an array of options/commands which will be evaluated in sequence
	};

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

		if (GLOBAL_DIARY.check(5,"AWAKE") && !GLOBAL_DIARY.check(5,"BOSS",true)){
			retval = "GD_Yoyo_c5_advice_"+line;
			line = Math.min(line+1,0);
		}
		else if (GLOBAL_DIARY.check(3,"TREASURE")){
			retval = "GD_Yoyo_c3_treasure_"+line;
			line = Math.min(line+1,1);
		}
		else if (GLOBAL_DIARY.check(3,"BOSS")){
			retval = "GD_Yoyo_c3_boss_"+line;
			line = Math.min(line+1,0);
		}
		else if (GLOBAL_DIARY.check(3,"DRAINED_SEED")){
			retval = "GD_Yoyo_c3_drainseed_"+line;
			line = Math.min(line+1,1);
		}
		else if (GLOBAL_DIARY.check(3,"MET_BOBO")){
			retval = "GD_Yoyo_c3_metbobo_"+line;
			line = Math.min(line+1,4);
		}
		else{
			retval = "GD_Monkey_c3_metraviene_0";
		}
		GLOBAL_SCRATCHPAD.note("Dlg_Yoyo_Line",line);
		return retval;
	};

