查看: 1592|回复: 2

[已经解决] 怎么每个回合补一定数量的HP

  [复制链接]
梦石
0
星屑
308
在线时间
53 小时
注册时间
2011-2-19
回帖
15
发表于 2011-4-12 18:03:42 | 显示全部楼层 |阅读模式

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

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

×
就是进入补血状态,每个回合补一定数量的HP,或者6/1的HP。

应该怎么做,有没有相关脚本?

酱油的

梦石
0
星屑
1840
在线时间
2161 小时
注册时间
2007-12-22
回帖
3216

贵宾

发表于 2011-4-12 18:18:12 | 显示全部楼层
不做頭像做簽名,看我囧冏有神(多謝山人有情提供 )
回复

使用道具 举报

垃圾死人

梦石
0
星屑
50
在线时间
285 小时
注册时间
2009-1-27
回帖
2337

贵宾

发表于 2011-4-12 21:04:44 | 显示全部楼层
用这个试试,插入到main前面。
  1. module After_Battle
  2. # HP回复开关(不回复改成false)
  3. HP_RE = true
  4. # HP回复量(%)
  5. HP_RE_PER = 20
  6. # SP回复开关(不回复改成false)
  7. SP_RE = true
  8. # SP回复量(%)
  9. SP_RE_PER = 20
  10. # 战斗后复活开关(复活改成true)
  11. CORPSE_RE = false
  12. end
  13. class Scene_Battle
  14. include After_Battle
  15. alias start_phase5_rec start_phase5
  16. def start_phase5
  17. for actor in $game_party.actors
  18.    if HP_RE and !actor.dead?
  19.    actor.hp += (actor.maxhp * HP_RE_PER / 100).truncate
  20.    end
  21.    if SP_RE and !actor.dead?
  22.    actor.sp += (actor.maxsp * SP_RE_PER / 100).truncate
  23.    end
  24.    if CORPSE_RE and actor.dead?
  25.    actor.hp = 1
  26.    end
  27. end
  28. start_phase5_rec
  29. end
  30. end
复制代码
努力努力再努力
回复

使用道具 举报

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

本版积分规则

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

在本版发帖返回顶部