예제 #1
0
        private static string name(bool male)
        {
            string str = "";

            switch (Session.Random.Next(10))
            {
            case 0:
            case 1:
            case 2:
            case 3:
            {
                str = string.Concat(ElfName.prefix(), ElfName.suffix(male));
                break;
            }

            case 4:
            case 5:
            case 6:
            {
                str = string.Concat(ElfName.prefix(), ElfName.suffix(male), ElfName.suffix(male));
                break;
            }

            case 7:
            case 8:
            {
                string[] strArrays = new string[] { ElfName.prefix(), ElfName.suffix(male), " ", ElfName.prefix(), ElfName.suffix(male) };
                str = string.Concat(strArrays);
                break;
            }

            case 9:
            {
                string[] strArrays1 = new string[] { ElfName.suffix(male), "'", ElfName.prefix(), ElfName.suffix(male), ElfName.suffix(male) };
                str = string.Concat(strArrays1);
                break;
            }
            }
            return(TextHelper.Capitalise(str, true));
        }
예제 #2
0
        public static string Sentence()
        {
            string str = "";
            int    num = Session.Dice(4, 8);

            for (int i = 0; i != num; i++)
            {
                string lower = "";
                int    num1  = 0;
                switch (Session.Random.Next(6))
                {
                case 0:
                {
                    num1 = 1;
                    break;
                }

                case 1:
                case 2:
                {
                    num1 = 2;
                    break;
                }

                case 3:
                case 4:
                {
                    num1 = 3;
                    break;
                }

                case 5:
                {
                    num1 = 4;
                    break;
                }
                }
                for (int j = 0; j != num1; j++)
                {
                    switch (Session.Random.Next(3))
                    {
                    case 0:
                    {
                        lower = string.Concat(lower, ElfName.prefix());
                        break;
                    }

                    case 1:
                    {
                        lower = string.Concat(lower, ElfName.suffix(true));
                        break;
                    }

                    case 2:
                    {
                        lower = string.Concat(lower, ElfName.suffix(false));
                        break;
                    }
                    }
                    if (j != num1 && Session.Random.Next(10) == 0)
                    {
                        List <string> strs = new List <string>()
                        {
                            "y",
                            "'"
                        };
                        int num2 = Session.Random.Next(strs.Count);
                        lower = string.Concat(lower, strs[num2]);
                    }
                }
                lower = lower.ToLower();
                if (str != "")
                {
                    str = string.Concat(str, " ");
                    if (Session.Random.Next(20) == 0)
                    {
                        lower = TextHelper.Capitalise(lower, false);
                    }
                }
                else
                {
                    lower = TextHelper.Capitalise(lower, false);
                }
                str = string.Concat(str, lower);
            }
            str = string.Concat(str, ".");
            return(str);
        }
예제 #3
0
 public static string MaleName()
 {
     return(ElfName.name(true));
 }
예제 #4
0
 public static string FemaleName()
 {
     return(ElfName.name(false));
 }