Project1

标题: 关于暴击的脚本求助 [打印本页]

作者: 真の玛娜君    时间: 2019-9-30 11:07
标题: 关于暴击的脚本求助
本帖最后由 真の玛娜君 于 2019-9-30 19:32 编辑

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


编辑:似乎是我搞错了,暴击率和暴击闪避的关系不是我想的那样。。。
# item.damage.critical ? user.cri * (1 - cev) : 0
作者: KB.Driver    时间: 2019-9-30 11:07
RUBY 代码复制
  1. class RPG::EquipItem;def cridef;
  2.   @note=~ /\<crd (\d+)\>/ ? $1.to_i/100.0 : 1;end;end
  3. class Game_Actor;def apply_critical(value)
  4.   equips.inject(super){|v,e|e ? v*e.cridef : v}
  5. end;end#装备备注<crd 90>受到的暴击伤害变为原来的0.9倍,乘法叠加





欢迎光临 Project1 (https://rpg.blue/) Powered by Discuz! X3.1