private void btnAddArmy_Click(object sender, EventArgs e)
        {
            object[] arr = new object[76];

            for (int i = 0; i < arr.Length; i++)
            {
                arr[i] = (i + 5) * 100;
            }

            NewArmyForm naf = new NewArmyForm(playerName, HexCoords.NewUserCoords(-1, -1), arr);
            naf.ShowDialog();

            xDoc = XDocument.Load(Player.SavePath);
            PopulateListBoxes();
        }
예제 #2
0
        private void cmsTown_MusterArmy_Click(object sender, EventArgs e)
        {
            playerDoc.Save(Player.UndoPath);
            btnUndo.Enabled = true;

            Town t = tm.GetTown(clickCoords);
            object[] arr = new object[t.Level - 5];

            for (int i = 0; i < arr.Length; i++)
            {
                arr[i] = (i + 5) * 100;
            }

            NewArmyForm naf = new NewArmyForm(turn.CurrentPlayer.Name, clickCoords, arr);

            naf.ShowDialog();

            LoadMap();

            Army a = tm.GetArmy(clickCoords);

            if (a != null)
            {
                int levels = a.Size / 100;

                t.Downgrade(levels);

                LoadMap();
            }

            playerDoc = XDocument.Load(Player.SavePath);
            UpdateSummary();
            UpdateResources();
        }