コード例 #1
0
ファイル: Anika.cs プロジェクト: jingjing54007/ArchaicQuest
        public static PlayerSetup.Player OddsNSodsShopKeeper()
        {
            #region NPC setup
            var Anika = new PlayerSetup.Player
            {
                NPCId         = Guid.NewGuid(),
                Name          = "Anika",
                NPCLongName   = "Anika",
                KnownByName   = true,
                Type          = PlayerSetup.Player.PlayerTypes.Mob,
                Description   = "The shop keeper",
                Strength      = 15,
                Dexterity     = 16,
                Constitution  = 16,
                Intelligence  = 12,
                Wisdom        = 16,
                Charisma      = 18,
                MaxHitPoints  = 350,
                HitPoints     = 350,
                Level         = 20,
                Status        = PlayerSetup.Player.PlayerStatus.Standing,
                Skills        = new List <Skill>(),
                Inventory     = new List <Item.Item>(),
                Trainer       = false,
                Greet         = true,
                Shop          = true,
                itemsToSell   = new List <Item.Item>(),
                sellerMessage = "Why of course, here is what I can sell you.",
                GreetMessage  = "Hello there!",
                DialogueTree  = new List <DialogTree>(),
                Dialogue      = new List <Responses>(),
                Quest         = new List <Quest>()
            };


            var backpack = new Item.Item
            {
                name          = "Leather Backpack",
                container     = true,
                containerSize = 30,
                Weight        = 1,
                count         = 10,
                equipable     = false,
                location      = Item.Item.ItemLocation.Inventory,
                canOpen       = true,
                Gold          = 25
            };

            Anika.itemsToSell.Add(ShortSwordBasic.ShortIronSword());
            Anika.itemsToSell.Add(DaggerBasic.IronDagger());
            Anika.itemsToSell.Add(LongSwordBasic.LongIronSword());
            Anika.itemsToSell.Add(StaffBasic.WoodenQuarterstaff());
            Anika.itemsToSell.Add(AxeBasic.IronHatchet());
            Anika.itemsToSell.Add(MaceBasic.IronMace());
            Anika.itemsToSell.Add(PaddedBodyBasic.PaddedBreastPlate());
            Anika.itemsToSell.Add(PaddedSleeves.PaddedSleeve());
            Anika.itemsToSell.Add(PaddedHandsBasic.PaddedGloves());
            Anika.itemsToSell.Add(PaddedLegsBasic.PaddedGreaves());
            Anika.itemsToSell.Add(LeatherBootBasic.WornLeatherBoots());
            Anika.itemsToSell.Add(Light.WoodenTorch());
            Anika.itemsToSell.Add(drink.WaterSkin());
            Anika.itemsToSell.Add(Food.Cheese());
            Anika.itemsToSell.Add(backpack);
            #endregion



            return(Anika);
        }
