Beispiel #1
0
        public override void Run()
        {
            var companyName = _companyNames[Random.Range(0, _companyNames.Count)];

            Description =
                $"The party spots a large gathering and decides to check it out.\n\n'WELCOME TO THE {companyName.ToUpper()} COMPANY RETREAT!' a huge banner exclaims.\n\nYou are about to tell everyone break's over when an ENTHUSIASTIC gentleman with a ponytail challenges your party to 'unleash their inner power'. His arm is extended towards a bed of hot coals surrounded by totally thrilled employees.\n\nWho will take the challenge?";

            Options = new Dictionary <string, Option>();

            var sacrifices = Party.GetRandomCompanions(3);

            const int success = 15;

            string optionResultText;

            foreach (var sacrifice in sacrifices)
            {
                var optionReward  = new Reward();
                var optionPenalty = new Penalty();

                var coordCheck = Dice.Roll($"{sacrifice.Attributes.Coordination - 1}d6");

                var wildRoll = GlobalHelper.RollWildDie();

                coordCheck += wildRoll;

                if (coordCheck > success)
                {
                    optionResultText = $"{sacrifice.FirstName()} marches across the coals. They indeed feel a burning sensation -- not on their feet, but within. Just like the pamphlet said!";

                    optionReward.AddEntityGain(sacrifice, EntityStatTypes.CurrentMorale, 10);
                    optionReward.AddEntityGain(sacrifice, EntitySkillTypes.Endurance, 1);
                }
                else
                {
                    optionResultText = $"{sacrifice.FirstName()} tries walking on the sides of their feet to keep from burning their soles, but ends up slipping and slams onto the hot coals!";

                    optionPenalty.AddEntityLoss(sacrifice, EntityStatTypes.CurrentMorale, 5);
                    optionPenalty.AddEntityLoss(sacrifice, EntityStatTypes.CurrentHealth, 5);
                }

                var option = new Option(sacrifice.Name, optionResultText, optionReward, optionPenalty, EncounterType.Normal);

                Options.Add(sacrifice.Name, option);
            }

            var optionTitle = "Get out of there";

            optionResultText = $"The man whips his ponytail round and round in a rage!\n\n\"You'll never know true enlightenment!\"";

            var optionFour = new Option(optionTitle, optionResultText, null, null, EncounterType.Normal);

            Options.Add(optionTitle, optionFour);

            SubscribeToOptionSelectedEvent();

            var eventMediator = Object.FindObjectOfType <EventMediator>();

            eventMediator.Broadcast(GlobalHelper.FourOptionEncounter, this);
        }
Beispiel #2
0
        public override void Run()
        {
            var travelManager = Object.FindObjectOfType <TravelManager>();
            var derpus        = travelManager.Party.Derpus;

            Reward = new Reward();

            Reward.AddEntityGain(derpus, EntityStatTypes.CurrentMorale, derpus.Stats.MaxMorale / 2);

            Reward.AddEntityGain(derpus, EntityStatTypes.CurrentEnergy, 10);

            foreach (var companion in travelManager.Party.GetCompanions())
            {
                Reward.AddEntityGain(companion, EntityStatTypes.CurrentEnergy, 10);
            }

            var fullResultDescription = new List <string> {
                Description + "\n"
            };

            travelManager.ApplyEncounterReward(Reward);

            var eventMediator = Object.FindObjectOfType <EventMediator>();

            eventMediator.Broadcast(GlobalHelper.EncounterResult, this, fullResultDescription);
        }
Beispiel #3
0
        public override void Run()
        {
            var chosen = Party.GetRandomCompanion();

            Description = $"You and the party get a free stay at an inn with some coupons. It's a pretty comfy place, but {chosen.FirstName()} has to deal with a drunk bard serenading to their lover outside their window! Eventually, the bard figures out he is at the wrong inn and leaves.";

            Reward = new Reward();

            Reward.AddEntityGain(Party.Derpus, EntityStatTypes.CurrentEnergy, 10);

            foreach (var companion in Party.GetCompanions())
            {
                if (companion == chosen)
                {
                    Reward.AddEntityGain(companion, EntityStatTypes.CurrentEnergy, 5);
                    continue;
                }

                Reward.AddEntityGain(companion, EntityStatTypes.CurrentEnergy, 10);
            }

            var fullResultDescription = new List <string> {
                Description + "\n"
            };

            var travelManager = Object.FindObjectOfType <TravelManager>();

            travelManager.ApplyEncounterReward(Reward);

            var eventMediator = Object.FindObjectOfType <EventMediator>();

            eventMediator.Broadcast(GlobalHelper.EncounterResult, this, fullResultDescription);
        }
