被动技能写法

function ProcPassiveSkill_Swordman(obj, skill_index, skill_level)
{
if (skill_index == 247)//技能ID
{
if(skill_level > 0)
{
local appendage = CNSquirrelAppendage.sq_AppendAppendage(obj, obj, skill_index, false, “”, true);
 
if(appendage)
{
local PHYSICAL_ATTACK = sq_GetLevelData(obj, skill_index, SKL_LVL_COLUMN_IDX_2, skill_level);
local MAGICAL_ATTACK = sq_GetLevelData(obj, skill_index, SKL_LVL_COLUMN_IDX_3, skill_level);
local PHYSICAL_DEFENSE = sq_GetLevelData(obj, skill_index, SKL_LVL_COLUMN_IDX_4, skill_level);
local MAGICAL_DEFENSE = sq_GetLevelData(obj, skill_index, SKL_LVL_COLUMN_IDX_5, skill_level);
 
local change_appendage = appendage.sq_getChangeStatus(“magicalAtkHit”);
 
 
PHYSICAL_ATTACK = PHYSICAL_ATTACK / 2
MAGICAL_ATTACK = MAGICAL_ATTACK / 2
PHYSICAL_DEFENSE = PHYSICAL_DEFENSE / 2
 
 
print( “PHYSICAL_ATTACK:” + PHYSICAL_ATTACK);
print( “MAGICAL_ATTACK:” + MAGICAL_ATTACK);
print( “PHYSICAL_DEFENSE:” + PHYSICAL_DEFENSE);
print( “MAGICAL_DEFENSE:” + MAGICAL_DEFENSE);
 
 
if(!change_appendage) 
{
change_appendage = appendage.sq_AddChangeStatus(“magicalAtkHit”,obj, obj, 2, CHANGE_STATUS_TYPE_PHYSICAL_ATTACK  , false, PHYSICAL_ATTACK );
change_appendage = appendage.sq_AddChangeStatus(“magicalAtkHit”,obj, obj, 3, CHANGE_STATUS_TYPE_MAGICAL_ATTACK  , false, MAGICAL_ATTACK );
change_appendage = appendage.sq_AddChangeStatus(“magicalAtkHit”,obj, obj, 4, CHANGE_STATUS_TYPE_PHYSICAL_DEFENSE  , false, PHYSICAL_DEFENSE );
change_appendage = appendage.sq_AddChangeStatus(“magicalAtkHit”,obj, obj, 5, CHANGE_STATUS_TYPE_MAGICAL_DEFENSE  , false, MAGICAL_DEFENSE );
}
 
 
if(change_appendage)
{
change_appendage.clearParameter();
change_appendage.addParameter(CHANGE_STATUS_TYPE_PHYSICAL_ATTACK, false, PHYSICAL_ATTACK.tofloat());
change_appendage.addParameter(CHANGE_STATUS_TYPE_MAGICAL_ATTACK, false, MAGICAL_ATTACK.tofloat());
change_appendage.addParameter(CHANGE_STATUS_TYPE_PHYSICAL_DEFENSE, false, PHYSICAL_DEFENSE.tofloat());
change_appendage.addParameter(CHANGE_STATUS_TYPE_MAGICAL_DEFENSE, false, MAGICAL_DEFENSE.tofloat());
}
}
}
}
 
}

给TA打赏
共{{data.count}}人
人已打赏
技能教程教学资源

超详细添加导入新技能教程(新手向)-BY墨林

2024-12-18 18:23:14

地下城与勇士

你被命运硬币劈过吗?DNF那些有趣的道具

2023-11-20 17:03:44

0 条回复 A文章作者 M管理员
    暂无讨论,说说你的看法吧
个人中心
购物车
优惠劵
今日签到
有新私信 私信列表
搜索