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); }
public static bool GetStats() { Program.buffer.PrintBackground(); Item[] bagitem = Program.pl.GetGemas(); int modh = 0; int moda = 0; int modd = 0; int modam = 0; int modm = 0; for (int i = 0; i < bagitem.Length; i++) { if (bagitem[i] != null && bagitem[i].GetType() == typeof(ItemGema)) { ItemGema gema = (ItemGema)bagitem[i]; modh += gema.ModifierHp(); moda += gema.ModifierAtt(); modd += gema.ModifierDef(); modam += gema.ModifierAttM(); modm += gema.ModifierManaM(); } } ItemWeapon weapon = Program.pl.GetWeapon(); if (weapon != null) { modh += weapon.ModifierHp(); moda += weapon.ModifierAtt(); modd += weapon.ModifierDef(); modam += weapon.ModifierAttM(); modm += weapon.ModifierManaM(); } ItemArmor armor = Program.pl.GetArmor(); if (armor != null) { modh += armor.ModifierHp(); moda += armor.ModifierAtt(); modd += armor.ModifierDef(); modam += armor.ModifierAttM(); modm += armor.ModifierManaM(); } Program.buffer.Print(1, 0, "STATS"); if (modh == 0) { Program.buffer.Print(2, 5, "VIDA (HP) -> " + Program.pl.GetHealth() + "/" + Program.pl.GetMHealth() + " --> Capacidad de aguante"); } else { Program.buffer.Print(2, 5, "VIDA (HP) -> " + Program.pl.GetHealth() + "/" + Program.pl.GetMHealth() + "+(" + modh + ") --> Capacidad de aguante"); } if (moda == 0) { Program.buffer.Print(2, 7, "ATAQUE (Att) -> " + Program.pl.GetFlatAtt() + " --> Daño que inflinges"); } else { Program.buffer.Print(2, 7, "ATAQUE (Att) -> " + Program.pl.GetFlatAtt() + "+(" + moda + ") --> Daño que inflinges"); } if (modd == 0) { Program.buffer.Print(2, 9, "DEFENSA (Def) -> " + Program.pl.GetFlatDef() + " --> Daño que reduces"); } else { Program.buffer.Print(2, 9, "DEFENSA (Def) -> " + Program.pl.GetFlatDef() + "+(" + modd + ") --> Daño que reduces"); } if (modam == 0) { Program.buffer.Print(2, 11, "ATAQUE M. (Att M.) -> " + Program.pl.GetAttMa() + " --> Daño por hechizos"); } else { Program.buffer.Print(2, 11, "ATAQUE M. (Att M.) -> " + Program.pl.GetAttMa() + "+(" + modam + ") --> Daño por hechizos"); } if (modm == 0) { Program.buffer.Print(2, 13, "MANA (mana) -> " + Program.pl.GetMana() + "/" + Program.pl.GetManaM() + " --> Capacidad de hechizos"); } else { Program.buffer.Print(2, 13, "MANA (mana) -> " + Program.pl.GetMana() + "/" + Program.pl.GetManaM() + "+(" + modm + ") --> Capacidad de hechizos"); } Program.buffer.Print(2, 13, "MANA (mana) -> " + Program.pl.GetMana() + "/" + Program.pl.GetManaM()); Program.buffer.Print(2, 15, "Velocidad (Vel.) -> " + Program.pl.GetSpeed()); Program.SmallMap(); Program.buffer.PrintScreen(); Console.ReadKey(); return(true); }