Exemplo n.º 1
0
    private void Awake()
    {
        //부모 오브젝트 character 스크립트의 변수 연결 작업
        character = transform.parent.transform.parent.GetComponent <PCharacter>();
        character.NpcAI_Control = GetComponent <NPCBehaviorTree>();

        //분기 노드
        //NPC 분기 트리는 재설정 필요.
        //GameObject bt_Base = transform.GetChild(0).gameObject;
        //sel_characterState = bt_Base.GetComponent<BT_Selector>();
        //sel_Stun_Status_Branch = bt_Base.GetComponent<BT_Selector>();
        //seq_Input_Status_Branch = bt_Base.GetComponent<BT_Sequence>();
        //sel_Status_Replacement_Branch = bt_Base.GetComponent<BT_Selector>();

        //액션 노드
        action_IDLE        = gameObject.AddComponent <BT_Action_IDLE>();
        action_BATTLE_IDLE = gameObject.AddComponent <BT_Action_BATTLE_IDLE>();
        action_HIT         = gameObject.AddComponent <BT_Action_HIT>();
        action_INPUT       = gameObject.AddComponent <BT_Action_INPUT>();
        action_AVOIDE      = gameObject.AddComponent <BT_Action_DODGE>();
        action_GUARD       = gameObject.AddComponent <BT_Action_GUARD>();
        action_MOVE        = gameObject.AddComponent <BT_Action_MOVE>();
        action_ATTACK      = gameObject.AddComponent <BT_Action_ATTACK>();
        action_SKILL_USE   = gameObject.AddComponent <BT_Action_SKILL_USE>(); //임시
    }
Exemplo n.º 2
0
        public void SetUpNewGame()
        {
            Texture2D spriteSheet = content.Load <Texture2D>(@"PlayerSprites\maleplayer");

            player = new Player(GameRef, "Wesley", false, spriteSheet);
            player.AddAvatar("fire", AvatarManager.GetAvatar("fire"));
            player.SetAvatar("fire");
            Texture2D tiles = GameRef.Content.Load <Texture2D>(@"Tiles\tileset1");
            TileSet   set   = new TileSet(8, 8, 32, 32);

            set.Texture = tiles;
            TileLayer background = new TileLayer(200, 200);
            TileLayer edge       = new TileLayer(200, 200);
            TileLayer building   = new TileLayer(200, 200);
            TileLayer decor      = new TileLayer(200, 200);

            map = new TileMap(set, background, edge, building, decor, "test-map");
            map.FillEdges();
            map.FillBuilding();
            map.FillDecoration();
            ConversationManager.CreateConversations(GameRef);
            ICharacter teacherOne = Character.FromString(GameRef,
                                                         "Lance,teacherone,WalkDown,teacherone,water");
            ICharacter teacherTwo = PCharacter.FromString(GameRef,
                                                          "Marissa,teachertwo,WalkDown,tearchertwo,wind,earth");

            teacherOne.SetConversation("LanceHello");
            teacherTwo.SetConversation("MarissaHello");
            GameRef.CharacterManager.AddCharacter("teacherone", teacherOne);
            GameRef.CharacterManager.AddCharacter("teachertwo", teacherTwo);
            map.Characters.Add("teacherone", new Point(0, 4));
            map.Characters.Add("teachertwo", new Point(4, 0));
            camera = new Camera();
        }
Exemplo n.º 3
0
    private void Awake()
    {
        //부모 오브젝트 character 스크립트의 변수 연결 작업
        character = transform.parent.transform.parent.GetComponent <PCharacter>();
        character.Player_Control = GetComponent <PCBehaviorTree>();

        //분기 노드
        sel_CharacterState            = gameObject.AddComponent <BT_Selector>();
        sel_Hit_Status_Branch         = gameObject.AddComponent <BT_Selector>();
        seq_Input_Status_Branch       = gameObject.AddComponent <BT_Sequence>();
        sel_Status_Replacement_Branch = gameObject.AddComponent <BT_Selector>();

        //액션 노드
        action_IDLE        = gameObject.AddComponent <BT_Action_IDLE>();
        action_BATTLE_IDLE = gameObject.AddComponent <BT_Action_BATTLE_IDLE>();
        action_HIT         = gameObject.AddComponent <BT_Action_HIT>();
        action_INPUT       = gameObject.AddComponent <BT_Action_INPUT>();
        action_AVOIDE      = gameObject.AddComponent <BT_Action_DODGE>();
        action_GUARD       = gameObject.AddComponent <BT_Action_GUARD>();
        action_MOVE        = gameObject.AddComponent <BT_Action_MOVE>();
        action_ATTACK      = gameObject.AddComponent <BT_Action_ATTACK>();
        action_SKILL_USE   = gameObject.AddComponent <BT_Action_SKILL_USE>(); //임시
    }
