• 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.
  • Our friends from the Johto Times are hosting a favorite Pokémon poll - and we'd love for you to participate! Click here for information on how to vote for your favorites!
  • Serena, Kris, Dawn, Red - which Pokémon protagonist is your favorite? Let us know by voting in our grand final favorite protagonist poll!
  • PokéCommunity supports the Stop Killing Games movement. If you're a resident of the UK or EU, consider signing one of the petitions to stop publishers from destroying games. Click here for more information!
  • 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] One ability that changes Ice-type moves to Fire-type and vice versa? How do I program that?

  • 413
    Posts
    5
    Years
    I've tried looking at the Galvanize/Pixilate code already in Pokemon Essentials and copying it, then changing it to my type and new ability name, but all that seems to do is slightly boost the damage of a chosen type. I can't find any move-type-changing code that changes the type of the moves used by the pokemon.

    How do I program an ability that will turn all your Ice-type moves into Fire-type moves and 1.2x their power, and also turn all Fire-type moves into Ice-type moves and 1.2x their power? So you'd end up with the Pokemon knowing a Fire-type Ice Beam and Ice-type Flamethrower.
     
    If you have the power boost part working, all you should need to do is put this after "elsif isConst?(type,PBTypes,:NORMAL)" under def pbModifyType:
    Code:
          elsif isConst?(type,PBTypes,:ICE)
            if attacker.hasWorkingAbility(:ABILITYNAME) && hasConst?(PBTypes,:FIRE)
              type=getConst(PBTypes,:FIRE)
              @powerboost=true
            end
          elsif isConst?(type,PBTypes,:FIRE)
            if attacker.hasWorkingAbility(:ABILITYNAME) && hasConst?(PBTypes,:ICE)
              type=getConst(PBTypes,:ICE)
              @powerboost=true
            end
     
    Back
    Top