using System;
using System.Collections.Generic;
using System.Text;
using System.Xml.Serialization;

namespace WTD_Editor
{
    public class Round
    {
        public static int curr = 1;

        // attributes
        public string comment;
        public int number;
        [XmlIgnore]
        public Monster type;
        public int type_idx;
        public int spawn_rate;
        public int nextround_delay;
        public int gold_bonus;
        public int mps_method;
        public int[] paths_number;
        public int[] paths_spawn_rate;

        // constructors
        public Round()  // to allow serialization
        {
            comment = "";
            number = 0;
            type = null; 
            spawn_rate = (int)Map.SR.NORMAL;
            nextround_delay = 10;
            gold_bonus = 0;
            type_idx = -1;
            mps_method = (int)Map.MPS_METHOD.ALTERNATE;
            paths_number = new int[Map.MAX_PATHS - 1];
            paths_spawn_rate = new int[Map.MAX_PATHS - 1];
            for (int i = 0; i < Map.MAX_PATHS - 1; i++)
            {
                paths_number[i] = 0;
                paths_spawn_rate[i] = (int)Map.SR.NORMAL;
            }
        }

        public Round(Monster m)
        {
            comment = "";
            number = 0;
            type = m;
            spawn_rate = (int)Map.SR.NORMAL;
            nextround_delay = 10;
            gold_bonus = 0;
            mps_method = (int)Map.MPS_METHOD.ALTERNATE;
            paths_number = new int[Map.MAX_PATHS - 1];
            paths_spawn_rate = new int[Map.MAX_PATHS - 1];
            for (int i = 0; i < Map.MAX_PATHS - 1; i++)
            {
                paths_number[i] = 0;
                paths_spawn_rate[i] = (int)Map.SR.NORMAL;
            }
        }

        override public string ToString()
        {
            return "Round " + curr++;
        }

    }
}