Beispiel #4
0
        public override void Run()
        {
            var travelManager   = Object.FindObjectOfType <TravelManager>();
            var chosenCompanion = travelManager.Party.GetRandomCompanion();

            Description =
                $"While taking a whizz {chosenCompanion.Name} notices a black bottle sticking out from under a bush. They pick it up and inspect it, but they can't quite make out the contents. Curiosity gets the best of {chosenCompanion.FirstName()} and they open the bottle. Black smoke erupts from the bottle and forms into a genie! \n\nMAKE A WISH!";

            Options = new Dictionary <string, Option>();

            var optionTitle      = "I want to feast tonight!";
            var optionResultText =
                $"The genie snaps his fingers and {chosenCompanion.FirstName()}'s arms are overflowing with delicious food!";

            var reward = new Reward();

            var foodGained = Random.Range(15, 21);

            reward.AddPartyGain(PartySupplyTypes.Food, foodGained);

            var optionOne = new Option(optionTitle, optionResultText, reward, null, EncounterType);

            Options.Add(optionTitle, optionOne);

            optionTitle      = "Good health!";
            optionResultText = $"{chosenCompanion.FirstName()}'s wounds are completely healed! They feel like a million bucks!";

            reward = new Reward();

            reward.AddEntityGain(chosenCompanion, EntityStatTypes.CurrentHealth, chosenCompanion.Stats.MaxHealth);
            reward.AddEntityGain(chosenCompanion, EntityStatTypes.CurrentEnergy, chosenCompanion.Stats.MaxEnergy);

            var optionTwo = new Option(optionTitle, optionResultText, reward, null, EncounterType);

            Options.Add(optionTitle, optionTwo);

            optionTitle      = "MAKE IT RAIN";
            optionResultText = $"The genie disappears in a flash! Gold coins rain down upon {chosenCompanion.FirstName()}'s skull much to their delight!";

            var goldAmount = Random.Range(20, 81);

            reward = new Reward();

            reward.AddPartyGain(PartySupplyTypes.Gold, goldAmount);

            var optionThree = new Option(optionTitle, optionResultText, reward, null, EncounterType);

            Options.Add(optionTitle, optionThree);

            SubscribeToOptionSelectedEvent();

            var eventMediator = Object.FindObjectOfType <EventMediator>();

            eventMediator.Broadcast(GlobalHelper.FourOptionEncounter, this);
        }
Beispiel #5
0
        public override void Run()
        {
            var partyPal = Party.GetRandomCompanion();

            Title = $"{partyPal.FirstName()} Forty Hands";

            Description = $"The party camps outside a town known for its taverns. In the morning, {partyPal.FirstName()} is missing! After a short search, they are found in a nearby field in their underwear with empty bottles tied to their hands.";

            const int equipmentLostChance = 18;

            var roll = Dice.Roll("1d100");

            if (roll <= equipmentLostChance)
            {
                partyPal.UnEquipAll();

                Description += "\n\nTheir equipment is nowhere to be found!";
            }
            else
            {
                Description += "\n\nLuckily, their equipment is found close by.";
            }

            Penalty = new Penalty();

            Penalty.AddEntityLoss(partyPal, EntityStatTypes.CurrentEnergy, 10);

            Reward = new Reward();

            Reward.AddEntityGain(Party.Derpus, EntityStatTypes.CurrentEnergy, 10);

            foreach (var companion in Party.GetCompanions())
            {
                if (companion == partyPal)
                {
                    continue;
                }

                Reward.AddEntityGain(companion, EntityStatTypes.CurrentEnergy, 10);
            }

            var fullResultDescription = new List <string> {
                Description + "\n"
            };

            var travelManager = Object.FindObjectOfType <TravelManager>();

            travelManager.ApplyEncounterPenalty(Penalty);
            travelManager.ApplyEncounterReward(Reward);

            var eventMediator = Object.FindObjectOfType <EventMediator>();

            eventMediator.Broadcast(GlobalHelper.EncounterResult, this, fullResultDescription);
        }
Beispiel #6
0
        public override void Run()
        {
            var travelManager = Object.FindObjectOfType <TravelManager>();

            Options = new Dictionary <string, Option>();

            var optionTitle      = "Let him keep it";
            var optionResultText = "Derpus grins wildly and \"wears\" the hat best he can.";

            var optionOneReward = new Reward();

            optionOneReward.AddEntityGain(travelManager.Party.Derpus, EntityStatTypes.MaxMorale, 5);

            var optionOne = new Option(optionTitle, optionResultText, optionOneReward, null, EncounterType.Normal);

            Options.Add(optionTitle, optionOne);

            optionTitle = "Drop it!";

            optionResultText = "Derpus shrugs and tosses the hat aside. Oh well.";

            var optionTwo = new Option(optionTitle, optionResultText, null, null, EncounterType.Normal);

            Options.Add(optionTitle, optionTwo);

            SubscribeToOptionSelectedEvent();

            var eventMediator = Object.FindObjectOfType <EventMediator>();

            eventMediator.Broadcast(GlobalHelper.FourOptionEncounter, this);
        }
Beispiel #7
0
        public override void Run()
        {
            var victim = Party.GetRandomCompanion();

            Description = $"It's getting close to sundown when the sound of music carries through the air. A short while later, the party happens upon a music festival! Everyone decides this would be as good a spot to camp as any and parks the wagon out of the way.\n\n{victim.FirstName()} wanders towards a stage, but starts getting pushed around when the lute player is seven minutes into a solo! They try to get away, but go down for the count when they are hit in the head by a dwarf someone tossed!\n\nA festival goer stands over them and screams in their face \"WELCOME TO THE PIT!\"";

            Reward = new Reward();

            if (victim.Stats.CurrentHealth > 5)
            {
                Description += $"\n\n{victim.FirstName()} wakes in the morning with a horrible headache.";

                Reward.EveryoneGain(Party, EntityStatTypes.CurrentEnergy, 10);
            }
            else
            {
                Reward.AddEntityGain(Party.Derpus, EntityStatTypes.CurrentEnergy, 10);

                foreach (var companion in Party.GetCompanions())
                {
                    if (companion == victim)
                    {
                        continue;
                    }

                    Reward.AddEntityGain(companion, EntityStatTypes.CurrentEnergy, 10);
                }
            }

            Penalty = new Penalty();

            Penalty.AddEntityLoss(victim, EntityStatTypes.CurrentHealth, 5);

            var travelManager = Object.FindObjectOfType <TravelManager>();

            travelManager.ApplyEncounterReward(Reward);
            travelManager.ApplyEncounterPenalty(Penalty);

            var fullResultDescription = new List <string> {
                Description + "\n"
            };

            var eventMediator = Object.FindObjectOfType <EventMediator>();

            eventMediator.Broadcast(GlobalHelper.EncounterResult, this, fullResultDescription);
        }
