if opponent.damagestate.typemod<4
effectiveness=1 # "Not very effective"
elsif opponent.damagestate.typemod>4
effectiveness=2 # "Super effective"
end
if opponent.damagestate.typemod<4
if $game_switches[[COLOR="Red"]x[/COLOR]]
effectiveness=2
else
effectiveness=1 # "Not very effective"
end
elsif opponent.damagestate.typemod>4
if $game_switches[[COLOR="red"]x[/COLOR]]
effectiveness=1
else
effectiveness=2 # "Super effective"
end
end
if $game_switches[[COLOR="Red"]x[/COLOR]]
inmod1=mod1
inmod2=mod2
mod1=3 if inmod1<2
mod1=1 if inmod1>2
mod2=3 if inmod2<2
mod2=1 if inmod2>2
end
mod1=PBTypes.getEffectiveness(atype,otype1)
mod2=(otype1==otype2) ? 2 : PBTypes.getEffectiveness(atype,otype2)