- 220
- Posts
- 14
- Years
- Seen Nov 29, 2021
When I try this, I get a NoMethodError. I'm guessing this is because i.pbParalysis isn't a thing, but I don't know what to replace it with.
Code:
when PBWeather::TESLASTORM
@weatherduration=@weatherduration-1 if @weatherduration>0
if @weatherduration==0
pbDisplay(_INTL("The air returned to normal."))
@weather=0
PBDebug.log("[End of effect] Ionized weather ended")
else
if pbWeather==PBWeather::TESLASTORM
PBDebug.log("[Lingering effect triggered] Ionized weather damage")
for i in priority
next if i.isFainted?
if !i.pbHasType?(:ELECTRIC) &&
!i.pbHasType?(:GROUND) &&
!i.hasWorkingAbility(:LIGHTNINGROD) &&
!i.hasWorkingAbility(:STATIC) &&
!i.hasWorkingAbility(:MAGICGUARD) &&
!i.hasWorkingAbility(:OVERCOAT) &&
!i.hasWorkingAbility(:VOLTABSORB) &&
!i.hasWorkingAbility(:MOTORDRIVE) &&
!i.hasWorkingItem(:SAFETYGOGGLES) &&
![0xCA,0xCB].include?(PBMoveData.new(i.effects[PBEffects::TwoTurnAttack]).function) # Dig, Dive
@scene.pbDamageAnimation(i,0)
if i.status==0
PBDebug.log("[Lingering effect triggered] #{i.pbThis}'s Ionize")
i.pbParalysis
end
pbDisplay(_INTL("{1} is shocked by the air!",i.pbThis))
if i.isFainted?
return if !i.pbFaint
end
end
end
end
end