コード例 #1
0
ファイル: Program.cs プロジェクト: Telorath/Capers
        static void Event()
        {
            List <Character> CHARDATABASE = Database.GetActiveDatabase().CharList();

            if (CHARDATABASE.Count < 2)
            {
                return;
            }
            for (int i = 0; i < CHARDATABASE.Count; i++)
            {
                if (CHARDATABASE[i].SPD == 0)
                {
                    CHARDATABASE[i].SPD = 2;
                }
            }
            Character First = CHARDATABASE[prng.Next(0, CHARDATABASE.Count)];
            Character Other;

            while (true)
            {
                Other = CHARDATABASE[prng.Next(0, CHARDATABASE.Count)];
                if (Other != First)
                {
                    break;
                }
            }
            int var = prng.Next(1, 101);

            if (var < 1)
            {
                Console.WriteLine("You meet up with " + Other.Name + " and some stuff happens. Nobody kills each other though!");
            }
            else
            {
                Console.WriteLine("You run into " + Other.Name + " out on the street and a fight breaks out between you!");
                First.FullHeal();
                Other.FullHeal();
                MockBattle(First, Other);
            }
        }