• 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] Curing Burn Before Move

1
Posts
93
Days
    • Seen Feb 16, 2024
    Hello! I'm sorry if this question seems obvious, I've been trawling forms and can't seem to figure it out. I want to create a move which functions like scald, but rather than curing the user's frozen status before acting, cures the user's burn before moving. I cannot for the life of me figure out what the best way to get this to happen before damage is calculated might be. If anyone might know a possible solution, I'd appreciate it immensely. Cheers!
     

    Nanulak

    A ghost in the snow
    420
    Posts
    93
    Days
  • Hello! I'm sorry if this question seems obvious, I've been trawling forms and can't seem to figure it out. I want to create a move which functions like scald, but rather than curing the user's frozen status before acting, cures the user's burn before moving. I cannot for the life of me figure out what the best way to get this to happen before damage is calculated might be. If anyone might know a possible solution, I'd appreciate it immensely. Cheers!
    I don't know anything about coding or anything, however I could do a suggested order!

    1. Cures burn: The reason this goes first is because for moves like Scald, it cures the freeze first
    2. Deals damage: Then you, of course, deal damage. If this is a Physical move, it'll deal normal damage because the burn was removed beforehand
    3. Might burn: After dealing damage, there's the chance to burn, as like Scald

    I hope this helps!
     
    604
    Posts
    11
    Years
  • Hello!

    It's been a while since I've looked at moves so this is how I would investigate the way to do it.
    We know that the functionality exists in Scald already to perform something before the damage. So, it probably has a Flag set something like ThawsUser. From there we can look at how this flag is implemented.
    In Battle_Move we can define the flags that exist something like:
    Spoiler:


    Then I would check the instances you find a move.thawsUser and try to mimic the functionality but instead check for burns.
    So you'll probably want to check in Battler_UseMove, Battler_UseMoveSuccessChecks, Battler_UseMoveTriggerEffects. Then you probably want to investigate the AI code too though I've not looked in there forever so I won't provide any useful information on that!

    Hope that helps!
     
    Back
    Top