// File created automatically by custom Dialogger on 4/4/2019, 2:23:22 AM
// Do not tamper with this file.
// It will be replaced automatically by Dialogger and all changes will be lost.
// Instead change IntroductionToMaze.dl.
module DialogueTrees {
	export let IntroductionToMaze = (function () {
        let tree : DialogueTree = new DialogueTree("IntroductionToMaze");
        let node : DialogueNode;
        let text : DialogueText;
        let choice : DialogueChoice;
        let set : DialogueSet;
        let branch : DialogueBranch;
        
        
        node = new DialogueNode("ad3f7d0b-5e6d-4eec-8db0-6ddcb2e28c1b");
        node.setNext("41004f47-b46c-4e85-98a5-b03f599423f4");
        tree.addStartNode(node);
        
        
         AI.talktoRules.createAndAddRule({
            name : "AIHook for IntroductionToMaze",
            conditions : (runner : RulebookRunner<TalkingHeads>) => {
                // @ts-ignore
                let player = WorldState.player, greeter = runner.noun.greeter, answerer = runner.noun.answerer;
        
                return (answerer == Forest.MazeMinotaurGuard && !tree.hasRan());
            },
            priority : Rule.PRIORITY_HIGHEST,
            firstPriority : Rule.PRIORITY_HIGHEST,
            code : (runner : RulebookRunner<TalkingHeads>) => {
                runner.noun.runAndStop.push(tree);
            },
        });
        
        
        
        text = new DialogueText("41004f47-b46c-4e85-98a5-b03f599423f4");
        text.setSay(() => { return new Say(Say.Speak("Minotaur", "Halt!"), Say.PARAGRAPH_BREAK, "The minotaur speaks with a deep, strong voice.", Say.PARAGRAPH_BREAK, Say.Speak("Minotaur", "If you intend to enter this place, I must ask that you do not. It is a wretched place and you'd surely meet your end in there."));});
        text.setNext("96681f54-8355-453d-b5e2-d6c465f7ce1f");
        tree.addNode(text);
        
        
        choice = new DialogueChoice("4685c1b8-e0df-466d-97b9-a8048b21a99b");
        choice.setSay(() => { return new Say("Why shouldn't I go in there?");});
        choice.setNext("00b7fa85-b95c-4611-94b8-2366b9532b56");
        tree.addNode(choice);
        
        
        choice = new DialogueChoice("b2e85332-4f2e-4def-9663-332289609e91");
        choice.setSay(() => { return new Say("I'm going in there.");});
        choice.setNext("80ff3aca-2a62-44d4-91f2-480c6c6fc4ad");
        tree.addNode(choice);
        
        
        node = new DialogueNode("96681f54-8355-453d-b5e2-d6c465f7ce1f");
        node.setName("Investigate");
        node.setChoices(["4685c1b8-e0df-466d-97b9-a8048b21a99b","b2e85332-4f2e-4def-9663-332289609e91","9ae561cd-56d5-4443-896a-c761425edaf3"]);
        tree.addNode(node);
        
        
        choice = new DialogueChoice("9ae561cd-56d5-4443-896a-c761425edaf3");
        choice.setSay(() => { return new Say("Ok.");});
        tree.addNode(choice);
        
        
        text = new DialogueText("00b7fa85-b95c-4611-94b8-2366b9532b56");
        text.setSay(() => { return new Say(Say.Speak("Minotaur", "This is the entrance to the maze. That which is too dangerous to remain free is stuck forever inside. It is too dangerous. Please, go away."));});
        text.setNext("d657cef5-2b0d-44cb-987e-1b10c1e5893a");
        tree.addNode(text);
        
        
        node = new DialogueNode("d657cef5-2b0d-44cb-987e-1b10c1e5893a");
        node.setNext("Investigate");
        tree.addNode(node);
        
        
        text = new DialogueText("80ff3aca-2a62-44d4-91f2-480c6c6fc4ad");
        text.setSay(() => { return new Say(Say.Speak("Minotaur", "I will not allow you to kill yourself in such manner. If you truly wish to enter the maze, then you must prove you are strong enough to survive it."));});
        text.setNext("c2d03477-b9a2-4c99-8c1b-f661cbf8dcf1");
        tree.addNode(text);
        
        
        choice = new DialogueChoice("05f466b3-e0fe-4adc-9abc-c1129b950677");
        choice.setSay(() => { return new Say("What do you care what I do?");});
        choice.setNext("44467380-9432-40b6-a385-040ce0cb6fba");
        tree.addNode(choice);
        
        
        choice = new DialogueChoice("636603ef-21ee-4b92-822a-208ae90d259c");
        choice.setSay(() => { return new Say("I am strong enough. Let me in.");});
        choice.setNext("3df07df1-5da1-495a-b612-5a239c289c44");
        tree.addNode(choice);
        
        
        choice = new DialogueChoice("63d167f2-1622-4e0f-948d-3839920f13fb");
        choice.setSay(() => { return new Say("How can I prove I am strong enough?");});
        choice.setNext("3df07df1-5da1-495a-b612-5a239c289c44");
        tree.addNode(choice);
        
        
        choice = new DialogueChoice("f37c041f-4836-4d4d-88e6-8a69fd9eeeab");
        choice.setSay(() => { return new Say("Fine, I'll leave.");});
        tree.addNode(choice);
        
        
        node = new DialogueNode("c2d03477-b9a2-4c99-8c1b-f661cbf8dcf1");
        node.setName("GoingIn");
        node.setChoices(["05f466b3-e0fe-4adc-9abc-c1129b950677","636603ef-21ee-4b92-822a-208ae90d259c","63d167f2-1622-4e0f-948d-3839920f13fb","f37c041f-4836-4d4d-88e6-8a69fd9eeeab"]);
        tree.addNode(node);
        
        
        text = new DialogueText("44467380-9432-40b6-a385-040ce0cb6fba");
        text.setSay(() => { return new Say(Say.Speak("Minotaur", "It is my mission to guard this place, so that no one ever suffers from the evil that is inside.") );});
        text.setNext("d0493826-1ea6-4d36-be3e-0befc7470c50");
        tree.addNode(text);
        
        
        node = new DialogueNode("d0493826-1ea6-4d36-be3e-0befc7470c50");
        node.setNext("GoingIn");
        tree.addNode(node);
        
        
        text = new DialogueText("3df07df1-5da1-495a-b612-5a239c289c44");
        text.setSay(() => { return new Say(Say.Speak("Minotaur", "If you are strong enough, you should easily be able to fend for yourself in combat. With me."));});
        text.setChoices(["88271bd0-8c0e-4097-b9e1-026c8f57c26e","ffc04d84-54c1-418b-834f-e7bbc4901201","e048adac-4290-4d1e-91ae-11b6e200c68b","c6d917c3-54b6-4499-84a3-798b9b02f814"]);
        tree.addNode(text);
        
        
        choice = new DialogueChoice("88271bd0-8c0e-4097-b9e1-026c8f57c26e");
        choice.setSay(() => { return new Say("Fighting it is.");});
        choice.setNext("9a04f53e-be4f-4208-988f-af4ad9735ae0");
        tree.addNode(choice);
        
        
        choice = new DialogueChoice("c6d917c3-54b6-4499-84a3-798b9b02f814");
        choice.setSay(() => { return new Say("I don't want to fight you.");});
        choice.setNext("487ff733-21e5-481b-80fe-7bda86530905");
        tree.addNode(choice);
        
        
        choice = new DialogueChoice("e048adac-4290-4d1e-91ae-11b6e200c68b");
        choice.setSay(() => { return new Say("But you're too strong!");});
        choice.setNext("b82390ba-7dd1-4b6b-b812-9a9bb9771bae");
        tree.addNode(choice);
        
        
        choice = new DialogueChoice("ffc04d84-54c1-418b-834f-e7bbc4901201");
        choice.setSay(() => { return new Say("Is there no other way?");});
        choice.setNext("22bbf7fe-3d7e-46f6-b041-57638f097d0a");
        tree.addNode(choice);
        
        
        set = new DialogueSet("64876420-f6c1-434c-b9b8-c4cd017ef329");
        set.setFunction(() => {
        // TODO: If the player has done something that the minotaur should respect, add it as an option here.
        });
        tree.addNode(set);
        
        
        set = new DialogueSet("9a04f53e-be4f-4208-988f-af4ad9735ae0");
        set.setFunction(() => {
        MinotaurGuard.AgreedToDuel.value = true;
        });
        set.setNext("e3705614-9e9a-42b5-b747-d2fa8c5a1b0c");
        tree.addNode(set);
        
        
        branch = new DialogueBranch("22bbf7fe-3d7e-46f6-b041-57638f097d0a");
        branch.setVariable(() => { return 1;});
        branch.addBranch("69bc261f-9c69-4401-933c-ac76b45b095d", () => { return 2;});
        branch.setNext("0dbb4cb6-c6df-4587-838d-4193ac54de45");
        tree.addNode(branch);
        
        
        set = new DialogueSet("69bc261f-9c69-4401-933c-ac76b45b095d");
        set.setFunction(() => {
        MinotaurGuard. BestedMinotaur.value = true;
        });
        tree.addNode(set);
        
        
        text = new DialogueText("0dbb4cb6-c6df-4587-838d-4193ac54de45");
        text.setSay(() => { return new Say(Say.Speak("Minotaur", "Well...", new SayAction("the big man sighs"), "All I need is to test your endurance, find out if you're strong enough to survive in there.", new SayAction("he lifts his loincloth suggestively")), Say.LINE_BREAK, "The Minotaur's balls are bigger than your hands, and his cock is as wide as your arm, probably half as long when hard as well. Truly a test of endurance. Could you handle it? Would you even want to? He lets go of his loincloth, letting it cover that huge tool once again, then awaits your answer.");});
        text.setNext("c6807e4e-2dae-49b5-b423-ae0ecca7cd47");
        tree.addNode(text);
        
        
        text = new DialogueText("b82390ba-7dd1-4b6b-b812-9a9bb9771bae");
        text.setSay(() => { return new Say(Say.Speak("Minotaur", "And so are the dangers inside, perhaps even more so — I have no desire to hurt you, but I will if that will save your life."));});
        text.setNext("1c3b1dc2-7862-4614-a54d-aaabd8dab3f1");
        tree.addNode(text);
        
        
        node = new DialogueNode("1c3b1dc2-7862-4614-a54d-aaabd8dab3f1");
        node.setNext("GoingIn");
        tree.addNode(node);
        
        
        text = new DialogueText("e3705614-9e9a-42b5-b747-d2fa8c5a1b0c");
        text.setSay(() => { return new Say(Say.Speak("Minotaur", "I will wait until you are prepared. Tell me when you are ready to challenge me, and we will find out what you're made of."));});
        tree.addNode(text);
        
        
        text = new DialogueText("487ff733-21e5-481b-80fe-7bda86530905");
        text.setSay(() => { return new Say(Say.Speak("Minotaur", "Then leave. You wouldn't want to see the horrors inside."));});
        tree.addNode(text);
        
        
        choice = new DialogueChoice("9d13ac84-af56-4a1f-a4a6-f499b96d92de");
        choice.setSay(() => { return new Say("Fine. I'll do it.");});
        choice.setNext("21b64a86-657b-43b8-a591-5eb87b49d084");
        tree.addNode(choice);
        
        
        choice = new DialogueChoice("45ac3006-6fb1-4785-bc4e-76116a5f1eec");
        choice.setSay(() => { return new Say("No.");});
        choice.setNext("d7a424c5-d590-4402-b67c-02d1571da8c2");
        tree.addNode(choice);
        
        
        choice = new DialogueChoice("db40825e-2ccb-4dd9-a032-924f95ea8643");
        choice.setSay(() => { return new Say("How would that prove anything?!?");});
        choice.setNext("a84be8e1-a957-43ab-99e5-11c00bc44e68");
        tree.addNode(choice);
        
        
        text = new DialogueText("d7a424c5-d590-4402-b67c-02d1571da8c2");
        text.setSay(() => { return new Say(Say.Speak("Minotaur", "Suit yourself. But there is only one way I'm letting you in: once you've proven you're strong."));});
        tree.addNode(text);
        
        
        node = new DialogueNode("c6807e4e-2dae-49b5-b423-ae0ecca7cd47");
        node.setName("SexOffered");
        node.setChoices(["9d13ac84-af56-4a1f-a4a6-f499b96d92de","45ac3006-6fb1-4785-bc4e-76116a5f1eec","db40825e-2ccb-4dd9-a032-924f95ea8643"]);
        tree.addNode(node);
        
        
        text = new DialogueText("a84be8e1-a957-43ab-99e5-11c00bc44e68");
        text.setSay(() => { return new Say(Say.Speak("Minotaur", "Look, if you're tough enough to handle this without fainting, then you can at least survive long enough to escape, if you get stuck in the maze."));});
        text.setNext("b5a467e8-b55b-479f-97c2-2847123e5c79");
        tree.addNode(text);
        
        
        node = new DialogueNode("b5a467e8-b55b-479f-97c2-2847123e5c79");
        node.setNext("SexOffered");
        tree.addNode(node);
        
        
        set = new DialogueSet("21b64a86-657b-43b8-a591-5eb87b49d084");
        set.setFunction(() => {
        MinotaurGuard.AgreedToSex.value = true;
        });
        set.setNext("ae29f9fa-570f-4aca-a29f-3900db84db31");
        tree.addNode(set);
        
        
        text = new DialogueText("ae29f9fa-570f-4aca-a29f-3900db84db31");
        text.setSay(() => { return new Say(Say.Speak("Minotaur", "I will wait until you are prepared. Tell me when you are ready to do the trial, and we will find out what you're made of."));});
        tree.addNode(text);
        
        
         AI.talktoRules.createAndAddRule({
            name : "AIHook for IntroductionToMaze",
            conditions : (runner : RulebookRunner<TalkingHeads>) => {
                // @ts-ignore
                let player = WorldState.player, greeter = runner.noun.greeter, answerer = runner.noun.answerer;
        
                return (answerer == Forest.MazeMinotaurGuard && MinotaurGuard.isMadeNoChoice());
            },
            priority : Rule.PRIORITY_MEDIUM,
            firstPriority : Rule.PRIORITY_MEDIUM,
            code : (runner : RulebookRunner<TalkingHeads>) => {
                runner.noun.options.push({
                    tree: tree,
                    text : new Say("About the crypt...")
                })
            },
        });
        
        
        return tree;
    })();
}