【圣狐天国】第五世代伤害整合NUT

相比较上一世代多了手搓和战斗力系统(你也可以理解为110版本的攻击强化属性数值是每100点增加1%的伤害)
 
EMPTY_SLOT_NUMBER <- 0
 
function setEmptySlotNumber(obj)
{
local id = obj.sq_GetIntData(169, 2);
if(id >= 1)
{
local skillmgr = obj.getSkillManager();
local emptySlotNum = 0;
for(local i=0;i<6;++i)
{
local skill = skillmgr.getSkill(i);
if(!skill)
emptySlotNum+=0.05;
}
for(local i=198;i<204;++i)
{
local skill = skillmgr.getSkill(i);
if(!skill)
emptySlotNum+=0.05;
}
EMPTY_SLOT_NUMBER = emptySlotNum;
}
else
EMPTY_SLOT_NUMBER = 0;
}
 
function getCurrentModuleDamageRate(obj)
{
if (!obj)
return 1.0;
 
setEmptySlotNumber(obj)
 
local inr = obj.sq_GetIntData(174, 1);
local inrdam = inr.tofloat()/100;
inrdam = inrdam.tofloat();
 
local cri = obj.sq_GetIntData(174, 2);
local cridam = cri.tofloat()/100;
cridam = cridam.tofloat() + (cridam.tofloat() * inrdam.tofloat());
 
local skl = obj.sq_GetIntData(174, 3);
local skldam = skl.tofloat()/100;
skldam = skldam.tofloat() + (skldam.tofloat() * inrdam.tofloat());
 
local abs = obj.sq_GetIntData(174, 4);
local absdam = abs.tofloat()/100;
absdam = absdam.tofloat() + (absdam.tofloat() * (inrdam.tofloat() + cridam.tofloat()));
 
local fin = obj.sq_GetIntData(174, 5);
local findam = fin.tofloat()/100;
findam = findam.tofloat() + (findam.tofloat() * (inrdam.tofloat() + cridam.tofloat() + skldam.tofloat()));
 
local emp = obj.sq_GetIntData(174, 6);
local empdam =  emp.tofloat()/100;
empdam = empdam.tofloat() + (empdam.tofloat() * (inrdam.tofloat() + cridam.tofloat() + absdam.tofloat()));
 
local skill_level = sq_GetSkillLevel(obj, 254);
local batte = sq_GetLevelData(obj,254, 0, skill_level);
local battedam =  batte.tofloat()/1000;
battedam = battedam.tofloat();
 
local damrate = (inrdam.tofloat() + cridam.tofloat() + skldam.tofloat() + absdam.tofloat() + findam.tofloat() + empdam.tofloat() + battedam.tofloat() + EMPTY_SLOT_NUMBER.tofloat());
damrate = 1.0 + damrate.tofloat();
 
return damrate.tofloat();
}
© 版权声明
THE END
喜欢就支持一下吧
点赞4 分享
评论 抢沙发

请登录后发表评论

    暂无评论内容