• 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] Help with Tinkerer

  • 163
    Posts
    5
    Years
    Hi! I am making this ability called Tinkerer. What it does is that in a double battle if the ally Pokemon is a Steel-type, then Tinkerer would heal the ally from status problems. I looked at the code for Shed Skin to get some ideas but Idk how to make it so that it heals the ally from status problems if the ally is a Steel-type. Can someone help?
     
  • 143
    Posts
    4
    Years
    • Seen Mar 26, 2024
    The question here is, if you want the ally Pokemon to be protected or healed of the status conditions by the ability.
    Either way you could look into the codes of Sweet Veil and Flower Veil.
    On another note in Essentials version 17.2 you adress a partner by using:
    Code:
     pbPartner
    and in version 18 by using:
    Code:
    BattleHandlers::StatusImmunityAllyAbility.add
    as your ability trigger.
    :)
     
  • 163
    Posts
    5
    Years
    The question here is, if you want the ally Pokemon to be protected or healed of the status conditions by the ability.
    Either way you could look into the codes of Sweet Veil and Flower Veil.
    On another note in Essentials version 17.2 you adress a partner by using:
    Code:
     pbPartner
    and in version 18 by using:
    Code:
    BattleHandlers::StatusImmunityAllyAbility.add
    as your ability trigger.
    :)

    Okay! But I am also looking at the ability Healer for this one as it too has a similar effect.
     
  • 163
    Posts
    5
    Years
    The question here is, if you want the ally Pokemon to be protected or healed of the status conditions by the ability.
    Either way you could look into the codes of Sweet Veil and Flower Veil.
    On another note in Essentials version 17.2 you adress a partner by using:
    Code:
     pbPartner
    and in version 18 by using:
    Code:
    BattleHandlers::StatusImmunityAllyAbility.add
    as your ability trigger.
    :)

    Oh! and here's the code I used BTW!
    Spoiler:

    Haven't tested it out yet but the game starts without any syntax errors so hopefully this code shouldn't cause any more issues.
     
  • 163
    Posts
    5
    Years
    A Little Help!

    Okay so I am working on the ability called Tinkerer, which heals ally Steel-types from status problems. But when I put partner.pbHasType?(:STEEL), it gives me an error message!

    Here's the code for it. Please someone check if this'll work or tell me how to modify it so only ally Steel-types are effected.
    Code:
    # Healer, Tinkerer
          if (i.hasWorkingAbility(:HEALER) && pbRandom(10)<3) ||
             (i.hasWorkingAbility(:TINKERER) && pbHasType?(:STEEL))
            partner=i.pbPartner
            if partner && partner.status>0
              PBDebug.log("[Ability triggered] #{i.pbThis}'s #{PBAbilities.getName(i.ability)}")
              s=partner.status
              partner.pbCureStatus(false)
              case s
              when PBStatuses::SLEEP
                pbDisplay(_INTL("{1}'s {2} cured its partner's sleep problem!",i.pbThis,PBAbilities.getName(i.ability)))
              when PBStatuses::POISON
                pbDisplay(_INTL("{1}'s {2} cured its partner's poison problem!",i.pbThis,PBAbilities.getName(i.ability)))
              when PBStatuses::BURN
                pbDisplay(_INTL("{1}'s {2} healed its partner's burn!",i.pbThis,PBAbilities.getName(i.ability)))
              when PBStatuses::PARALYSIS
                pbDisplay(_INTL("{1}'s {2} cured its partner's paralysis!",i.pbThis,PBAbilities.getName(i.ability)))
              when PBStatuses::FROZEN
                pbDisplay(_INTL("{1}'s {2} thawed its partner out!",i.pbThis,PBAbilities.getName(i.ability)))
              end
            end
          end
        end
     
  • 658
    Posts
    7
    Years
    Okay so I am working on the ability called Tinkerer, which heals ally Steel-types from status problems. But when I put partner.pbHasType?(:STEEL), it gives me an error message!

    Here's the code for it. Please someone check if this'll work or tell me how to modify it so only ally Steel-types are effected.
    Code:
    <code>
    You can test it out and tell if it works. If not then we'll try to fix it.
     
  • 163
    Posts
    5
    Years
    You can test it out and tell if it works. If not then we'll try to fix it.

    Turns out that if the Pokemon that has Tinkerer is a Steel-type, then it cures ally non Steel-type Pokemon's statuses. I only want it so Tinkerer only works if the ally is a Steel-type.

    The pbHasType?(:STEEL) part in the code only refers to the ability activating if the Pokemon with the ability IS a Steel-type! :(

    How do I fix this?
     
  • 658
    Posts
    7
    Years
    Turns out that if the Pokemon that has Tinkerer is a Steel-type, then it cures ally non Steel-type Pokemon's statuses. I only want it so Tinkerer only works if the ally is a Steel-type.

    How do I fix this?

    You need to make the pbHasType? (:STEEL) to i.pbPartner.pbHasType?(:STEEL)
     
    Back
    Top