Exemple #1
0
        public static void Learner(Persona Ego, string typ = "", string nom = "")
        {
            if (typ == "")
            {
                Console.WriteLine("What do you wish to learn?\n1>Proffession\n2>Mastery\n3>Spell\n4>Skill\n5>Buff");
                Σ.notou = Console.ReadLine();
                Console.WriteLine("Name it.");
                Σ.notod = Console.ReadLine();
            }
            else
            {
                Σ.notou = typ;
                Σ.notod = nom;
            }

            switch (Σ.notou)
            {
            case "1":
                Ego.AddicioM(nom);
                break;

            case "2":
                Ego.AddicioM(nom, verbum: "peritia");
                break;

            case "3":
                Ego.Addicio("repertoire", nom);
                break;

            case "4":
                Ego.Addicio(nom);
                break;

            case "5":
                Ego.AddicioB(nom);
                break;

            default:

                break;
            }
        }
Exemple #2
0
        public void Discare(Persona Ego)
        {
            if (this.type == "Mage")
            {
                Console.WriteLine("Welcome to the " + this.Nomen + " of Emerald Village.");
                Console.WriteLine("We have courses availables for:");
                for (int u = 0; u < this.praesto.Length; u++)
                {
                    Console.WriteLine("Buff: " + this.praesto[u]);
                }
                Console.WriteLine("\nWhat would you like to learn?");
                Σ.rector = Console.ReadLine();

                if (Array.Exists(this.praesto, u => u == Σ.rector))
                {
                    Console.WriteLine("\n" + β.Buff(Σ.rector).Nomen);
                    foreach (var u in β.Buff(Σ.rector).Difficultas)
                    {
                        Console.WriteLine("Difficulty: " + u.Value + " " + u.Key);
                    }
                    int hor = β.Buff(Σ.rector).hora / 3600;
                    Console.WriteLine("Time: " + hor + "h" +
                                      "\nCost: " + β.Buff(Σ.rector).Pretium);

                    Console.WriteLine("\nWould you like to train it?");
                    Σ.notou = Console.ReadLine();
                    if (Σ.notou == "y" || Σ.notou == "yes")
                    {
                        if (Ego.RepertoireB.ContainsKey(Σ.rector))
                        {
                            Console.WriteLine("\nYou have already learnt that, man!");
                        }
                        else if (β.Buff(Σ.rector).requiritare != "" && !Ego.RepertoireB.ContainsKey(β.Buff(Σ.rector).requiritare))
                        {
                            Console.WriteLine("\nYour incapable self is devoid of the minimal " + β.Buff(Σ.rector).requiritare + ".");
                        }
                        else
                        {
                            Console.WriteLine("\nFor how long?");
                            Σ.notou = Console.ReadLine();
                            Σ.unus  = String.IsNullOrEmpty(Σ.notou) ? 0 : Convert.ToInt32(Σ.notou);
                            if (hor == β.Buff(Σ.rector).discunt[0])
                            {
                                Σ.unus = 1;
                            }
                            else if (Σ.unus + β.Buff(Σ.rector).discunt[0] > hor)
                            {
                                Σ.unus = hor - β.Buff(Σ.rector).discunt[0];
                            }
                            if (Ego.Credits >= β.Buff(Σ.rector).Pretium *Σ.unus)
                            {
                                Agrum.Centuria[2] += Σ.unus;
                                Adventum.Verso(Ego);
                                Ego.Credits -= β.Buff(Σ.rector).Pretium *Σ.unus;
                                Console.WriteLine("You have: " + Ego.Credits);
                                Console.WriteLine("It is " + Agrum.Centuria[2] + ":" + Agrum.Centuria[1] + ":" + Agrum.Centuria[0] + ".\n");
                                β.Buff(Σ.rector).discunt[0] += Σ.unus;
                                if (β.Buff(Σ.rector).discunt[0] > hor)
                                {
                                    β.Buff(Σ.rector).discunt[0] = hor;
                                }
                                if (β.Buff(Σ.rector).discunt[1] < 1)
                                {
                                    β.Buff(Σ.rector).discunt[1] = 1;
                                }
                                Petitio(Ego);
                                Σ.num[1] = Mechanicae.Volvere(100, nomen: Ego.Cognomen);
                                Console.WriteLine(Ego.Cognomen + " rolls " + Σ.num[1] + " against " + Σ.num[0] + ".");
                                if (Σ.num[1] > Σ.num[0])
                                {
                                    Ego.AddicioB(β.Buff(Σ.rector).Nomen, "E");
                                }
                                else
                                {
                                    Console.WriteLine("\nYou have not truly grasped the way of the spell.");
                                    if (β.Buff(Σ.rector).discunt[0] == hor)
                                    {
                                        β.Buff(Σ.rector).discunt[1] += 1;
                                        Console.WriteLine("But you feel closer to mastering it!");
                                    }
                                }
                            }
                        }
                    }
                }
            }
        }