EXECUTION_SUB_STATE_GRAB <- 0 EXECUTION_SUB_STATE_GRAB_EX <- 1 EXECUTION_SUB_STATE_TURNOVER <- 2 EXECUTION_SUB_STATE_RUN <- 3 EXECUTION_SUB_STATE_LAST <- 4 EXECUTION_SUB_STATE_FAILED <- 5 TEST_MODE_EXCUTION <- DEBUG; EXC_READY_FOR_THROW <- 0; function sendSubState_Execution(obj,subState) { if(!obj) return; if(obj.isMyControlObject()) { obj.sq_IntVectClear(); obj.sq_IntVectPush(subState); // substate撮? obj.sq_addSetStatePacket(STATE_EXECUTION, STATE_PRIORITY_USER, true); } } //------------------------------------------------------------------------------ // 籀?擎 学葆啪桧虽煎 亵瞰胀棻..斜楝嘎煎 学葆啪桧虽 comsume睡碟击 籀?缣 ?热?蒂 卫面捡?栖棻.. function IsEnableExecution(obj) { if(!obj) return false; //if(TEST_MODE_EXCUTION) // return true; //if(!isInDevilStrike(obj)) return false; if(!isInDevilStrikeSkill(obj)) return false; local appendage = obj.GetSquirrelAppendage("Appendage/Character/ap_avenger_devilstrike.nut"); // 等网蝶?塭桧醴 横?蛤虽 if(!appendage) return false; print("appendage.sq_var.size_vector():" + appendage.sq_var.size_vector()); if(appendage.sq_var.size_vector() > 1) { // 7. 学葆啪桧虽 模赅榆 local skillLevel = sq_GetSkillLevel(obj, SKILL_EXECUTION); local consumeValue = sq_GetLevelData(obj, SKILL_EXECUTION, 7, skillLevel); //DS_APEND_MAX_GAUGE <- 0 // 譆渠 学葆啪桧虽 热纂 //DS_APEND_GAUGE <- 1 // ?营 学 local devil_gauge = appendage.sq_var.get_vector(DS_APEND_GAUGE); // gauge index 0 if(devil_gauge >= consumeValue) { consumeDevilGauge(obj, consumeValue); // 学葆啪桧虽蒂 还罹鄹栖棻.. return true; } else { obj.startCantUseSkillWarning(); if (obj.isMessage()) { sq_AddMessage(29002); // 29002>学葆啪桧虽陛 睡褶?栖棻. } return false; } } return false; } function onEndState_Execution(obj, newState) { if(newState != STATE_EXECUTION) removeAllExcutionAppendage(obj); } // 蝶鉴 撮睡嫦翕 亵勒击 虏菟横舆朝 ?热殓栖棻.. 嫦翕 亵勒 state朝 桧嘐 模蝶缣怃 掘?肾横 毡蝗栖棻. 桧够缣怃 useskill娄 setstate蒂 虽姜?舆贼 腌栖棻. function checkExecutableSkill_Execution(obj) { if(!obj) return false; local b_useskill = obj.sq_IsUseSkill(SKILL_EXECUTION); if(b_useskill) { if(IsEnableExecution(obj)) { // 学葆啪桧虽煎 籀?击 噩 热 毡蝗栖棻.. sendSubState_Execution(obj,EXECUTION_SUB_STATE_GRAB); return true; } } return false; } // 蝶鉴嬴桧夔 ?撩? 亵勒击 评虽朝 ?热殓栖棻. true蒂 葬欐?贼 蝶鉴 嬴桧夔桧 ?撩?陛 腌栖棻. (嫦翕亵勒 state朝 模蝶缣怃 籀葬腌栖棻.) function checkCommandEnable_Execution(obj) { //橾奁 鼻?缣怃 绿?撩? 卫监棻.. 桧匙击 ?撩? 卫郦朝 钦啗朝 螃煎虽.. 渗褐-陕撩击 ?朝 钦啗缣怃 殓栖棻. //if(TEST_MODE_EXCUTION) // return true; return false; } //------------------------------------------------------------------------------ //isCheckHitCollision谛 checkHit朝 ?问 羹觼蒂 鼻渠寞桧 嬴棋 顶陛 ?捡 ?唳办缣 噙樯棻. pvp缣摹 鼻渠寞桧 ?问羹觼蒂 ?贼 拟港卫除桧 替溥 蝶鉴桧 警蜗肾朝 唳办陛 毡晦 阳侥. function onIsCheckHitCollision_Execution(obj,damager) { local subState = obj.getSkillSubState(); if(subState == EXECUTION_SUB_STATE_GRAB) //横菸暧 掏栋 pvp缣怃 罗颤 褒? 虞晦 嫔?. return obj.isMyControlObject(); //晦狱瞳戏烦 釭暧 螃粽薛?陛 嬴栖贼 false棻. 罹晦怃 false蒂 ?啪 肾贼 釭暧 螃粽薛? 樯虽 念娄陛 葬欐胀棻. return (damager && damager.isMyControlObject()); } function isForceHitCheck_Execution(obj) { if(obj.isMyControlObject()) { local subState = obj.getSkillSubState(); if(subState == EXECUTION_SUB_STATE_GRAB) { //横菸暧 掏栋 pvp缣怃 罗颤 褒? 虞晦 嫔?. return true; } } return false; } // state蒂 撮??坚 籀挤戏煎 菟横螃啪 腌栖棻. 陕谦 葬模蝶蒂 撮??栖棻. function onSetState_Execution(obj, state, datas, isResetTimer) { if(!obj) return; // 怃粽 蝶才桧? 扑姜 local sq_var = obj.getVar(); local subState = obj.sq_getVectorData(datas, 0); obj.setSkillSubState(subState); local posX = obj.getXPos(); local posY = obj.getYPos(); local posZ = obj.getZPos(); sq_var.clear_vector(); // als缣怃 create draw only object 蒂 跤噙晦 阳侥缣 ?溯歜 郦 ?楚斜煎 桧辨?啊蝗栖棻.. sq_var.push_vector(0); // index : 0 sq_var.push_vector(0); // index : 1 sq_var.push_vector(0); // index : 2 sq_var.push_vector(0); // index : 3 sq_var.push_vector(0); // index : 4 sq_var.push_vector(0); // index : 5 local ani = null; // 蝶监嬴夥颤 阳侥缣 getcustomani蒂 桧辨?虽 跤?栖棻.. 瞪睡 谖睡缣怃 拥栖诡桧暮击 煎注?怃 陛螳褫栖棻.. if(subState == EXECUTION_SUB_STATE_GRAB) { obj.sq_stopMove(); //obj.sq_setCurrentAnimation(CUSTOM_ANI_EXC_GRAB); ani = obj.getVar().GetAnimationMap("EXC_GRAB", "Character/Priest/Animation/execution/grab.ani"); // 蝶监嬴夥颤 阳侥缣 谖睡缣怃 拥栖诡桧暮击 陛虽坚 谛捡 ?栖棻.. obj.setCurrentAnimation(ani); obj.sq_setCurrentAttackInfo(CUSTOM_ATTACKINFO_EXCUTION_1); obj.sq_PlaySound("PR_EXECUTION_READY"); sq_var.setBool(EXC_READY_FOR_THROW,false); } else if(subState == EXECUTION_SUB_STATE_GRAB_EX) { obj.sq_stopMove(); //obj.sq_setCurrentAnimation(CUSTOM_ANI_EXC_GRAB_EX); ani = obj.getVar().GetAnimationMap("EXC_GRAB_EX", "Character/Priest/Animation/execution/grabEx.ani"); // 蝶监嬴夥颤 阳侥缣 谖睡缣怃 拥栖诡桧暮击 陛虽坚 谛捡 ?栖棻.. obj.setCurrentAnimation(ani); obj.sq_setCurrentAttackInfo(CUSTOM_ATTACKINFO_EXCUTION_2); obj.sq_setAttackPowerWithPassive(SKILL_EXECUTION,state, 0,-1,1.0); // 0廓 樯策蝶 奢问溘 虽姜 } else if(subState == EXECUTION_SUB_STATE_TURNOVER) { //obj.sq_setCurrentAnimation(CUSTOM_ANI_EXC_TURNOVER); ani = obj.getVar().GetAnimationMap("EXC_TURNOVER", "Character/Priest/Animation/execution/turnOver.ani"); // 蝶监嬴夥颤 阳侥缣 谖睡缣怃 拥栖诡桧暮击 陛虽坚 谛捡 ?栖棻.. obj.setCurrentAnimation(ani); local sizeRate = obj.sq_getLevelData(3); local explosionSizeRate = sizeRate.tofloat()/100.0; local pAni = obj.sq_getCurrentAni(); pAni.applyBoundingBoxRate(explosionSizeRate,0,0); // 醱问? 彰嫔 瞳辨 obj.sq_setCurrentAttackInfo(CUSTOM_ATTACKINFO_EXCUTION_3); local sq_var = obj.getVar(); local i=0; local objectsSize = sq_var.get_obj_vector_size(); for(;i= 0 && !sq_var.get_vector(0)) { sqr_CreatePooledObject(obj, "Effect/Animation/execution/run/26_dust_a_normal.ani", posX, posY + 50, posZ, dir); sq_var.set_vector(0, 1); } if(frmIndex >= 1 && !sq_var.get_vector(1)) { sqr_CreatePooledObject(obj, "Effect/Animation/execution/run/1_dust_a_normal.ani", posX, posY - 1, posZ, dir); sq_var.set_vector(1, 1); } if(frmIndex >= 2 && !sq_var.get_vector(2)) { sqr_CreatePooledObject(obj, "Effect/Animation/execution/run/26_dust_a_normal.ani", posX, posY + 50, posZ, dir); sq_var.set_vector(2, 1); } if(frmIndex >= 3 && !sq_var.get_vector(3)) { sqr_CreatePooledObject(obj, "Effect/Animation/execution/run/1_dust_a_normal.ani", posX, posY - 1, posZ, dir); sq_var.set_vector(3, 1); } if(frmIndex >= 4 && !sq_var.get_vector(4)) { sqr_CreatePooledObject(obj, "Effect/Animation/execution/run/26_dust_a_normal.ani", posX, posY + 50, posZ, dir); sq_var.set_vector(4, 1); } if(frmIndex >= 5 && !sq_var.get_vector(5)) { sqr_CreatePooledObject(obj, "Effect/Animation/execution/run/1_dust_a_normal.ani", posX, posY - 1, posZ, dir); sq_var.set_vector(5, 1); } // } else if(subState == EXECUTION_SUB_STATE_LAST) { //[use animation] `../../Effect/Animation/execution/run/26_dust_a_normal.ani` `3` //[use animation] `../../Effect/Animation/execution/run/1_dust_a_normal.ani` `2` //[create draw only object] 3 `3` 60 50 0 //[create draw only object] 1 `3` 30 50 0 //[create draw only object] 0 `2` 30 -1 0 //[create draw only object] 2 `2` 60 -1 0 // if(frmIndex >= 0 && !sq_var.get_vector(0)) { local dstX = sq_GetDistancePos(posX, obj.getDirection(), 30); sqr_CreatePooledObject(obj, "Effect/Animation/execution/run/1_dust_a_normal.ani", dstX, posY - 1, posZ, obj.getDirection()); sq_var.set_vector(0, 1); } if(frmIndex >= 0 && !sq_var.get_vector(4)) { local dstX = sq_GetDistancePos(posX, obj.getDirection(), 90); sqr_CreatePooledObject(obj, "Effect/Animation/execution/last/drawOnly/drawOnlyBase.ani", dstX, posY + 1, posZ, obj.getDirection()); sq_var.set_vector(4, 1); } if(frmIndex >= 1 && !sq_var.get_vector(1)) { local dstX = sq_GetDistancePos(posX, obj.getDirection(), 30); sqr_CreatePooledObject(obj, "Effect/Animation/execution/run/26_dust_a_normal.ani", dstX, posY + 50, posZ, obj.getDirection()); sq_var.set_vector(1, 1); } if(frmIndex >= 2 && !sq_var.get_vector(2)) { local dstX = sq_GetDistancePos(posX, obj.getDirection(), 60); sqr_CreatePooledObject(obj, "Effect/Animation/execution/run/1_dust_a_normal.ani", dstX, posY - 1, posZ, obj.getDirection()); sq_var.set_vector(2, 1); } if(frmIndex >= 3 && !sq_var.get_vector(3)) { local dstX = sq_GetDistancePos(posX, obj.getDirection(), 60); sqr_CreatePooledObject(obj, "Effect/Animation/execution/run/26_dust_a_normal.ani", dstX, posY + 50, posZ, obj.getDirection()); sq_var.set_vector(3, 1); } } if(obj.isMyControlObject()) { if(subState == EXECUTION_SUB_STATE_RUN) { local pAni = obj.sq_getCurrentAni(); local currentT = pAni.getCurrentTime(); if (obj.sq_timer_.isOnEvent(currentT) == true) { sendSubState_Execution(obj,EXECUTION_SUB_STATE_LAST); } obj.setSkillCommandEnable(SKILL_EXECUTION,true); local b_useskill = obj.sq_IsEnterSkill(SKILL_EXECUTION); if(b_useskill != -1) sendSubState_Execution(obj,EXECUTION_SUB_STATE_LAST); } } } function onTimeEvent_Execution(obj, timeEventIndex, timeEventCount) { if(obj.isMyControlObject()) { local subState = obj.getSkillSubState(); if(subState == EXECUTION_SUB_STATE_RUN) { local power = obj.sq_getPowerWithPassive(SKILL_EXECUTION, STATE_EXECUTION, 4,-1,1.0); sq_createAttackObjectWithPath(obj, "Character/Priest/Effect/Animation/execution/run/runDamage.ani","PassiveObject/Character/Priest/AttackInfo/excutionBox.atk",false,power,100,0,0,0); } } return false; // true贼 属寥 酝钦 } function isExcutionGrabable(obj) { local sq_var = obj.getVar(); local i=0; local objectsSize = sq_var.get_obj_vector_size(); for(;i 0) { //?问 螃粽薛?陛 ?涡绾桧贼 EXECUTION_SUB_STATE_TURNOVER 嬴栖贼 EXECUTION_SUB_STATE_GRAB_EX if(isExcutionGrabable(obj)) { sendSubState_Execution(obj,EXECUTION_SUB_STATE_TURNOVER); } else { sendSubState_Execution(obj,EXECUTION_SUB_STATE_GRAB_EX); } } else { sendSubState_Execution(obj,EXECUTION_SUB_STATE_FAILED); } } else if(subState == EXECUTION_SUB_STATE_TURNOVER) { sendSubState_Execution(obj,EXECUTION_SUB_STATE_RUN); local gap = obj.sq_getIntData(SKILL_EXECUTION,4); obj.setTimeEvent(0,gap,0,true); } else if(subState == EXECUTION_SUB_STATE_RUN) { sendSubState_Execution(obj,EXECUTION_SUB_STATE_LAST); } else if(subState == EXECUTION_SUB_STATE_LAST || subState == EXECUTION_SUB_STATE_GRAB_EX || subState == EXECUTION_SUB_STATE_FAILED) //虞颤 部釭贼 stand { obj.sq_addSetStatePacket(STATE_STAND, STATE_PRIORITY_USER, false); removeAllExcutionAppendage(obj); } } // onAttack 属寥?热 殓栖棻 function onAttack_Execution(obj, damager, boundingBox) { local sq_var = obj.getVar(); local subState = obj.getSkillSubState(); if(subState == EXECUTION_SUB_STATE_GRAB) { if(!CNSquirrelAppendage.sq_IsAppendAppendage(damager,"Appendage/Character/executionAppendage.nut")) // 桧嘐 称横 毡朝 拥菟擎 称桧虽 强朝棻. { local masterAppendage = CNSquirrelAppendage.sq_AppendAppendage(damager, obj, SKILL_EXECUTION, false, "Appendage/Character/executionAppendage.nut", true); if(masterAppendage) { sq_HoldAndDelayDie(damager, obj, true, true, true, 300, 300, ENUM_DIRECTION_NEUTRAL , masterAppendage); damager.setCurrentDirection(sq_GetOppositeDirection(obj.getDirection())); sq_var.push_obj_vector(damager); } } } local isLastThrowMode = sq_var.getBool(EXC_READY_FOR_THROW); if(isLastThrowMode && damager) CNSquirrelAppendage.sq_RemoveAppendage(damager, "Appendage/Character/executionAppendage.nut"); } function onKeyFrameFlag_Execution(obj,flagIndex) { local sq_var = obj.getVar(); local i=0; local objectsSize = sq_var.get_obj_vector_size(); // 赅苌 横?蛤虽缣 瞪殖 for(;i