public void Win() { int totalXP = 0; int totalGold = 0; MonstersInBattle.ForEach(monster => { totalXP += monster.EntityStats.Experiences; totalGold += monster.Gold; }); WinMessage(totalXP, totalGold); Gold += totalGold; Characters.ForEach(character => character.AddExperiencesIfAlive(totalXP)); }
public void RemoveFocus() { MonstersInBattle.ForEach(entity => entity.Focus = null); Characters.ForEach(entity => entity.Focus = null); }
public void GetLoots() { MonstersInBattle.ForEach(entity => entity.Loots().ForEach(item => Bag.Items.Add(item))); }
public bool IsEnemyAlive() { return(MonstersInBattle.Any(entity => entity.IsAlive())); }
public List <Monster> AllMonstersAlive() { return(MonstersInBattle.FindAll(m => m.IsAlive())); }
public Monster FirstMonsterAlive() { return(MonstersInBattle.First(c => c.IsAlive())); }
public int MonstersAliveCount() { return(MonstersInBattle.Where(m => m.IsAlive()).ToList().Count); }