• Our software update is now concluded. You will need to reset your password to log in. In order to do this, you will have to click "Log in" in the top right corner and then "Forgot your password?".
  • Welcome to PokéCommunity! Register now and join one of the best fan communities on the 'net to talk Pokémon and more! We are not affiliated with The Pokémon Company or Nintendo.

[Pokeemerald] Bad Data: "Canonical" effects of the downpour weather condition

137
Posts
10
Years
    • Age 35
    • Seen May 1, 2024
    "Bad data" is the term used by the protocrystal website to refer to code and data drawn from the leaked source code which sheds light on what Gamefreak originally intended to do with unused and unreferenced code and data left over in the final game. We can play the same games with Gen 3 that that website plays with Gen 2, since we have source code for both.

    Let's look at the unused weather condition, "downpour", which I'm sure everyone has speculated about at this point - is it connected somehow to the "strong rain" created by Primal Kyogre's Primordial Sea? The original design was that rain came in two levels: the first level is what we got as normal rain, while the second level was downpour. It was accessed by using a rain-setting effect such as using Rain Dance or switching in a Pokemon with Drizzle while already under the effect of normal rain.

    Code:
    static void Cmd_setrain(void)
    {
    #if 0
        if (gBattleWeather & WEATHER_RAIN_DOWNPOUR)
        {
            gMoveResultFlags |= MOVE_RESULT_MISSED;
            gBattleCommunication[MULTISTRING_CHOOSER] = 2;
        }
        else if (gBattleWeather & WEATHER_RAIN_TEMPORARY)
        {
            gBattleWeather = WEATHER_RAIN_DOWNPOUR;
            gBattleCommunication[MULTISTRING_CHOOSER] = 1;
            gWishFutureKnock.weatherDuration = 5;
        }
        else
        {
            gBattleWeather = WEATHER_RAIN_TEMPORARY;
            gBattleCommunication[MULTISTRING_CHOOSER] = 0;
            gWishFutureKnock.weatherDuration = 5;
        }
        gBattlescriptCurrInstr++;
    #else
        if (gBattleWeather & WEATHER_RAIN_ANY)
        {
            gMoveResultFlags |= MOVE_RESULT_MISSED;
            gBattleCommunication[MULTISTRING_CHOOSER] = 2;
        }
        else
        {
            gBattleWeather = WEATHER_RAIN_TEMPORARY;
            gBattleCommunication[MULTISTRING_CHOOSER] = 0;
            gWishFutureKnock.weatherDuration = 5;
        }
        gBattlescriptCurrInstr++;
    #endif
    }

    In a downpour, Water-type moves have their damage doubled, while Fire-type moves and the move Solar Beam have their damage quartered. (As implemented I think this might stack with the existing Solar Beam damage reduction for rain, which probably wasn't Gamefreak's intention, but that's not my problem - I'm just presenting the designs as recorded in their source code.) This snippet of code goes in the function CalculateBaseDamage in pokemon.c.

    Code:
                // any weather except sun weakens solar beam
                if ((gBattleWeather & (WEATHER_RAIN_ANY | WEATHER_SANDSTORM_ANY | WEATHER_HAIL_ANY)) && gCurrentMove == MOVE_SOLAR_BEAM)
                    damage /= 2;
    
    #if 0
                if (gBattleWeather & WEATHER_RAIN_DOWNPOUR)
                {
                    switch (type)
                    {
                    case TYPE_FIRE:
                        damage /= 4;
                        break;
                    case TYPE_WATER:
                        damage *= 2;
                        break;
                    }
    
                    if (gCurrentMove == MOVE_SOLAR_BEAM)
                        damage /= 4;
                }
    #endif
    
                // sunny
                if (gBattleWeather & WEATHER_SUN_ANY)
                {
                    switch (type)
                    {
                    case TYPE_FIRE:
                        damage = (15 * damage) / 10;
                        break;
                    case TYPE_WATER:
                        damage /= 2;
                        break;
                    }
                }
            }
     
    Back
    Top