public void RandomPlayerHelper_GetMonsterDescription_2_Should_Return_2() { // Arrange DiceHelper.EnableForcedRolls(); DiceHelper.SetForcedRollValue(2); // Act var result = RandomPlayerHelper.GetMonsterDescription(); // Reset DiceHelper.DisableForcedRolls(); // Assert Assert.AreEqual("the Elf hater", result); }
/// <summary> /// Randomize the Monster, keep the level the same /// </summary> /// <returns></returns> public bool RandomizeMonster() { // Randomize Name ViewModel.Data.Name = RandomPlayerHelper.GetMonsterName(); ViewModel.Data.Description = RandomPlayerHelper.GetMonsterDescription(); // Randomize the Attributes ViewModel.Data.Attack = RandomPlayerHelper.GetAbilityValue(); ViewModel.Data.Speed = RandomPlayerHelper.GetAbilityValue(); ViewModel.Data.Defense = RandomPlayerHelper.GetAbilityValue(); ViewModel.Data.Difficulty = RandomPlayerHelper.GetMonsterDifficultyValue(); ViewModel.Data.ImageURI = RandomPlayerHelper.GetMonsterImage(); ViewModel.Data.UniqueItem = RandomPlayerHelper.GetMonsterUniqueItem(); UpdatePageBindingContext(); return(true); }