public IActionResult Index() { var strategies = strategyGateway.All().OrderBy(x => x.Name); ViewData["Strategies"] = strategies.ToArray(); ViewData["ScoreGenerators"] = GatewayProvider.All <AbilityScoreGenerator>(); return(View()); }
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(); }
public void ExecuteStep(CharacterSheet character) { var birth = circumstances.All().CreateWeightedTable().ChooseRandomly(); var history = character.Get <History>(); history.BirthCircumstance = birth; }
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); }
public void ExecuteStep(CharacterSheet character) { var configure = setups.Find("default"); character.Components.AddNoInitialize(new object[] { configure }); character.InitializeComponents(); character.SkillRanks.FillSkills(skills.All()); }
public void Execute(ComponentContainer components) { var options = _ragePowers .All() .GetAllQualified <RagePower>(components) .Exclude(components.GetAll <RagePower>()); var power = options.ChooseOne(); components.Add(power); }
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); }
public void ChooseAny(CharacterSheet character) { AssignClass(character, classes.All().ToList().ChooseOne()); }
public Drawback SelectDrawback() { var table = new WeightedOptionTable <Drawback>(drawbacks.All()); return(table.ChooseRandomly()); }
public void YouCanGetAllTheArmors() { var armors = gateway.All(); Assert.Equal(3, armors.Count()); }