/// <summary> /// Get A Random Difficulty /// </summary> /// <returns></returns> public static string GetMonsterUniqueItem() { var result = ItemIndexViewModel.Instance.Dataset.ElementAt(DiceHelper.RollDice(1, ItemIndexViewModel.Instance.Dataset.Count()) - 1).Id; return(result); }
/// <summary> /// Get a Random Level /// </summary> /// <returns></returns> public static int GetLevel() { // 1-20 return(DiceHelper.RollDice(1, 20)); }
/// <summary> /// Get Health /// </summary> /// <param name="level"></param> /// <returns></returns> public static int GetHealth(int level) { // Roll the Dice and reset the Health return(DiceHelper.RollDice(level, 10)); }
/// <summary> /// Get Random Ability Number /// </summary> /// <returns></returns> public static int GetAbilityValue() { // 0 to 9, not 1-10 return(DiceHelper.RollDice(1, 10) - 1); }
/// <summary> /// Get Random Monster type /// </summary> /// <returns></returns> public static MonsterTypeEnum GetMonsterType() { var result = (MonsterTypeEnum)(DiceHelper.RollDice(1, 22)); return(result); }
/// <summary> /// Selects a random item from a list of items /// </summary> /// <returns></returns> public static ItemModel GetRandomItem() { int item = DiceHelper.RollDice(1, ItemIndexViewModel.Instance.Dataset.Count) - 1; return(ItemIndexViewModel.Instance.Dataset[item]); }