• 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] Mega evolution messing with Forms (16.2)

465
Posts
7
Years
    • Seen yesterday
    So trying to adjust how shadow pokemon work (not at all relevent, it happens in general)

    but if a pokemon has forms but has a mega, the form will act oddly.

    the sprite will match the right form but no data changes (type, ability etc.)

    i know it works without mega but when i add that back in it breaks (used on an existing mega)

    Code:
    MultipleForms.register(:SHARPEDO,{
    "getForm"=>proc{|pokemon|
       next if pokemon.form==0
       next if pokemon.form==1
       next 33 if pokemon.isShadow?
       next 0
    },
    "type2"=>proc{|pokemon|
       next if pokemon.form==0
       next if pokemon.form==1
       case pokemon.form
       when 33; next getID(PBTypes,:SHADOW)
       end
    }
    })

    then the mega code

    Code:
    MultipleForms.register(:SHARPEDO,{
    "getMegaForm"=>proc{|pokemon|
       next 1 if isConst?(pokemon.item,PBItems,:SHARPEDONITE) && !pokemon.form==33
       next 35 if pokemon.form==33 && pokemon.hypermode==true
       next
    },
    "getUnmegaForm"=>proc{|pokemon|
       next 33 if pokemon.form==35 && !pokemon.hypermode==true
       next
    },
    "megaMessage"=>proc{|pokemon|
       next 3 if pokemon.form==35
       next
    },
    "getMegaName"=>proc{|pokemon|
       next _INTL("Twilight Sharpedo") if pokemon.form==35
       next
    },
    "getBaseStats"=>proc{|pokemon|
       next [70,140,70,105,110,65] if pokemon.form==1
       next [70,140,70,105,110,65] if pokemon.form==35
       next
    },
    "type2"=>proc{|pokemon|
       next getID(PBTypes,:SHADOW) if pokemon.form==35
       next
    },
    "getAbilityList"=>proc{|pokemon|
       next [[getID(PBAbilities,:STRONGJAW),0]] if pokemon.form==1
       next [[getID(PBAbilities,:STRONGJAW),0]] if pokemon.form==35
       next
    },
    "height"=>proc{|pokemon|
       next 25 if pokemon.form==1
       next 25 if pokemon.form==35
       next
    },
    "weight"=>proc{|pokemon|
       next 1303 if pokemon.form==1
       next 1303 if pokemon.form==35
       next
    }
    })

    could be my altered code, but im unsure.

    any help will be great.
     
    465
    Posts
    7
    Years
    • Seen yesterday
    Sorry for late reply, this does help in most cases, but it wont work if its with a pokemon with "get form on" stuff. cuz it'll either overwrite "get mega form" or vice versa, otherwise what you said is correct.
     
    Back
    Top