招式扫墓怎么做

lige

宝可梦训练家
成员
2023-09-23
3
0
70
21
很奇怪,不知道为什么会改变初始值
 
最后编辑:

lige

宝可梦训练家
成员
2023-09-23
3
0
70
21
[Pokémon Essentials version 20.1]
[EBDX v1.0]
Exception:NoMethodError
Message: undefined method []' for nil:NilClass Backtrace: Legends Arceus:98:in pbFaintedAllyCount'
Legends Arceus:56:in num_fainted_allies' Move_Effects_19A:348:in pbBaseDamage'
Move_Usage_Calculations:243:in pbCalcDamage' Battler_UseMove:733:in pbProcessMoveHit_ebdx'
Battler_UseMove:725:ineach' Battler_UseMove:725:in pbProcessMoveHit_ebdx'
[EBDX] Battle r Info:66:in pbProcessMoveHit' Battler_UseMove:509:in pbUseMove_ebdx'
Battler_UseMove:507:in `each'
This exception was logged in C:\Users\USERNAME\Saved Games\Pokemon Spaimer\errorlog. txt. Press Ctrl+C to copy this message to the clipboard.

class PokeBattle_Move_20C < PokeBattle_Move
def pbBaseDamage(baseDmg, user, target)
numFainted = user.num_fainted_allies
return baseDmg if numFainted <= 0
baseDmg += 50 * numFainted
return baseDmg
end
end

def num_fainted_allies
return @battle.pbFaintedAllyCount(self)
end

class PokeBattle_Battle
attr_accessor :fainted_count # Used to track the number of fainted battlers for Last Respects/Supreme Overlord.

alias __pla__initialize initialize
def initialize(scene, p1, p2, player, opponent)
__pla__initialize(scene, p1, p2, player, opponent)
@fainted_count = [0,0]
end

def pbFaintedAllyCount(idxBattler)
idxBattler = idxBattler.index if idxBattler.respond_to?("index")
return @fainted_count[idxBattler & 1]
end
end
 

在线成员

论坛统计

主题
354
消息
1,627
会员
2,374
最新会员
那就这样吧

关于我们

  • 宝可梦以及其他相关名称是任天堂的商标,版权归宝可梦公司所有。宝可饭堂是一个同人游戏中文社区,不隶属于宝可梦公司。在宝可饭堂上的粉丝游戏亦未获得其授权,请支持正版游戏。
© 2022- pokefans.cn
点此延长宝可饭堂生命