Exemplo n.º 4
0
    public void SaveCharacter()
    {
        if (pcName != "" && pcType != "" && pcMotivation != "" && xtra == 0)
        {
            Debug.Log("save the Game for the First time");
            PCharacter pc = new PCharacter(pcName, pcType, pcMotivation, str, dex, iq, wis, per, hlth, aura, face);
            SaveGame.current = new SaveGame(); Debug.Log("Setting up new save game slot");
            SaveGame.current.GROUP.Add(pc); Debug.Log("adding PC to group");
            SaveGame.current.index = -1;
            //Initial Tags
            SaveGame.current.TAGS.Add("Thelmore_Tavern_Open");

            /*            SaveGame.current.thelmoreBank = true; SaveGame.current.thelmoreBarracks = false; SaveGame.current.thelmoreInn = true;
             *              SaveGame.current.thelmoreRoad = false; SaveGame.current.thelmoreSmith = true; SaveGame.current.thelmoreTavern = true;
             *                  SaveGame.current.thelmoreTemple = true; SaveGame.current.thelmoreToolShop = true; SaveGame.current.thelmoreTownHall = false;
             *                      SaveGame.current.thelmoreVoncar = true; SaveGame.current.thelmoreWell = true; Debug.Log("Started bools"); */

            //load rumors
            SaveAndLoad.LoadDefaultRumorList();
            //Create NPCList
            int          randMot, randTyp, randFac;
            string       tempMot = "", tempTyp = "", tempNam = "";
            PCharacter[] NPC = new PCharacter[25];
            for (int i = 0; i < 25; i++)
            {
                //Name
                tempNam = GameManager.GAME.randomName[Random.Range(0, GameManager.GAME.randomName.Count)];
                //Type
                randTyp = Random.Range(1, 4);
                if (randTyp == 1)
                {
                    tempTyp = "Warrior";
                }
                if (randTyp == 2)
                {
                    tempTyp = "Mage";
                }
                if (randTyp == 3)
                {
                    tempTyp = "Rogue";
                }
                //Motivation
                randMot = Random.Range(1, 8);
                if (randMot == 1)
                {
                    tempMot = "Money";
                }
                if (randMot == 2)
                {
                    tempMot = "Power";
                }
                if (randMot == 3)
                {
                    tempMot = "Honor";
                }
                if (randMot == 4)
                {
                    tempMot = "Glory";
                }
                if (randMot == 5)
                {
                    tempMot = "Fate";
                }
                if (randMot == 6)
                {
                    tempMot = "Duty";
                }
                if (randMot == 7)
                {
                    tempMot = "Curiosity";
                }
                if (randMot == 4)
                {
                    tempMot = "Bloodlust";
                }
                randMot = Random.Range(1, 7);
                //Face
                randFac = Random.Range(0, 10);
                //Make NPC
                NPC[i]          = new PCharacter(tempNam, tempTyp, tempMot, randFac);
                NPC[i].motIndex = randMot;
                //Add to SaveGame list
                SaveGame.current.NPCS.Add(NPC[i]);
            }

            SaveAndLoad.Save(); Debug.Log("Saving savegame");
            SceneManager.LoadScene("ThelmoreTown");
        }
        else
        {
            ErrorPanel.SetActive(true);
        }
    }
Exemplo n.º 5
0
        private void HandleMessage(string returnData)
        {
            string[] lines = returnData.Split("|");
            Game     game  = GameManager.Game;

            lock (game)
            {
                if (lines.Length > 1)
                {
                    int maplines = int.Parse(lines[3]) * 3 + 4;
                    if (int.Parse(lines[0]) != game.Map.num)
                    {
                        game.Map.num  = int.Parse(lines[0]);
                        game.Map.Size = new Vector2f(int.Parse(lines[1]), int.Parse(lines[2]));
                        game.Map.Tiles.Clear();
                        game.Map.MapLayout.Clear();
                        for (int i = 0; i < int.Parse(lines[3]); i++)
                        {
                            game.Map.Tiles.Add(new Map.MapTileCenter(int.Parse(lines[4 + i * 3]),
                                                                     new Vector2f(int.Parse(lines[5 + i * 3]), int.Parse(lines[6 + i * 3]))));
                        }

                        game.Map.LoadTiles();
                    }

                    game.Pentities.Clear();
                    game.Pentities.Add(game.Characters[0]);
                    int entityLineNums = 0;
                    for (int i = 0; i < int.Parse(lines[maplines]); i++)
                    {
                        if (lines[entityLineNums + maplines + 1].Equals("Network"))
                        {
                            game.Characters[0].Position = new Vector2f(int.Parse(lines[entityLineNums + maplines + 4]),
                                                                       int.Parse(lines[entityLineNums + maplines + 5]));
                            game.Characters[0].Display.State.ID      = int.Parse(lines[entityLineNums + maplines + 6]);
                            game.Characters[0].Display.State.facing  = float.Parse(lines[entityLineNums + maplines + 7]);
                            game.Characters[0].Display.State.elapsed = Time.FromSeconds(float.Parse(lines[entityLineNums + maplines + 8]));
                            game.Characters[0].Experience            = int.Parse(lines[entityLineNums + maplines + 9]);
                            game.Characters[0].Experience            = int.Parse(lines[entityLineNums + maplines + 17]);
                            game.Characters[0].Experience            = int.Parse(lines[entityLineNums + maplines + 18]);
                            entityLineNums += 18;
                        }
                        else if (lines[entityLineNums + maplines + 1].Equals("PCharacter"))
                        {
                            PCharacter character = new PCharacter(lines[entityLineNums + maplines + 2], game);
                            character.Position = new Vector2f(int.Parse(lines[entityLineNums + maplines + 3]),
                                                              int.Parse(lines[entityLineNums + maplines + 4]));
                            character.Display.State.ID     = int.Parse(lines[entityLineNums + maplines + 5]);
                            character.Display.State.facing = float.Parse(lines[entityLineNums + maplines + 6]);
                            game.Pentities.Add(character);
                            entityLineNums += 17;
                        }
                        else if (lines[entityLineNums + maplines + 1].Equals("PProjectile"))
                        {
                            PProjectile projectile = new PProjectile(lines[entityLineNums + maplines + 2], game);
                            projectile.Position = new Vector2f(int.Parse(lines[entityLineNums + maplines + 3]),
                                                               int.Parse(lines[entityLineNums + maplines + 4]));
                            projectile.Display.State.ID     = int.Parse(lines[entityLineNums + maplines + 5]);
                            projectile.Display.State.facing = float.Parse(lines[entityLineNums + maplines + 6]);
                            entityLineNums += 7;
                        }
                        else if (lines[entityLineNums + maplines + 1].Equals("PEnvironment"))
                        {
                            PEnvironment environment = new PEnvironment(lines[entityLineNums + maplines + 2], game);
                            environment.Position = new Vector2f(int.Parse(lines[entityLineNums + maplines + 3]),
                                                                int.Parse(lines[entityLineNums + maplines + 4]));
                            environment.Display.State.ID     = int.Parse(lines[entityLineNums + maplines + 5]);
                            environment.Display.State.facing = float.Parse(lines[entityLineNums + maplines + 6]);
                            game.Pentities.Add(environment);
                            entityLineNums += 7;
                        }
                    }
                }
            }
        }
