本帖最后由 VIPArcher 于 2015-12-28 17:55 编辑
F12试了一下发现数组好像没有最大值和最小值的方法。那就自己瞎糊一个呗Array.prototype.min=function(){ return Math.min.apply(Math,this); } Array.prototype.max=function(){ return Math.max.apply(Math,this); }
Array.prototype.min=function(){
return Math.min.apply(Math,this);
}
Array.prototype.max=function(){
return Math.max.apply(Math,this);
}
然后公式这样写- [b.mhp*0.6,[a.atk * 10 - b.def * 8,b.mhp*0.1].max()].min()
复制代码 未测试 |