public static void returnSoul(Zone zone) { int numSouls = Convert.ToInt32(zone.getNumberOfSouls()); int soulsOnHand = PointAndCurency.GetSouls(); if (zone.GetZoneType() >= 2) { zone.setNumberOfSouls(numSouls + 1); PointAndCurency.SetSouls(soulsOnHand - 1); } /*foreach (var soul in souls) * { * if (soul.soulName == "currency") * { * soul.soulName = "alive"; * soul.age = 0; * soul.maxAge = random.Next(30, 140); * soul.goodLevel = soul.goodLevel - 2; * * } * }*/ }
public void ResetGameStats() { List <Zone> zones = MapComponent.GetZones(); foreach (Zone zone in zones) { zone.setUpgradeCost(300); zone.setTileType(1); zone.setNumberOfSouls(0); } Turn.setCurrentTurn(1); PointAndCurency.SetSouls(0); PointAndCurency.SetPoints(0); PointAndCurency.SetGold(0); Souls.souls = new List <Soul>(); }
public static void scoreSoul(int numSouls) { int currentPoints = PointAndCurency.GetPoints(); int currentSouls = PointAndCurency.GetSouls(); int selling = 0; foreach (var soul in souls) { if (soul.soulName == "currency" && selling < numSouls) { currentPoints = (currentPoints + soul.goodLevel); //currentSouls = currentSouls - 1; selling++; soul.soulName = "point"; PointAndCurency.SetSouls(currentSouls); PointAndCurency.SetPoints(currentPoints); } } }
public override void Update(GameTime gameTime) { // TODO: Add your update code here currentMouseState = Mouse.GetState(); if (currentMouseState.LeftButton == ButtonState.Released && pastMouseState.LeftButton == ButtonState.Pressed && easybuttonbuttonrectanglepos.Contains(currentMouseState.X, currentMouseState.Y)) { PointAndCurency.SetGold(10000); for (int x = 0; x < 20; x++) { Souls.createSoul(); } PointAndCurency.SetSouls(Souls.souls.Count); Turn.setDifficulty("easy"); StartNewGame(); } if (currentMouseState.LeftButton == ButtonState.Released && pastMouseState.LeftButton == ButtonState.Pressed && normalbuttonrectanglepos.Contains(currentMouseState.X, currentMouseState.Y)) { PointAndCurency.SetGold(5000); for (int x = 0; x < 15; x++) { Souls.createSoul(); } PointAndCurency.SetSouls(Souls.souls.Count); Turn.setDifficulty("normal"); StartNewGame(); } if (currentMouseState.LeftButton == ButtonState.Released && pastMouseState.LeftButton == ButtonState.Pressed && expertbuttonrectanglepos.Contains(currentMouseState.X, currentMouseState.Y)) { PointAndCurency.SetGold(3000); for (int x = 0; x < 10; x++) { Souls.createSoul(); } PointAndCurency.SetSouls(Souls.souls.Count); Turn.setDifficulty("hard"); StartNewGame(); } pastMouseState = currentMouseState; base.Update(gameTime); }
public static void sellSoul() { int currentGold = PointAndCurency.GetGold(); int currentSouls = PointAndCurency.GetSouls(); int selling = 0; int soulID = 0; foreach (var soul in souls) { if (soul.soulName == "currency" && selling == 0) { currentSouls = currentSouls - 1; currentGold = currentGold + 75; selling++; soul.soulName = "sold"; PointAndCurency.SetSouls(currentSouls); PointAndCurency.SetGold(currentGold); soul.soulNumber = soulID; } } }
public void Quit() { List <Zone> zones = MapComponent.GetZones(); foreach (Zone zone in zones) { zone.setUpgradeCost(300); zone.setTileType(1); zone.setNumberOfSouls(0); } Turn.setCurrentTurn(1); PointAndCurency.SetSouls(0); PointAndCurency.SetPoints(0); PointAndCurency.SetGold(0); Souls.souls = new List <Soul>(); quitSession = true; this.Visible = false; this.Enabled = false; }
public static void buySoul() { int currentGold = PointAndCurency.GetGold(); int currentSouls = PointAndCurency.GetSouls(); if (currentGold >= 100) { currentGold = currentGold - 100; currentSouls = currentSouls + 1; PointAndCurency.SetSouls(currentSouls); PointAndCurency.SetGold(currentGold); allSoul++; souls.Add(new Soul { soulNumber = allSoul, soulName = "currency", age = 0, maxAge = random.Next(30, 140), goodLevel = random.Next(-10, 35), tileID = 0 }); } }