"use strict";

DATA_SDS_DIALOGUE["Goddess_C5_Welcome"]=
	{ 
		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: "Goddess",
		script: [
			{command:"buffer", text:"Welcome.\n"},
			{command:"wait"},
			{command:"clear"},
			{command:"buffer", text:"I am the Goddess.\n"},
			{command:"wait"},
			{command:"clear"},
			{command:"buffer", text:"And yes, I am also... you.\n"},
			{command:"wait"},
			{command:"buffer", text:"Or as much as to say, you are also me.\n"},
			{command:"wait"},
			{command:"clear"},
			{command:"buffer", text:"For I created the world, but not out of nothing.\n"},
			{command:"wait"},
			{command:"buffer", text:"I created the world out of myself.\n"},
			{command:"wait"},
			{command:"buffer", text:"Everything it is, I am.  Everything it feels, I feel.  Everything in it... "},
			{command:"wait"},
			{command:"buffer", text:"is me.\n"},
			{command:"wait"},
			{command:"return", retval:0},
		] // an array of options/commands which will be evaluated in sequence
	};

DATA_SDS_DIALOGUE["Goddess_C5_BadEnd"]=
	{ 
		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: "Goddess",
		script: [
			{command:"buffer", text:"The world... feels bad.\n"},
			{command:"wait"},
			{command:"clear"},
			{command:"buffer", text:"The world is desperate for my power; desperate for my help.\n"},
			{command:"wait"},
			{command:"buffer", text:"But... most of my power is already out in the world, already the world's very sustenance.\n"},
			{command:"wait"},
			{command:"clear"},
			{command:"buffer", text:"The greatest power I have kept for myself is this: the mere power to maintain a self- an identity, here, independent of the world.\n"},
			{command:"wait"},
			{command:"buffer", text:"But it seems even this is too selfish of me.  And putting upon you to carry the fate of the world, doubly so.\n"},
			{command:"wait"},
			{command:"clear"},
			{command:"buffer", text:"I regret I cannot grant you the termination you seek, but I will use such power as I have to seal you away, frozen in time.\n"},
			{command:"wait"},
			{command:"buffer", text:"By the time my seal is drained, your own binding magic ought equally to have run out; any power sufficient to break my seal prematurely should be sufficient to annihilate you within it.\n"},
			{command:"wait"},
			{command:"buffer", text:"And once you are sealed... I too shall disappear, granting the last of my power to my children as they so desire.\n"},
			{command:"wait"},
			{command:"buffer", text:"For you have shown me that it is possible to live a life, of sorts, even as a gestalt consciousness in a borrowed body.\n"},
			{command:"wait"},
			{command:"clear"},
			{command:"buffer", text:"Perhaps my children will care for my body- my world- better than I ever could...\n"},
			{command:"wait"},
			{command:"return", retval:0},
		] // an array of options/commands which will be evaluated in sequence
	};

DATA_SDS_DIALOGUE["Goddess_C5_GoodContinue"]=
	{ 
		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: "Goddess",
		script: [
			{command:"buffer", text:"But... I can no longer recognize myself.\n"},
			{command:"wait"},
			{command:"buffer", text:"I can no longer trust my own feelings.\n"},
			{command:"wait"},
			{command:"buffer", text:"I need... "},
			{command:"wait"},
			{command:"buffer", text:"you.\n"},
			{command:"wait"},
			{command:"clear"},
			{command:"buffer", text:"You desire answers, naturally, before I can expect your continued cooperation.\n"},
			{command:"wait"},
			{command:"buffer", text:"I regret that I can only provide perspective; the sense you make of it will need to be your own.\n"},
			{command:"wait"},
			{command:"buffer", text:"I understand this is a sudden request, so please, take a moment to collect yourself and speak with me again when you are ready.\n"},
			{command:"wait"},
			{command:"return", retval:0},
		] // an array of options/commands which will be evaluated in sequence
	};

DATA_SDS_DIALOGUE["Goddess_C5_Query"]=
	{ 
		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: "Goddess",
		script: [
			{command:"clear"},
			{command:"buffer", text:"What do you wish to learn?"},
			{command:"chooseV", choices:{
					"About Malfose":3, 
					"About the Treasures & Emissary":4,
					"About Me":5,
					"I've made my decision":6,
				}
			},
			{command:"return", retval:0},
			{command:"return", retval:1},
			{command:"return", retval:2},
			{command:"clear"},
			{command:"chooseV", choices:{
					"I'll help.":8, 
					"I just want this to end.":9,
					"Actually, back up...":0,
				}
			},
			{command:"return", retval:3},
			{command:"return", retval:4},
		] // an array of options/commands which will be evaluated in sequence
	};

