• 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.
  • 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!
  • Serena, Kris, Dawn, Red - which Pokémon protagonist is your favorite? Let us know by voting in our grand final favorite protagonist poll!
  • PokéCommunity supports the Stop Killing Games movement. If you're a resident of the UK or EU, consider signing one of the petitions to stop publishers from destroying games. Click here for more information!
  • 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
    359
    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