• 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.

Problem with Grassy Terrain

24
Posts
10
Years
    • Seen Jul 5, 2018
    EDIT: Fixed it, the problem was I forgot this in front of it:
    for i in priority
    next if i.isFainted?

    I am trying to implement Grassy Terrain in Pokemon essentials version 15, but it doesn't heal anybody. Here is the code I have in PokeBattle_Battle:
    if @field.effects[PBEffects::GrassyTerrain]>0
    if i.effects[PBEffects::HealBlock]==0
    hpgain=(i.totalhp/16).floor
    hpgain=i.pbRecoverHP(hpgain,true)
    pbDisplay(_INTL("{1}'s HP was restored.",i.pbThis)) if hpgain>0
    end
    end

    In PBEffects, I have it in the section that supposedly makes it affect both sides
    # These effects apply to the battle (i.e. both sides)
    Gravity = 0
    MagicRoom = 1
    TrickRoom = 2
    WonderRoom = 3
    GrassyTerrain = 4
    ElectricTerrain = 5
    MistyTerrain = 6
    What's wrong and how do I make it affect both sides? Could the problem be in another portion of the code?
     
    Last edited:
    Back
    Top