예제 #1
0
        public static List <Cities> GenerateCities()
        {
            List <Cities> CityList  = new List <Cities>();
            int           CityCount = DiceRoller.RandomRange(3, 5);

            Cities[] Temp = new Cities[CityCount];
            for (int Count = 0; Count < CityCount; Count++)
            {
                Temp[Count] = new Cities();
            }
            foreach (Cities City in Temp)
            {
                CityList.Add(City);
            }
            return(CityList);
        }
예제 #2
0
        public static string NameGenerator(string Arg, string NPCName)
        {
            string Name = "";

            string[] consonants = { "b", "c", "d", "f", "g", "h", "j", "k", "l", "m", "l", "n", "p", "q", "r", "s", "sh", "zh", "t", "v", "w", "x" };
            string[] vowels     = { "a", "e", "i", "o", "u", "ae", "y" };
            Name += consonants[DiceRoller.RollDice(consonants.Length - 1)].ToUpper();
            Name += vowels[DiceRoller.RollDice(vowels.Length - 1)];
            int Length      = DiceRoller.RollDice(6) + 2;
            int LetterCount = 2;

            while (LetterCount < Length)
            {
                Name += consonants[DiceRoller.RollDice(consonants.Length - 1)];
                LetterCount++;
                Name += vowels[DiceRoller.RollDice(vowels.Length - 1)];
                LetterCount++;
            }
            switch (Arg)
            {
            case null:
                return(Name);

            case "City":
                return("City of " + Name);

            case "BlackSmith":
                Name = EditName(Name, Names.GetFromBlackSmith(DiceRoller.RandomRange(0, Names.GetCountBlackSmith() - 1)));
                break;

            case "Armourer":
                Name = EditName(Name, Names.GetFromArmourer(DiceRoller.RandomRange(0, Names.GetCountArmourer() - 1)));
                break;

            case "PotionBrewer":
                Name = EditName(Name, Names.GetFromPotionBrewer(DiceRoller.RandomRange(0, Names.GetCountPotionBrewer() - 1)));
                break;

            default:
                Debug.Log("Name Generation Error -> Arg: " + Arg);
                break;
            }
            return(Name);
        }
 public Tavern()
 {
     Name    = ProGen.NameGenerator(null, null);
     BarKeep = new NPCS();
     Patrons = ProGen.GenerateNPCS(DiceRoller.RandomRange(2, 5));
 }