Esempio n. 1
0
        public static bool VerEquipo()
        {
            Program.buffer.PrintBackground();
            Program.buffer.Print(1, 0, "EQUIPO");
            Program.buffer.Print(1, 4, "ARMA");
            ItemWeapon weapon = Program.pl.GetWeapon();

            if (weapon != null)
            {
                Program.buffer.Print(7, 5, weapon.GetName());
                Program.buffer.Print(7, 6, "ATT-> " + weapon.ModifierAtt());
                Program.buffer.Print(7, 7, "ATT M.-> " + weapon.ModifierAttM());
                Program.buffer.Print(7, 8, "ATT PROB.-> " + weapon.GetHitPercInt());
            }
            else
            {
                Program.buffer.Print(7, 5, "Ninguna");
            }


            Program.buffer.Print(1, 12, "ARMADURA");
            ItemArmor armor = Program.pl.GetArmor();

            if (armor != null)
            {
                Program.buffer.Print(7, 13, armor.GetName());
                Program.buffer.Print(7, 14, "HP-> " + armor.ModifierHp());
                Program.buffer.Print(7, 15, "DEF-> " + armor.ModifierDef());
                Program.buffer.Print(7, 16, "DEF PROB.-> " + armor.GetAvoidPercInt());
            }
            else
            {
                Program.buffer.Print(7, 5, "Ninguna");
            }

            Program.buffer.Print(101, 3, "Hp  -> " + Program.pl.GetHealth() + "/" + Program.pl.GetMHealth());
            Program.buffer.Print(101, 5, "Att -> " + Program.pl.GetAtt());
            Program.buffer.Print(101, 7, "Def -> " + Program.pl.GetDef());
            Program.buffer.Print(101, 9, "Att M. -> " + Program.pl.GetAttMa());
            Program.buffer.Print(101, 11, "Mana -> " + Program.pl.GetMana() + "/" + Program.pl.GetManaM());
            Program.buffer.Print(101, 13, "Vel. -> " + Program.pl.GetSpeed());

            Program.buffer.Print(51, 4, "GEMAS");

            ItemGema[] gemas = Program.pl.GetGemas();
            bool       check = true;

            for (int i = 0; i < gemas.Length; i++)
            {
                if (gemas[i] != null)
                {
                    check = false;
                    if (i < 2)
                    {
                        Program.buffer.Print(55, 5 + i * 7, i.ToString() + ":");
                        Program.buffer.Print(57, 6 + i * 7, gemas[i].GetName());
                        Program.buffer.Print(57, 7 + i * 7, "HP-> " + gemas[i].ModifierHp());
                        Program.buffer.Print(57, 8 + i * 7, "ATT M.-> " + gemas[i].ModifierAttM());
                        Program.buffer.Print(57, 9 + i * 7, "MANA-> " + gemas[i].ModifierManaM());
                    }
                    else
                    {
                        Program.buffer.Print(78, 5, i.ToString() + ":");
                        Program.buffer.Print(80, 6, gemas[i].GetName());
                        Program.buffer.Print(80, 7, "HP-> " + gemas[i].ModifierHp());
                        Program.buffer.Print(80, 8, "ATT M.-> " + gemas[i].ModifierAttM());
                        Program.buffer.Print(80, 9, "MANA-> " + gemas[i].ModifierManaM());
                    }
                }
            }

            if (check)
            {
                Program.buffer.Print(57, 5, "No tienes gemas");
            }

            Program.buffer.Print(1, Program.buffer.height - 2, "Pulsa cualquier tecla para salir");
            Program.buffer.PrintScreen();
            Console.ReadKey();
            return(true);
        }
