|
楼主 |
发表于 2025-3-10 21:07:23
|
显示全部楼层
此时我们已可以生成dll并挂载后,在pvf内部调用我们注册的sqx_GetCharacterStrength()与sqx_GetCharacterIntelligence();
并通过其获取的值在ap中来完成简单的力智平衡,以下代码为我在战灵潜能的procap中加入
local currentStrength = sqx_GetCharacterStrength();
local currentIntelligence = sqx_GetCharacterIntelligence();
local change_appendage = appendage.sq_getChangeStatus("zhanlingqianneng");
if(!change_appendage)
{change_appendage = appendage.sq_AddChangeStatus("zhanlingqianneng",obj, obj, 0, CHANGE_STATUS_TYPE_PHYSICAL_ATTACK, false, 0);}
if(change_appendage)
{if(currentStrength < currentIntelligence )
{
local delta = (currentIntelligence - currentStrength).tofloat(); change_appendage.addParameter(CHANGE_STATUS_TYPE_PHYSICAL_ATTACK, false, delta);
}
else if(currentStrength > currentIntelligence)
{local delta = (-currentIntelligence + currentStrength).tofloat();change_appendage.addParameter(CHANGE_STATUS_TYPE_MAGICAL_ATTACK, false, delta);
}
} |
|