Vendily

fix typemod

Aug 31st, 2018
139
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1.     # Smack Down makes Ground moves work against fliers
  2.     if (!opponent.isAirborne?(attacker.hasMoldBreaker) || @function==0x11C) && # Smack Down
  3.        isConst?(atype,PBTypes,:GROUND)
  4.       mod1=2 if isConst?(otype1,PBTypes,:FLYING)
  5.       mod2=2 if isConst?(otype2,PBTypes,:FLYING)
  6.       mod3=2 if isConst?(otype3,PBTypes,:FLYING)
  7.     end
  8.     # Smack Down makes Ground moves work against fliers
  9.     if (!opponent.isAirborne?(attacker.hasMoldBreaker) || @function==0x11C) && # Smack Down
  10.        isConst?(atype,PBTypes,:GROUND)
  11.       mod1=2 if isConst?(otype1,PBTypes,:FLYING)
  12.       mod2=2 if isConst?(otype2,PBTypes,:FLYING)
  13.       mod3=2 if isConst?(otype3,PBTypes,:FLYING)
  14.     end
  15.     if @function==0x135 && !attacker.effects[PBEffects::Electrify] # Freeze-Dry
  16.       mod1=4 if isConst?(otype1,PBTypes,:WATER)
  17.       if isConst?(otype2,PBTypes,:WATER)
  18.         mod2=(otype1==otype2) ? 2 : 4
  19.       end
  20.       if isConst?(otype3,PBTypes,:WATER)
  21.         mod3=(otype1==otype3 || otype2==otype3) ? 2 : 4
  22.       end
  23.     end
  24.     if @function==0x159 && !attacker.effects[PBEffects::Electrify] # Flytrap
  25.       mod1=4 if isConst?(otype1,PBTypes,:BUG)
  26.       if isConst?(otype2,PBTypes,:BUG)
  27.         mod2=(otype1==otype2) ? 2 : 4
  28.       end
  29.       if isConst?(otype3,PBTypes,:BUG)
  30.         mod3=(otype1==otype3 || otype2==otype3) ? 2 : 4
  31.       end
  32.     end
  33.     return mod1*mod2*mod3
  34.   end
RAW Paste Data