Exemplo n.º 6
0
        /// <summary>
        /// Helper function for creating players
        /// </summary>
        private void CreateCharacters(IO.Models.GameState state)
        {
            foreach (var entry in state.PlayerNames)
            {
                PPlayer    pplayer   = entry.Value;
                PCharacter character = entry.Value.Character;
                PPosition  position  = character.Position;

                if (position.BoardId != _sceneConfiguration.BoardName)
                {
                    continue;
                }

                GameObject player = this._charactersManager.CreatePlayer(
                    new Vector3Int(position.X, position.Y, 0),
                    character.Name);

                var hub = player.GetComponent <Hub>();

                hub.Level      = character.Level;
                hub.Health     = character.CurrentHealth;
                hub.Experience = character.Experience;

                var inventory = player.GetComponent <Inventory>();

                if (inventory != null)
                {
                    Sprite head = _tileDatabase.GetWearable(pplayer.Hat?.Sprite);
                    if (head != null)
                    {
                        inventory.Head = head;
                    }

                    Sprite top = _tileDatabase.GetWearable(pplayer.Clothes?.Sprite);
                    if (top != null)
                    {
                        inventory.Top = top;
                    }

                    Sprite bottom = _tileDatabase.GetWearable(pplayer.Shoes?.Sprite);
                    if (bottom != null)
                    {
                        inventory.Bottom = bottom;
                    }

                    Sprite accessory = _tileDatabase.GetWearable(pplayer.Accessory?.Sprite);
                    if (accessory != null)
                    {
                        inventory.Accessory = accessory;
                    }

                    Sprite weapon = _tileDatabase.GetWearable(character.Weapon?.Sprite);
                    if (weapon != null)
                    {
                        inventory.Weapon = weapon;
                    }
                }
            }

            foreach (var entry in state.MonsterNames)
            {
                PCharacter character = entry.Value.Character;
                PPosition  position  = character.Position;

                if (position.BoardId != _sceneConfiguration.BoardName)
                {
                    continue;
                }

                Sprite monsterSprite = _tileDatabase.GetSprite(character.Sprite);

                GameObject monster = this._charactersManager.CreateMonster(
                    new Vector3Int(position.X, position.Y, 0),
                    character.Name,
                    monsterSprite);

                var hub = monster.GetComponent <Hub>();

                hub.Health     = character.CurrentHealth;
                hub.Experience = character.Experience;
                hub.Level      = character.Level;
            }
        }
Exemplo n.º 7
0
        public void SetUpNewGame()
        {
            Texture2D spriteSheet = content.Load <Texture2D>(@"PlayerSprites\maleplayer");
            TileMap   map         = null;

            world = new World();

            // player initialize
            // TODO:  Let player enter their own name
            player = new Player(GameRef, "Wesley", false, spriteSheet);
            player.AddAvatar("fire", AvatarManager.GetAvatar("fire"));
            player.SetAvatar("fire");

            Texture2D tiles = GameRef.Content.Load <Texture2D>(@"Tiles\tileset1");
            TileSet   set   = new TileSet(8, 8, 32, 32);

            set.Texture = tiles;
            TileLayer background = new TileLayer(200, 200);
            TileLayer edge       = new TileLayer(200, 200);
            TileLayer building   = new TileLayer(200, 200);
            TileLayer decor      = new TileLayer(200, 200);

            // configure map 1
            map = new TileMap(set, background, edge, building, decor, "test-map");
            map.FillEdges();
            map.FillBuilding();
            map.FillDecoration();
            building.SetTile(4, 4, 18);

            ConversationManager.CreateConversations(GameRef);

            // TODO:  Build characters from data file
            var        lanceDTO = new CharacterData("Lance", "teacherone", AnimationKey.WalkDown, "teacherone", "water");
            ICharacter lance    = Character.FromDTO(GameRef, lanceDTO);


            var        marissaString = "Marissa,teachertwo,WalkDown,tearchertwo,0,wind,earth";
            ICharacter marissa       = PCharacter.FromString(GameRef, marissaString);

            lance.SetConversation("LanceHello");
            marissa.SetConversation("MarissaHello");

            GameRef.CharacterManager.AddCharacter("teacherone", lance);
            GameRef.CharacterManager.AddCharacter("teachertwo", marissa);

            map.Characters.Add("teacherone", new Point(0, 8));
            map.Characters.Add("teachertwo", new Point(4, 0));

            map.PortalLayer.Portals.Add(Rectangle.Empty, new Portal(Point.Zero, Point.Zero, "level1"));
            map.PortalLayer.Portals.Add(new Rectangle(4, 4, 32, 32), new Portal(new Point(4, 4), new
                                                                                Point(10, 10), "inside"));

            world.AddMap("level1", map);
            world.ChangeMap("level1", Rectangle.Empty);

            // configure map 2
            background = new TileLayer(20, 20, 23);
            edge       = new TileLayer(20, 20);
            building   = new TileLayer(20, 20);
            decor      = new TileLayer(20, 20);
            map        = new TileMap(set, background, edge, building, decor, "inside");
            map.FillEdges();
            map.FillBuilding();
            map.FillDecoration();
            map.BuildingLayer.SetTile(9, 19, 18);
            map.PortalLayer.Portals.Add(new Rectangle(9, 19, 32, 32), new Portal(new Point(9, 19), new
                                                                                 Point(4, 4), "level1"));
            world.AddMap("inside", map);

            camera = new Camera();
        }