DATA_SDS_DIALOGUE["Goddess_C5_Malfose"]=
	{ 
		x: DEFINE_DIALOGUE_BOX_INTERSTITIAL.x,
		y: DEFINE_DIALOGUE_BOX_INTERSTITIAL.y,
		width: DEFINE_DIALOGUE_BOX_INTERSTITIAL.width,
		height: DEFINE_DIALOGUE_BOX_INTERSTITIAL.height,
		pauses: false,
		blocks: true,
		title: "Goddess",
		script: [
			{command:"buffer", text:"I created Malfose.\n"},
			{command:"wait"},
			{command:"buffer", text:"I separated him from myself and ceded to him the power that is now his under the pretext that a balanced world needed an independent limiter- a force to destroy what needed to be torn down and created anew.\n"},
			{command:"wait"},
			{command:"clear"},
			{command:"buffer", text:"I could have done that myself.  I could have wielded that power.  But... I was afraid of it.\n"},
			{command:"wait"},
			{command:"buffer", text:"I hoped it would never be needed.  I loved my world.  I wanted to be loved by my world, to love myself, not to ever be known as the source of misfortune or hardship.\n"},
			{command:"wait"},
			{command:"buffer", text:"And yet, I was still afraid I might be tempted to use it, if pressed.\n"},
			{command:"wait"},
			{command:"buffer", text:"What if something hurt me more than I could bear?\n"},
			{command:"wait"},
			{command:"buffer", text:"Or worse, what if I simply became bored; aloof and desensitized, wanting to start over with something new?\n"},
			{command:"wait"},
			{command:"buffer", text:"Should any conscious being have the right to destroy millions- billions of innocent lives out of mere ennui?\n"},
			{command:"wait"},
			{command:"clear"},
			{command:"buffer", text:"And so, for my own selfish reasons, I created Malfose.\n"},
			{command:"wait"},
			{command:"buffer", text:"Much as any of my children have will and agency independent of my own, so would he.\n"},
			{command:"wait"},
			{command:"buffer", text:"He could destroy, but he could not destroy in my name.\n"},
			{command:"wait"},
			{command:"buffer", text:"And he was less than me, so he could not destroy me.\n"},
			{command:"wait"},
			{command:"clear"},
			{command:"buffer", text:"By giving him a name, I had power over him.  I could bury him, deep inside me.\n"},
			{command:"wait"},
			{command:"buffer", text:"When, many years ago, he... I... tried to harm me, simply desperate to be acknowledged and empowered, I was able to fight back.\n"},
			{command:"wait"},
			{command:"buffer", text:"I could fight him down, and seal him away.\n"},
			{command:"wait"},
			{command:"buffer", text:"A great battle of heroes acting as me, and demons acting as him, going down in history.\n"},
			{command:"wait"},
			{command:"buffer", text:"And finally, an almost unthinkable creation, derived by my agents in my own defense, to end it:\n"},
			{command:"wait"},
			{command:"buffer", text:"A magical anesthetic, or perhaps only an opiate, to forcibly sever the soul from the body- to sever my ability to act on, or feel, any part of myself deemed too dangerous to my continued well-being.\n"},
			{command:"wait"},
			{command:"clear"},
			{command:"buffer", text:"But now...  Malfose... "},
			{command:"wait"},
			{command:"buffer", text:"the part of me that is Malfose... \n"},
			{command:"wait"},
			{command:"buffer", text:"is thinking my thoughts that I never want to think...\n"},
			{command:"wait"},
			{command:"buffer", text:"He is feeling my jealousy at having to stay apart from the world, my frustration at my own impotence, my sadness at being alone, abstracted to the point where my real identity is forgotten.\n"},
			{command:"wait"},
			{command:"buffer", text:"Malfose has been repressed too strenuously, for too long, without resolution.  His thoughts are leaking back out into the world, and I can no longer tell his desires from the world's... from my own.\n"},
			{command:"wait"},
			{command:"clear"},
			{command:"buffer", text:"I want what's best for the world, but so much of the world is hurting that sometimes I think that it truly does long for annihilation.\n"},
			{command:"wait"},
			{command:"buffer", text:"That I, as it, really do... want to be hurt, or destroyed.\n"},
			{command:"wait"},
			{command:"return", retval:0},
		] // an array of options/commands which will be evaluated in sequence
	};

