level 4
伤害公式在Game_Battler 3里attack_effect是通常攻击的方法,在第42行skill_effect是特技的方法,在第103行# 计算基本伤害atk = [attacker.atk - self.pdef / 2, 0].max这句就是通常攻击伤害公式,意思是 攻击力 - 物理防御 / 2,再和0比较,取最大的那个,即伤害不能为负,如果攻击力比防御力的一半小,伤害为0
2008年09月01日 07点09分
2
level 4
if self.damage > 0 # 会心一击修正 if rand(100) < 4 * attacker.dex / self.agi self.damage *= 2 self.critical = true end # 防御修正 if self.guarding? self.damage /= 2 end end这是会心和防御的计算公式self.damage *= 2就是会心时伤害2倍(self.damage = self.damage * 2)self.damage /= 2就是防御时伤害减半(self.damage = self.damage / 2)把这些系数改掉就可以了
2008年09月01日 07点09分
3