- 428
- Posts
- 5
- Years
- Zekko
- Seen Nov 21, 2023
[Pokémon Essentials version 19.1]
[Generation 8 Project v1.1.0]
[v19.1 Hotfixes 1.0.7]
Exception: NameError
Message: undefined local variable or method `b' for #<PokeBattle_Move_000>
Backtrace:
163:Move_Usage_Calculations:525:in `pbAdditionalEffectChance'
155:Battler_UseMove:722:in `block in pbProcessMoveHit'
155:Battler_UseMove:720:in `each'
155:Battler_UseMove:720:in `pbProcessMoveHit'
155:Battler_UseMove:433:in `block in pbUseMove'
155:Battler_UseMove:431:in `each'
155:Battler_UseMove:431:in `pbUseMove'
155:Battler_UseMove:60:in `block in pbProcessTurn'
012:PBDebug:6:in `logonerr'
155:Battler_UseMove:59:in `pbProcessTurn'
I started getting these crashes upon using super-effective moves after I made the Random Effect Chance and Serene Grace code into this:
def pbAdditionalEffectChance(user,target,effectChance=0)
return 0 if target.hasActiveAbility?(:SHIELDDUST) && [email protected]
ret = (effectChance>0) ? effectChance : @addlEffect
if Settings::MECHANICS_GENERATION >= 6 || @function != "0A4" # Secret Power
ret = 100 if user.hasActiveAbility?(:SERENEGRACE)
end
ret = 100 if Effectiveness.super_effective?(b.damageState.typeMod);
return ret
ret = 100 if $DEBUG && Input.press?(Input::CTRL)
return ret
end
My goal is:
For randomly-happening optional effects to never trigger, unless it is an optional effect of a move that was super-effective, then the activation chance should be guaranteed at 100%. Serene Grace should also guarantee 100% optional effect chance.
[Generation 8 Project v1.1.0]
[v19.1 Hotfixes 1.0.7]
Exception: NameError
Message: undefined local variable or method `b' for #<PokeBattle_Move_000>
Backtrace:
163:Move_Usage_Calculations:525:in `pbAdditionalEffectChance'
155:Battler_UseMove:722:in `block in pbProcessMoveHit'
155:Battler_UseMove:720:in `each'
155:Battler_UseMove:720:in `pbProcessMoveHit'
155:Battler_UseMove:433:in `block in pbUseMove'
155:Battler_UseMove:431:in `each'
155:Battler_UseMove:431:in `pbUseMove'
155:Battler_UseMove:60:in `block in pbProcessTurn'
012:PBDebug:6:in `logonerr'
155:Battler_UseMove:59:in `pbProcessTurn'
I started getting these crashes upon using super-effective moves after I made the Random Effect Chance and Serene Grace code into this:
def pbAdditionalEffectChance(user,target,effectChance=0)
return 0 if target.hasActiveAbility?(:SHIELDDUST) && [email protected]
ret = (effectChance>0) ? effectChance : @addlEffect
if Settings::MECHANICS_GENERATION >= 6 || @function != "0A4" # Secret Power
ret = 100 if user.hasActiveAbility?(:SERENEGRACE)
end
ret = 100 if Effectiveness.super_effective?(b.damageState.typeMod);
return ret
ret = 100 if $DEBUG && Input.press?(Input::CTRL)
return ret
end
My goal is:
For randomly-happening optional effects to never trigger, unless it is an optional effect of a move that was super-effective, then the activation chance should be guaranteed at 100%. Serene Grace should also guarantee 100% optional effect chance.
Last edited: