var Constructor = function()
{
    this.getWeatherName = function()
    {
        return qsTr("Heavy Gale");
    };

    this.getDescription = function()
    {
        return qsTr("Severe winds that destabilize units. Increases fuel consumption for Air, Drone and Helicopter Units. Naval and Coastal Units suffer reduced Movement and Offense.");
    };

    this.getWeatherSymbol = function()
    {
        return "weather_symbol_heavy_gale";
    };
	
    this.getWeatherTerrainSprite = function()
    {
        return "heavy_gale";
    };

    this.getOffensiveModifier = function(weather, map)
    {
        return -10;
    };

    this.getDefensiveModifier = function(weather, map)
    {
        return 0;
    };

    this.getMovementFuelCostModifier = function(weather, unit, fuelCost)
    {
        var uType = unit.getUnitType();
        if (uType === GameEnums.UnitType_Air || 
            uType === GameEnums.REMOTE_WEAPON || 
            uType === GameEnums.HELICOPTER || 
            uType === GameEnums.DRONE)
        {
            return 2;
        }
        return 0;
    };

    this.getMovementCostModifier = function(weather, unit, terrain, map)
    {
        var uType = unit.getUnitType();
        if (uType === GameEnums.UnitType_Air || 
            uType === GameEnums.UnitType_Naval || 
            uType === GameEnums.COASTAL ||
            uType === GameEnums.REMOTE_WEAPON || 
            uType === GameEnums.HELICOPTER || 
            uType === GameEnums.DRONE)
        {
            return 1;
        }
        return 0;
    };

    this.activate = function(weather, map)
    {
        var animationCount = GameAnimationFactory.getAnimationCount();
        var queueAnimation = null;
        if (animationCount > 0)
        {
            queueAnimation = GameAnimationFactory.getAnimation(animationCount - 1);
        }
        var animation = GameAnimationFactory.createAnimation(map, 0, 0);
        
        animation.addSprite2("white_pixel", 0, 0, 3200, map.getMapWidth(), map.getMapHeight());
        animation.addTweenColor(0, "#00FFFFFF", "#FFFFFFFF", 3000, true);
        
        animation.setSound("wind.wav"); 
        animation.setStartOfAnimationCall("ANIMATION", "preOnAnimationChangedAnimation");
        
        if (queueAnimation !== null)
        {
            queueAnimation.queueAnimation(animation);
        }
    };

    this.getDefaultWeatherChance = function()
    {
        return 0; 
    };
}

Constructor.prototype = WEATHER;
var WEATHER_HEAVY_GALE = new Constructor();