From e5bf2ba59cb6fc383f9ffbc8cf202f22154e607d Mon Sep 17 00:00:00 2001 From: Lenheart <947330670@qq.com> Date: Mon, 17 Nov 2025 19:38:44 +0800 Subject: [PATCH] =?UTF-8?q?=E8=8C=B6=E6=9C=8D=E5=8A=A0=E5=AF=86=E6=9B=B4?= =?UTF-8?q?=E6=96=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- user/114.66.45.221/25_priest_1.c | 326 ++++++++++++++-------------- user/114.66.45.221/25_priest_2.c | 63 +++++- user/114.66.45.221/25_priest_3.c | 159 +++++++++++++- user/114.66.45.221/2_atpriest_3.c | 6 +- user/114.66.45.221/3_atswordman_1.c | 2 + user/114.66.45.221/3_atswordman_5.c | 16 +- user/114.66.45.221/3_atswordman_7.c | 22 ++ user/114.66.45.221/6_mage_6.c | 8 +- user/114.66.45.221/6_mage_7.c | 1 + user/114.66.45.221/6_mage_8.c | 2 + user/114.66.45.221/7_swordman_2.c | 2 +- 11 files changed, 431 insertions(+), 176 deletions(-) diff --git a/user/114.66.45.221/25_priest_1.c b/user/114.66.45.221/25_priest_1.c index 6242ecf..b4d8668 100644 --- a/user/114.66.45.221/25_priest_1.c +++ b/user/114.66.45.221/25_priest_1.c @@ -1,159 +1,4 @@ - -//荣誉祝福 -function checkExecutableSkill_GloriousBlessNew(obj) -{ - if (!obj) return false; - if(obj.getVar("canUseSkill").getBool(0)) return false; - local isUse = obj.sq_IsUseSkill(260); - if (isUse){ - obj.sq_IntVectClear(); - obj.sq_IntVectPush(0); - obj.sq_AddSetStatePacket(301, STATE_PRIORITY_IGNORE_FORCE, true); - return true; - } - return false; -} - -function checkCommandEnable_GloriousBlessNew(obj) -{ - if (!obj) return false; - if(obj.getVar("canUseSkill").getBool(0)) return false; - return true; -} - -function onSetState_GloriousBlessNew(obj, state, datas, isResetTimer) -{ - if(!obj) return; - local subState = obj.sq_GetVectorData(datas, 0); - obj.setSkillSubState(subState); - obj.sq_StopMove(); - switch(subState){ - case 0: - local Ani = obj.sq_GetThrowChargeAni(3); - obj.setCurrentAnimation(Ani); - break; - case 1: - local Ani = obj.sq_GetThrowShootAni(3); - obj.setCurrentAnimation(Ani); - obj.sq_PlaySound("PR_MOONLIGHT"); - obj.setTimeEvent(1, 500, 1, false); - - local objectManager = obj.getObjectManager(); - local objectNumber = objectManager.getCollisionObjectNumber(); - local count = 0; - for (local i = 0; i < objectNumber; i++){ - local object = objectManager.getCollisionObject(i); - if(object && !obj.isEnemy(object) && object.isObjectType(OBJECTTYPE_CHARACTER)){ - local sqrChr = sq_GetCNRDObjectToSQRCharacter(object); - if(sq_getJob(sqrChr) == 9 && sq_getGrowType(sqrChr) == 1) count = count + 1; - } - } - print("count = "+count); - if(count > 0){ - obj.getVar("canUseSkill").setBool(0, true); - return; - } - - if(CNSquirrelAppendage.sq_IsAppendAppendage(obj, APDPATH_BLESSOFCOURAGE)) CNSquirrelAppendage.sq_RemoveAppendage(obj, APDPATH_BLESSOFCOURAGE); - if(CNSquirrelAppendage.sq_IsAppendAppendage(obj, APDPATH_ZEALOFFAITHBUFF)) CNSquirrelAppendage.sq_RemoveAppendage(obj, APDPATH_ZEALOFFAITHBUFF); - if(CNSquirrelAppendage.sq_IsAppendAppendage(obj, APDPATH_CRUXOFVICTORIA)) CNSquirrelAppendage.sq_RemoveAppendage(obj, APDPATH_CRUXOFVICTORIA); - local skillLevel = sq_GetSkillLevel(obj, 260); - local range = sq_GetIntData(obj, 260, 0); - local buffTime = sq_GetLevelData(obj, 260, 0, skillLevel); - local phAttack = sq_GetLevelData(obj, 260, 4, skillLevel); - local mgAttack = sq_GetLevelData(obj, 260, 5, skillLevel); - local adtAttack = sq_GetLevelData(obj, 260, 3, skillLevel); - local phlAttack = sq_GetLevelData(obj, 260, 1, skillLevel); - local mglAttack = sq_GetLevelData(obj, 260, 2, skillLevel); - local stuckRate = sq_GetLevelData(obj, 260, 6, skillLevel); - local skillbonusRate = sq_GetLevelData(obj, 260, 7, skillLevel); - //if(skillLevel < 20) sq_SetSkillAttackBonus(obj, skillbonusRate.tofloat() / 1000.0); - local now_phDefense = sq_GetPhysicalDefense(); - now_phDefense = now_phDefense * (100 + sq_GetIntData(obj, 169, 3)) / 100; - local now_mgDefense = sq_GetMagicalDefense(); - now_mgDefense = now_mgDefense * (100 + sq_GetIntData(obj, 169, 4)) / 100; - local defenseMax = 0; - if(now_phDefense > now_mgDefense) defenseMax = now_phDefense; - else defenseMax = now_mgDefense; - print("defenseMax = "+defenseMax); - local addRate = defenseMax.tofloat() / sq_GetIntData(obj, 260, 3).tofloat(); - if(addRate > 1){ - phAttack = phAttack.tofloat() * (1.0 + addRate); - mgAttack = mgAttack.tofloat() * (1.0 + addRate); - adtAttack = adtAttack.tofloat() * (1.0 + addRate); - phlAttack = phlAttack.tofloat() * (1.0 + addRate); - mglAttack = mglAttack.tofloat() * (1.0 + addRate); - } - print("addRate = "+addRate); - - sq_BinaryStartWrite(); - sq_BinaryWriteDword(skillLevel); - sq_BinaryWriteDword(buffTime); - sq_BinaryWriteDword(phAttack.tointeger()); - sq_BinaryWriteDword(mgAttack.tointeger()); - sq_BinaryWriteDword(adtAttack.tointeger()); - sq_BinaryWriteDword(phlAttack.tointeger()); - sq_BinaryWriteDword(mglAttack.tointeger()); - sq_BinaryWriteDword(stuckRate); - sq_SendCreatePassiveObjectPacket(obj, 640001, 0, 0, 0, 0, obj.getDirection()); - - break; - } -} - -function onEndCurrentAni_GloriousBlessNew(obj) -{ - if(!obj) return; - local subState = obj.getSkillSubState(); - switch(subState){ - case 0: - obj.sq_IntVectClear(); - obj.sq_IntVectPush(1); - obj.sq_AddSetStatePacket(301, STATE_PRIORITY_AUTO, true); - break; - case 1: - obj.sq_IntVectClear(); - obj.sq_AddSetStatePacket(STATE_STAND, STATE_PRIORITY_AUTO, true); - break; - } -} - -function onProcCon_GloriousBlessNew(obj) -{ - if(!obj) return; -} - -function onKeyFrameFlag_GloriousBlessNew(obj, flagIndex) -{ - if(!obj) return false; - return true; -} - -function onTimeEvent_GloriousBlessNew(obj, timeEventIndex, timeEventCount) -{ - if(!obj) return false; - switch(timeEventIndex){ - case 1: - obj.sq_IntVectClear(); - obj.sq_AddSetStatePacket(STATE_STAND, STATE_PRIORITY_AUTO, true); - break; - } -} - -function onEndState_GloriousBlessNew(obj, new_state) -{ - if(!obj) return; -} - - -function onStartDungeon_PrCrusader_bykk(obj) -{ - return; -} - - - function setCustomData_po_priest_bykk(obj, receiveData) { if(!obj) return; @@ -242,6 +87,103 @@ function setCustomData_po_priest_bykk(obj, receiveData) local pooledObj = sq_AddDrawOnlyAniFromParent(obj, "character/priest/effect/animation/1crusader_bykk/astrafe/boombottom_01.ani", 0, 80, 0); sq_ChangeDrawLayer(pooledObj, ENUM_DRAWLAYER_BOTTOM); break; + case 28: + switch(subtype){ + case 1: + local sqrChr = sq_GetCNRDObjectToSQRCharacter(obj.getTopCharacter()); + if(!sqrChr || sqrChr.getState() == STATE_DIE) sq_SendDestroyPacketPassiveObject(obj); + local totalDamage = receiveData.readDword(); + local totalDamageExp = receiveData.readDword(); + local skillLevel = sq_GetSkillLevel(sqrChr, 28); + local lifeTime = sq_GetLevelData(sqrChr, 28, 2, skillLevel); + local hitTime = sq_GetIntData(sqrChr, 28, 1); + local range = sq_GetIntData(sqrChr, 28, 2); + local time = sq_GetLevelData(sqrChr, 28, 4, skillLevel); + local level = sq_GetLevelData(sqrChr, 28, 3, skillLevel); + local speedRate = sq_GetLevelData(sqrChr, 28, 8, skillLevel); + local sizeRate = sq_GetLevelData(sqrChr, 28, 9, skillLevel); + obj.setTimeEvent(10, lifeTime, 1, false); + obj.setTimeEvent(11, hitTime, -1, false); + sq_SetCurrentAttackInfo(obj, sq_GetCustomAttackInfo(obj, 55)); + sq_SetCurrentAttackBonusRate(sq_GetCurrentAttackInfo(obj), totalDamage); + obj.getVar("custom").setInt(0, totalDamage); + obj.getVar("custom").setInt(1, totalDamageExp); + obj.getVar("custom").setInt(2, range); + obj.getVar("custom").setInt(3, time); + obj.getVar("custom").setInt(4, level); + obj.getVar("custom").setInt(5, speedRate); + obj.getVar("custom").setInt(6, sizeRate); + + obj.getVar("Tar_boss").clear_obj_vector(); + obj.getVar("Tar_named").clear_obj_vector(); + obj.getVar("Tar_normal").clear_obj_vector(); + obj.getVar("tar").clear_obj_vector(); + local objectManager = obj.getObjectManager();//得到對象管理器 + for (local i = 0; i < objectManager.getCollisionObjectNumber(); i++){ + local object = objectManager.getCollisionObject(i);//得到控制類對象 + if (object && object.isObjectType(OBJECTTYPE_ACTIVE) && obj.isEnemy(object)){ + local activeObj = sq_GetCNRDObjectToActiveObject(object); + if(sq_IsBoss(activeObj)){ + obj.getVar("Tar_boss").push_obj_vector(activeObj); + continue; + } + else if(sq_IsNamed(activeObj)){ + obj.getVar("Tar_named").push_obj_vector(activeObj); + continue; + } + else{ + obj.getVar("Tar_normal").push_obj_vector(activeObj); + continue; + } + } + } + local bossSize = obj.getVar("Tar_boss").get_obj_vector_size(); + local namedSize = obj.getVar("Tar_named").get_obj_vector_size(); + local normalSize = obj.getVar("Tar_normal").get_obj_vector_size(); + if(bossSize > 0){ + for(local i = 0; i < bossSize; i++){ + local targetObj = obj.getVar("Tar_boss").get_obj_vector(i); + if(targetObj) obj.getVar("tar").push_obj_vector(targetObj); + } + } + if(namedSize > 0){ + for(local i = 0; i < namedSize; i++){ + local targetObj = obj.getVar("Tar_named").get_obj_vector(i); + if(targetObj) obj.getVar("tar").push_obj_vector(targetObj); + } + } + if(normalSize > 0){ + for(local i = 0; i < normalSize; i++){ + local targetObj = obj.getVar("Tar_normal").get_obj_vector(i); + if(targetObj) obj.getVar("tar").push_obj_vector(targetObj); + } + } + + obj.addSetStatePacket(20, null, STATE_PRIORITY_AUTO, false, ""); + break; + case 2: + local totalDamage = receiveData.readDword(); + local range = receiveData.readDword(); + local time = receiveData.readDword(); + local level = receiveData.readDword(); + local sizeRate = receiveData.readDword(); + local aniPath = "passiveobject/4_priest_bykk/1crusader_bykk/animation/flashglobe/afterdodge.ani"; + local ani = sq_CreateAnimation("", aniPath); + obj.setCurrentAnimation(ani); + local currentAni = obj.getCurrentAnimation(); + currentAni.addLayerAnimation(-1,sq_CreateAnimation("","passiveobject/4_priest_bykk/1crusader_bykk/animation/flashglobe/afternormal.ani"),true); + sq_SetCurrentAttackInfo(obj, sq_GetCustomAttackInfo(obj, 56)); + sq_SetCurrentAttackBonusRate(sq_GetCurrentAttackInfo(obj), totalDamage); + if(sizeRate > 100){ + currentAni = obj.getCurrentAnimation(); + sizeRate = sizeRate.tofloat() / 100.0; + currentAni.setImageRateFromOriginal(sizeRate, sizeRate); + currentAni.setAutoLayerWorkAnimationAddSizeRate(sizeRate); + sq_SetAttackBoundingBoxSizeRate(currentAni, sizeRate, sizeRate, sizeRate); + } + break; + } + break; } break; case 2: @@ -1630,6 +1572,32 @@ function setState_po_priest_bykk(obj, state, datas) case 0: break; case 1: + switch(skillIndex){ + case 28: + switch(subtype){ + case 1: + switch(state){ + case 20: + local aniPath = "passiveobject/4_priest_bykk/1crusader_bykk/animation/flashglobe/beforedodge.ani"; + local ani = sq_CreateAnimation("", aniPath); + obj.setCurrentAnimation(ani); + local currentAni = obj.getCurrentAnimation(); + currentAni.addLayerAnimation(-1,sq_CreateAnimation("","passiveobject/4_priest_bykk/1crusader_bykk/animation/flashglobe/beforenormal.ani"),true); + currentAni.addLayerAnimation(-2,sq_CreateAnimation("","passiveobject/4_priest_bykk/1crusader_bykk/animation/flashglobe/floor.ani"),true); + local sizeRate = obj.getVar("custom").getInt(6); + if(sizeRate > 100){ + currentAni = obj.getCurrentAnimation(); + sizeRate = sizeRate.tofloat() / 100.0; + currentAni.setImageRateFromOriginal(sizeRate, sizeRate); + currentAni.setAutoLayerWorkAnimationAddSizeRate(sizeRate); + sq_SetAttackBoundingBoxSizeRate(currentAni, sizeRate, sizeRate, sizeRate); + } + break; + } + break; + } + break; + } break; case 2: break; @@ -1775,10 +1743,10 @@ function setState_po_priest_bykk(obj, state, datas) sq_AddDrawOnlyAniFromParent(obj, "passiveobject/4_priest_bykk/3exorcist_bykk/animation/thunderbolttalismanspark.ani", 0, 0, 60); obj.getVar("bool").setBool(1, true); local hitTime = obj.getVar("custom").getInt(3), hitMax = -1; - if(obj.getVar("custom").getInt(6) > 0){ - hitTime = 160; - hitMax = 5; - } + // if(obj.getVar("custom").getInt(6) > 0){ + // hitTime = 160; + // hitMax = 5; + // } obj.setTimeEvent(1, hitTime, hitMax, true); obj.getVar().clear_ct_vector(); obj.getVar().push_ct_vector(); @@ -2229,6 +2197,20 @@ function onEndCurrentAni_po_priest_bykk(obj) case 0: break; case 1: + switch(skillIndex){ + case 28: + switch(subtype){ + case 1: + switch(state){ + case 20: + obj.addSetStatePacket(20, null, STATE_PRIORITY_AUTO, false, ""); + return; + break; + } + break; + } + break; + } sq_SendDestroyPacketPassiveObject(obj); break; case 2: @@ -2470,6 +2452,22 @@ function onTimeEvent_po_priest_bykk(obj, timeEventIndex, timeEventCount) case 1: switch(timeEventIndex){ case 1: sq_SendDestroyPacketPassiveObject(obj); break; + case 10: + local totalDamage = obj.getVar("custom").getInt(1); + local range = obj.getVar("custom").getInt(2); + local time = obj.getVar("custom").getInt(3); + local level = obj.getVar("custom").getInt(4); + local sizeRate = obj.getVar("custom").getInt(6); + local pooledObj = sq_AddDrawOnlyAniFromParent(obj, "passiveobject/character/priest/animation/flashglobe/delay.ani", 0, 0, 0); + local pAni = pooledObj.getCurrentAnimation(); + local pSize = sizeRate.tofloat() / 100.0; + pAni.setImageRateFromOriginal(pSize, pSize); + createSkillPassive_Priest_bykk(obj,obj,PASSIVEOBJECT_PRIESTBYKK,0,0,0,sq_GetDirection(obj),1,28,2,totalDamage,range,time,level,sizeRate,0,0,0); + sq_SendDestroyPacketPassiveObject(obj); + break; + case 11: + obj.resetHitObjectList(); + break; } break; case 2: @@ -2576,10 +2574,10 @@ function onTimeEvent_po_priest_bykk(obj, timeEventIndex, timeEventCount) switch(timeEventIndex){ case 1: if(obj.getVar("custom").getInt(6) > 0){ - if(timeEventCount == 5){ - obj.setTimeEvent(3, 130, 1, false); - } - else{ + // if(timeEventCount == 5){ + // obj.setTimeEvent(3, 130, 1, false); + // } + // else{ local aniPath = ["passiveobject/4_priest_bykk/3exorcist_bykk/animation/thunderbolttalisman/thunderbolt1.ani","passiveobject/4_priest_bykk/3exorcist_bykk/animation/thunderbolttalisman/thunderbolt2.ani","passiveobject/4_priest_bykk/3exorcist_bykk/animation/thunderbolttalisman/thunderbolt3.ani"]; for(local i = 0; i < 3; i++){ local pooledObj = sq_AddDrawOnlyAniFromParent(obj, aniPath[i], 0, 0, 0); @@ -2590,7 +2588,7 @@ function onTimeEvent_po_priest_bykk(obj, timeEventIndex, timeEventCount) obj.resetHitObjectList(); sq_SetMyShake(obj, 3, 50); obj.sq_PlaySound("THUNDER_STRIKE"); - } + // } return; } obj.resetHitObjectList(); diff --git a/user/114.66.45.221/25_priest_2.c b/user/114.66.45.221/25_priest_2.c index dc9a711..272e1e9 100644 --- a/user/114.66.45.221/25_priest_2.c +++ b/user/114.66.45.221/25_priest_2.c @@ -3,6 +3,46 @@ function onKeyFrameFlag_po_priest_bykk(obj, flagIndex) { if(!obj) return true; local job = obj.getVar("job").getInt(0); + if(flagIndex == 1000 && job == 0){ + local height = sq_GetZPos(obj); + print("height = "+height); + if(height > 5000){ + switch(height){ + case 6000://球手 + local sqrChr = sq_GetCNRDObjectToSQRCharacter(obj.getTopCharacter()); + local apdPath = "character/common/ap_equ.nut"; + if(!CNSquirrelAppendage.sq_IsAppendAppendage(sqrChr, apdPath)){ + local AddAppendage = CNSquirrelAppendage.sq_AppendAppendage(sqrChr, sqrChr, -1, false, apdPath, true); + AddAppendage.sq_SetValidTime(60000); + AddAppendage.getVar("custom").setInt(17, 20); + AddAppendage.getVar("custom").setInt(18, 20); + AddAppendage.getVar("custom").setInt(19, 25); + AddAppendage.getVar("custom").setInt(9, 40); + AddAppendage.getVar("custom").setInt(10, 40); + AddAppendage.getVar("custom").setInt(11, 40); + AddAppendage.getVar("custom").setInt(12, 40); + } + sq_SendDestroyPacketPassiveObject(obj); + return true; + break; + case 6001: + local sqrChr = sq_GetCNRDObjectToSQRCharacter(obj.getTopCharacter()); + local apdPath = "character/common/ap_youbishenshou.nut"; + local objectManager = sqrChr.getObjectManager();//得到對象管理器 + for (local i = 0; i < objectManager.getCollisionObjectNumber(); i++){ + local object = objectManager.getCollisionObject(i);//得到控制類對象 + if (object && object.getState() != STATE_DIE && object.isObjectType(OBJECTTYPE_CHARACTER) && !sqrChr.isEnemy(object)){ + local chrObj = sq_GetCNRDObjectToSQRCharacter(object); + if(!CNSquirrelAppendage.sq_IsAppendAppendage(sqrChr, apdPath)){ + local AddAppendage = CNSquirrelAppendage.sq_AppendAppendage(chrObj, sqrChr, -1, false, apdPath, true); + AddAppendage.sq_SetValidTime(10000); + } + } + } + break; + } + } + } local skillIndex = obj.getVar("skillIndex").getInt(0); local subtype = obj.getVar("subtype").getInt(0); local state = obj.getVar("state").getInt(0); @@ -18,6 +58,26 @@ function onKeyFrameFlag_po_priest_bykk(obj, flagIndex) sq_SetCurrentAttackBonusRate(sq_GetCurrentAttackInfo(obj), totalDamage); sq_SetAddWeaponDamage(sq_GetCurrentAttackInfo(obj), true); break; + case 28: + switch(flagIndex){ + case 100: + local currentAni = obj.getCurrentAnimation(); + currentAni.setCurrentFrameWithChildLayer(2); + break; + case 101: + local targetObj = obj.getVar("tar").get_obj_vector(0); + if(targetObj){ + local activeObj = sq_GetCNRDObjectToActiveObject(targetObj); + sq_setCurrentAxisPos(obj, 0, sq_GetDistancePos(sq_GetXPos(activeObj), sq_GetDirection(activeObj), 30)); + sq_setCurrentAxisPos(obj, 1, sq_GetYPos(activeObj)); + } + local speedRate = obj.getVar("custom").getInt(5); + local speed = 15 * speedRate / 100; + if(sq_GetDirection(obj) == ENUM_DIRECTION_RIGHT) sq_SetVelocity(obj, 0, speed.tofloat()); + else sq_SetVelocity(obj, 0, -speed.tofloat()); + break; + } + break; } break; case 2: @@ -180,6 +240,7 @@ function onKeyFrameFlag_po_priest_bykk(obj, flagIndex) return true; } + function onAttack_po_priest_bykk(obj, damager, boundingBox, isStuck) { if(!obj) return; @@ -413,7 +474,7 @@ function procAppend_po_priest_bykk(obj) switch(state){ case 21: if(obj.getVar("bool").getBool(0)) return; - if(obj.getVar("custom").getInt(6) > 0) return; + // if(obj.getVar("custom").getInt(6) > 0) return; local timer = obj.getVar().get_ct_vector(0); if(timer){ local currentT = timer.Get(); diff --git a/user/114.66.45.221/25_priest_3.c b/user/114.66.45.221/25_priest_3.c index 2369f9e..c3c9f56 100644 --- a/user/114.66.45.221/25_priest_3.c +++ b/user/114.66.45.221/25_priest_3.c @@ -290,8 +290,8 @@ function onSetState_Dangerousscale(obj, state, datas, isResetTimer) local totalDamage = obj.sq_GetBonusRateWithPassive(SKILL_BYKK_DANGEROUSSCALE, -1, 0, bonusRate); local sizeRate = sq_GetIntData(obj, SKILL_BYKK_DANGEROUSSCALE, 4); sizeRate = sizeRate * sq_GetIntData(obj, SKILL_BYKK_DANGEROUSSCALE, 3) / 100; - local isTalisman = 0; - if(sq_GetIntData(obj, SKILL_BYKK_DANGEROUSSCALE, 15) > 0){ + local isTalisman = 0, skill = sq_GetSkill(obj, SKILL_BYKK_DANGEROUSSCALE); + if(sq_GetIntData(obj, SKILL_BYKK_DANGEROUSSCALE, 15) > 0 || !skill.isSealFunction()){ isTalisman = 1; totalDamage = totalDamage * 110 / 100; sizeRate = sizeRate * 125 / 100; @@ -2076,3 +2076,158 @@ function createSkillPassive_Priest_bykk(obj,passiveObj,objnum,x,y,z,direction,jo sq_SendCreatePassiveObjectPacket(obj, objnum, 0, destX_01 + x, destY_01 + y, z, direction); } + + +//荣誉祝福 +function checkExecutableSkill_GloriousBlessNew(obj) +{ + if (!obj) return false; + if(obj.getVar("canUseSkill").getBool(0)) return false; + local isUse = obj.sq_IsUseSkill(260); + if (isUse){ + obj.sq_IntVectClear(); + obj.sq_IntVectPush(0); + obj.sq_AddSetStatePacket(301, STATE_PRIORITY_IGNORE_FORCE, true); + return true; + } + return false; +} + +function checkCommandEnable_GloriousBlessNew(obj) +{ + if (!obj) return false; + if(obj.getVar("canUseSkill").getBool(0)) return false; + return true; +} + +function onSetState_GloriousBlessNew(obj, state, datas, isResetTimer) +{ + if(!obj) return; + local subState = obj.sq_GetVectorData(datas, 0); + obj.setSkillSubState(subState); + obj.sq_StopMove(); + switch(subState){ + case 0: + local Ani = obj.sq_GetThrowChargeAni(3); + obj.setCurrentAnimation(Ani); + break; + case 1: + local Ani = obj.sq_GetThrowShootAni(3); + obj.setCurrentAnimation(Ani); + obj.sq_PlaySound("PR_MOONLIGHT"); + obj.setTimeEvent(1, 500, 1, false); + + local objectManager = obj.getObjectManager(); + local objectNumber = objectManager.getCollisionObjectNumber(); + local count = 0; + for (local i = 0; i < objectNumber; i++){ + local object = objectManager.getCollisionObject(i); + if(object && !obj.isEnemy(object) && object.isObjectType(OBJECTTYPE_CHARACTER)){ + local sqrChr = sq_GetCNRDObjectToSQRCharacter(object); + if(sq_getJob(sqrChr) == 9 && sq_getGrowType(sqrChr) == 1) count = count + 1; + } + } + print("count = "+count); + if(count > 0){ + obj.getVar("canUseSkill").setBool(0, true); + return; + } + + if(CNSquirrelAppendage.sq_IsAppendAppendage(obj, APDPATH_BLESSOFCOURAGE)) CNSquirrelAppendage.sq_RemoveAppendage(obj, APDPATH_BLESSOFCOURAGE); + if(CNSquirrelAppendage.sq_IsAppendAppendage(obj, APDPATH_ZEALOFFAITHBUFF)) CNSquirrelAppendage.sq_RemoveAppendage(obj, APDPATH_ZEALOFFAITHBUFF); + if(CNSquirrelAppendage.sq_IsAppendAppendage(obj, APDPATH_CRUXOFVICTORIA)) CNSquirrelAppendage.sq_RemoveAppendage(obj, APDPATH_CRUXOFVICTORIA); + local skillLevel = sq_GetSkillLevel(obj, 260); + local range = sq_GetIntData(obj, 260, 0); + local buffTime = sq_GetLevelData(obj, 260, 0, skillLevel); + local phAttack = sq_GetLevelData(obj, 260, 4, skillLevel); + local mgAttack = sq_GetLevelData(obj, 260, 5, skillLevel); + local adtAttack = sq_GetLevelData(obj, 260, 3, skillLevel); + local phlAttack = sq_GetLevelData(obj, 260, 1, skillLevel); + local mglAttack = sq_GetLevelData(obj, 260, 2, skillLevel); + local stuckRate = sq_GetLevelData(obj, 260, 6, skillLevel); + local skillbonusRate = sq_GetLevelData(obj, 260, 7, skillLevel); + //if(skillLevel < 20) sq_SetSkillAttackBonus(obj, skillbonusRate.tofloat() / 1000.0); + local now_phDefense = sq_GetPhysicalDefense(); + now_phDefense = now_phDefense * (100 + sq_GetIntData(obj, 169, 3)) / 100; + local now_mgDefense = sq_GetMagicalDefense(); + now_mgDefense = now_mgDefense * (100 + sq_GetIntData(obj, 169, 4)) / 100; + local defenseMax = 0; + if(now_phDefense > now_mgDefense) defenseMax = now_phDefense; + else defenseMax = now_mgDefense; + print("defenseMax = "+defenseMax); + local addRate = defenseMax.tofloat() / sq_GetIntData(obj, 260, 3).tofloat(); + if(addRate > 1){ + phAttack = phAttack.tofloat() * (1.0 + addRate); + mgAttack = mgAttack.tofloat() * (1.0 + addRate); + adtAttack = adtAttack.tofloat() * (1.0 + addRate); + phlAttack = phlAttack.tofloat() * (1.0 + addRate); + mglAttack = mglAttack.tofloat() * (1.0 + addRate); + } + print("addRate = "+addRate); + + sq_BinaryStartWrite(); + sq_BinaryWriteDword(skillLevel); + sq_BinaryWriteDword(buffTime); + sq_BinaryWriteDword(phAttack.tointeger()); + sq_BinaryWriteDword(mgAttack.tointeger()); + sq_BinaryWriteDword(adtAttack.tointeger()); + sq_BinaryWriteDword(phlAttack.tointeger()); + sq_BinaryWriteDword(mglAttack.tointeger()); + sq_BinaryWriteDword(stuckRate); + sq_SendCreatePassiveObjectPacket(obj, 640001, 0, 0, 0, 0, obj.getDirection()); + + break; + } +} + +function onEndCurrentAni_GloriousBlessNew(obj) +{ + if(!obj) return; + local subState = obj.getSkillSubState(); + switch(subState){ + case 0: + obj.sq_IntVectClear(); + obj.sq_IntVectPush(1); + obj.sq_AddSetStatePacket(301, STATE_PRIORITY_AUTO, true); + break; + case 1: + obj.sq_IntVectClear(); + obj.sq_AddSetStatePacket(STATE_STAND, STATE_PRIORITY_AUTO, true); + break; + } +} + +function onProcCon_GloriousBlessNew(obj) +{ + if(!obj) return; +} + +function onKeyFrameFlag_GloriousBlessNew(obj, flagIndex) +{ + if(!obj) return false; + return true; +} + +function onTimeEvent_GloriousBlessNew(obj, timeEventIndex, timeEventCount) +{ + if(!obj) return false; + switch(timeEventIndex){ + case 1: + obj.sq_IntVectClear(); + obj.sq_AddSetStatePacket(STATE_STAND, STATE_PRIORITY_AUTO, true); + break; + } +} + +function onEndState_GloriousBlessNew(obj, new_state) +{ + if(!obj) return; +} + + +function onStartDungeon_PrCrusader_bykk(obj) +{ + return; +} + + diff --git a/user/114.66.45.221/2_atpriest_3.c b/user/114.66.45.221/2_atpriest_3.c index e946030..02af032 100644 --- a/user/114.66.45.221/2_atpriest_3.c +++ b/user/114.66.45.221/2_atpriest_3.c @@ -2989,11 +2989,11 @@ function onSetState_Cruxofvictoria(obj, state, datas, isResetTimer) switch(subState){ case 0: obj.sq_SetCurrentAnimation(ATPANI_BYKK_VICTORY1); - sq_AddDrawOnlyAniFromParent(obj, "character/swordman/effect/animation/1_atpriest_bykk/atcruxofvictoria/ready/covreadyeff_skylight.ani", 0, 1, 0); + if(obj.isMyControlObject()) sq_AddDrawOnlyAniFromParent(obj, "character/swordman/effect/animation/1_atpriest_bykk/atcruxofvictoria/ready/covreadyeff_skylight.ani", 0, 1, 0); break; case 1: obj.sq_SetCurrentAnimation(ATPANI_BYKK_VICTORY2); - sq_AddDrawOnlyAniFromParent(obj, "character/swordman/effect/animation/1_atpriest_bykk/atcruxofvictoria/fly/covflyeff_01.ani", 0, 1, 0); + if(obj.isMyControlObject()) sq_AddDrawOnlyAniFromParent(obj, "character/swordman/effect/animation/1_atpriest_bykk/atcruxofvictoria/fly/covflyeff_01.ani", 0, 1, 0); local pooledObj = sq_AddDrawOnlyAniFromParent(obj, "character/swordman/effect/animation/1_atpriest_bykk/atcruxofvictoria/fly/covflycross_01.ani", 0, -1, -50); obj.getVar("Cruxofvictoria_Eff").clear_obj_vector(); obj.getVar("Cruxofvictoria_Eff").push_obj_vector(pooledObj); @@ -3002,7 +3002,7 @@ function onSetState_Cruxofvictoria(obj, state, datas, isResetTimer) obj.sq_SetCurrentAnimation(ATPANI_BYKK_VICTORY3); local pooledObj = obj.getVar("Cruxofvictoria_Eff").get_obj_vector(0); if(pooledObj) pooledObj.setValid(false); - sq_AddDrawOnlyAniFromParent(obj, "character/swordman/effect/animation/1_atpriest_bykk/atcruxofvictoria/crosscatch/covsetupeff_feather_00.ani", 0, 1, 0); + if(obj.isMyControlObject()) sq_AddDrawOnlyAniFromParent(obj, "character/swordman/effect/animation/1_atpriest_bykk/atcruxofvictoria/crosscatch/covsetupeff_feather_00.ani", 0, 1, 0); sq_flashScreen(obj,100,500,100,255, sq_RGB(255,255,255), GRAPHICEFFECT_NONE, ENUM_DRAWLAYER_CLOSEBACK); break; case 3: diff --git a/user/114.66.45.221/3_atswordman_1.c b/user/114.66.45.221/3_atswordman_1.c index 82f4e11..f2e76bf 100644 --- a/user/114.66.45.221/3_atswordman_1.c +++ b/user/114.66.45.221/3_atswordman_1.c @@ -203,6 +203,8 @@ function getDamageRate_Swordmaster_bykk(obj) print("bonusRate3 = "+bonusRate); if(CNSquirrelAppendage.sq_IsAppendAppendage(obj, "character/atswordman/1_swordmaster/overdrive/ap_overdrive.nut")) bonusRate = bonusRate * (1000 + sq_GetLevelData(obj, SKILL_SWORDMASTER_BYKK_OVERDRIVE, 1, sq_GetSkillLevel(obj, SKILL_SWORDMASTER_BYKK_OVERDRIVE))) / 1000; print("bonusRate4 = "+bonusRate); + if(CNSquirrelAppendage.sq_IsAppendAppendage(obj, "character/atswordman/1_swordmaster/bladesoul/ap_bladesoulbuff.nut")) bonusRate = bonusRate * (1000 + sq_GetLevelData(obj, 15, 0, sq_GetSkillLevel(obj, 15))) / 1000; + print("bonusRate5 = "+bonusRate); obj.getVar("setSkillBonusRate").setInt(0, bonusRate.tointeger()); //sq_SetSkillAttackBonus(obj, bonusRate); //return bonusRate; diff --git a/user/114.66.45.221/3_atswordman_5.c b/user/114.66.45.221/3_atswordman_5.c index 9c32eb3..1f90738 100644 --- a/user/114.66.45.221/3_atswordman_5.c +++ b/user/114.66.45.221/3_atswordman_5.c @@ -539,8 +539,8 @@ function onSetState_Destroyer_bykk(obj, state, datas, isResetTimer) break; } if(subState != 0){ - local speedRate = 1.0; - if(sq_GetIntData(obj, SKILL_DARKEMPLER_DESTROYER, 12) > 0 || DESTROYER_STONE > 0) speedRate = 2.0; + local speedRate = 1.5; + if(sq_GetIntData(obj, SKILL_DARKEMPLER_DESTROYER, 12) > 0 || DESTROYER_STONE > 0) speedRate = 2.5; obj.sq_SetStaticSpeedInfo(SPEED_TYPE_ATTACK_SPEED, SPEED_TYPE_ATTACK_SPEED,SPEED_VALUE_DEFAULT, SPEED_VALUE_DEFAULT, speedRate, speedRate); } else{ @@ -1845,10 +1845,15 @@ function onSetState_Punishment_bykk(obj, state, datas, isResetTimer) case 2: obj.removeAllTimeEvent(); obj.sq_SetCurrentAnimation(ANIMATION_DARKEMPLER_PUNISHMENT_FINISH_MOTION_BODY1); + obj.sq_SetStaticSpeedInfo(SPEED_TYPE_ATTACK_SPEED, SPEED_TYPE_ATTACK_SPEED, SPEED_VALUE_DEFAULT, SPEED_VALUE_DEFAULT, 1.0, 1.0); + local currentAni = obj.getCurrentAnimation(); + local speedRate = 6000 / currentAni.getDelaySum(0, 0); + obj.getVar("punishmentSet").setInt(0, speedRate); obj.sq_PlaySound("SW_PUNISHMENT_FIN"); local pooledObj = createOnlyDrawObject_AtSwordMan_bykk(obj, "character/swordman/effect/animation/atpunishment/finish/atpunishment_finish_bottom1.ani",true,obj.getDirection(), sq_GetDistancePos(sq_GetXPos(obj), obj.getDirection(), 350),sq_GetYPos(obj), 100, ENUM_DRAWLAYER_BOTTOM); local pAni = pooledObj.getCurrentAnimation(); pAni.setImageRateFromOriginal(3.0, 1.2); + pAni.setSpeedRate(speedRate.tofloat()); local currentAni = obj.getCurrentAnimation(); local delaySum = currentAni.getDelaySum(0,5); obj.setTimeEvent(1, delaySum, 1, false); @@ -1857,7 +1862,7 @@ function onSetState_Punishment_bykk(obj, state, datas, isResetTimer) local totalDamage = sq_GetLevelData(obj, SKILL_DARKEMPLER_PUNISHMENT, 1, skill_level); sq_SetCurrentAttackInfo(obj, sq_GetCustomAttackInfo(obj, 116)); sq_SetCurrentAttackBonusRate(sq_GetCurrentAttackInfo(obj), totalDamage); - obj.setTimeEvent(2, 1800, 1, false); + obj.setTimeEvent(2, 180000 / speedRate, 1, false); break; } } @@ -1870,7 +1875,10 @@ function onTimeEvent_Punishment_bykk(obj, timeEventIndex, timeEventCount) //sq_flashScreen(obj, 200, 100, 100, 255, sq_RGB(255,255,255), GRAPHICEFFECT_SPACE_DISTORT, ENUM_DRAWLAYER_CONTACT); break; case 1: - sq_AddDrawOnlyAniFromParent(obj, "character/swordman/effect/animation/atpunishment/finish/atpunishment_finish_top_eff2_dodge.ani", 350, 1, 100); + local speedRate = obj.getVar("punishmentSet").getInt(0); + local pooledObj = sq_AddDrawOnlyAniFromParent(obj, "character/swordman/effect/animation/atpunishment/finish/atpunishment_finish_top_eff2_dodge.ani", 350, 1, 100); + local pAni = pooledObj.getCurrentAnimation(); + pAni.setSpeedRate(speedRate.tofloat()); break; case 2: attack_Punishment_bykk(obj); diff --git a/user/114.66.45.221/3_atswordman_7.c b/user/114.66.45.221/3_atswordman_7.c index 323cd75..ae0d24c 100644 --- a/user/114.66.45.221/3_atswordman_7.c +++ b/user/114.66.45.221/3_atswordman_7.c @@ -2186,6 +2186,20 @@ function onSetState_Timeslash_bykk(obj, state, datas, isResetTimer) switch(subState){ case 0: if(obj.isMyControlObject()) obj.sq_SetXScrollStart(200, 300); + local apdPath = "character/atswordman/1_swordmaster/timeslash/ap_timeslashhold.nut"; + obj.getVar("timeSlashTar").clear_obj_vector(); + local objectManager = obj.getObjectManager();//得到對象管理器 + for (local i = 0; i < objectManager.getCollisionObjectNumber(); i++){ + local object = objectManager.getCollisionObject(i);//得到控制類對象 + if (object && object.isObjectType(OBJECTTYPE_ACTIVE) && obj.isEnemy(object) && object.isInDamagableState(obj) && sq_GetDistance(sq_GetXPos(obj), sq_GetYPos(obj), sq_GetXPos(object), sq_GetYPos(object), true) <= 1000){ + local activeObj = sq_GetCNRDObjectToActiveObject(object); + if(!CNSquirrelAppendage.sq_IsAppendAppendage(activeObj, apdPath)){ + local AddAppendage = CNSquirrelAppendage.sq_AppendAppendage(activeObj, obj, SKILL_SWORDMASTER_BYKK_TIMESLASH, false, apdPath, true); + sq_HoldAndDelayDie(activeObj, obj, true, true, true, 200, 200, ENUM_DIRECTION_NEUTRAL , AddAppendage); + obj.getVar("timeSlashTar").push_obj_vector(activeObj); + } + } + } break; case 1: cearteSkillPassiveObj_AtSwordMan_bykk(obj,obj,PASSIVEOBJECT_BYKK_SWORDMASTER,0,0,0,obj.getDirection(),1,SKILL_SWORDMASTER_BYKK_TIMESLASH,1,0,0,0,0,0,0,0,0,0); @@ -2249,6 +2263,14 @@ function onEndState_Timeslash_bykk(obj, newState) if(!obj) return; if(newState != SKILL_SWORDMASTER_BYKK_TIMESLASH){ obj.sq_SetXScrollStop(0) + local size = obj.getVar("timeSlashTar").get_obj_vector_size(); + if(size > 0){ + local apdPath = "character/atswordman/1_swordmaster/timeslash/ap_timeslashhold.nut"; + for(local i = 0; i < size; i++){ + local targetObj = obj.getVar("timeSlashTar").get_obj_vector(i); + if(targetObj && CNSquirrelAppendage.sq_IsAppendAppendage(targetObj, apdPath)) CNSquirrelAppendage.sq_RemoveAppendage(targetObj, apdPath); + } + } blademastery_buff(obj); local flashScreenObj = obj.getVar("flashobj").getObject(0); if(flashScreenObj){ diff --git a/user/114.66.45.221/6_mage_6.c b/user/114.66.45.221/6_mage_6.c index e2f5a1a..695abfd 100644 --- a/user/114.66.45.221/6_mage_6.c +++ b/user/114.66.45.221/6_mage_6.c @@ -643,7 +643,13 @@ function setCustomData_po_summoners(obj, receiveData) obj.getVar("time").clear_vector(); obj.getVar("time").push_vector(time); obj.setTimeEvent(0,time,1,false); - if(subtype == 61) sq_flashScreen(obj,693,time - 693,500,180, sq_RGB(0,0,0), GRAPHICEFFECT_NONE, ENUM_DRAWLAYER_BOTTOM); + if(subtype == 61){ + local skill = sq_GetSkill(sqrChr, 150); + local isSeal = 0; + if(!skill.isSealFunction()) isSeal = 1; + obj.getVar("sealSet").setInt(0, isSeal); + sq_flashScreen(obj,693,time - 693,500,180, sq_RGB(0,0,0), GRAPHICEFFECT_NONE, ENUM_DRAWLAYER_BOTTOM); + } break; case 63: local totalDamage = receiveData.readDword(); diff --git a/user/114.66.45.221/6_mage_7.c b/user/114.66.45.221/6_mage_7.c index 569cbee..3f04e2c 100644 --- a/user/114.66.45.221/6_mage_7.c +++ b/user/114.66.45.221/6_mage_7.c @@ -900,6 +900,7 @@ function onAttack_po_summoners(obj, damager, boundingBox, isStuck) case 61: switch(state){ case 21: + if(obj.getVar("sealSet").getInt(0) < 1) break; local appendagePath = "character/mage/k_k_made/appendage/aptomonster/debuff/ap_holdedmonster.nut"; if(!CNSquirrelAppendage.sq_IsAppendAppendage(damager, appendagePath)){ local MasterAppendage = CNSquirrelAppendage.sq_AppendAppendage(damager, obj, 128, false, appendagePath, true); diff --git a/user/114.66.45.221/6_mage_8.c b/user/114.66.45.221/6_mage_8.c index 7071a6e..4a573b7 100644 --- a/user/114.66.45.221/6_mage_8.c +++ b/user/114.66.45.221/6_mage_8.c @@ -2706,6 +2706,8 @@ function monsterpulled_bykkkkkkk(obj,monsterobj,x,y,z) { local timer = obj.getVar("pulled").get_ct_vector(0); if(!timer) return; + local skill = sq_GetSkill(obj, 150); + if(skill.isSealFunction()) return; local currentT = timer.Get(); //printp("currentT="+currentT.tostring()+"\n"); if(currentT <= 2000) return; diff --git a/user/114.66.45.221/7_swordman_2.c b/user/114.66.45.221/7_swordman_2.c index ef435d8..35d745e 100644 --- a/user/114.66.45.221/7_swordman_2.c +++ b/user/114.66.45.221/7_swordman_2.c @@ -2494,7 +2494,7 @@ function onSetState_RapidMoveSlash(obj, state, datas, isResetTimer) // print("speedRate = "+speedRate); local newSpeedRate = speedRate; if(speedRate < 100) newSpeedRate = 100; - else if(speedRate > 150) newSpeedRate = 150; + else if(speedRate > 250) newSpeedRate = 250; if(newSpeedRate != speedRate) currentAni.setSpeedRate(newSpeedRate.tofloat()); obj.getVar("rapidMoveSlashSet").setInt(0, newSpeedRate); local direction = sq_GetDirection(obj), xPos = sq_GetXPos(obj), yPos = sq_GetYPos(obj);