Beispiel #1
0
        public IActionResult Index()
        {
            var strategies = strategyGateway.All().OrderBy(x => x.Name);

            ViewData["Strategies"]      = strategies.ToArray();
            ViewData["ScoreGenerators"] = GatewayProvider.All <AbilityScoreGenerator>();
            return(View());
        }
Beispiel #2
0
        public void ExecuteStep(CharacterSheet character)
        {
            var chosenOptions = new List <PhysicalFeature>();
            var paragraph     = new ParagraphBuilder();

            while (chosenOptions.Count < MaximumFeatures && physical.All().Exclude(chosenOptions).HasChoices())
            {
                var selected = physical.All().Exclude(chosenOptions).ChooseOne();
                chosenOptions.Add(selected);
                paragraph.AddSentence(CharacterSentenceGenerator.Create(character, selected));
            }
            character.Appearance.PhysicalAppearance = paragraph.GetParagraph();
        }
Beispiel #3
0
        public void ExecuteStep(CharacterSheet character)
        {
            var birth   = circumstances.All().CreateWeightedTable().ChooseRandomly();
            var history = character.Get <History>();

            history.BirthCircumstance = birth;
        }
Beispiel #4
0
        public void Execute(Settlement settlement)
        {
            var nameGroup = gateway.All();
            var names     = nameGroup.SelectMany(x => x.Names);
            var gen       = new MarkovNameGenerator(names, Order);

            settlement.Name = gen.Generate(MaximumLength);
        }
Beispiel #5
0
        public void ExecuteStep(CharacterSheet character)
        {
            var configure = setups.Find("default");

            character.Components.AddNoInitialize(new object[] { configure });
            character.InitializeComponents();
            character.SkillRanks.FillSkills(skills.All());
        }
Beispiel #6
0
        public void Execute(ComponentContainer components)
        {
            var options = _ragePowers
                          .All()
                          .GetAllQualified <RagePower>(components)
                          .Exclude(components.GetAll <RagePower>());
            var power = options.ChooseOne();

            components.Add(power);
        }
Beispiel #7
0
        private void ChooseRace(CharacterSheet character, WeightedOptionTable <string> options)
        {
            if (options.IsEmpty)
            {
                this.SetRace(character, raceGateway.All().ToList().ChooseOne());
                return;
            }

            var choice = options.ChooseRandomly();
            var race   = raceGateway.Find(choice);

            this.SetRace(character, race);
        }
Beispiel #8
0
 public void ChooseAny(CharacterSheet character)
 {
     AssignClass(character, classes.All().ToList().ChooseOne());
 }
Beispiel #9
0
        public Drawback SelectDrawback()
        {
            var table = new WeightedOptionTable <Drawback>(drawbacks.All());

            return(table.ChooseRandomly());
        }
Beispiel #10
0
        public void YouCanGetAllTheArmors()
        {
            var armors = gateway.All();

            Assert.Equal(3, armors.Count());
        }