Exemplo n.º 8
0
        private void HandleMessage(string returnData, IPEndPoint RemoteIpEndPoint)
        {
            string[] lines = returnData.Split("|");
            if (lines.Length > 0)
            {
                string ip = RemoteIpEndPoint.Address.ToString();
                if (lines[0].Equals("JOIN") && lines[1].Equals("PCharacter"))
                {
                    if (!Connections.Contains(ip))
                    {
                        lock (Connections)
                        {
                            Connections.Add(ip);
                            PCharacter character = new PCharacter("Player", GameManager.Game);
                            character.Position     = new Vector2f(int.Parse(lines[3]), int.Parse(lines[4]));
                            character.Experience   = int.Parse(lines[8]);
                            character.Level        = int.Parse(lines[9]);
                            character.SkillPoints  = int.Parse(lines[10]);
                            character.Vigor        = int.Parse(lines[11]);
                            character.Strength     = int.Parse(lines[12]);
                            character.Agility      = int.Parse(lines[13]);
                            character.Intelligence = int.Parse(lines[14]);
                            character.Spirit       = int.Parse(lines[15]);
                            character.Health       = character.Vigor;
                            character.Mana         = character.Intelligence;
                            character.Abilities.Add(new PCharacter.Ability(Time.FromSeconds(1), 1, EntityActions.Throw));
                            character.Abilities.Add(new PCharacter.Ability(Time.FromSeconds(3), 5, EntityActions.WhirlWind));
                            character.Abilities.Add(new PCharacter.Ability(Time.FromSeconds(5), 3, EntityActions.Lunge));
                            GameManager.Game.AddCharacter(character);
                            GameManager.Game.NetworkPlayers.Add(character);
                        }
                    }
                }
                else
                {
                    if (Connections.Contains(ip))
                    {
                        int num = 0;
                        for (int i = 0; i < Connections.Count; i++)
                        {
                            if (Connections[i].Equals(ip))
                            {
                                num = i;
                            }
                        }

                        PCharacter player   = GameManager.Game.NetworkPlayers[num];
                        Vector2f   position = new Vector2f(int.Parse(lines[1]), int.Parse(lines[2]));
                        switch (int.Parse(lines[0]))
                        {
                        case 0:
                            PEntity entity = GameManager.Game.EntityAt(position);
                            if (entity != null && entity != player)
                            {
                                player.Target    = entity;
                                player.Direction = null;
                            }
                            else
                            {
                                player.Target    = null;
                                player.Direction = GameManager.Game.Map.IntersectAt(player.Position, position);
                                if (player.Direction == player.Position)
                                {
                                    player.Direction = null;
                                }
                            }
                            break;

                        case 1:
                            player.Display.State.UpdateFacing(position);
                            player.DoSpecialAttack(1);
                            break;

                        case 2:
                            player.DoSpecialAttack(2);
                            break;

                        case 3:
                            player.DoSpecialAttack(3);
                            break;

                        default:
                            player.Target    = null;
                            player.Direction = null;
                            break;
                        }
                    }
                }
            }
        }
