• 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] How to create an ability that turns Ice-type moves into Fire-Types and turns Fire-type moves into Ice-types, like a Double Pixilate?

429
Posts
4
Years
  • How to create an ability that turns Ice-type moves into Fire-Types and turns Fire-type moves into Ice-types, like a Double Pixilate?

    So a Pokemon with this ability would end up having a Fire-type Ice Beam and ice-type Flamethrower.
     

    Pokeminer20

    PDM20, Coder of Chaos!
    412
    Posts
    10
    Years
  • you'll wanna modify this
    Spoiler:
    then locate this
    Spoiler:

    untested, but it should work... hopefully
     
    Last edited:
    285
    Posts
    5
    Years
    • Seen Oct 1, 2023
    you'll wanna modify this
    Spoiler:
    then locate this
    Spoiler:

    untested, but it should work... hopefully

    That's going to change normal moves to Fire type. SuperSpyro, did you try the code I already provided in your other post here?: https://www.pokecommunity.com/showthread.php?t=438505. Not sure why you made 2 posts for this
     

    HeroesFightingFear

    "The Champion of Alon"
    99
    Posts
    4
    Years
  • I had my own ability idea like this. I can show you the way I coded it, if that helps.

    Part 1 - Flying to Electric
    Code:
    def pbModifyType(type,attacker,opponent)
        if type>=0
          if attacker.hasWorkingAbility(:AVIATOR) && hasConst?(PBTypes,:FLYING)
            type=getConst(PBTypes,:FLYING)
          elsif isConst?(type,PBTypes,:FLYING)
            if attacker.hasWorkingAbility(:TEMPEST) && hasConst?(PBTypes,:ELECTRIC)
              type=getConst(PBTypes,:ELECTRIC)
              @powerboost=true
            end
          end
        end
        return type
      end

    Part 2 - Electric to Flying
    Code:
    def pbModifyType(type,attacker,opponent)
        if type>=0
          if attacker.hasWorkingAbility(:CHARGED) && hasConst?(PBTypes,:ELECTRIC)
            type=getConst(PBTypes,:ELECTRIC)
          elsif isConst?(type,PBTypes,:ELECTRIC)
            if attacker.hasWorkingAbility(:TEMPEST) && hasConst?(PBTypes,:FLYING)
              type=getConst(PBTypes,:FLYING)
              @powerboost=true
            end
          end
        end
        return type
      end


    NOTE: This was an ability concept for Zapdos.
     
    429
    Posts
    4
    Years
  • I tried adding both def pbModifyType entries and getting them to work on the same Freezer Burn ability that's meant to x1.2 Fire and Ice moves and swap Fire/Ice around, but it just turns all of my Pokemon's moves into Electric-types. Including moves that are already Electric type.
     
    285
    Posts
    5
    Years
    • Seen Oct 1, 2023
    I tried adding both def pbModifyType entries and getting them to work on the same Freezer Burn ability that's meant to x1.2 Fire and Ice moves and swap Fire/Ice around, but it just turns all of my Pokemon's moves into Electric-types. Including moves that are already Electric type.

    Did you try this yet?:

    If you have the power boost part working, all you should need to do is put the bolded part after "elsif isConst?(type,PBTypes,:NORMAL)" under def pbModifyType like below:
    Code:
          if attacker.hasWorkingAbility(:NORMALIZE) && hasConst?(PBTypes,:NORMAL)
            type=getConst(PBTypes,:NORMAL)
          elsif isConst?(type,PBTypes,:NORMAL)
            if attacker.hasWorkingAbility(:AERILATE) && hasConst?(PBTypes,:FLYING)
              type=getConst(PBTypes,:FLYING)
              @powerboost=true
            elsif attacker.hasWorkingAbility(:REFRIGERATE) && hasConst?(PBTypes,:ICE)
              type=getConst(PBTypes,:ICE)
              @powerboost=true
            elsif attacker.hasWorkingAbility(:PIXILATE) && hasConst?(PBTypes,:FAIRY)
              type=getConst(PBTypes,:FAIRY)
              @powerboost=true
            end
    [B]      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[/B]
          end
     
    429
    Posts
    4
    Years
  • ok

    def pbModifyType(type,attacker,opponent)
    if type>=0
    if attacker.hasWorkingAbility(:NORMALIZE) && hasConst?(PBTypes,:NORMAL)
    type=getConst(PBTypes,:NORMAL)
    elsif isConst?(type,PBTypes,:NORMAL)
    if attacker.hasWorkingAbility(:AERILATE) && hasConst?(PBTypes,:FLYING)
    type=getConst(PBTypes,:FLYING)
    @powerboost=true
    elsif attacker.hasWorkingAbility(:REFRIGERATE) && hasConst?(PBTypes,:ICE)
    type=getConst(PBTypes,:ICE)
    @powerboost=true
    elsif attacker.hasWorkingAbility(:PIXILATE) && hasConst?(PBTypes,:FAIRY)
    type=getConst(PBTypes,:FAIRY)
    @powerboost=true
    end
    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
    end
    end
    end
    return type
    end
     
    285
    Posts
    5
    Years
    • Seen Oct 1, 2023
    Code:
      def pbModifyType(type,attacker,opponent)
        if type>=0
          if attacker.hasWorkingAbility(:NORMALIZE) && hasConst?(PBTypes,:NORMAL)
            type=getConst(PBTypes,:NORMAL)
          elsif isConst?(type,PBTypes,:NORMAL)
            if attacker.hasWorkingAbility(:AERILATE) && hasConst?(PBTypes,:FLYING)
              type=getConst(PBTypes,:FLYING)
              @powerboost=true
            elsif attacker.hasWorkingAbility(:REFRIGERATE) && hasConst?(PBTypes,:ICE)
              type=getConst(PBTypes,:ICE)
              @powerboost=true
            elsif attacker.hasWorkingAbility(:PIXILATE) && hasConst?(PBTypes,:FAIRY)
              type=getConst(PBTypes,:FAIRY)
              @powerboost=true
            end
          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
          end
        end
    [B][I]end[/I][/B]
        return type
      end
    You have an extra "end"
     
    429
    Posts
    4
    Years
  • Removing the extra And fixed things.

    I tested the ability against a Geodude and it correctly changed the types, used a Super-effective Flamethrower and a not-very-effective Ice Beam on him. Is it possible to make the ability change the displayed type icon of the moves the pokemon has during battle?
     
    285
    Posts
    5
    Years
    • Seen Oct 1, 2023
    Removing the extra And fixed things.

    I tested the ability against a Geodude and it correctly changed the types, used a Super-effective Flamethrower and a not-very-effective Ice Beam on him. Is it possible to make the ability change the displayed type icon of the moves the pokemon has during battle?

    That's going to take a little bit more effort, but this script does that (and also will display type-effectiveness). Also note that this doesn't work with EBS.
     
    Back
    Top