|
楼主 |
发表于 2024-9-17 16:27:02
|
显示全部楼层
function onAttack_PassiveObjectEtc(passiveobj, damager, bounding_box, is_stuck)
{
local PassiveObjectIndex = passiveobj.getPassiveObjectIndex();
local attackInfo = sq_GetCurrentAttackInfo(passiveobj);
local parentChr = sq_GetCNRDObjectToSQRCharacter(passiveobj.getTopCharacter());
local job = sq_getJob(parentChr);
//print("PassiveObjectIndex:"+passiveobj.getPassiveObjectIndex());
if(sq_getJob(parentChr) == 0 && sq_getGrowType(parentChr) == 1 && sq_GetSkillLevel(parentChr, 13) >0 && PassiveObjectIndex != 48081 && parentChr.getWeaponSubType() == 1 )
{
local probability = sq_getRandom(1, 1000);
local attackInfo = sq_GetCurrentAttackInfo(parentChr);//角色;特效
local skill_level = sq_GetSkillLevel(parentChr, 13);//技能等级
local activestatus = sq_GetLevelData(parentChr,13, 14, skill_level);//异常概率
local activestatusLv = sq_GetLevelData(parentChr,13, 11, skill_level);//异常等級
local activestatusT = sq_GetLevelData(parentChr,13, 12, skill_level);//异常時間
local activestatusAtk = sq_GetLevelData(parentChr,13, 13, skill_level);;//异常傷害
if(probability <= activestatus)
{
sq_SetChangeStatusIntoAttackInfoWithEtc(sq_GetCurrentAttackInfo(passiveobj) , 1, ACTIVESTATUS_BLEEDING, 100, activestatusLv, activestatusT, activestatusAtk,1);//出血
}
}
} |
|