I haven't posted in here in a very long time, moreover.
For whatever reason when a pokemon uses an attacking move I get this error
PokeBattle_Move_xxx in the error changes depending on the move being used which is understandable, but it always returns with pbAccuracyCheck being the issue.
This is the pbAccuracyCheck from PokeBattle_Move
For whatever reason when a pokemon uses an attacking move I get this error
PokeBattle_Move_xxx in the error changes depending on the move being used which is understandable, but it always returns with pbAccuracyCheck being the issue.
Spoiler:
Code:
Exception: NoMethodError
Message: undefined method `pbAccuracyCheck' for #<PokeBattle_Move_xxx:xxxxxxxxx>
PokeBattle_Battler:3288:in `pbSuccessCheck'
PokeBattle_Battler:3485:in `pbProcessMoveAgainstTarget'
PokeBattle_Battler:3481:in `each'
PokeBattle_Battler:3481:in `pbProcessMoveAgainstTarget'
PokeBattle_Battler:4052:in `pbUseMove'
PokeBattle_Battler:4032:in `loop'
PokeBattle_Battler:4055:in `pbUseMove'
PokeBattle_Battler:4295:in `pbProcessTurn'
PokeBattle_Battler:4294:in `logonerr'
PokeBattle_Battler:4294:in `pbProcessTurn'
This is the pbAccuracyCheck from PokeBattle_Move
Spoiler:
Code:
def pbModifyBaseAccuracy(baseaccuracy,attacker,opponent)
return baseaccuracy
end
def pbAccuracyCheck(attacker,opponent)
baseaccuracy=@accuracy
baseaccuracy=pbModifyBaseAccuracy(baseaccuracy,attacker,opponent)
baseaccuracy=0 if opponent.effects[PBEffects::Minimize] && tramplesMinimize?(1)
return true if baseaccuracy==0
return true if attacker.hasWorkingAbility(:NOGUARD) ||
opponent.hasWorkingAbility(:NOGUARD)
return true if opponent.hasWorkingAbility(:STORMDRAIN) &&
isConst?(pbType(@type,attacker,opponent),PBTypes,:WATER)
return true if opponent.hasWorkingAbility(:LIGHTNINGROD) &&
isConst?(pbType(@type,attacker,opponent),PBTypes,:ELECTRIC)
return true if opponent.effects[PBEffects::Telekinesis]>0
# One-hit KO accuracy handled elsewhere
accstage=attacker.stages[PBStats::ACCURACY]
accstage=0 if !attacker.hasMoldBreaker && opponent.hasWorkingAbility(:UNAWARE)
accuracy=(accstage>=0) ? (accstage+3)*100.0/3 : 300.0/(3-accstage)
evastage=opponent.stages[PBStats::EVASION]
evastage-=2 if @battle.field.effects[PBEffects::Gravity]>0
evastage=-6 if evastage<-6
evastage=0 if evastage>0 && USENEWBATTLEMECHANICS &&
attacker.hasWorkingAbility(:KEENEYE)
evastage=0 if opponent.effects[PBEffects::Foresight] ||
opponent.effects[PBEffects::MiracleEye] ||
@function==0xA9 || # Chip Away
attacker.hasWorkingAbility(:UNAWARE)
evasion=(evastage>=0) ? (evastage+3)*100.0/3 : 300.0/(3-evastage)
if attacker.hasWorkingAbility(:COMPOUNDEYES)
accuracy*=1.3
end
if attacker.hasWorkingAbility(:HUSTLE) && pbIsDamaging? &&
pbIsPhysical?(pbType(@type,attacker,opponent))
accuracy*=0.8
end
if attacker.hasWorkingAbility(:VICTORYSTAR)
accuracy*=1.1
end
partner=attacker.pbPartner
if partner && partner.hasWorkingAbility(:VICTORYSTAR)
accuracy*=1.1
end
if attacker.effects[PBEffects::MicleBerry]
attacker.effects[PBEffects::MicleBerry]=false
accuracy*=1.2
end
if attacker.hasWorkingItem(:WIDELENS)
accuracy*=1.1
end
if attacker.hasWorkingItem(:ZOOMLENS) &&
(@battle.choices[opponent.index][0]!=1 || # Didn't choose a move
opponent.hasMovedThisRound?) # Used a move already
accuracy*=1.2
end
if !attacker.hasMoldBreaker
if opponent.hasWorkingAbility(:WONDERSKIN) && pbIsStatus? &&
attacker.pbIsOpposing?(opponent.index)
accuracy=50 if accuracy>50
end
if opponent.hasWorkingAbility(:TANGLEDFEET) &&
opponent.effects[PBEffects::Confusion]>0
evasion*=1.2
end
if opponent.hasWorkingAbility(:SANDVEIL) &&
@battle.pbWeather==PBWeather::SANDSTORM
evasion*=1.25
end
if opponent.hasWorkingAbility(:SNOWCLOAK) &&
@battle.pbWeather==PBWeather::HAIL
evasion*=1.25
end
end
if opponent.hasWorkingItem(:BRIGHTPOWDER)
evasion*=1.1
end
if opponent.hasWorkingItem(:LAXINCENSE)
evasion*=1.1
end
return @battle.pbRandom(100)<(baseaccuracy*accuracy/evasion)
end