alianlord 发表于 2020-2-9 12:06
def eval(a, b, v)
[Kernel.eval(@formula), 0].max * sign rescue 0
end
alianlord 发表于 2020-2-9 12:08
class RPG::UsableItem::Damage
def initialize
@type = 0
alianlord 发表于 2020-2-9 14:36
我大概猜了一下,是不是这个意思……
result = Kernel.eval(@formula)
"当方法错误时,就返回0 "
欢迎光临 Project1 (https://rpg.blue/) | Powered by Discuz! X3.1 |