查看: 4104|回复: 1

[已经解决] 关于暴击的脚本求助

[复制链接]
梦石
0
星屑
1088
在线时间
141 小时
注册时间
2019-5-12
回帖
49
发表于 2019-9-30 11:07:25 | 显示全部楼层 |阅读模式
悬赏60星屑已解决
本帖最后由 真の玛娜君 于 2019-9-30 19:32 编辑

五行脚本中的,敌人暴击就会崩溃,能帮忙更改一下吗?
[pre lang="ruby"]class RPG::EquipItem;def cridef;
  @note=~ /\<crd (\d+)\>/ ? $1.to_i/100.0 : 1;end;end
class Game_Actor;def apply_critical(value)
  equips.inject(super){|v,e|v*e.cridef}
end;end#装备备注<crd 90>受到的暴击伤害变为原来的0.9倍,乘法叠加[/pre]

编辑:似乎是我搞错了,暴击率和暴击闪避的关系不是我想的那样。。。
# item.damage.critical ? user.cri * (1 - cev) : 0

最佳答案

查看完整内容

[pre lang="ruby"]class RPG::EquipItem;def cridef; @note=~ /\/ ? $1.to_i/100.0 : 1;end;end class Game_Actor;def apply_critical(value) equips.inject(super){|v,e|e ? v*e.cridef : v} end;end#装备备注受到的暴击伤害变为原来的0.9倍,乘法叠加 [/pre]
梦石
10
星屑
39550
在线时间
1919 小时
注册时间
2010-11-14
回帖
3214

R考场第七期纪念奖

发表于 2019-9-30 11:07:26 | 显示全部楼层
[pre lang="ruby"]class RPG::EquipItem;def cridef;
  @note=~ /\<crd (\d+)\>/ ? $1.to_i/100.0 : 1;end;end
class Game_Actor;def apply_critical(value)
  equips.inject(super){|v,e|e ? v*e.cridef : v}
end;end#装备备注<crd 90>受到的暴击伤害变为原来的0.9倍,乘法叠加
[/pre]
用头画头像,用脚写脚本
回复

使用道具 举报

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

本版积分规则

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

在本版发帖返回顶部