Exemplo n.º 9
0
    public string TalktoAdventurers(PCharacter speaker)
    {
        string output = "";

        if (speaker.pcMotivation == "Money")
        {
            if (speaker.motIndex == 1)
            {
                output = "I need money. You need help. Let’s go.";
            }
            if (speaker.motIndex == 2)
            {
                output = "Why would I want to plunge into the Deadly Dark Deeps with you? It’s simple, really. They are down there with literal tons of gold and treasure, just sitting there. I want some of that for myself.";
            }
            if (speaker.motIndex == 3)
            {
                output = "When the Ghalidans broke through the walls at Hushalla, my family was forced to flee with nothing but the clothes we wore. Now, I will fight to earn what I need to improve our standing, to recover our place in the world!";
            }
            if (speaker.motIndex == 4)
            {
                output = "Do you know what makes the world go around? Money. It all comes down to money. I doubt I will ever have enough!";
            }
            if (speaker.motIndex == 5)
            {
                output = "My family never had much but they raised me as best they could. I was happy enough on my farm, but now that’s gone, and I gotta make a living somehow.";
            }
            if (speaker.motIndex == 6)
            {
                output = "It’s pretty simple really. First, I get the money and then I get the power. The more money, the more power. I am going to be a King!";
            }
            if (speaker.motIndex == 7)
            {
                output = "I find that I need more money than I am able to easily procure. Once we have delved a bit, I plan to take what I have earned and use it to ease the burdens of the war-orphans in the south.";
            }
        }
        if (speaker.pcMotivation == "Power")
        {
            if (speaker.motIndex == 1)
            {
                output = "I sense great power below us, calling me.";
            }
            if (speaker.motIndex == 2)
            {
                output = "You hear such wondrous tales, you know? I heard about this one guy, he found a knife in a dungeon a lot like this. Used it for eating, cutting rope, you know, just the usual stuff. Only, this knife could talk! It had all these spells on it, and he used it to cut rope! Can you imagine!";
            }
            if (speaker.motIndex == 3)
            {
                output = "Khalidan. Montegrai. Solemenai. Just three examples, but it seems all the great Sorcerers got their start in places like these. I may be humble now, but my Power will grow!";
            }
            if (speaker.motIndex == 4)
            {
                output = "Gotta keep going, you know? Gotta keep delving deeper, finding my paydays. Gotta keep training. It is the only way to get more powerful. Gotta keep getting more powerful, you know?";
            }
            if (speaker.motIndex == 5)
            {
                output = "I will tell you simply: I seek power. Not for myself, but for my children. I have tried to leave a legacy for my family, but for naught. But here? In this place? I will find the power I need to ensure a legacy for my children.";
            }
            if (speaker.motIndex == 6)
            {
                output = "I may not be much right now, but that will change! You are going to hire me, and we are going to go and find what we need to be the most powerful adventurers ever!";
            }
            if (speaker.motIndex == 7)
            {
                output = "Nobility means nothing without power. Nobility directs our intentions, but power fuels the ambitions into reality. I have my nobility and a purpose, but together perhaps we can find the power I need?";
            }
        }
        if (speaker.pcMotivation == "Honor")
        {
            if (speaker.motIndex == 1)
            {
                output = "I must delve. It is a matter of Honor.";
            }
            if (speaker.motIndex == 2)
            {
                output = "Honor drives me, Honor comforts me. When nothing is left; no friends, no family, no lovers… I have my Honor still. My Honor has led me here, and my Honor leads me below, and so I will go.";
            }
            if (speaker.motIndex == 3)
            {
                output = "Ser Gregori was my master, but he set me free when he rode south to war. I served him as best I could, but in the end I was not chosen to be his squire. However, here in the Deadly Dark Deeps, I will find Honor enough to earn my place in the Light Corps!";
            }
            if (speaker.motIndex == 4)
            {
                output = "Some of these ‘Adventurers’ are little more than bandits. They talk about money, or the tales people will sing about them, or taking pleasure in death. Bandits. It is simple: We must stand against darkness. Honor demands it.";
            }
            if (speaker.motIndex == 5)
            {
                output = "You want to know why I am here? I didn’t hear about this place and travel across the world to get here, I was born right over there. When the Deeps opened, I had a puppy named Bill. Those first days, we didn’t know what was happening, you know? There were no guards. Things were wandering town willy-nilly… and one of those bastards got my puppy. My little Bill. Now, on my Honor, I will kill every last one of them…";
            }
            if (speaker.motIndex == 6)
            {
                output = "Good day! Or good Evening! Honorable greetings! Are you here to explore the Deadly Dark Deeps too? Let’s go together!";
            }
            if (speaker.motIndex == 7)
            {
                output = "Nobility means nothing without Honor. Nobility directs our intentions, but Honor gives us something to uphold, something greater than us to work toward and judge our actions against. Honor is the backdrop that lets us be Noble. I am here to fight the darkness, because it is my Honor to do so.";
            }
        }
        if (speaker.pcMotivation == "Glory")
        {
            if (speaker.motIndex == 1)
            {
                output = "Nobody knows who I am, but someday they will.";
            }
            if (speaker.motIndex == 2)
            {
                output = "Ha! I will give the Bards something to sing about! My name will be on every tongue! In every song! Young’uns will hear the stories and dream about their own adventures to come, just as I did as a lad! No matter how I end, I will leave a tale to be told!";
            }
            if (speaker.motIndex == 3)
            {
                output = "In the story of Samosite, he slew a hundred foes with little more than a club fashioned from the jawbone of a wyvern. Imagine what my story will be! In this dungeon, I will find my hundred foes, and our battle will be Glorious!";
            }
            if (speaker.motIndex == 4)
            {
                output = "Nobody has ever heard of me, not yet. But that will change! These are the Glory days!";
            }
            if (speaker.motIndex == 5)
            {
                output = "You want to know what a tragedy is? Nobody sings about me! My name is perfect for stories, it just rolls off the tongue!";
            }
            if (speaker.motIndex == 6)
            {
                output = "Nobody has ever heard of me, not yet. But that will change! These are the Glory days!";
            }
            if (speaker.motIndex == 7)
            {
                output = "Glory is coming for me, and when everyone knows my name, I will marshal an army and retake my family’s birthright!";
            }
        }
        if (speaker.pcMotivation == "Fate")
        {
            if (speaker.motIndex == 1)
            {
                output = "I have come to meet my Fate.";
            }
            if (speaker.motIndex == 2)
            {
                output = "Some people are Fated to meet, and I think we are two such. Everyone has a destiny, you know? All you need do is watch to see that it all works out.";
            }
            if (speaker.motIndex == 3)
            {
                output = "Everyone is talking about the Dark Deadly Deeps, but this is not the only time this has opened. This small sliver is just a fraction of the Deeps. The true Dark Deadly Deeps is far older and far more vast than people dream. It is my Destiny to seek out more, to delve deeper than ever before.";
            }
            if (speaker.motIndex == 4)
            {
                output = "I will die down there. It is ok, I am ready. I have prepared. My affairs are in order. Let’s go meet my Fate.";
            }
            if (speaker.motIndex == 5)
            {
                output = "I will die down there. It is ok, I am ready. I have prepared. My affairs are in order. Let’s go meet my Fate.";
            }
            if (speaker.motIndex == 6)
            {
                output = "Ever since I was little, I have known that I have a destiny. A Fate. I am marked for great things!";
            }
            if (speaker.motIndex == 7)
            {
                output = "Fate looms over us all. Everyone has a destiny. Perhaps mine is here. Perhaps it is further on in time. It hardly matters, I will meet my Fate when it is time to do so.";
            }
        }
        if (speaker.pcMotivation == "Duty")
        {
            if (speaker.motIndex == 1)
            {
                output = "It is my Duty to delve the Deadly Dark Deeps.";
            }
            if (speaker.motIndex == 2)
            {
                output = "I suppose I am here because of my father. He was an adventurer, and he wanted me to follow in his footsteps. I hesitated when I heard of the war in the south, all the adventurers went as soon as it started, but I stayed behind. That is why when I heard about the Deadly Dark Deeps opening here, I knew I had to come. This is my chance to fulfill my Father’s wishes.";
            }
            if (speaker.motIndex == 3)
            {
                output = "I was a guard in Hamilton, on the road south of here. My brother lives in Thelmore, but he disappeared when the Deadly Dark Deeps opened. I am here to find out what happened to him, it is my duty to my family.";
            }
            if (speaker.motIndex == 4)
            {
                output = "I was a guard in Hamilton, on the road south of here. My brother lives in Thelmore, but he disappeared when the Deadly Dark Deeps opened. I am here to find out what happened to him, it is my duty to my family.";
            }
            if (speaker.motIndex == 5)
            {
                output = "I was a guard in Hamilton, on the road south of here. My brother lives in Thelmore, but he disappeared when the Deadly Dark Deeps opened. I am here to find out what happened to him, it is my duty to my family.";
            }
            if (speaker.motIndex == 6)
            {
                output = "I think we all have a Duty to stand against the darkness. Who knows what is down there? We are all that is holding it back so these good people can live their lives.";
            }
            if (speaker.motIndex == 7)
            {
                output = "Nobility means nothing without Duty. Knights talk about Honor and Glory, but Duty is what sticks when everything else has run out. Without Duty, what purpose has Nobility?";
            }
        }
        if (speaker.pcMotivation == "Curiosity")
        {
            if (speaker.motIndex == 1)
            {
                output = "Why do I want to go into the Deadly Dark Deeps? Because it is there.";
            }
            if (speaker.motIndex == 2)
            {
                output = "Can you imagine? A whole complex below a sleepy little town like this! How long has it been there? Where did it come from? Why was it built? Why here? How could no-one have stumbled upon it before? I mean, these questions keep me up at night! I have to know!";
            }
            if (speaker.motIndex == 3)
            {
                output = "This is not the whole of the Deadly Dark Deeps of course. The Deadly Dark Deeps are vast, containing whole civilizations. Entrances have been found on the Eastern continent! This entrance is curiously stable, however, and it will be rewarding to see how deep it goes.";
            }
            if (speaker.motIndex == 4)
            {
                output = "My mother always told me that my nose would get me in trouble if I kept sticking it in other people’s business. She is probably right, but still, it seems like a dungeon opening under town is everyone’s business, right?";
            }
            if (speaker.motIndex == 5)
            {
                output = "My uncle lived in Thelmore, but he disappeared a short time after the Deadly Dark Deeps opened. He kept a journal, and in it he describes having strange dreams for months before the opening. They puzzled and disturbed him, but it seems clear now that he was dreaming about something in the Deeps… but what? I must know!";
            }
            if (speaker.motIndex == 6)
            {
                output = "Does it seem odd to you? A whole dungeon locked off from the world until it was breached by some poor guy who wanted to dig a well in the wrong place? I mean, what lived there before? How could they live in the darkness, with no sunlight or plants? Just one question I want to find an answer to!";
            }
            if (speaker.motIndex == 7)
            {
                output = "I do not simply wish to improve my standing or self, I have no malice in my heart for the things below. No! Rather, I am curious about them! I am eager to catalog any new creatures from below! What are their habits? What is their diet? Do they live in communities as we do? Do they have skills we can learn? I have so many questions!";
            }
        }
        if (speaker.pcMotivation == "Bloodlust")
        {
            if (speaker.motIndex == 1)
            {
                output = "–grunt-";
            }
            if (speaker.motIndex == 2)
            {
                output = "Look buddy, it is really, really simple. I am here to kill things. That’s it. The more things I kill, the happier I am.";
            }
            if (speaker.motIndex == 3)
            {
                output = "Black Razor, Blade of the Lune, Cadmus… These are only some of the most powerful weapons of all time, all pulled from forgotten dungeons like this one. I will find a weapon of legend here, and I will use it to write my legend in the blood of my enemies!";
            }
            if (speaker.motIndex == 4)
            {
                output = "Look, friend… I have this problem. Blood is all I think about, it is in my dreams, it is in my heart. I just need to kill, all the time. Here, I can finally let loose! I can kill them all! MUW-HA-HA-HAAA!";
            }
            if (speaker.motIndex == 5)
            {
                output = "Did you hear about that guy’s dog? GRRRR! I WILL KILL THEM ALL! THEY WILL ALL DIE! GRRRR!";
            }
            if (speaker.motIndex == 6)
            {
                output = "Just keep killing, just keep killing, La la la la la la la!  Everything will be okay!";
            }
            if (speaker.motIndex == 7)
            {
                output = "Nobility means nothing without strength. What good is noble spirit if you do not kill everything that stands against you? What good is duty, if you do not remove anything that could keep you to it? What good is honor if you do not wash every stain from it with the blood of your enemies? No, it is clear… being Noble means making other people die.";
            }
        }
        output = "I belong to SaveGame # " + speaker.SaveGameID;
        return(output);
    }