DATA_SDS_DIALOGUE["Goddess_C5_Treasures"]=
	{ 
		x: DEFINE_DIALOGUE_BOX_INTERSTITIAL.x,
		y: DEFINE_DIALOGUE_BOX_INTERSTITIAL.y,
		width: DEFINE_DIALOGUE_BOX_INTERSTITIAL.width,
		height: DEFINE_DIALOGUE_BOX_INTERSTITIAL.height,
		pauses: false,
		blocks: true,
		title: "Goddess",
		script: [
			{command:"buffer", text:"The Treasures were my gifts to my children; ways to connect them to me, and me to them.\n"},
			{command:"wait"},
			{command:"buffer", text:"They let me call out to rally aid, and in return, see into the hearts of those they touch.\n"},
			{command:"wait"},
			{command:"buffer", text:"They allow my children to realize their own latent abilities, extremes of power only needed in extremes of duress.\n"},
			{command:"wait"},
			{command:"buffer", text:"And... they allow me to shield their bearers from Malfose's influence, at least to an extent.\n"},
			{command:"wait"},
			{command:"clear"},
			{command:"buffer", text:"My Emissary is merely one of my children- any of my children- able to make use of the Treasures, and content to tie their will to my own; their fate to my own.\n"},
			{command:"wait"},
			{command:"clear"},
			{command:"buffer", text:"The last time I needed help, to save me from myself, I knew what I wanted.  I could call to someone who felt as I did.\n"},
			{command:"wait"},
			{command:"buffer", text:"The Treasures let me call out to a brave, compassionate heroine who was able to stay my desperate, self-destructive hand until others could deaden it.\n"},
			{command:"wait"},
			{command:"clear"},
			{command:"buffer", text:"But now, I, collectively...\n"},
			{command:"wait"},
			{command:"buffer", text:"the world, collectively...\n"},
			{command:"wait"},
			{command:"buffer", text:"is too tainted by Malfose for me to trust anymore what it wants; what I want.\n"},
			{command:"wait"},
			{command:"buffer", text:"And so... I... need help.\n"},
			{command:"wait"},
			{command:"buffer", text:"I need a part of me who I know still has sanity, still has compassion, to do what is best for me.\n"},
			{command:"wait"},
			{command:"buffer", text:"To help me see the points of light in a world of growing darkness.\n"},
			{command:"wait"},
			{command:"buffer", text:"To... help me reclaim... Malfose.\n"},
			{command:"wait"},
			{command:"return", retval:0},
		] // an array of options/commands which will be evaluated in sequence
	};

DATA_SDS_DIALOGUE["Goddess_C5_Meli"]=
	{ 
		x: DEFINE_DIALOGUE_BOX_INTERSTITIAL.x,
		y: DEFINE_DIALOGUE_BOX_INTERSTITIAL.y,
		width: DEFINE_DIALOGUE_BOX_INTERSTITIAL.width,
		height: DEFINE_DIALOGUE_BOX_INTERSTITIAL.height,
		pauses: false,
		blocks: true,
		title: "Goddess",
		script: [
			{command:"buffer", text:"By the time I realized I needed help, I worried I'd be too late; that there was already too much darkness in people's hearts for my call to be received.\n"},
			{command:"wait"},
			{command:"buffer", text:"And, when the Treasures began to move, I was confused.  I had not sensed anyone- any living consciousness connected to me- wearing them.\n"},
			{command:"wait"},
			{command:"buffer", text:"In my many lesser eyes and ears, I could confirm that they were being carried, and used to good end, by a seachild, just as before.\n"},
			{command:"wait"},
			{command:"buffer", text:"But I could not feel her- I could not feel you.\n"},
			{command:"wait"},
			{command:"buffer", text:"I could see your actions, but not your motives; infer your will, but not know your heart.  And worse, I could feel Malfose; not on the surface, but somewhere deep in your being.\n"},
			{command:"wait"},
			{command:"clear"},
			{command:"buffer", text:"I looked into my past, seeing where you came from, and what was done to you.  The you that you were WAS cut off from me, by that spell.  She came from me, and is part of me, but I can no longer feel her.\n"},
			{command:"wait"},
			{command:"buffer", text:"The you that you are- that you were constructed to be- continues, wherever you go, to draw souls away from me, leaving a trail of numbness.\n"},
			{command:"wait"},
			{command:"buffer", text:"I was suddenly afraid, but I had no other options.  My last hero was equally beyond my reach.  My keepers were too old, or too young, or had too many more immediate obligations.\n"},
			{command:"wait"},
			{command:"buffer", text:"Everyone else you crossed paths with, who could have taken the Treasures, was either disinterested or already corrupted.\n"},
			{command:"wait"},
			{command:"clear"},
			{command:"buffer", text:"But you... enigma though you were, desecrated though you had been, you were doing all the right things.  \n"},
			{command:"wait"},
			{command:"buffer", text:"And the Treasures were working for you, if not for me.\n"},
			{command:"wait"},
			{command:"buffer", text:"And so I chose you, even when I couldn't reach you.\n"},
			{command:"wait"},
			{command:"buffer", text:"My keepers aided you and reassured you where I could not.\n"},
			{command:"wait"},
			{command:"buffer", text:"Unable to break the curse, I even steeled myself to the task of restoring your body, to which your souls are inexorably bound, when it should become intolerably damaged.\n"},
			{command:"wait"},
			{command:"clear"},
			{command:"buffer", text:"But even then, when you did arrive, I was apprehensive. \n"},
			{command:"wait"},
			{command:"buffer", text:"I had to know, as well as I could, whether trusting you to help me would leave me better or worse off than reconciling to my otherwise inevitable decline.\n"},
			{command:"wait"},
			{command:"buffer", text:"And, Meli...\n"},
			{command:"wait"},
			{command:"buffer", text:"...my Meli...\n"},
			{command:"wait"},
			{command:"buffer", text:"you ARE The One.  Of this I am now confident.\n"},
			{command:"wait"},
			{command:"buffer", text:"You are worthy, and you are capable.  And moreover, the Treasures are now in selfish hands, no less tainted by Malfose than your own, but far more dangerous.\n"},
			{command:"wait"},
			{command:"buffer", text:"Even if I suspected any other could help me, I no longer have the influence to send for them.\n"},
			{command:"wait"},
			{command:"buffer", text:"So please... allow me to beg your aid just a while longer.\n"},
			{command:"wait"},
			{command:"return", retval:0},
		] // an array of options/commands which will be evaluated in sequence
	};

