Ejemplo n.º 1
0
 public void StartBattle(List <Monster> opponents)
 {
     CurrentOpponents.Clear();
     CurrentOpponents.AddRange(opponents);
     SelectedOpponent = null;
     StartBattle();
 }
Ejemplo n.º 2
0
 public void StartBattle(Monster opponent)
 {
     CurrentOpponents.Clear();
     CurrentOpponents.Add(opponent);
     if (AutoBattle)
     {
         SelectedOpponent = opponent;
     }
     StartBattle();
 }
Ejemplo n.º 3
0
    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();
    }