public RoomClosed(int x, int y) : base(x, y) { double random = CustomMath.RandomUnit(); if (CustomMath.RandomUnit() < 1 / 3d) { ene = new Enemigo(Enemigo.eneList[CustomMath.RandomIntNumber(Enemigo.eneList.Length - 1)], (int)Math.Pow(Program.GetLevel() + 1, 1.4)); ene.SetName("Super " + ene.GetName()); if (random < 0.5) { item[0] = new ItemWeapon("Espada legendaria", CustomMath.RandomIntNumber(5, 3) + Program.level, 20, CustomMath.RandomIntNumber(5, 3) + Program.level); } else { item[0] = new ItemWeapon("Espada de espadas", (CustomMath.RandomIntNumber(3, 0) + Program.level) * 2, -10); } } else { if (CustomMath.RandomUnit() < 0.25) { ene = new Enemigo(Enemigo.eneList[CustomMath.RandomIntNumber(Enemigo.eneList.Length - 1)], Program.GetLevel()); } if (random < 0.05) { item[0] = new ItemWeapon("Espada legendaria", CustomMath.RandomIntNumber(5, 3) + Program.level, 20, CustomMath.RandomIntNumber(5, 3) + Program.level); } else if (random < 0.3) { item[0] = new ItemWeapon("Espada buena", CustomMath.RandomIntNumber(3, 0) + Program.level, 20); } else if (random < 0.675) { item[0] = new ItemWeapon("Espada normal", (CustomMath.RandomIntNumber(3, 0) + Program.level) / 2, 10); } else if (random < 0.95) { item[0] = new ItemWeapon("Baston Mágico", (CustomMath.RandomIntNumber(2, 0) + Program.level) / 3, 10, CustomMath.RandomIntNumber(1 + Program.level, 1 + Program.level / 2)); } else { item[0] = new ItemWeapon("Espada podrida", 1, 0); } } }
public RoomClosed(int x, int y) : base(x, y) { int level = Program.ObteJuego().GetLevel(); Player pl = Program.ObteJuego().pl; double random = CustomMath.RandomUnit(); if (CustomMath.RandomUnit() < 1 / 3d) { ene = new Enemigo(Enemigo.eneList[CustomMath.RandomIntNumber(Enemigo.eneList.Length - 1)], ((int)Math.Pow(level + 1, 1.2) < pl.GetLevel()) ? pl.GetLevel() : (int)Math.Pow(level + 1, 1.4)); ene.SetName("Super " + ene.GetName()); if (random < 0.5) { item[0] = new ItemWeapon("Espada legendaria", CustomMath.RandomIntNumber(5, 3) + level, 50); } else { item[0] = new ItemWeapon("Espada de espadas", CustomMath.RandomIntNumber(3, 0) + level * 2, 5); } } else { if (random < 0.05) { item[0] = new ItemWeapon("Espada legendaria", CustomMath.RandomIntNumber(5, 3) + level, 50); } else if (random < 0.3) { item[0] = new ItemWeapon("Espada buena", CustomMath.RandomIntNumber(3, 0) + level, 20); } else if (random < 0.95) { item[0] = new ItemWeapon("Espada normal", (CustomMath.RandomIntNumber(3, 0) + level) / 2, 10); } else { item[0] = new ItemWeapon("Espada podrida", 1, 0); } } }