查看: 1909|回复: 1

[已经解决] 如何制作吸血状态

[复制链接]
梦石
0
星屑
50
在线时间
40 小时
注册时间
2013-3-31
回帖
35
发表于 2013-8-13 08:56:18 | 显示全部楼层 |阅读模式

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

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

×
比如我设定第43号状态为狂热,只要角色处于该状态下无论是攻击还是使用特技造成伤害都将恢复伤害数值20%的生命。本意是使用脚本在Game_Battler应用通常攻击效果和应用特技效果中进行修改的,但不知道如何对攻击者或者特技使用者的数据进行操作,求指点

点评

在第五步或第六步加一句@status_window.refresh  发表于 2013-9-30 17:10

万兽

梦石
0
星屑
602
在线时间
2271 小时
注册时间
2006-11-4
回帖
4701

贵宾

发表于 2013-8-13 12:49:49 | 显示全部楼层
话说你连那个什么会罩都能写,这么简单的怎么反而不会……
Scene_Battle 4 如下一段
  1.   #--------------------------------------------------------------------------
  2.   # ● 刷新画面 (主回合步骤 5 : 显示伤害)
  3.   #--------------------------------------------------------------------------
  4.   def update_phase4_step5
  5.     # 隐藏帮助窗口
  6.     @help_window.visible = false
  7.     # 刷新状态窗口
  8.     @status_window.refresh
  9.     # 显示伤害
  10.     for target in @target_battlers
  11.       if target.damage != nil
  12.         target.damage_pop = true
  13.       end
  14.     end
  15.     # 移至步骤 6
  16.     @phase4_step = 6
  17.   end
复制代码
改成:
  1. #--------------------------------------------------------------------------
  2. # ● 刷新画面 (主回合步骤 5 : 显示伤害)
  3. #--------------------------------------------------------------------------
  4. def update_phase4_step5
  5. # 隐藏帮助窗口
  6. @help_window.visible = false
  7. # 刷新状态窗口
  8. @status_window.refresh
  9. # 显示伤害
  10. for target in @target_battlers
  11. if target.damage != nil
  12. target.damage_pop = true
  13. end
  14. end
  15. #bearrpg
  16. if @active_battler.state?(43) && target.damage.is_a?(Numeric)
  17. @active_battler.damage = -target.damage*20/100
  18. @active_battler.hp -= @active_battler.damage
  19. @active_battler.damage_pop = true
  20. @active_battler.animation_id = 16#动画ID
  21. end
  22. #bearrpg
  23. # 移至步骤 6
  24. @phase4_step = 6
  25. end
复制代码

点评

测试结果表明确实可以回复生命值,但是生命值不会立刻变化,是要等下一次变化或者战斗结束后才能看得出来,有办法解决吗?  发表于 2013-9-30 17:04
回复

使用道具 举报

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

本版积分规则

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

在本版发帖返回顶部