コード例 #1
0
ファイル: Genus.cs プロジェクト: Bedengus/ULF
        public void Mensura(string genus, Persona Ego)
        {
            Console.WriteLine("Type 'roll' to randomize proportions; input anything else to use your race's standard measures.");

            genus = genus.ToLower();
            switch (genus)
            {
            case "human":
                Human.Mensura(Ego);
                break;

            case "orc":
                Orc.Mensura(Ego);
                break;

            case "vampire":
                Vampire.Mensura(Ego);
                break;

            case "dwarf":
                Dwarf.Mensura(Ego);
                break;

            case "elf":
                Elf.Mensura(Ego);
                break;

            case "werewolf":
                Werewolf.Mensura(Ego);
                break;

            default:
                break;
            }
            Ego.Caput[0]     = Math.Round((Ego.Altitudo / 8) * 1, 2);
            Ego.Caput[1]     = Math.Round(Ego.Caput[0] * 0.5, 2);
            Ego.Caput[2]     = Math.Round(Ego.Caput[0] * Ego.Caput[1], 2);
            Ego.Ocullus[0]   = Math.Round((Ego.Caput[1] / 4) * 0.5, 2);
            Ego.Ocullus[1]   = Math.Round(Ego.Ocullus[0] * 2, 2);
            Ego.Ocullus[2]   = Math.Round(Ego.Ocullus[0] * Ego.Ocullus[1], 2);
            Ego.Collum[0]    = Math.Round((Ego.Altitudo / 16) * 1, 2);
            Ego.Collum[1]    = Math.Round(Ego.Collum[0] * 1, 2);
            Ego.Collum[2]    = Math.Round(Ego.Collum[0] * Ego.Collum[1], 2);
            Ego.Cor[0]       = Math.Round((Ego.Altitudo / 16) * 1, 2);
            Ego.Cor[1]       = Math.Round(Ego.Cor[0] * 1, 2);
            Ego.Cor[2]       = Math.Round(Ego.Cor[0] * Ego.Cor[1], 2);
            Ego.Tergum[0]    = Math.Round((Ego.Altitudo / 8) * 3.5, 2);
            Ego.Tergum[1]    = Math.Round(Ego.Tergum[0] * 0.1, 2);
            Ego.Tergum[2]    = Math.Round(Ego.Tergum[0] * Ego.Tergum[1], 2);
            Ego.Bracchium[0] = Math.Round((Ego.Altitudo / 8) * 3.5, 2);
            Ego.Bracchium[1] = Math.Round(Ego.Bracchium[0] * 0.1, 2);
            Ego.Bracchium[2] = Math.Round(Ego.Bracchium[0] * Ego.Bracchium[1], 2);
            Ego.Stomachus[0] = Math.Round((Ego.Altitudo / 8) * 1, 2);
            Ego.Stomachus[1] = Math.Round(Ego.Stomachus[0] * 2, 2);
            Ego.Stomachus[2] = Math.Round(Ego.Stomachus[0] * Ego.Stomachus[1], 2);
            Ego.Crus[0]      = Math.Round((Ego.Altitudo / 2) * 1, 2);
            Ego.Crus[1]      = Math.Round(Ego.Crus[0] * 0.1, 2);
            Ego.Crus[2]      = Math.Round(Ego.Crus[0] * Ego.Crus[1], 2);
        }