Beispiel #8
0
        public SweetrollRobbery()
        {
            Rarity          = Rarity.Common;
            EncounterType   = EncounterType.Normal;
            Title           = "Sweetroll Robbery";
            Description     = "The group finds an overturned wagon on the side of the trail. It's unclear what happened here, but the group manages to find some baked goods!";
            ImageResultName = "crashed wagon";

            Reward = new Reward();

            Reward.AddPartyGain(PartySupplyTypes.Food, 8);

            var travelManager = Object.FindObjectOfType <TravelManager>();

            //todo need a method for giving entire party the same reward or penalty
            Reward.AddEntityGain(travelManager.Party.Derpus, EntityStatTypes.CurrentMorale, 10);

            foreach (var companion in travelManager.Party.GetCompanions())
            {
                Reward.AddEntityGain(companion, EntityStatTypes.CurrentMorale, 10);
            }
        }
Beispiel #9
0
        public override void Run()
        {
            var travelManager = Object.FindObjectOfType <TravelManager>();

            var gold = travelManager.Party.Gold;

            const int clothesCost = 50;

            Reward  = new Reward();
            Penalty = new Penalty();

            var trendy = travelManager.Party.GetRandomCompanion();

            Description = $"The party decides to camp outside of a town known for its shopping district. {trendy.FirstName()} disappears for awhile to check things out. They return proudly wearing the poofiest, silkiest pantaloons you've ever seen!";

            if (gold <= 0)
            {
                Description += $"\n\nThey found the clothes hanging out to dry in someone's yard and took them!";
            }
            else
            if (gold <= clothesCost)
            {
                Description += $"\n\nThey spent the rest of the gold!";

                Penalty.AddPartyLoss(PartySupplyTypes.Gold, gold);
            }
            else
            {
                Description += $"\n\nThey spent {clothesCost} gold!";

                Penalty.AddPartyLoss(PartySupplyTypes.Gold, clothesCost);
            }

            Reward.EveryoneGain(travelManager.Party, EntityStatTypes.CurrentEnergy, 10);

            Reward.AddEntityGain(trendy, EntityStatTypes.CurrentMorale, 5);

            var fullResultDescription = new List <string> {
                Description + "\n"
            };

            travelManager.ApplyEncounterPenalty(Penalty);
            travelManager.ApplyEncounterReward(Reward);

            var eventMediator = Object.FindObjectOfType <EventMediator>();

            eventMediator.Broadcast(GlobalHelper.EncounterResult, this, fullResultDescription);
        }
Beispiel #10
0
        public override void Run()
        {
            Options = new Dictionary <string, Option>();

            string optionTitle;
            string optionResultText;

            var sacrifice = Party.GetRandomCompanion();

            if (Party.HealthPotions > 0)
            {
                optionTitle = "Offer them a health potion";

                optionResultText = "Not quite cough syrup, but close enough!\n\n";

                const int sacChance = 13;

                var roll = Dice.Roll("1d100");

                var optionOnePenalty = new Penalty();

                optionOnePenalty.AddPartyLoss(PartySupplyTypes.HealthPotions, 1);

                var optionOneReward = new Reward();

                if (roll <= sacChance)
                {
                    optionResultText += "\"Still gonna take one of you as a sacrifice though.\"\n\n";

                    optionResultText += $"{sacrifice.Name} vanishes in a flash of fire and black smoke! Seva shrugs.\n\n\"Okay, see ya.\"";

                    optionOnePenalty.RemoveFromParty(sacrifice);

                    optionOnePenalty.EveryoneLoss(Party, EntityStatTypes.CurrentMorale, 5);

                    optionOneReward.EveryoneGain(Party, EntityAttributeTypes.Physique, 1);
                    optionOneReward.EveryoneGain(Party, EntitySkillTypes.Endurance, 1);
                }
                else
                {
                    var chosen = Party.GetRandomCompanion();

                    optionResultText += $"Seva points at {chosen.FirstName()}.\n\n\"You seem cool. Here.\"\n\n{chosen.FirstName()} glows red briefly and Seva vanishes.";

                    optionOneReward.AddEntityGain(chosen, EntityAttributeTypes.Physique, 1);
                    optionOneReward.AddEntityGain(chosen, EntitySkillTypes.Endurance, 1);

                    //todo maybe change their skin color to red idk
                }

                var optionOne = new Option(optionTitle, optionResultText, optionOneReward, optionOnePenalty,
                                           EncounterType.Normal);

                Options.Add(optionTitle, optionOne);
            }

            optionTitle = "PANIC!";

            optionResultText = $"Everyone screams and scatters in all directions! Seva alternates between screaming and coughing before pointing at {sacrifice.FirstName()}. {sacrifice.FirstName()} stops in their tracks, glows red briefly, then vanishes in a flash of fire and black smoke! Seva shrugs.\n\n\"Okay, see ya.\"";

            var optionTwoPenalty = new Penalty();

            optionTwoPenalty.RemoveFromParty(sacrifice);

            var optionTwo = new Option(optionTitle, optionResultText, null, optionTwoPenalty, EncounterType.Normal);

            Options.Add(optionTitle, optionTwo);

            SubscribeToOptionSelectedEvent();

            var eventMediator = Object.FindObjectOfType <EventMediator>();

            eventMediator.Broadcast(GlobalHelper.FourOptionEncounter, this);
        }
