• 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!
  • Which Pokémon Masters protagonist do you like most? Let us know by casting a vote in our Masters favorite protagonist poll here!
  • Red, Hilda, Paxton, or Kellyn - which Pokémon protagonist is your favorite? Let us know by voting in our 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] Some way to prevent a player to use a certain move

  • 6
    Posts
    5
    Years
    Hello, i'm working to add boss battles in my game, but my project is on 16.2v, yes, i still use the 16.2 version, i'm trying develop boss battle, but i'm running into some problems, the players can use Destiny Bond or Endeavor to win easier, there's some way (a item, ability...) to prevent the player to use those moves?
    I thought to use Damp's ability script to make a script to do that, but i can't find it, so if someone know some way to help me i'll be very grateful.
    P.S: Disregard some english erros :)
     
    I don't know if this function exists in Essentials v16.2, but in the current version of Essentials, the class PokeBattle_Move has a method called pbMoveFailed?().
    You can set a switch to true for the boss battle (don't forget to set it to false afterwards), and in the definition of the classes of the moves you want to forbid, reimplement pbMoveFailed?() to always fail if that switch is set to true.

    The problem is that I don't have a copy of v16.2, so I don't know if that pbMoveFailed?() function had the same name.
    One tip is: look for the PokeBattle_Move subclass that defines the move Protect (in v18.X, it is PokeBattle_Move_0AA, which inherits from PokeBattle_ProtectMove), and check if there is a functoin that says "But it failed!" at some point. This is the function you should modify in the classes implementing Destiny Bond or Endeavor or whatever move you want to forbid.
     
    Back
    Top