| 赞 | 3  | 
 
| VIP | 0 | 
 
| 好人卡 | 0 | 
 
| 积分 | 22 | 
 
| 经验 | 46374 | 
 
| 最后登录 | 2025-7-3 | 
 
| 在线时间 | 1015 小时 | 
 
 
 
 
 
Lv3.寻梦者 
	- 梦石
 - 0 
 
        - 星屑
 - 2245 
 
        - 在线时间
 - 1015 小时
 
        - 注册时间
 - 2015-10-17
 
        - 帖子
 - 1288
 
 
 
 | 
	
加入我们,或者,欢迎回来。
您需要 登录 才可以下载或查看,没有帐号?注册会员  
 
x
 
在game_battler的 
  #-------------------------------------------------------------------------- 
  # ● 处理伤害 
  #    调用前需要设置好 
  #    @result.hp_damage   @result.mp_damage  
  #    @result.hp_drain    @result.mp_drain 
  #-------------------------------------------------------------------------- 
  def execute_damage(user) 
    on_damage(@result.hp_damage) if @result.hp_damage > 0 
    self.hp -= @result.hp_damage 
    self.mp -= @result.mp_damage 
    user.hp += @result.hp_drain 
    user.mp += @result.mp_drain 
  end 
 
的 
self.hp -= @result.hp_damage 
 
 
改成 
 
if self.state(x)?#被击者有某个状态时 
[email protected]_damage#攻击者受到全额反弹,被击者不受伤害 
else 
[email protected]_damage 
end 
 
后会报else错,帮忙看下哪里错误了 |   
 
 
 
 |