Beispiel #11
0
        public override void Run()
        {
            var travelManager    = Object.FindObjectOfType <TravelManager>();
            var curiousCompanion = travelManager.Party.GetRandomCompanion();

            Description  = "The party happens upon an odd sight: A bubbling cauldron smack dab in the middle of a clearing. \n\n";
            Description += $"Four items sit on a table next to the cauldron. {curiousCompanion.Name} thinks they should cast one of the items in. They approach the cauldron and toss in: ";

            Options = new Dictionary <string, Option>();

            var optionTitle      = "A Steak";
            var optionResultText = "The cauldron glows and a disembodied voice bellows:\n\n";

            optionResultText += "PROTEIN PROTEIN PROTEIN PROTEIN";

            var     optionReward  = new Reward();
            Penalty optionPenalty = null;

            optionReward.AddEntityGain(curiousCompanion, EntityAttributeTypes.Physique, 1);

            var optionOne = new Option(optionTitle, optionResultText, optionReward, null, EncounterType);

            Options.Add(optionTitle, optionOne);

            optionTitle      = "A Vial of Water";
            optionResultText = "The cauldron explodes showering everyone with hot liquid!";

            optionPenalty = new Penalty();

            foreach (var companion in travelManager.Party.GetCompanions())
            {
                optionPenalty.AddEntityLoss(companion, EntityStatTypes.CurrentHealth, 5);
            }

            var optionTwo = new Option(optionTitle, optionResultText, null, optionPenalty, EncounterType);

            Options.Add(optionTitle, optionTwo);

            optionTitle      = "A Pair of Rat Legs";
            optionResultText = $"The cauldron's bubbling grows violent and a discolored cloud envelopes {curiousCompanion.FirstName()}. The cloud clears and they feel... different. \n\nFaster? \n\nFaster.";

            optionReward = new Reward();
            optionReward.AddEntityGain(curiousCompanion, EntityAttributeTypes.Agility, 1);

            var optionThree = new Option(optionTitle, optionResultText, optionReward, null, EncounterType);

            Options.Add(optionTitle, optionThree);

            optionTitle      = "A Shopping List";
            optionResultText = $"{curiousCompanion.FirstName()} drops the shopping list into the cauldron. Supplies appear out of thin air next to the wagon!";

            optionReward = new Reward();
            optionReward.AddPartyGain(PartySupplyTypes.Food, 15);
            optionReward.AddPartyGain(PartySupplyTypes.HealthPotions, 3);

            var optionFour = new Option(optionTitle, optionResultText, optionReward, null, EncounterType);

            Options.Add(optionTitle, optionFour);

            SubscribeToOptionSelectedEvent();

            var eventMediator = Object.FindObjectOfType <EventMediator>();

            eventMediator.Broadcast(GlobalHelper.FourOptionEncounter, this);
        }
Beispiel #12
0
        public override void Run()
        {
            Options = new Dictionary <string, Option>();

            var volunteers = Party.GetRandomCompanions(3);

            string optionResultText;

            foreach (var volunteer in volunteers)
            {
                optionResultText = $"The fire really hits the spot!";

                var optionReward = new Reward();

                optionReward.AddEntityGain(volunteer, EntityAttributeTypes.Physique, 1);

                optionReward.EveryoneGain(Party, EntityStatTypes.CurrentMorale, 5);

                optionReward.AddEntityGain(Party.Derpus, EntityStatTypes.CurrentEnergy, 10);

                foreach (var companion in Party.GetCompanions())
                {
                    if (companion == volunteer)
                    {
                        continue;
                    }

                    optionReward.AddEntityGain(companion, EntityStatTypes.CurrentEnergy, 10);
                }

                var optionPenalty = new Penalty();

                optionPenalty.AddEntityLoss(volunteer, EntityStatTypes.CurrentEnergy, 20);

                var option = new Option(volunteer.Name, optionResultText, optionReward, optionPenalty, EncounterType.Camping);

                Options.Add(volunteer.Name, option);
            }

            var optionTitle = "Don't bother chopping any";

            var littleSpoon = Party.GetRandomCompanion();

            optionResultText = $"Everyone is curled up into a ball trying to stay warm. {littleSpoon.FirstName()} wakes up to Derpus spooning them!";

            var optionFourReward = new Reward();

            optionFourReward.EveryoneGain(Party, EntityStatTypes.CurrentEnergy, 10);

            var optionFourPenalty = new Penalty();

            optionFourPenalty.AddEntityLoss(littleSpoon, EntityStatTypes.CurrentMorale, 5);

            var optionFour = new Option(optionTitle, optionResultText, optionFourReward, optionFourPenalty,
                                        EncounterType.Camping);

            Options.Add(optionTitle, optionFour);

            SubscribeToOptionSelectedEvent();

            var eventMediator = Object.FindObjectOfType <EventMediator>();

            eventMediator.Broadcast(GlobalHelper.FourOptionEncounter, this);
        }
