• Just a reminder that providing specifics on, sharing links to, or naming websites where ROMs can be accessed is against the rules. If your post has any of this information it will be removed.
  • Dawn, Gloria, Juliana, or Summer - which Pokémon protagonist is your favorite? Let us know by voting in our poll!
  • Our friends from the Johto Times are hosting a favorite Pokémon poll - and we'd love for you to participate! Click here for information on how to vote for your favorites!
  • 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] quick question about PBEffects

  • 172
    Posts
    8
    Years
    • Seen Sep 6, 2022
    In PBEffects where it has the long list of attacks and abilities like this
    Code:
    ############################################################################
        # These effects apply to a battler
        AquaRing           = 0
        Attract            = 1
        BatonPass          = 2
        Bide               = 3
        BideDamage         = 4
        BideTarget         = 5
        Charge             = 6
        ChoiceBand         = 7
        Confusion          = 8
        Counter            = 9
        CounterTarget      = 10
        Curse              = 11
        DefenseCurl        = 12
        DestinyBond        = 13
        Disable            = 14
        DisableMove        = 15
        Electrify          = 16
        Embargo            = 17
        Encore             = 18
        EncoreIndex        = 19
        EncoreMove         = 20
        Endure             = 21
        FirstPledge        = 22
        FlashFire          = 23
        Flinch             = 24
        FocusEnergy        = 25
        FollowMe           = 26
        Foresight          = 27
        FuryCutter         = 28
        FutureSight        = 29
        FutureSightMove    = 30
        FutureSightUser    = 31
        FutureSightUserPos = 32
        GastroAcid         = 33
        Grudge             = 34
        HealBlock          = 35
    and so on...
    how do you know if something needs to be added to that list or not? and what happens if you do or don't have something on that list? because ive made a few abilities and attacks which some do fall under that category at the top of "these affects apply to a battler", so do I need to add them to this list? the abilities and moves ive made all work just fine, so im not sure if I need to or not, but I don't know if itll affect something else down the road. Thanks in advance :)
     
    Last edited:
    I think the short answer is "you need one if you want your effect to have state (memory)". An example is Disguise—you want it to be on until the the Pokémon is hit, and then off afterwards[0]. Another example is Defense Curl—you want it to be off to start with, and on after use so that you can know to double the power of Rollout.

    A counter-example is Weak Armor. In some sense it remembers how many times you've been attacked, but it does it via stat boosts. However if you wanted it to have a limit to how many times it could trigger then you could use an effect to count how many times it had been used—you wouldn't be able to use stat boosts for this, because other effects alter stat boosts too.

    [0] Actually Disguise is a little different to other examples because it's one of the few effects that you don't reset on switch.
     
    Back
    Top