|
本帖最后由 xiaoli999999 于 2013-3-29 14:16 编辑 在脚本编辑器里找到Game_Battler 3这个类 找到attack_effect这个函数的 # 状态变化 @state_changed = false states_plus(attacker.plus_state_set) states_minus(attacker.minus_state_set) 这一段,在下面加上 if self.damage<= 0 self.damage *=-1 self.damage = "+#{self.damage}" else self.damage = "-#{self.damage}" end 然后找到skill_effect这个函数的 # HP 的伤害减法运算 last_hp = self.hp self.hp -= self.damage effective |= self.hp != last_hp 这一段,在后面加上 if self.damage<= 0 self.damage *=-1 self.damage = "+#{self.damage}" else self.damage = "-#{self.damage}" end 如此类推,在item_effect函数的 if item.recover_hp_rate == 0 and item.recover_hp == 0 # 设置伤害为空的字符串 self.damage = "" # SP 回复率与回复量为 0、能力上升值无效的情况下 if item.recover_sp_rate == 0 and item.recover_sp == 0 and (item.parameter_type == 0 or item.parameter_points == 0) # 状态没有变化的情况下 unless @state_changed # 伤害设置为 "Miss" self.damage = "Miss" end end end 后面 和slip_damage_effect函数的 if self.damage.abs > 0 amp = [self.damage.abs * 15 / 100, 1].max self.damage += rand(amp+1) + rand(amp+1) - amp end # HP 的伤害减法运算 self.hp -= self.damage 后面也加上 if self.damage<= 0 self.damage *=-1 self.damage = "+#{self.damage}" else self.damage = "-#{self.damage}" end 暂时测试通过没问题 |
站长信箱:[email protected]|手机版|小黑屋|无图版|Project1游戏制作
GMT+8, 2025-6-27 12:16
Powered by Discuz! X3.1
© 2001-2013 Comsenz Inc.