|
可能0.1倍伤害太低了,可以调整下面nut实现想要的伤害“
狗哥神迹角色伤害缩放 自己被揍不影响
复制下面代码替换sqr/ui/ap/ap_monster.nut中的同名函数
DAMAGE_SCALE_FACTOR <- 0.1 // 缩放为1/10
function onApplyHpDamage_appendage_monster(appendage, newHpDamage, attacker)
{
if(!appendage) return;
if(!attacker) return;
local monster = appendage.getParent();
monster = sq_GetCNRDObjectToActiveObject(monster);
if(!monster) return;
if(appendage.getParent().getTeam() == attacker.getTeam())
return newHpDamage;
if(appendage && newHpDamage > 0)
{
local addHpDamage = applyAddHpDamage(appendage,newHpDamage);
appendage.getVar("addHpDamage").setInt(0,(DAMAGE_SCALE_FACTOR * addHpDamage.tofloat()).tointeger());
appendage.getVar("newHpDamage").setInt(0,(DAMAGE_SCALE_FACTOR * newHpDamage.tofloat()).tointeger());
if(appendage.getVar("atkCount").getInt(0) == 1)
NOMAL_ATTACK_FLAG = 1;
else
appendage.getVar("atkCount").setInt(0,1);
}
local scaledDamage = (DAMAGE_SCALE_FACTOR * newHpDamage.tofloat()).tointeger();
return scaledDamage;
}
DAMAGE_SCALE_FACTOR <- 0.1 // 缩放为1/10 调整DAMAGE_SCALE_FACTOR <- 后面的数值 |
|