查看: 2348|回复: 2

[已经过期] 关于状态消失后给予伤害..

[复制链接]
梦石
0
星屑
50
在线时间
189 小时
注册时间
2013-1-26
回帖
31
发表于 2016-1-24 23:45:39 | 显示全部楼层 |阅读模式

加入我们,或者,欢迎回来。

您需要 登录 才可以下载或查看,没有账号?注册会员

×
我想做一个类似定时炸弹的技能,当A的某个状态消失时,给予固定伤害

之前在论坛大神拿到了这个脚本,不知道有没有办法用这个去改?

[pre lang="ruby"]
class Game_Battler
  def remove_state(state_id)
    if state?(state_id)
      revive if state_id == death_state_id
      erase_state(state_id)
      refresh
      # 上面部分不要动
      # 如果状态30消失,那么有80%的概率附加状态31
      add_state(31) if state_id == 30 && rand < 0.8
      add_state(508) if state_id == 102 #可以这样排列具备多个状态
      # 下面部分不要动
      @result.removed_states.push(state_id).uniq!
    end
  end
end[/pre]
david_ng223 该用户已被删除
发表于 2016-1-25 00:00:34 | 显示全部楼层
提示: 作者被禁止或删除 内容自动屏蔽
回复

使用道具 举报

随缘

梦石
0
星屑
55
在线时间
12 小时
注册时间
2007-12-16
回帖
658
发表于 2016-1-29 21:44:27 | 显示全部楼层
  1. class Game_Battler
  2.   def remove_state(state_id)
  3.     if state?(state_id)
  4.       revive if state_id == death_state_id
  5.       erase_state(state_id)
  6.       refresh
  7.       # 上面部分不要动
  8.       # 如果状态30消失,那么有80%的概率附加状态31
  9.       self.hp -=  @result.hp_damage += 1000 if state_id == 30 && rand < 1
  10.       add_state(508) if state_id == 102 #可以这样排列具备多个状态
  11.       # 下面部分不要动
  12.       @result.removed_states.push(state_id).uniq!
  13.     end
  14.   end
  15. end
复制代码
当解除30号状态固定伤害-1000生命
论坛:
回复

使用道具 举报

您需要登录后才可以回帖 登录 | 注册会员

本版积分规则

Powered by Discuz! X5.0 © 2001-2026 Discuz! Team.

在本版发帖返回顶部