Esempio n. 1
0
        protected override void Execute(LocalPlayer player)
        {
            if (player.ActiveUnit.CurrentLocation.IsCityPresent)
            {
                player.ActiveTile.CityHere.GrowCity(_game);
                var unit = player.ActiveUnit;
                unit.Dead           = true;
                unit.MovePointsLost = unit.MovePoints;
                _game.ChooseNextUnit();
            }
            else
            {
                var box = _mainForm.popupBoxList["NAMECITY"];
                if (box.Options is not null)
                {
                    box.Text    = box.Options;
                    box.Options = null;
                }

                var name           = CityActions.GetCityName(player.Civ, _game);
                var cityNameDialog = new Civ2dialog(_mainForm, box,
                                                    textBoxes: new List <TextBoxDefinition>
                {
                    new()
                    {
                        index        = 0,
                        InitialValue = name,
                        Name         = "CityName",
                        Width        = 225
                    }
                });