• Our software update is now concluded. You will need to reset your password to log in. In order to do this, you will have to click "Log in" in the top right corner and then "Forgot your password?".
  • 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] Editing whether a move is Physical or Special based on the user's Ability

  • 14
    Posts
    7
    Years
    • Seen May 18, 2024
    I'm trying to implement an ability in Essentials 18.1 that turns all punching-based moves from Physical moves to Special moves. Unfortunately, the isPhysical? and isSpecial? functions only accept the type of the move used, and not the user's ability. I could just add a new parameter to these functions to work around this, but I feel this would be somewhat inefficient. Is there an easier/more efficient way of implementing this ability?
     
  • 1,682
    Posts
    8
    Years
    • Seen May 29, 2024
    Well, the thing is, you don't have to work in those methods to get the result you want.
    After all, the PS split is just to pick the attacking and defending stats to use. For a regular move that's similar to the effect you want, Psyshock, which uses the defender's physical defense instead of special despite being a special attack. of course, we can't modify every move individually, but we can edit the original method, def pbGetAttackStats(user,target) and def pbGetDefenseStats(user,target)
    Play with that a bit, see what you make of it.
    (you may want to modify 121 and 122 to consider your ability as well, but it's not necessary)

    Hopefully this does what you want, admittedly I didn't dig very deep so it's possible I'm missing some sort of finer detail.
     
    Back
    Top