Beispiel #13
0
        public override void Run()
        {
            Options = new Dictionary <string, Option>();

            var optionTitle = "Scavenge for supplies (free)";

            var optionResultText = "Everyone splits up and scrounges up what they can from the streets and alleys.";

            var optionReward = new Reward();

            var foodGained = Random.Range(4, 9);

            optionReward.AddPartyGain(PartySupplyTypes.Food, foodGained);

            const int potionChance = 50;

            //todo diceroller
            var roll = Random.Range(1, 101);

            int potionsGained;

            if (roll <= potionChance)
            {
                potionsGained = Random.Range(1, 6);

                optionReward.AddPartyGain(PartySupplyTypes.HealthPotions, potionsGained);
            }

            const int goldChance = 30;

            //todo diceroller
            roll = Random.Range(1, 101);

            if (roll <= goldChance)
            {
                var goldGained = Random.Range(20, 41);

                optionReward.AddPartyGain(PartySupplyTypes.Gold, goldGained);
            }

            var optionOne = new Option(optionTitle, optionResultText, optionReward, null, EncounterType);

            Options.Add(optionTitle, optionOne);

            var supplyCost = Random.Range(25, 81);

            optionTitle      = $"Buy supplies ({supplyCost} gold)";
            optionResultText = "A local shopkeeper is happy to do business.";

            optionReward = new Reward();

            foodGained *= 2;

            optionReward.AddPartyGain(PartySupplyTypes.Food, foodGained);

            potionsGained = Random.Range(2, 12);

            optionReward.AddPartyGain(PartySupplyTypes.HealthPotions, potionsGained);

            var optionPenalty = new Penalty();

            optionPenalty.AddPartyLoss(PartySupplyTypes.Gold, supplyCost);

            var optionTwo = new Option(optionTitle, optionResultText, optionReward, optionPenalty, EncounterType);

            Options.Add(optionTitle, optionTwo);

            var travelManager = Object.FindObjectOfType <TravelManager>();

            var restCost = travelManager.Party.GetCompanions().Count * 10;

            if (travelManager.Party.Gold >= restCost)
            {
                optionTitle      = $"Rest for a day ({restCost} gold)";
                optionResultText = $"The party stays at the local inn and gets some good shut-eye.";

                optionReward = new Reward();

                optionReward.AddEntityGain(travelManager.Party.Derpus, EntityStatTypes.CurrentEnergy, 10);

                foreach (var companion in travelManager.Party.GetCompanions())
                {
                    optionReward.AddEntityGain(companion, EntityStatTypes.CurrentEnergy, 10);
                }

                optionReward.AddEntityGain(travelManager.Party.Derpus, EntityStatTypes.CurrentMorale, 10);

                foreach (var companion in travelManager.Party.GetCompanions())
                {
                    optionReward.AddEntityGain(companion, EntityStatTypes.CurrentMorale, 10);
                }

                optionPenalty = new Penalty();

                optionPenalty.AddPartyLoss(PartySupplyTypes.Gold, restCost);

                EncounterType = EncounterType.Camping;

                CountsAsDayTraveled = false;

                var optionThree = new Option(optionTitle, optionResultText, optionReward, optionPenalty, EncounterType);

                Options.Add(optionTitle, optionThree);
            }

            SubscribeToOptionSelectedEvent();

            var eventMediator = Object.FindObjectOfType <EventMediator>();

            eventMediator.Broadcast(GlobalHelper.FourOptionEncounter, this);
        }
Beispiel #14
0
        public override void Run()
        {
            var challenge = _challenges[Random.Range(0, _challenges.Count)];

            Description =
                "The party is passing through a town and sees an advertisement for an EXTREME FOOD CHALLENGE outside of an inn:\n\n";

            switch (challenge)
            {
            case "The Deadliest Catch":
                Description +=
                    "The Deadliest Catch! One hour to scarf down 40 fish filets, a bucket of slaw, and 3 gallons of beans!";
                break;

            case "5 Foot Megabeast Pizza":
                Description +=
                    "The 5 Foot Megabeast Pizza Challenge! One hour to finish a 5 foot, 22 pound pizza smothered in meat!";
                break;

            case "Get Clucked Noob":
                Description +=
                    "The 'Get Clucked, Noob!' Challenge! Eat 32 of our hottest wings with no other food or beverage in under 10 minutes!";
                break;

            case "The Dragon":
                Description += "The Dragon Chili Challenge! Finish a drum of our infamous Dragon Chili in under an hour!";
                break;
            }

            Description += $"\n\nWho will take the challenge?";

            var travelManager = Object.FindObjectOfType <TravelManager>();

            var challengers = travelManager.Party.GetRandomCompanions(4);

            Options = new Dictionary <string, Option>();

            foreach (var challenger in challengers)
            {
                string optionResultText = null;

                var optionReward = new Reward();

                switch (challenge)
                {
                case "The Deadliest Catch":
                    optionResultText = $"{challenger.FirstName()} SHOVELS fish into their cakehole with one hand and slaw and beans with the other! With a loud belch they crash to the floor victorious!";
                    optionReward.AddEntityGain(challenger, EntityAttributeTypes.Intellect, 1);
                    optionReward.AddEntityGain(challenger, EntitySkillTypes.Endurance, 1);
                    break;

                case "5 Foot Megabeast Pizza":
                    optionResultText = $"{challenger.FirstName()} ROLLS the pizza into a burrito and shows no mercy! They briefly enter a sweaty catatonic state, but snap out of it with a thunderous burp!";
                    optionReward.AddEntityGain(challenger, EntityAttributeTypes.Physique, 1);
                    optionReward.AddEntityGain(challenger, EntitySkillTypes.Endurance, 1);
                    break;

                case "Get Clucked Noob":
                    optionResultText = $"{challenger.FirstName()} VACUUMS the meat off the bones in seconds! Their skin turns BRIGHT RED and enter a sweaty catatonic state for the better part of an hour.";
                    optionReward.AddEntityGain(challenger, EntitySkillTypes.Survival, 1);
                    optionReward.AddEntityGain(challenger, EntitySkillTypes.Endurance, 1);
                    break;

                case "The Dragon":
                    optionResultText = $"{challenger.FirstName()} CHUGS the chili! Their skin turns BRIGHT RED and they can't communicate anything through bouts of sweating and spice induced hallucinations. They recover after some time and declare to everyone that they have retired from spicy foods.";
                    optionReward.AddEntityGain(challenger, EntitySkillTypes.Survival, 1);
                    optionReward.AddEntityGain(challenger, EntitySkillTypes.Endurance, 1);
                    break;
                }

                var option = new Option(challenger.Name, optionResultText, optionReward, null,
                                        EncounterType.Normal);

                Options.Add(challenger.Name, option);
            }

            SubscribeToOptionSelectedEvent();

            var eventMediator = Object.FindObjectOfType <EventMediator>();

            eventMediator.Broadcast(GlobalHelper.FourOptionEncounter, this);
        }
