Ejemplo n.º 1
0
        public ActionResult Story(HomeViewModel model)
        {
            _party = MapStoryCharacters(model);
            var finished = false;
            var failures = 0;

            _vm = new FinishedStoryViewModel(_party);
            AddCharacterIntros();
            var rnd = new Random();

            while (!finished)
            {
                WriteText("Once again, the buttons in front of [LAName] and [RAName] light up, beckoning for them to make a decision...");
                //Do the selection
                var votes = Vote(failures, rnd);

                foreach (var vote in votes)
                {
                    WriteText(vote.VoteText);
                }

                if (votes.All(v => v.IsLeftVote))
                {
                    _party.LeftArbiter.CurrentReluctance += _party.LeftArbiter.Character.Reluctance.Value;
                    _party.RightArbiter.CurrentReluctance = 0;
                    _party.LeftArbiter.CurrentStageNum   += 1;
                    WriteText(ParseTeamText(_party.LeftArbiter.CurrentStage.ProgressionText, _party.LeftArbiter));
                }
                else if (votes.All(v => !v.IsLeftVote))
                {
                    _party.RightArbiter.CurrentReluctance += _party.RightArbiter.Character.Reluctance.Value;
                    _party.LeftArbiter.CurrentReluctance   = 0;
                    _party.RightArbiter.CurrentStageNum   += 1;
                    WriteText(ParseTeamText(_party.RightArbiter.CurrentStage.ProgressionText, _party.RightArbiter));
                }
                else
                {
                    _party.LeftArbiter.CurrentReluctance  -= 5;
                    _party.RightArbiter.CurrentReluctance -= 5;
                    // WriteText(ParseTeamText(_party.LeftArbiter.CurrentStage.VoteFailureReaction, _party.LeftArbiter));
                    // WriteText(ParseTeamText(_party.RightArbiter.CurrentStage.VoteFailureReaction, _party.RightArbiter));

                    _party.LeftVictim.CurrentStageNum += 1;
                    WriteText(ParseTeamText(_party.LeftVictim.CurrentStage.ProgressionText, _party.LeftVictim));
                }
                //Advance stages, write text results

                //Check for end condition
                finished = IsAnyCharacterFullyTransformed();
            }

            FinishStory();
            //Do finale stuff
            return(View(_vm));
        }
Ejemplo n.º 2
0
 public void AddText(FinishedStoryViewModel vm, string text)
 {
     vm.Story += text + "<br/><br/>";
 }