本帖最后由 金芒芒 于 2024-1-18 22:53 编辑 p @attacker.get_battle_effective.to_s #p我方战斗力 p @defender.get_battle_effective.to_s &nb ...
soulsaga 发表于 2024-1-18 23:51 74行~~~~~~~~~~~~~~
def get_battle_effective#定义获得实际战斗力 sum = 0#数字=0 @member.each do|group|#@每个do|组的成员| next if group.get_all_dead#如果下一个组。全部阵亡 num = group.calculate_effective#数字=组。计算有效 sum+= num #总和+=数字 end return sum.round*10 end
折叠内容标题(非必须)
折叠内容
站长信箱:[email protected]|手机版|小黑屋|无图版|Project1游戏制作
GMT+8, 2026-7-21 07:11
Powered by Discuz! X3.1
© 2001-2013 Comsenz Inc.