/// <summary> /// Create Characters for Party /// </summary> public virtual bool CreateCharacterParty() { // Picks 6 Characters // To use your own characters, populate the List before calling RunAutoBattle //// Will first pull from existing characters foreach (var data in CharacterIndexViewModel.Instance.Dataset) { if (Battle.EngineSettings.CharacterList.Count() >= Battle.EngineSettings.MaxNumberPartyCharacters) { break; } // Start off with max health if adding a character in data.CurrentHealth = data.GetMaxHealthTotal; Battle.PopulateCharacterList(data); } //If there are not enough will add random ones for (int i = Battle.EngineSettings.CharacterList.Count(); i < Battle.EngineSettings.MaxNumberPartyCharacters; i++) { Battle.PopulateCharacterList(RandomPlayerHelper.GetRandomCharacterEscapingSchool(1)); } return(true); }
public void RandomPlayerHelper_GetRandomCharacterEscapingSchool_2_Should_Return_Parent() { // Arrange DiceHelper.EnableForcedRolls(); DiceHelper.SetForcedRollValue(2); // Act var result = RandomPlayerHelper.GetRandomCharacterEscapingSchool(20); // Reset DiceHelper.DisableForcedRolls(); // Assert Assert.AreEqual(CharacterTypeEnum.Parent, result.CharacterTypeEnum); }