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

    this.getDescription = function()
    {
        return qsTr("Thick ash fills the air. Reduces -1 unit vision and -20% offensive power.");
    };

    this.getWeatherTerrainSprite = function()
    {
        return "ashfall";
    };

    this.getWeatherSymbol = function()
    {
        return "weather_symbol_ashfall";
    };

    this.getOffensiveModifier = function()
    {
        return -20;
    };

    this.getVisionrangeModifier = function()
    {
        return -1;
    };

    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", "#50303030", 3000, true);
        animation.setSound("ashfall.wav");
        animation.setStartOfAnimationCall("ANIMATION", "preOnAnimationChangedAnimation");
        if (queueAnimation !== null)
        {
            queueAnimation.queueAnimation(animation);
        }
    };

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

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