Esempio n. 2
0
        public static bool LookAtBag()
        {
            Item[] bag = Program.pl.GetBag();
            for (int i = 0; i < bag.Length; i++)
            {
                int ii = i;
                int x  = 0;
                if (ii >= 5)
                {
                    ii -= 5;
                    x   = 1;
                }
                if (bag[i] != null)
                {
                    if (bag[i].GetType() == typeof(ItemArmor))
                    {
                        ItemArmor equipo = (ItemArmor)bag[i];
                        Program.buffer.Print(1 + 50 * x, 2 + ii * 3, equipo.GetName());
                        string texto = "";
                        if (equipo.ModifierHp() < 0)
                        {
                            texto += "HP(" + equipo.ModifierHp() + ") ";
                        }
                        else
                        {
                            texto += "HP(+" + equipo.ModifierHp() + ") ";
                        }

                        if (equipo.ModifierDef() < 0)
                        {
                            texto += "DEF(" + equipo.ModifierDef() + ") ";
                        }
                        else
                        {
                            texto += "DEF(+" + equipo.ModifierDef() + ") ";
                        }

                        if (equipo.GetAvoidPercInt() < 0)
                        {
                            texto += "DEF PROB.(" + equipo.GetAvoidPercInt() + ")";
                        }
                        else
                        {
                            texto += "DEF PROB.(+" + equipo.GetAvoidPercInt() + ")";
                        }

                        Program.buffer.Print(5 + 50 * x, 3 + ii * 3, texto);
                    }
                    else if (bag[i].GetType() == typeof(ItemWeapon))
                    {
                        ItemWeapon equipo = (ItemWeapon)bag[i];
                        Program.buffer.Print(1 + 50 * x, 2 + ii * 3, equipo.GetName());
                        string texto = "";
                        if (equipo.ModifierAtt() < 0)
                        {
                            texto += "ATT(" + equipo.ModifierAtt() + ") ";
                        }
                        else
                        {
                            texto += "ATT(+" + equipo.ModifierAtt() + ") ";
                        }

                        if (equipo.ModifierAttM() < 0)
                        {
                            texto += "ATT M.(" + equipo.ModifierAttM() + ") ";
                        }
                        else
                        {
                            texto += "ATT M.(+" + equipo.ModifierAttM() + ") ";
                        }

                        if (equipo.GetHitPercInt() < 0)
                        {
                            texto += "ATT PROB.(" + equipo.GetHitPercInt() + ")";
                        }
                        else
                        {
                            texto += "ATT PROB.(+" + equipo.GetHitPercInt() + ")";
                        }

                        Program.buffer.Print(5 + 50 * x, 3 + ii * 3, texto);
                    }
                    else if (bag[i].GetType() == typeof(ItemGema))
                    {
                        ItemGema equipo = (ItemGema)bag[i];
                        Program.buffer.Print(1 + 50 * x, 2 + ii * 3, equipo.GetName());
                        string texto = "";
                        if (equipo.ModifierHp() < 0)
                        {
                            texto += "HP(" + equipo.ModifierHp() + ") ";
                        }
                        else
                        {
                            texto += "HP(+" + equipo.ModifierHp() + ") ";
                        }

                        if (equipo.ModifierAttM() < 0)
                        {
                            texto += "ATT M.(" + equipo.ModifierAttM() + ") ";
                        }
                        else
                        {
                            texto += "ATT M.(+" + equipo.ModifierAttM() + ") ";
                        }

                        if (equipo.ModifierManaM() < 0)
                        {
                            texto += "MANA M.(" + equipo.ModifierManaM() + ")";
                        }
                        else
                        {
                            texto += "MANA M.(+" + equipo.ModifierManaM() + ")";
                        }

                        Program.buffer.Print(5 + 50 * x, 3 + ii * 3, texto);
                    }
                    else if (bag[i].GetType() == typeof(ItemPocion))
                    {
                        ItemPocion consumable = (ItemPocion)bag[i];
                        Program.buffer.Print(1 + 50 * x, 2 + ii * 3, consumable.GetName());
                        if (consumable.GetPocionType() == ItemPocion.PocionType.hp)
                        {
                            Program.buffer.Print(1 + 50 * x, 3 + ii * 3, "    +" + consumable.GetFlatCant().ToString() + "% HP");
                        }
                        else
                        {
                            Program.buffer.Print(1 + 50 * x, 3 + ii * 3, "    +" + consumable.GetFlatCant().ToString() + "% Mana");
                        }
                    }
                    else
                    {
                        Program.buffer.Print(1 + 50 * x, 2 + ii * 3, bag[i].GetName());
                    }
                }
            }
            Program.buffer.PrintBackground();
            Program.buffer.Print(1, Program.buffer.height - 2, "Pulsa cualquier boton para salir");
            Program.buffer.Print(1, 0, "MOCHILA");
            Program.SmallMap();
            Program.buffer.PrintScreen();
            Console.ReadKey();
            return(true);
        }