Esempio n. 1
0
 public static void Sensus(Persona Ego, Persona hostis)
 {
     if (Ego.Spatium[1] >= Mechanicae.Calculus("hypod", Math.Abs(Ego.Lotus.X - hostis.Lotus.X), Math.Abs(Ego.Lotus.Y - hostis.Lotus.Y)))
     {
         Ego.verb = "Strike";
     }
     else
     {
         Ego.verb = "Step";
     }
 }
Esempio n. 2
0
        public static void Step(Persona Ego, bool yuno = false)
        {
            double dis = 0;
            string dir = "";

            if (!yuno)
            {
                Console.WriteLine("\nHow long?");
                Σ.rector = Console.ReadLine();
                dis      = String.IsNullOrEmpty(Σ.rector) ? 50 : Convert.ToInt32(Σ.rector);
                if (dis > 50)
                {
                    dis = 50;
                }
                else if (dis < 1)
                {
                    dis = 1;
                }

                Console.WriteLine("Whither?");
                dir = Console.ReadLine();
            }
            else
            {
                dis = 50;
                if (Primor.h**o.Lotus.Y > Ego.Lotus.Y && Primor.h**o.Lotus.X > Ego.Lotus.X)
                {
                    dir = "ne";
                }
                else if (Primor.h**o.Lotus.Y > Ego.Lotus.Y && Primor.h**o.Lotus.X < Ego.Lotus.X)
                {
                    dir = "nw";
                }
                else if (Primor.h**o.Lotus.Y < Ego.Lotus.Y && Primor.h**o.Lotus.X > Ego.Lotus.X)
                {
                    dir = "se";
                }
                else if (Primor.h**o.Lotus.Y < Ego.Lotus.Y && Primor.h**o.Lotus.X < Ego.Lotus.X)
                {
                    dir = "sw";
                }
                else if (Primor.h**o.Lotus.Y > Ego.Lotus.Y)
                {
                    dir = "n";
                }
                else if (Primor.h**o.Lotus.X > Ego.Lotus.X)
                {
                    dir = "w";
                }
                else if (Primor.h**o.Lotus.Y < Ego.Lotus.Y)
                {
                    dir = "s";
                }
                else if (Primor.h**o.Lotus.X < Ego.Lotus.X)
                {
                    dir = "e";
                }
            }

            if (dir == "n" || dir == "north")
            {
                Mechanicae.Momentum(Ego, y: dis);
            }
            else if (dir == "w" || dir == "west")
            {
                Mechanicae.Momentum(Ego, x: -dis);
            }
            else if (dir == "s" || dir == "south")
            {
                Mechanicae.Momentum(Ego, y: -dis);
            }
            else if (dir == "e" || dir == "east")
            {
                Mechanicae.Momentum(Ego, x: dis);
            }
            else
            {
                dis = Mechanicae.Calculus("hypo", dis);
            }

            if (dir == "nw" || dir == "northwest")
            {
                Mechanicae.Momentum(Ego, dis, -dis);
            }
            else if (dir == "sw" || dir == "southwest")
            {
                Mechanicae.Momentum(Ego, -dis, -dis);
            }
            else if (dir == "se" || dir == "southeast")
            {
                Mechanicae.Momentum(Ego, -dis, +dis);
            }
            else if (dir == "ne" || dir == "northeast")
            {
                Mechanicae.Momentum(Ego, dis, dis);
            }
        }