• 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.
  • Ever thought it'd be cool to have your art, writing, or challenge runs featured on PokéCommunity? Click here for info - we'd love to spotlight your work!
  • Our weekly protagonist poll is now up! Vote for your favorite Conquest protagonist in the poll by clicking here.
  • 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.

[Custom Feature Question] Smogon's CAP Custom Abilities Script

  • 1
    Posts
    294
    Days
    • Seen Jul 22, 2024
    Hello! I'm new to pokecommunity (and essentials in general) and I am looking to implement Smogon's CAPs (fakemons) into a fangame I am making. While getting the Pokemon and the few custom moves some of them have implemented has not been an issue, I have had trouble figuring out the code for the three custom abilities in CAP. Apologies if this has been asked before; I can't find an instance of that, though.

    The abilities operate as follows:

    Mountaineer:
    A Pokemon with Mountaineer is immune to Stealth Rock and immune to Rock-type attacks, but only on the turn it switches in. Note: This immunity does not activate on lead, only if you switch it in on the turn via a switch action or a pivoting move.

    Rebound:
    A Pokemon with Rebound bounces back all status moves, but only on the turn it switches in. It functionally behaves identically to Magic Bounce but only for the turn in question. Like Mountaineer, it does not activate on lead.

    Persistent:
    When a Pokemon with Persistent uses any of the following moves: Trick Room, Tailwind, Gravity, Magic Room, and Wonder Room, the effects of the move will be extended by 2 turns. For example, if a Pokemon without Persistent uses Trick Room, the effect lasts 5 turns. However, if a Pokemon with Persistent uses Trick Room, the effect lasts 7 turns.

    My struggles with the first two lie mostly in their "one-turn" nature. My struggles with the third lie in its uniqueness; no ability "extends" effects like it does to my knowledge. I'm genuinely curious as well to see the solution to these! Thank you for any help provided! And apologies in advance if this is not the right subforum to be posting this question in.
     
    Back
    Top