Beispiel #15
0
        public override void Run()
        {
            Description = @"The group gets irritated because one of the wagon's wheels is squeaking. Who should try to repair it?";

            Options = new Dictionary <string, Option>();

            var travelManager    = Object.FindObjectOfType <TravelManager>();
            var chosenCompanions = travelManager.Party.GetRandomCompanions(4);

            const int fixSuccess = 10;

            Reward  optionReward;
            Penalty optionPenalty;

            foreach (var chosenCompanion in chosenCompanions)
            {
                if (Options.ContainsKey(chosenCompanion.FirstName()))
                {
                    continue;
                }

                optionReward  = null;
                optionPenalty = null;

                var optionTitle = $"{chosenCompanion.FirstName()}";

                string optionResultText;

                var fixCheck = Dice.Roll($"{chosenCompanion.Attributes.Acumen - 1}d6");

                var wildRoll = GlobalHelper.RollWildDie();

                fixCheck += wildRoll;

                if (fixCheck > fixSuccess)
                {
                    optionResultText = "They figure out what was wrong and repair it!";

                    optionReward = new Reward();
                    optionReward.AddEntityGain(travelManager.Party.Derpus, EntityStatTypes.CurrentMorale, 10);

                    foreach (var companion in travelManager.Party.GetCompanions())
                    {
                        optionReward.AddEntityGain(companion, EntityStatTypes.CurrentMorale, 10);
                    }
                }
                else
                {
                    optionResultText = "They can't repair it and the squeaking continues to be annoying.";

                    optionPenalty = new Penalty();
                    optionPenalty.AddEntityLoss(travelManager.Party.Derpus, EntityStatTypes.CurrentMorale, 10);

                    foreach (var companion in travelManager.Party.GetCompanions())
                    {
                        optionPenalty.AddEntityLoss(companion, EntityStatTypes.CurrentMorale, 10);
                    }
                }

                var option = new Option(optionTitle, optionResultText, optionReward, optionPenalty, EncounterType);

                Options.Add(optionTitle, option);
            }

            SubscribeToOptionSelectedEvent();

            var eventMediator = Object.FindObjectOfType <EventMediator>();

            eventMediator.Broadcast(GlobalHelper.FourOptionEncounter, this);
        }
Beispiel #16
0
        //todo refactor
        public override void Run()
        {
            var travelManager   = Object.FindObjectOfType <TravelManager>();
            var chosenCompanion = travelManager.Party.GetRandomCompanion();

            Description =
                $"While scouting a town, {chosenCompanion.Name} decides the caravan would not be welcome here. Before they can leave, a guard sees through their disguise! {chosenCompanion.FirstName()} is cornered in an alley with large crates and a tall fence.";

            Options = new Dictionary <string, Option>();

            var optionTitle = "Scale The Fence";

            string optionResultText;

            Reward  optionOneReward  = null;
            Penalty optionOnePenalty = null;

            const int scaleSuccess = 10;

            var agilityCheck = Dice.Roll($"{chosenCompanion.Attributes.Agility - 1}d6");

            var wildRoll = GlobalHelper.RollWildDie();

            agilityCheck += wildRoll;

            Debug.Log($"Value Needed: {scaleSuccess}");
            Debug.Log(
                $"Rolled: {agilityCheck - chosenCompanion.Attributes.Agility} + Agility: {chosenCompanion.Attributes.Agility} = Final Value {agilityCheck}");

            if (agilityCheck > scaleSuccess)
            {
                optionResultText = $"{chosenCompanion.FirstName()} runs up one of the crates and flips over the fence!";

                optionOneReward = new Reward();
                optionOneReward.AddEntityGain(chosenCompanion, EntityStatTypes.CurrentMorale, 30);
            }
            else if (agilityCheck == scaleSuccess)
            {
                optionResultText = $"{chosenCompanion.FirstName()} barely manages to escape over the fence unharmed!";
            }
            else
            {
                optionResultText =
                    $"{chosenCompanion.FirstName()} struggles to climb the fence. One of the guards deals a blow to his leg before he makes it over!";

                optionOnePenalty = new Penalty();
                optionOnePenalty.AddEntityLoss(chosenCompanion, EntityStatTypes.CurrentHealth, 15);
            }

            var optionOne = new Option(optionTitle, optionResultText, optionOneReward, optionOnePenalty, EncounterType);

            Options.Add(optionTitle, optionOne);

            optionTitle = "Throw Crates";

            Reward  optionTwoReward  = null;
            Penalty optionTwoPenalty = null;

            const int throwSuccess = 20;

            //todo diceroller here
            var physiqueCheck = chosenCompanion.Attributes.Physique + Random.Range(1, 21);

            Debug.Log($"Value Needed: {throwSuccess}");
            Debug.Log(
                $"Rolled: {physiqueCheck - chosenCompanion.Attributes.Physique} + Physique: {chosenCompanion.Attributes.Physique} = Final Value {physiqueCheck}");

            if (physiqueCheck >= throwSuccess)
            {
                optionResultText =
                    $"{chosenCompanion.FirstName()} knocks several guards to the ground with a well placed throw and escapes!";

                optionTwoReward = new Reward();
                optionTwoReward.AddEntityGain(chosenCompanion, EntityStatTypes.CurrentMorale, 30);
            }
            else
            {
                optionResultText =
                    $"{chosenCompanion.FirstName()} manages to hit a guard or two with the crates, but has to fight off the rest!";

                optionTwoPenalty = new Penalty();
                optionTwoPenalty.AddEntityLoss(chosenCompanion, EntityStatTypes.CurrentHealth, 30);
            }

            var optionTwo = new Option(optionTitle, optionResultText, optionTwoReward, optionTwoPenalty, EncounterType);

            Options.Add(optionTitle, optionTwo);

            SubscribeToOptionSelectedEvent();

            var eventMediator = Object.FindObjectOfType <EventMediator>();

            eventMediator.Broadcast(GlobalHelper.FourOptionEncounter, this);
        }