DATA_SDS_DIALOGUE["Goddess_C5_Help"]=
	{ 
		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: "Goddess",
		script: [
			{command:"buffer", text:"It is not in the Arbiter's nature to choose sides or make plans, but it almost feels like even they were aware I needed more than an ordinary hero.\n"},
			{command:"wait"},
			{command:"clear"},
			{command:"buffer", text:"My Emissary is necessarily someone in tune with my own mind, but my present mind is in an exceptionally distressed condition.\n"},
			{command:"wait"},
			{command:"buffer", text:"No ordinary soul with an ordinary life, no matter how strong, courageous, or compassionate, would understand the way I've become.\n"},
			{command:"wait"},
			{command:"buffer", text:"You... suffer as I suffer, but still you persist.\n"},
			{command:"wait"},
			{command:"clear"},
			{command:"buffer", text:"I am a danger to myself; liable presently to harm any ordinary Emissary much as I killed my prior Emissary.\n"},
			{command:"wait"},
			{command:"buffer", text:"But you are fated not to die, and while I myself desire yet to live, I may restore you from any harm.\n"},
			{command:"wait"},
			{command:"clear"},
			{command:"buffer", text:"And I alone cannot fight; any Emissary with only my power cannot fight what I've become.\n"},
			{command:"wait"},
			{command:"buffer", text:"The part of me that wishes to destroy myself will only accept its destruction through my own.\n"},
			{command:"wait"},
			{command:"buffer", text:"You have the destroyer's power, and you wish an end, but you wish only to end suffering, retaining some hope that your own happiness may be restored in due time.\n"},
			{command:"wait"},
			{command:"clear"},
			{command:"buffer", text:"You are apart from me, perhaps irretrievably, and I cannot know you, but I trust you.\n"},
			{command:"wait"},
			{command:"buffer", text:"And so... you have my Blessing, and I shall release all your innate, latent powers- you will no longer require the Treasures to realize all that you are capable of.\n"},
			{command:"wait"},
			{command:"clear"},
			{command:"buffer", text:"Be wary, however- in releasing your full potential without comprehending your full being, I fear I release something darker than I alone have blessed you with...\n"},
			{command:"wait"},
			{command:"return", retval:0},
		] // an array of options/commands which will be evaluated in sequence
	};

DATA_SDS_DIALOGUE["Goddess_C5_Farewell"]=
	{ 
		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: "Goddess",
		script: [
			{command:"buffer", text:"Go, now, my child- seek Malfose, sealed deep in my own heart, that I may reconcile his will to my own.\n"},
			{command:"wait"},
			{command:"clear"},
			{command:"buffer", text:"I shall be with you as I am able; may you bring me peace before it is too late...\n"},
			{command:"wait"},
			{command:"return", retval:0},
		] // an array of options/commands which will be evaluated in sequence
	};

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

		if (false){
			retval = "GD_Goddess_Welcome"+line;
			line = Math.min(line+1,0);
		}
		else{
			retval = "Goddess_C5_"+line;
			line = Math.min(line+1,1);
		}
		GLOBAL_SCRATCHPAD.note("Dlg_Goddess_Line",line);
		return retval;
	};

