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

[Scripting Question] Shadow Move Type Effectiveness

  • 6
    Posts
    8
    Years
    • Seen Jan 16, 2017
    I noticed that Shadow type moves in raw Essentials only do neutral damage against non-Shadow Pokemon. Does anyone know how to make them follow Pokemon XD's effectiveness mechanics?

    Pokemon Zeta and Omicron have them working correctly.
     
    Last edited by a moderator:
    This is found in the function pbCalcDamage, which is found in the script section PokeBattle_Move. Add the red lines:
    Code:
              # Type effectiveness
        if (options&IGNOREPKMNTYPES)==0
          typemod=pbTypeModMessages(type,attacker,opponent)[COLOR="Red"]
          if isConst?(type,PBTypes,:SHADOW)
            if opponent.isShadow? || opponent.pbHasType?(:SHADOW)
              typemod=4
            else
              typemod=16
            end[/COLOR]
    The tutorial on the Essentials Wiki tells you just to make all types weak to Shadow type, but that makes dual-typed Pokemon 4x weak to Shadow type, and dual-typed Pokemon under Forest's Curse or Trick-or-Treat 8x weak. That's not how Shadow type works. All non-Shadow Pokemon are 2x weak, and all Shadow Pokemon resist them regardless of type.
     
    This is found in the function pbCalcDamage, which is found in the script section PokeBattle_Move. Add the red lines:
    Code:
              # Type effectiveness
        if (options&IGNOREPKMNTYPES)==0
          typemod=pbTypeModMessages(type,attacker,opponent)[COLOR="Red"]
          if isConst?(type,PBTypes,:SHADOW)
            if opponent.isShadow? || opponent.pbHasType?(:SHADOW)
              typemod=4
            else
              typemod=16
            end[/COLOR]
    The tutorial on the Essentials Wiki tells you just to make all types weak to Shadow type, but that makes dual-typed Pokemon 4x weak to Shadow type, and dual-typed Pokemon under Forest's Curse or Trick-or-Treat 8x weak. That's not how Shadow type works. All non-Shadow Pokemon are 2x weak, and all Shadow Pokemon resist them regardless of type.

    Thanks. The code that you provided solved the effectiveness of Shadow moves on non-Shadow 'mons.

    However, when I test on the in-game Shadow Electabuzz and Weepinbell, they still take neutral damage from x2 attacks and from resisted attacks.

    Against the Shadow Electabuzz:
    Boneclub = neutral
    Aerial Ace = neutral

    Against the Shadow Weepinbell:
    Waterfall = neutral
    Toxic = successfully poisoned

    Do you know how to fix these issues?
     
    Thanks. The code that you provided solved the effectiveness of Shadow moves on non-Shadow 'mons.

    However, when I test on the in-game Shadow Electabuzz and Weepinbell, they still take neutral damage from x2 attacks and from resisted attacks.

    Against the Shadow Electabuzz:
    Boneclub = neutral
    Aerial Ace = neutral

    Against the Shadow Weepinbell:
    Waterfall = neutral
    Toxic = successfully poisoned

    Do you know how to fix these issues?

    sadly, I do not.
     
    sadly, I do not.

    I talked with the creator of Zeta / Omicron on his Reddit page, and he referred me to the following user as someone who might know (Suzerain hasn't touched Shadow Pokemon in so long, he is rusty on the subject):

    https://www.reddit.com/user/LunarDusk

    Update:

    I heard back from LunarDusk, and he said that he would give the Zeta Omicron code a look to see if he can find the fixes that they used in their games.
     
    Last edited:
    Back
    Top