public void StartBattle(Monster opponent) { CurrentOpponents.Clear(); CurrentOpponents.Add(opponent); if (AutoBattle) { SelectedOpponent = opponent; } StartBattle(); }
public void StartBattle(Area area) { CurrentArea = area; int r = random.Next(0, CurrentArea.Monsters.Count); CurrentOpponents.Clear(); CurrentOpponents.Add(Monsters.FirstOrDefault(x => x.Name == CurrentArea.Monsters[r])); SelectedOpponent = null; if (CurrentOpponents[0] == null) { Console.WriteLine("No monsters found for area."); } else { foreach (Monster m in CurrentOpponents) { m.IsDefeated = false; } } StartBattle(); }