Exemplo n.º 1
0
        public override void Run()
        {
            Description = $"It's a narrow part of the trail and everyone has to walk in a tight group when someone farts!\n\n\"Who dun did it?\"";

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

            var farters = Party.GetRandomCompanions(3);

            string optionResultText;

            foreach (var farter in farters)
            {
                optionResultText = $"{farter.FirstName()} is the culprit!\n\nThe stench sticks to them like glue!\n\n\"Maybe check your drawers...\"";

                var optionPenalty = new Penalty();

                optionPenalty.AddEntityLoss(farter, EntityStatTypes.CurrentMorale, 10);

                var option = new Option(farter.Name, optionResultText, null, optionPenalty, EncounterType.Normal);

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

            var optionTitle = "Burrito Ghost";

            var battleChance = 100;

            optionResultText = $"{farters.First().FirstName()} scoffs.\n\n\"Ain't no such thing as ghost wandering around, farting, and moaning 'burrito'!\"";

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

            Option optionFour;

            if (roll < battleChance)
            {
                optionResultText += $"\n\n\"BURRRIIIIIITOOOO...\" something moans back. Everyone stops and looks around. Suddenly, another fart blasts their nostrils and the culprit reveals themself!\n\nThe Burrito Ghost is real, y'all! Prepare for battle!";

                optionFour = new FightCombatOption(optionTitle, optionResultText, new List <Entity> {
                    new BurritoGhost(), new Ghost(), new Ghost()
                });
            }
            else
            {
                optionResultText += "\n\nThe mystery remains unsolved.";

                var optionFourPenalty = new Penalty();

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

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

            Options.Add(optionTitle, optionFour);

            SubscribeToOptionSelectedEvent();

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

            eventMediator.Broadcast(GlobalHelper.FourOptionEncounter, this);
        }
Exemplo n.º 2
0
        public override void Run()
        {
            Description = "The wagon gets stuck in some kind of mud. It takes a couple hours to get it moving again. Everyone is dirty and irritated by the end of it.";

            Penalty = new Penalty();
            Penalty.EveryoneLoss(Party, EntityStatTypes.CurrentMorale, 5);

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

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

            travelManager.ApplyEncounterPenalty(Penalty);

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

            eventMediator.Broadcast(GlobalHelper.EncounterResult, this, fullResultDescription);
        }
Exemplo n.º 3
0
        public override void Run()
        {
            var travelManager = Object.FindObjectOfType <TravelManager>();

            Penalty = new Penalty();

            Penalty.EveryoneLoss(travelManager.Party, EntityStatTypes.CurrentMorale, 5);

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

            travelManager.ApplyEncounterPenalty(Penalty);

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

            eventMediator.Broadcast(GlobalHelper.EncounterResult, this, fullResultDescription);

            //todo blurb about are they sure we're going the right way if he can't see where hes going
        }
Exemplo n.º 4
0
        public override void Run()
        {
            Reward = new Reward();

            Reward.EveryoneGain(Party, EntityStatTypes.CurrentEnergy, 5);

            Penalty = new Penalty();

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

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

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

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

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

            eventMediator.Broadcast(GlobalHelper.EncounterResult, this, fullResultDescription);
        }
Exemplo n.º 5
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);
        }
Exemplo n.º 6
0
        public override void Run()  //todo possible continuity
        {
            var chosen = Party.GetRandomCompanion();

            Description =
                $"The party is setting up camp when a group of traveling lizardmen approach. They would like to {chosen.FirstName()} as food.\n\nThey offer 125 gold!";

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

            var optionTitle = "Agree for 125 gold";

            var optionResultText = $"You turn {chosen.Name} over to the lizardmen. Your companions are horrified!";

            var optionOnePenalty = new Penalty();

            optionOnePenalty.RemoveFromParty(chosen);

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

            var optionOneReward = new Reward();

            optionOneReward.AddPartyGain(PartySupplyTypes.Gold, 125);

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

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

            Options.Add(optionTitle, optionOne);

            optionTitle = "Counter with 200 gold";

            const int success = 33;

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

            var optionTwoPenalty = new Penalty();

            var optionTwoReward = new Reward();

            if (roll <= success)
            {
                optionResultText = $"They discuss the price briefly and agree. You turn {chosen.Name} over to the lizardmen. Your companions are horrified!";

                optionTwoPenalty.RemoveFromParty(chosen);

                optionTwoPenalty.EveryoneLoss(Party, EntityStatTypes.CurrentMorale, 15);

                optionTwoReward.AddPartyGain(PartySupplyTypes.Gold, 200);

                optionTwoReward.EveryoneGain(Party, EntityStatTypes.CurrentEnergy, 10);
            }
            else
            {
                optionResultText = $"They decline and continue on their way hungry and disappointed. Your companions are horrified! {chosen.FirstName()} is especially angry that you tried to sell them like a piece of beef!";

                var chosenMorale = chosen.Stats.CurrentMorale;

                if (chosenMorale - 20 < 0)
                {
                    optionResultText += "They stomp off and don't come back!";

                    optionTwoPenalty.RemoveFromParty(chosen);
                }

                optionTwoPenalty.EveryoneLoss(Party, EntityStatTypes.CurrentMorale, 15);

                optionTwoReward.EveryoneGain(Party, EntityStatTypes.CurrentEnergy, 10);
            }

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

            Options.Add(optionTitle, optionTwo);

            optionTitle = "Uhh no";

            optionResultText = $"The lizardmen continue on their way hungry and disappointed. {chosen.FirstName()} is looking themselves up and down trying to figure out why they were picked. They can't decide if they should be worried or flattered.";

            var optionThreeReward = new Reward();

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

            var optionThree = new Option(optionTitle, optionResultText, optionThreeReward, null, EncounterType.Camping);

            Options.Add(optionTitle, optionThree);

            SubscribeToOptionSelectedEvent();

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

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