• 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!
  • 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.

Make an Ability can trigger moves/move effects

  • 4
    Posts
    4
    Years
    • Seen Feb 11, 2021
    Hello friends, today I was struggling to implement a new ability called Flammable, what it does is that when receiving a Fire attack, the target automatically uses Explosion, similar to Perish Body from Cursola that when hit by a physical attack creates the effect by Perish Song, so, i have tried different things without much luck, can you help me?

    The idea is simple: When receiving a fire-type attack, the target hit will have the effect of Explosion if it has that ability, regardless of whether or not the attack is in the Pokémon's movepool. Getting Damp and MoldBreaker to disable this ability is easier for me (I think).

    Spoiler:
     
    Literally using the move in the middle of the turn would be pretty hard to implement. So I'd advise you to focus on what explosion does (kill the user, damage all other battlers). Just reduce your own hp to 0 and damage other battlers by a set amount.
    Code:
    target.pbReduceHP(target.hp)
    Code:
    eachBattler do |b|
      next if b==target
      b.pbReduceHP(b.hp/2,false)
    end
    Something like that. :)
     
    If you want it to use the move explosion, it actually wouldn't be that hard at all. Here's what you can do (this should probably be in pbEffectsAfterHit):
    Code:
          if target.hasWorkingAbility(:ABILITYNAME) && isConst?(thismove.type,PBTypes,:FIRE)
            @battle.pbDisplay(_INTL("{1} exploded!",target.pbThis))
            target.pbUseMoveSimple(PBMoves::EXPLOSION)
          end


    This is for v17.2 (shouldn't be too different in v18 because pbUseMoveSimple exists there too), but let me know if you need more help or it's not working.
     
    Thanks for the help, i will try with these two scripts, by the way, I'm too clumsy to figure out where I should put it to work properly, PokeBattle Battle or Move? I'll let you know when it's fully operational! I tried above of Aftermath and below, but no triggered. My Essentials is 17 (in Theory).
     
    Thanks for the help, i will try with these two scripts, by the way, I'm too clumsy to figure out where I should put it to work properly, PokeBattle Battle or Move? I'll let you know when it's fully operational! I tried above of Aftermath and below, but no triggered. My Essentials is 17 (in Theory).

    If you put it directly under Aftermath, it will only work with contact moves, so I would recommend instead putting it under Cursed Body or something.
     
    THANKS, THANKS THANKS THANKS, Now is working, i combined your script with Afthermath for Moldbreaker and Damp can ignore this,
    really thank you very much this gives me many possibilities for abilities !!
     
    Back
    Top