Beispiel #17
0
        public override void Run()
        {
            Options = new Dictionary <string, Option>();

            var travelManager = Object.FindObjectOfType <TravelManager>();

            var totalCost = CostPerPerson * travelManager.Party.GetCompanions().Count;

            string optionTitle;
            string optionResultText;

            if (totalCost <= travelManager.Party.Gold)
            {
                optionTitle      = $"Pay the {totalCost} gold";
                optionResultText = $"The group pays {totalCost} gold to stay the night. It's pretty comfy!";

                var optionReward = new Reward();
                optionReward.AddEntityGain(travelManager.Party.Derpus, EntityStatTypes.CurrentEnergy, EnergyGain);

                foreach (var companion in travelManager.Party.GetCompanions())
                {
                    optionReward.AddEntityGain(companion, EntityStatTypes.CurrentEnergy, EnergyGain);
                }

                var optionOnePenalty = new Penalty();
                optionOnePenalty.AddPartyLoss(PartySupplyTypes.Gold, totalCost);

                var rollForBreakfast = Random.Range(0, 101); //todo diceroller

                if (rollForBreakfast <= BreakfastChance)
                {
                    optionResultText = "\nThe innkeeper serves breakfast as thanks for being great guests!";

                    optionReward.AddEntityGain(travelManager.Party.Derpus, EntityStatTypes.CurrentMorale, EnergyGain);

                    foreach (var companion in travelManager.Party.GetCompanions())
                    {
                        optionReward.AddEntityGain(companion, EntityStatTypes.CurrentMorale, EnergyGain);
                    }

                    optionReward.AddPartyGain(PartySupplyTypes.Food, travelManager.Party.GetCompanions().Count *Party.FoodConsumedPerCompanion);
                }

                Options.Add(optionTitle, new Option(optionTitle, optionResultText, optionReward, optionOnePenalty, EncounterType));
            }

            optionTitle      = "No thanks";
            optionResultText = "You keep on going and travel through the night.";

            var optionTwoPenalty = new Penalty();

            optionTwoPenalty.AddEntityLoss(travelManager.Party.Derpus, EntityStatTypes.CurrentEnergy, 10);

            foreach (var companion in travelManager.Party.GetCompanions())
            {
                optionTwoPenalty.AddEntityLoss(companion, EntityStatTypes.CurrentEnergy, 10);
            }

            Options.Add(optionTitle, new Option(optionTitle, optionResultText, null, optionTwoPenalty, EncounterType));

            SubscribeToOptionSelectedEvent();

            var eventMediator = Object.FindObjectOfType <EventMediator>();

            eventMediator.Broadcast(GlobalHelper.FourOptionEncounter, this);
        }
