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

[Scripting Question] Help defining a status move that has the "burn up" effect

1
Posts
152
Days
    • Seen Feb 18, 2024
    Like the title says, I want to make a move the raises your defensive stats by 3, but removes a typing like the move "burn up". (Pokemon Essentials v20.1 is the version I'm using)
    On the good hand, I figured everything out, the scripts work, and don't work at the same time.
    When I define the attack as a status move, it raises the defensive stats but doesn't remove the typing. But when I define it as a physical/special attack, the "burn up" effect happens, but I can't raise or lower the stats.
    (I also tried adding 2 function codes but that made me loose the animation mess up and the effect not work)
    So I guess what I'm asking is if there is a way to make a status move that makes the pokemon loose the water typing and raise it's defense stat, (If not then I'll figure something else out)
    Also this is my first post on pokecommunity, I was hoping it wouldn't be about asking for help but here we are.
    This is the code (with labels organizing everything, better have it and not need it than need it and not have it)

    (BattleEffect_BattlerOther)

    #===============================================================================
    # User loses their Water type. Fails if user is not Water-type. (Flare Up)
    #===============================================================================
    class Battle::Move::UserLosesWaterTypeRaiseUserDefense2 < Battle::Move
    def pbMoveFailed?(user, targets)
    if !user.pbHasType?(:WATER)
    @battle.pbDisplay(_INTL("But it failed!"))
    return true
    end
    return false
    end

    def pbEffectAfterAllHits(user, target)
    if !user.effects[PBEffects::FlareUp]
    user.effects[PBEffects::FlareUp] = true
    @battle.pbDisplay(_INTL("{1} evaporated neaby water!", user.pbThis))
    end
    end
    end

    (MoveEffects_BattlerStats)

    #===============================================================================
    # Increases the user's Defense by 3 stages.
    # (Flare Up)
    #===============================================================================
    class Battle::Move::UserLosesWaterTypeRaiseUserDefense3 < Battle::Move::StatUpMove
    def initialize(battle, move)
    super
    @statUp = [:DEFENSE, 3]
    end
    end

    (BattleBattler)

    # Flare Up erases the Water-type.
    ret.delete(:WATER) if @effects[PBEffects::FlareUp]

    (Battler_Initialize)


    @effects[PBEffects::FlareUp] = false

    (PBEffects)

    FlareUp = 117

    (Debug_BattleExtraCode)


    PBEffects::FlareUp => { name: "Flare Up has removed self's Water type", default: false },

    (Move)

    when "177" then new_code = "UserLosesWaterTypeRaiseUserDefense3"

    (Moves.txt)

    [FLAREUP]
    Name = Flare Up
    Type = FIRE
    Category = x
    Power = x
    Accuracy = 100
    TotalPP = 10
    Target = User
    FunctionCode = UserLosesWaterTypeRaiseUserDefense2
    Flags = CanProtect,CanMirrorMove,ThawsUser
    Description = The user's fire starts to burn so hot that they will evaporate nearby water, this will raise their defensive stats.
    #-------------------------------
     
    188
    Posts
    9
    Years
    • Seen yesterday
    You defined the move's function in the PBS file as UserLosesWaterTypeRaiseUserDefense2 and in the script as UserLosesWaterTypeRaiseUserDefense3
     
    Back
    Top