var MapStart =
{
    gameStart: function(map)
    {
        if (!UNIT._weatherHookAttached)
        {
            UNIT._weatherHookAttached = true;

            var originalUnitStartOfTurn = UNIT.startOfTurn;

            UNIT.startOfTurn = function(unit, map)
            {
                originalUnitStartOfTurn.call(this, unit, map);

                var currentWeather = map.getGameRules().getCurrentWeather();
                if (currentWeather)
                {
                    var weatherId = currentWeather.getWeatherId();
                    var weatherScript = Global[weatherId];

                    if (weatherScript && typeof weatherScript.onStartOfTurn === 'function')
                    {
                        weatherScript.onStartOfTurn(currentWeather, unit, map);
                    }
                }
            };
        }
    }
};