Beispiel #18
0
        public override void Run()
        {
            var travelManager = Object.FindObjectOfType <TravelManager>();

            var chosenCompanion = travelManager.Party.GetRandomCompanion();

            Description = $"{chosenCompanion.FirstName()} gets cut pretty badly after challenging a crab to a knife fight.";

            Options = new Dictionary <string, Option>();

            var optionTitle = "Ignore it";

            var optionResultText = $"{chosenCompanion.FirstName()} insists that they don't need any help and proudly bleeds everywhere.";

            var optionOnePenalty = new Penalty();

            optionOnePenalty.AddEntityLoss(chosenCompanion, EntityStatTypes.CurrentHealth, 5);
            optionOnePenalty.AddEntityLoss(chosenCompanion, EntityAttributeTypes.Physique, 1);

            var optionOne = new Option(optionTitle, optionResultText, null, optionOnePenalty, EncounterType.Normal);

            Options.Add(optionTitle, optionOne);

            optionTitle = "Heal the wound";

            var medicalCompanion = travelManager.Party.GetCompanionWithHighestHealing();

            var healRoll = Dice.Roll($"{medicalCompanion.Skills.Healing - 1}d6");

            var wildRoll = GlobalHelper.RollWildDie();

            healRoll += wildRoll;

            const int healSuccess = 15;

            Reward  optionTwoReward = null;
            Penalty optionTwoPenalty;

            if (medicalCompanion.Skills.Healing > 5 || healRoll > healSuccess)
            {
                if (travelManager.Party.HealthPotions > 0)
                {
                    optionResultText =
                        $"{medicalCompanion.FirstName()} is able to treat the wound and it heals properly.";

                    optionTwoReward = new Reward();

                    optionTwoReward.AddEntityGain(medicalCompanion, EntitySkillTypes.Healing, 1);

                    optionTwoPenalty = new Penalty();

                    optionTwoPenalty.AddPartyLoss(PartySupplyTypes.HealthPotions, 1);
                }
                else
                {
                    optionResultText =
                        $"{medicalCompanion.FirstName()} does the best they can with no health potions. The wound ends up smelling funny later on.";

                    optionTwoPenalty = new Penalty();

                    optionTwoPenalty.AddEntityLoss(chosenCompanion, EntityStatTypes.CurrentMorale, 5);
                }
            }
            else
            {
                optionResultText =
                    $"{medicalCompanion.FirstName()} tries to help, but makes the wound much worse. The bleeding stops, but {chosenCompanion.FirstName()} feels weaker.";

                optionTwoPenalty = new Penalty();

                optionTwoPenalty.AddEntityLoss(chosenCompanion, EntityStatTypes.CurrentHealth, 5);
                optionTwoPenalty.AddEntityLoss(chosenCompanion, EntityAttributeTypes.Physique, 1);
            }

            var optionTwo = new Option(optionTitle, optionResultText, optionTwoReward, optionTwoPenalty,
                                       EncounterType.Normal);

            Options.Add(optionTitle, optionTwo);

            SubscribeToOptionSelectedEvent();

            var eventMediator = Object.FindObjectOfType <EventMediator>();

            eventMediator.Broadcast(GlobalHelper.FourOptionEncounter, this);
        }
Beispiel #19
0
        public override void Run()
        {
            var travelManager = Object.FindObjectOfType <TravelManager>();

            var chosenCompanion = travelManager.Party.GetRandomCompanion();

            Description =
                $"The group finds an abandoned archery range with a surprising amount of arrows and even a few bows. The sun sets and they decide to camp here for the night. \n\n{chosenCompanion.FirstName()} looks outside and notices a horde of giant spiders headed straight towards the range!";

            Options = new Dictionary <string, Option>();

            var optionTitle = "Shoot arrows at the spiders";

            string optionResultText;

            var party = travelManager.Party;

            var partyEndurance = party.GetTotalPartyEndurance();
            var partyPhysique  = party.GetTotalPartyPhysique();

            Reward  optionOneReward  = null;
            Penalty optionOnePenalty = null;

            if (partyEndurance < 8)
            {
                optionResultText =
                    "Shooting arrows uses a lot of energy. The group gets tired and the spiders overrun the range.";

                optionOnePenalty = new Penalty();

                foreach (var companion in party.GetCompanions())
                {
                    optionOnePenalty.AddEntityLoss(companion, EntityStatTypes.CurrentHealth, 5);
                }
            }
            else if (partyPhysique < 8)
            {
                optionResultText =
                    "They send arrows raining into the spiders, but they lack the strength to fire the arrows effectively. A few spiders are injured, but the group ends up having to fight them hand to hand.";

                optionOnePenalty = new Penalty();

                optionOnePenalty.AddEntityLoss(party.GetRandomCompanion(), EntityStatTypes.CurrentHealth, 5);

                if (party.GetCompanions().Count > 1)
                {
                    optionOnePenalty.AddEntityLoss(party.GetRandomCompanion(), EntityStatTypes.CurrentHealth, 5);
                }
            }
            else
            {
                optionResultText =
                    "Spider after spider falls dead as arrows slam into them from afar. They were barely a threat!";

                optionOneReward = new Reward();

                optionOneReward.AddEntityGain(party.Derpus, EntityStatTypes.CurrentMorale, 5);

                foreach (var companion in party.GetCompanions())
                {
                    optionOneReward.AddEntityGain(companion, EntityStatTypes.CurrentMorale, 5);
                }

                optionOneReward.AddEntityGain(party.GetCompanionWithLowestEndurance(), EntitySkillTypes.Endurance, 1);
            }

            var optionOne = new Option(optionTitle, optionResultText, optionOneReward, optionOnePenalty,
                                       EncounterType.Camping);

            Options.Add(optionTitle, optionOne);

            optionTitle = "Escape!";

            optionResultText = "The party makes a run for it and doesn't stop til sun up.";

            var optionTwoPenalty = new Penalty();

            optionTwoPenalty.AddEntityLoss(party.Derpus, EntityStatTypes.CurrentEnergy, 10);

            foreach (var companion in party.GetCompanions())
            {
                optionTwoPenalty.AddEntityLoss(companion, EntityStatTypes.CurrentEnergy, 10);
            }

            var optionTwo = new Option(optionTitle, optionResultText, null, optionTwoPenalty, EncounterType.Camping);

            Options.Add(optionTitle, optionTwo);

            SubscribeToOptionSelectedEvent();

            var eventMediator = Object.FindObjectOfType <EventMediator>();

            eventMediator.Broadcast(GlobalHelper.FourOptionEncounter, this);
        }