Project1

标题: 多个百分比扣血技能怎么写脚本 [打印本页]

作者: y967    时间: 2016-2-12 10:48
标题: 多个百分比扣血技能怎么写脚本
设置三个百分比扣血技能,第一个是当前生命16%,后面是20%,25%

这个代码为什么出错,怎么写呢?

RUBY 代码复制
  1. case skill.id
  2.       when 92 #81号技能
  3.            self.damage = [self.hp / 6,20000].min
  4.          else
  5.       when 303 #81号技能
  6.            self.damage = [self.hp / 5,30000].min
  7.          else
  8.       when 310 #81号技能
  9.            self.damage = [self.hp / 4,50000].min
  10.             else
  11.            self.damage = power * rate / 20
  12.          end

作者: SailCat    时间: 2016-2-13 17:05
把前面两个else删掉




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