Exemplo n.º 1
0
        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));
        }
Exemplo n.º 2
0
 public void RemoveFocus()
 {
     MonstersInBattle.ForEach(entity => entity.Focus = null);
     Characters.ForEach(entity => entity.Focus       = null);
 }
Exemplo n.º 3
0
 public void GetLoots()
 {
     MonstersInBattle.ForEach(entity => entity.Loots().ForEach(item => Bag.Items.Add(item)));
 }
Exemplo n.º 4
0
 public bool IsEnemyAlive()
 {
     return(MonstersInBattle.Any(entity => entity.IsAlive()));
 }
Exemplo n.º 5
0
 public List <Monster> AllMonstersAlive()
 {
     return(MonstersInBattle.FindAll(m => m.IsAlive()));
 }
Exemplo n.º 6
0
 public Monster FirstMonsterAlive()
 {
     return(MonstersInBattle.First(c => c.IsAlive()));
 }
Exemplo n.º 7
0
 public int MonstersAliveCount()
 {
     return(MonstersInBattle.Where(m => m.IsAlive()).ToList().Count);
 }