コード例 #2
0
ファイル: Horik.cs プロジェクト: zhzhwcn/ArchaicQuest
        /// <summary>
        /// alice walks from her home to the shop to talk to anika before buying a pie
        /// she then walks back home and puts the pie o nthe table, before sitting at the table
        /// and eating the pie.
        /// She then goes to sleep and repeats
        /// </summary>
        /// <returns></returns>
        public static PlayerSetup.Player HorikNpc()
        {
            var horik = new PlayerSetup.Player
            {
                NPCId        = Guid.NewGuid(),
                Name         = "Horik",
                NPCLongName  = "Horik the lumberjack",
                KnownByName  = true,
                Type         = PlayerSetup.Player.PlayerTypes.Mob,
                Description  = "You see nothing special about him.",
                Strength     = 70,
                Dexterity    = 72,
                Constitution = 60,
                Intelligence = 60,
                Wisdom       = 60,
                Charisma     = 60,
                MaxHitPoints = 722,
                HitPoints    = 722,
                Level        = 23,
                Status       = PlayerSetup.Player.PlayerStatus.Standing,
                Skills       = new List <Skill>(),
                Inventory    = new ItemContainer(),
                Trainer      = false,
                Greet        = true,
                Shop         = false,
                GreetMessage = "Hello there!",
                DialogueTree = new List <DialogTree>()
                {
                    new DialogTree()
                    {
                        Id                = "Horik1",
                        Message           = "Hi there, do you mind helping me get my Axe repaired?",
                        DontShowIfOnQuest = "Repair Horik's Axe",
                        PossibleResponse  = new List <Responses>()
                        {
                            new Responses()
                            {
                                QuestionId = "Horik1a",
                                AnswerId   = "Horik1a",
                                Response   = "Yes, I can help you."
                            },
                            new Responses()
                            {
                                QuestionId = "Horik1b",
                                AnswerId   = "Horik1b",
                                Response   = "Sorry not right now."
                            }
                        },
                    },
                    new DialogTree()
                    {
                        Id                   = "Horik1a",
                        Message              = "Thanks, take this broken axe and speak to Ferron he will know what to do. When you come back I can show you how to chop wood as a reward.",
                        MatchPhrase          = "Yes, I can help you.",
                        PossibleResponse     = new List <Responses>(),
                        GivePrerequisiteItem = true,
                        GiveQuest            = true,
                        QuestId              = 1,
                    },
                    new DialogTree()
                    {
                        Id               = "Horik1b",
                        Message          = "No worries, come back when you have time.",
                        MatchPhrase      = "Sorry not right now.",
                        PossibleResponse = new List <Responses>()
                    },
                    new DialogTree()
                    {
                        Id               = "Horik1c",
                        Message          = "Have you repaired my axe yet?",
                        ShowIfOnQuest    = "Repair Horik's Axe",
                        PossibleResponse = new List <Responses>(),
                    }
                },
                Dialogue = new List <Responses>(),
                Quest    = new List <Quest>()
                {
                    new Quest()
                    {
                        AlreadyOnQuestMessage = "Do you have the axe just give it to me please.",
                        Description           = "Repair Horik's Axe",
                        Id         = 1,
                        Name       = "Repair Horik's Axe",
                        QuestGiver = "Horik",
                        Type       = Quest.QuestType.FindItem,
                        QuestItem  = new List <Item.Item>()
                        {
                            new Item.Item()
                            {
                                name        = "Horik's Axe",
                                location    = Item.Item.ItemLocation.Inventory,
                                QuestItem   = true,
                                eqSlot      = Item.Item.EqSlot.Held,
                                slot        = Item.Item.EqSlot.Held,
                                description = new Description()
                                {
                                    look = "The shaft of this axe has broken in half and the blade has many chips along it's once sharp edge."
                                },
                                equipable  = true,
                                weaponType = Item.Item.WeaponType.Axe
                            }
                        },
                        RewardGold   = 100,
                        RewardXp     = 1500,
                        RewardDialog = new DialogTree()
                        {
                            Message = "Thank you so much $playerName. To chop wood, just wield an axe and chop the wood. Here you can actually keep the axe, I found my spare axe while you were out. Good luck!"
                        },
                        PrerequisiteItem = new List <Item.Item>()
                        {
                            new Item.Item()
                            {
                                name        = "Horik's Broken Axe",
                                location    = Item.Item.ItemLocation.Inventory,
                                QuestItem   = true,
                                eqSlot      = Item.Item.EqSlot.Held,
                                slot        = Item.Item.EqSlot.Held,
                                description = new Description()
                                {
                                    look = "The shaft of this axe has broken in half and the blade has many chips along it's once sharp edge."
                                },
                                equipable  = true,
                                weaponType = Item.Item.WeaponType.Axe,
                                Condition  = 60
                            }
                        },
                        Completed   = false,
                        RewardItem  = AxeBasic.IronHatchet(),
                        RewardSkill = Chopping.ChoppingAb()
                    }
                },
                Region      = "Anker",
                Area        = "Anker",
                AreaId      = 28,
                ArmorRating = 280,
                Recall      = new Recall()
                {
                    Region = "Anker",
                    Area   = "Anker Farm",
                    AreaId = 12
                }
            };



            #region Dialogue



            #endregion

            return(horik);
        }