• 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!
  • 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] How do you make Pokemon who attack with raised Atk/SpAtk stats reset their Atk/SpAtk modifiers to +0 at the end of their turn?

  • 413
    Posts
    5
    Years
    I was thinking, setup sweepers can be REALLY busted. Especially in my game, where some changes made this even better. So I came up with a system to nerf it.

    When a Pokemon attacks physically while having a boosted Attack stat (due to Swords Dance for example) or attacks Specially while having a boosted Special Attack stat (due to Tail Glow for example) how do I reset this to 0 at the end of the turn?

    How do I write the following in Pokemon Essentials code, and where do I put it?

    When TurnEnd=True
    If Pokemon.PhysicallyAttackedThisTurn=True && Pokemon.AttackRaised = True
    Pokemon.AttackModifier = -1
    end
    If Pokemon.SpeciallyAttackedThisTurn=True && Pokemon.SpecialAttackRaised = True
    Pokemon.SpecialAttackModifier = -1
    end
     
    Last edited:
    Back
    Top