2514 lines
125 KiB
C
2514 lines
125 KiB
C
|
|
function setCustomData_po_atswordman_bykk_kak(obj, receiveData)
|
|
{
|
|
if(!obj) return;
|
|
local sqrChr = sq_GetCNRDObjectToSQRCharacter(obj.getTopCharacter());
|
|
if(!sqrChr) return;
|
|
local job = receiveData.readDword();
|
|
local skillIndex = receiveData.readDword();
|
|
local subtype = receiveData.readDword();
|
|
|
|
obj.getVar("job").setInt(0,job);
|
|
obj.getVar("skillIndex").setInt(0,skillIndex);
|
|
obj.getVar("subtype").setInt(0,subtype);
|
|
|
|
switch(job){
|
|
case 0:
|
|
switch(skillIndex){
|
|
case 94:
|
|
local aniPath = "passiveobject/atswordman_bykk/common/atgorecross/projectile_a_eff03.ani";
|
|
if(subtype == 2) aniPath = "passiveobject/atswordman_bykk/common/atgorecross/projectile_b_eff03.ani";
|
|
local ani = sq_CreateAnimation("",aniPath);
|
|
obj.setCurrentAnimation(ani);
|
|
local totalDamage = receiveData.readDword();
|
|
sq_SetCurrentAttackInfo(obj, sq_GetCustomAttackInfo(obj, 185 + subtype));
|
|
sq_SetCurrentAttackBonusRate(sq_GetCurrentAttackInfo(obj), totalDamage);
|
|
break;
|
|
case 88:
|
|
local aniPath = "passiveobject/atswordman_bykk/common/atsiryun/siryungum.ani";
|
|
local ani = sq_CreateAnimation("",aniPath);
|
|
obj.setCurrentAnimation(ani);
|
|
local totalDamage = receiveData.readDword();
|
|
local hitMax = receiveData.readDword();
|
|
sq_SetCurrentAttackInfo(obj, sq_GetCustomAttackInfo(obj, 188));
|
|
sq_SetCurrentAttackBonusRate(sq_GetCurrentAttackInfo(obj), totalDamage);
|
|
obj.sq_SetMaxHitCounterPerObject(hitMax);
|
|
obj.setTimeEvent(1, 80, -1, false);
|
|
obj.sq_SetMoveParticle("particle/bloodseal_move.ptl", 0.0, 0.0);
|
|
sq_SetSpeedToMoveParticle(obj, 0, 600);
|
|
break;
|
|
case 87:
|
|
local aniPath = "passiveobject/atswordman_bykk/common/atmountaincrash/mountaincrashsub.ani";
|
|
local ani = sq_CreateAnimation("",aniPath);
|
|
obj.setCurrentAnimation(ani);
|
|
sq_ChangeDrawLayer(obj, ENUM_DRAWLAYER_BOTTOM);
|
|
local totalDamage = receiveData.readDword();
|
|
local sizeRate = receiveData.readDword();
|
|
sq_SetCurrentAttackInfo(obj, sq_GetCustomAttackInfo(obj, 189));
|
|
sq_SetCurrentAttackBonusRate(sq_GetCurrentAttackInfo(obj), totalDamage);
|
|
local attackInfo = sq_GetCurrentAttackInfo(obj);
|
|
sq_SetAddWeaponDamage(attackInfo, true)
|
|
if(sizeRate > 100){
|
|
local currentAni = obj.getCurrentAnimation();
|
|
sizeRate = sizeRate.tofloat() / 100.0;
|
|
currentAni.setImageRateFromOriginal(sizeRate, sizeRate);
|
|
currentAni.setAutoLayerWorkAnimationAddSizeRate(sizeRate);
|
|
sq_SetAttackBoundingBoxSizeRate(currentAni, sizeRate, sizeRate, sizeRate);
|
|
}
|
|
break;
|
|
case 34:
|
|
sqrChr.getVar("executionObj").push_obj_vector(obj);
|
|
local size = sqrChr.getVar("executionTar").get_obj_vector_size();
|
|
if(size < 1) sqrChr.getVar("executionTar").clear_obj_vector();
|
|
obj.addSetStatePacket(20, null, STATE_PRIORITY_AUTO, false, "");
|
|
break;
|
|
}
|
|
break;
|
|
case 1:
|
|
switch(skillIndex){
|
|
case SKILL_SWORDMASTER_BYKK_ATFLASH://瞬影三絕斬
|
|
local aniPath = "passiveobject/atswordman_bykk/swordmaster/animation/atflash/flash_sonic1.ani";
|
|
switch(subtype){
|
|
case 2: aniPath = "passiveobject/atswordman_bykk/swordmaster/animation/atflash/flash_sonic2.ani"; break;
|
|
case 3: aniPath = "passiveobject/atswordman_bykk/swordmaster/animation/atflash/flash_sonic3.ani"; break;
|
|
case 4: aniPath = "passiveobject/atswordman_bykk/swordmaster/animation/atflash/flash_sonic3.ani"; break;
|
|
}
|
|
local ani = sq_CreateAnimation("",aniPath);
|
|
obj.setCurrentAnimation(ani);
|
|
local totalDamage = receiveData.readDword();
|
|
sq_SetCurrentAttackInfo(obj, sq_GetCustomAttackInfo(obj, 122));
|
|
sq_SetCurrentAttackBonusRate(sq_GetCurrentAttackInfo(obj), totalDamage);
|
|
local sizeRate = receiveData.readDword();
|
|
local roate = receiveData.readDword();
|
|
sq_SetCustomRotate(obj, sq_ToRadian(roate.tofloat()));
|
|
if(sizeRate > 100){
|
|
local currentAni = obj.getCurrentAnimation();
|
|
sizeRate = sizeRate.tofloat() / 100.0;
|
|
currentAni.setImageRateFromOriginal(sizeRate, sizeRate);
|
|
currentAni.setAutoLayerWorkAnimationAddSizeRate(sizeRate);
|
|
sq_SetAttackBoundingBoxSizeRate(currentAni, sizeRate, sizeRate, sizeRate);
|
|
}
|
|
local sub = receiveData.readDword();
|
|
if(sub < 4){
|
|
local level = receiveData.readDword();
|
|
local prob = receiveData.readDword();
|
|
local time = receiveData.readDword();
|
|
local damage = receiveData.readDword();
|
|
local attackInfo = sq_GetCurrentAttackInfo(obj);
|
|
local activeStatusSet = [ACTIVESTATUS_BURN,ACTIVESTATUS_FREEZE,ACTIVESTATUS_BLIND,ACTIVESTATUS_LIGHTNING];
|
|
if(damage == 0) sq_SetChangeStatusIntoAttackInfo(attackInfo, 0, activeStatusSet[sub], prob, level, time);
|
|
else sq_SetChangeStatusIntoAttackInfo(attackInfo, 0, activeStatusSet[sub], prob, level, time, damage);
|
|
}
|
|
obj.sq_SetMoveParticle("Particle/Flash.ptl", 0.0, 0.0);
|
|
if(!sqrChr || sqrChr.getState() == STATE_DIE) break;
|
|
local dis = sq_GetIntData(sqrChr, SKILL_SWORDMASTER_BYKK_ATFLASH, 1);
|
|
local speed = (dis.tofloat() / 0.4).tointeger();
|
|
sq_SetSpeedToMoveParticle(obj,0,speed);
|
|
break;
|
|
case SKILL_SWORDMASTER_BYKK_BLADESOUL://斬魂術
|
|
break;
|
|
case SKILL_SWORDMASTER_BYKK_BREAKSWORDDANCE://極 · 馭劍術 (破劍陣)
|
|
switch(subtype){
|
|
case 1:
|
|
sqrChr.getVar("breakSwordDance_circle").clear_obj_vector();
|
|
sqrChr.getVar("breakSwordDance_circle").push_obj_vector(obj);
|
|
obj.setTimeEvent(1, 1000, -1, true);
|
|
sq_ChangeDrawLayer(obj, ENUM_DRAWLAYER_BOTTOM);
|
|
obj.addSetStatePacket(20, null, STATE_PRIORITY_AUTO, false, "");
|
|
break;
|
|
case 2:
|
|
local sub = receiveData.readDword();
|
|
obj.getVar("custom").setInt(10, sub);
|
|
sqrChr.getVar("breakSwordDance_sword"+sub.tostring()).clear_obj_vector();
|
|
sqrChr.getVar("breakSwordDance_sword"+sub.tostring()).push_obj_vector(obj);
|
|
obj.addSetStatePacket(20, null, STATE_PRIORITY_AUTO, false, "");
|
|
break;
|
|
case 10:
|
|
local totalDamage = receiveData.readDword();
|
|
local element = receiveData.readDword();
|
|
local atkIndex = [103,104,102,105,106];
|
|
sq_SetCurrentAttackInfo(obj, sq_GetCustomAttackInfo(obj, atkIndex[element]));
|
|
sq_SetCurrentAttackBonusRate(sq_GetCurrentAttackInfo(obj), totalDamage);
|
|
local aniPath = "passiveobject/atswordman_bykk/swordmaster/animation/atbreaksworddance/explosion/atbreaksworddance_boom_mu.ani";
|
|
switch(element){
|
|
case 0: aniPath = "passiveobject/atswordman_bykk/swordmaster/animation/atbreaksworddance/explosion/atbreaksworddance_boom_fire.ani"; break;
|
|
case 1: aniPath = "passiveobject/atswordman_bykk/swordmaster/animation/atbreaksworddance/explosion/atbreaksworddance_boom_ice.ani"; break;
|
|
case 2: aniPath = "passiveobject/atswordman_bykk/swordmaster/animation/atbreaksworddance/explosion/atbreaksworddance_boom_dark.ani"; break;
|
|
case 3: aniPath = "passiveobject/atswordman_bykk/swordmaster/animation/atbreaksworddance/explosion/atbreaksworddance_boom_light.ani"; break;
|
|
}
|
|
local ani = sq_CreateAnimation("",aniPath);
|
|
obj.setCurrentAnimation(ani);
|
|
local sizeRate = receiveData.readDword();
|
|
if(sizeRate > 100){
|
|
local currentAni = obj.getCurrentAnimation();
|
|
sizeRate = sizeRate.tofloat() / 100.0;
|
|
currentAni.setImageRateFromOriginal(sizeRate, sizeRate);
|
|
currentAni.setAutoLayerWorkAnimationAddSizeRate(sizeRate);
|
|
sq_SetAttackBoundingBoxSizeRate(currentAni, sizeRate, sizeRate, sizeRate);
|
|
}
|
|
obj.setTimeEvent(2, 100, 1, true);
|
|
break;
|
|
case 11:
|
|
local totalDamage = receiveData.readDword();
|
|
sq_SetCurrentAttackInfo(obj, sq_GetCustomAttackInfo(obj, 107));
|
|
sq_SetCurrentAttackBonusRate(sq_GetCurrentAttackInfo(obj), totalDamage);
|
|
local aniPath = "passiveobject/atswordman_bykk/swordmaster/animation/atbreaksworddance/finish/atbreaksworddance_finish_boom_7.ani";
|
|
local ani = sq_CreateAnimation("",aniPath);
|
|
obj.setCurrentAnimation(ani);
|
|
local currentAni = obj.getCurrentAnimation();
|
|
currentAni.addLayerAnimation(1,sq_CreateAnimation("","passiveobject/atswordman_bykk/swordmaster/animation/atbreaksworddance/finish/atbreaksworddance_finish_focus1.ani"),true);
|
|
local sizeRate = receiveData.readDword();
|
|
if(sizeRate > 100){
|
|
local currentAni = obj.getCurrentAnimation();
|
|
sizeRate = sizeRate.tofloat() / 100.0;
|
|
currentAni.setImageRateFromOriginal(sizeRate, sizeRate);
|
|
currentAni.setAutoLayerWorkAnimationAddSizeRate(sizeRate);
|
|
sq_SetAttackBoundingBoxSizeRate(currentAni, sizeRate, sizeRate, sizeRate);
|
|
}
|
|
break;
|
|
case 20:
|
|
local totalDamage = receiveData.readDword();
|
|
local sizeRate = receiveData.readDword();
|
|
local aniPath = "passiveobject/atswordman_bykk/newswordmaster/animation/atbreaksworddance/finish/atbreaksworddance_finish_boom_7.ani";
|
|
local ani = sq_CreateAnimation("",aniPath);
|
|
obj.setCurrentAnimation(ani);
|
|
sq_SetCurrentAttackInfo(obj, sq_GetCustomAttackInfo(obj, 192));
|
|
sq_SetCurrentAttackBonusRate(sq_GetCurrentAttackInfo(obj), totalDamage);
|
|
if(sizeRate > 100){
|
|
local currentAni = obj.getCurrentAnimation();
|
|
sizeRate = sizeRate.tofloat() / 100.0;
|
|
currentAni.setImageRateFromOriginal(sizeRate, sizeRate);
|
|
currentAni.setAutoLayerWorkAnimationAddSizeRate(sizeRate);
|
|
sq_SetAttackBoundingBoxSizeRate(currentAni, sizeRate, sizeRate, sizeRate);
|
|
}
|
|
break;
|
|
}
|
|
break;
|
|
case SKILL_SWORDMASTER_BYKK_CHANGESWORD://魔劍降臨
|
|
switch(subtype){
|
|
case 0:
|
|
local element = receiveData.readDword();
|
|
obj.getVar("custom").setInt(10, element);
|
|
sqrChr.getVar("elementalsword").clear_obj_vector();
|
|
sqrChr.getVar("elementalsword").push_obj_vector(obj);
|
|
obj.setMapFollowParent(sqrChr);
|
|
obj.setMapFollowType(1);
|
|
obj.addSetStatePacket(element + 100, null, STATE_PRIORITY_AUTO, false, "");
|
|
break;
|
|
case 1:
|
|
local totalDamage = receiveData.readDword();
|
|
local element = receiveData.readDword();
|
|
local aniPath = "passiveobject/atswordman_bykk/swordmaster/animation/atelementaleffect/fire_fire_dodge.ani", attackIndex = 109;
|
|
switch(element){
|
|
case 1: aniPath = "passiveobject/atswordman_bykk/swordmaster/animation/atelementaleffect/ice_ice_dodge.ani";attackIndex = 111; break;
|
|
case 2: aniPath = "passiveobject/atswordman_bykk/swordmaster/animation/atelementaleffect/dark_dark_normal.ani";attackIndex = 108; break;
|
|
case 3: aniPath = "passiveobject/atswordman_bykk/swordmaster/animation/atelementaleffect/light_first.ani";attackIndex = 110; break;
|
|
}
|
|
sq_SetCurrentAttackInfo(obj, sq_GetCustomAttackInfo(obj, attackIndex));
|
|
sq_SetCurrentAttackBonusRate(sq_GetCurrentAttackInfo(obj), totalDamage);
|
|
local ani = sq_CreateAnimation("",aniPath);
|
|
obj.setCurrentAnimation(ani);
|
|
if(element == 2){
|
|
local group = receiveData.readDword();
|
|
local uniqueId = receiveData.readDword();
|
|
local targetObj = sq_GetObject(obj, group, uniqueId);
|
|
obj.getVar("custom").clear_obj_vector();
|
|
obj.getVar("custom").push_obj_vector(targetObj);
|
|
if(targetObj){
|
|
sq_SendHitObjectPacket(obj,targetObj,0,0,sq_GetZPos(obj));
|
|
sq_moveWithParent(targetObj, obj);
|
|
obj.setTimeEvent(1,180,1,false);
|
|
}
|
|
}
|
|
else if(element == 3){
|
|
sq_AddDrawOnlyAniFromParent(obj, "passiveobject/atswordman_bykk/swordmaster/animation/atelementaleffect/thunder_dodge.ani", 0, 0, 0);
|
|
obj.setTimeEvent(2,90,2,false);
|
|
}
|
|
local pAni = obj.getCurrentAnimation();
|
|
pAni.setSpeedRate(200.0);
|
|
break;
|
|
}
|
|
break;
|
|
case SKILL_SWORDMASTER_BYKK_DEVILSLASH://惡即斬
|
|
switch(subtype){
|
|
case 1:
|
|
sqrChr.getVar("devilSlash_atk").clear_obj_vector();
|
|
sqrChr.getVar("devilSlash_atk").push_obj_vector(obj);
|
|
local totalDamage = receiveData.readDword();
|
|
local hitMax = receiveData.readDword();
|
|
local element = receiveData.readDword();
|
|
local speedRate = receiveData.readDword();
|
|
local sizeRate = receiveData.readDword();
|
|
obj.getVar("custom").setInt(11, hitMax);
|
|
obj.getVar("custom").setInt(12, element);
|
|
obj.getVar("custom").setInt(13, 0);
|
|
obj.getVar("custom").setInt(14, sizeRate);
|
|
local aniPath = "passiveobject/atswordman_bykk/swordmaster/animation/atdevilslash/devilslashmultiattack.ani";
|
|
local ani = sq_CreateAnimation("",aniPath);
|
|
obj.setCurrentAnimation(ani);
|
|
local atkIndex = 176;
|
|
if(element < 4) atkIndex = atkIndex + (element + 1);
|
|
sq_SetCurrentAttackInfo(obj, sq_GetCustomAttackInfo(obj, atkIndex));
|
|
sq_SetCurrentAttackBonusRate(sq_GetCurrentAttackInfo(obj), totalDamage);
|
|
local pAni = obj.getCurrentAnimation();
|
|
pAni.setSpeedRate(speedRate.tofloat());
|
|
sizeRate = sizeRate.tofloat() / 100.0;
|
|
sq_SetAttackBoundingBoxSizeRate(pAni, sizeRate, sizeRate, sizeRate);
|
|
sq_moveWithParent(sqrChr, obj);
|
|
break;
|
|
case 2:
|
|
local totalDamage = receiveData.readDword();
|
|
local sizeRate = receiveData.readDword();
|
|
local element = receiveData.readDword();
|
|
local aniPath = "";
|
|
switch(element){
|
|
case 0: aniPath = "character/swordman/effect/animation/atdevilslash/fire/finish_normal.ani"; break;
|
|
case 1: aniPath = "character/swordman/effect/animation/atdevilslash/ice/finish_normal.ani"; break;
|
|
case 2: aniPath = "character/swordman/effect/animation/atdevilslash/dark/finish_normal.ani"; break;
|
|
case 3: aniPath = "character/swordman/effect/animation/atdevilslash/light/finish_normal.ani"; break;
|
|
case 4: aniPath = "character/swordman/effect/animation/atdevilslash/nothing/finish_normal.ani"; break;
|
|
}
|
|
local ani = sq_CreateAnimation("",aniPath);
|
|
obj.setCurrentAnimation(ani);
|
|
local atkIndex = 181;
|
|
if(element < 4) atkIndex = 182 + element;
|
|
sq_SetCurrentAttackInfo(obj, sq_GetCustomAttackInfo(obj, atkIndex));
|
|
sq_SetCurrentAttackBonusRate(sq_GetCurrentAttackInfo(obj), totalDamage);
|
|
local pAni = obj.getCurrentAnimation();
|
|
sizeRate = sizeRate.tofloat() / 100.0;
|
|
pAni.setImageRateFromOriginal(sizeRate, sizeRate);
|
|
pAni.setAutoLayerWorkAnimationAddSizeRate(sizeRate);
|
|
sq_SetAttackBoundingBoxSizeRate(pAni, sizeRate, sizeRate, sizeRate);
|
|
break;
|
|
case 10:
|
|
//totalDamage,speedRate,sizeRate,flagIndex
|
|
local totalDamage = receiveData.readDword();
|
|
local speedRate = receiveData.readDword();
|
|
local sizeRate = receiveData.readDword();
|
|
local flagIndex = receiveData.readDword();
|
|
local aniPath = "";
|
|
switch(flagIndex){
|
|
case 31: aniPath = "passiveobject/atswordman_bykk/newswordmaster/animation/atdevilslash/newatdevilslashloopslash_00.ani"; break;
|
|
case 32: aniPath = "passiveobject/atswordman_bykk/newswordmaster/animation/atdevilslash/newatdevilslashloopslash_01.ani"; break;
|
|
case 33: aniPath = "passiveobject/atswordman_bykk/newswordmaster/animation/atdevilslash/newatdevilslashloopslash_02.ani"; break;
|
|
case 34: aniPath = "passiveobject/atswordman_bykk/newswordmaster/animation/atdevilslash/newatdevilslashloopslash_03.ani"; break;
|
|
case 35: aniPath = "passiveobject/atswordman_bykk/newswordmaster/animation/atdevilslash/newatdevilslashloopslash_04.ani"; break;
|
|
case 36: aniPath = "passiveobject/atswordman_bykk/newswordmaster/animation/atdevilslash/newatdevilslashloopslash_05.ani"; break;
|
|
}
|
|
if(aniPath == "") sq_SendDestroyPacketPassiveObject(obj);
|
|
local ani = sq_CreateAnimation("",aniPath);
|
|
obj.setCurrentAnimation(ani);
|
|
sq_SetCurrentAttackInfo(obj, sq_GetCustomAttackInfo(obj, 194));
|
|
sq_SetCurrentAttackBonusRate(sq_GetCurrentAttackInfo(obj), totalDamage);
|
|
local pAni = obj.getCurrentAnimation();
|
|
sizeRate = sizeRate.tofloat() / 100.0;
|
|
pAni.setImageRateFromOriginal(sizeRate, sizeRate);
|
|
pAni.setAutoLayerWorkAnimationAddSizeRate(sizeRate);
|
|
sq_SetAttackBoundingBoxSizeRate(pAni, sizeRate, sizeRate, sizeRate);
|
|
break;
|
|
case 11:
|
|
//totalDamage,speedRate,sizeRate,flagIndex
|
|
local totalDamage = receiveData.readDword();
|
|
local sizeRate = receiveData.readDword();
|
|
// local speedRate = receiveData.readDword();
|
|
local aniPath = "passiveobject/atswordman_bykk/newswordmaster/animation/atdevilslash/newatdevilslashchargefinisheffect_17.ani";
|
|
local ani = sq_CreateAnimation("",aniPath);
|
|
obj.setCurrentAnimation(ani);
|
|
sq_SetCurrentAttackInfo(obj, sq_GetCustomAttackInfo(obj, 193));
|
|
sq_SetCurrentAttackBonusRate(sq_GetCurrentAttackInfo(obj), totalDamage);
|
|
local pAni = obj.getCurrentAnimation();
|
|
sizeRate = sizeRate.tofloat() / 100.0;
|
|
pAni.setImageRateFromOriginal(sizeRate, sizeRate);
|
|
pAni.setAutoLayerWorkAnimationAddSizeRate(sizeRate);
|
|
sq_SetAttackBoundingBoxSizeRate(pAni, sizeRate, sizeRate, sizeRate);
|
|
// pAni.setSpeedRate(speedRate.tofloat());
|
|
break;
|
|
}
|
|
break;
|
|
case SKILL_SWORDMASTER_BYKK_DRAGONUPEX://裂刃天衝
|
|
switch(subtype){
|
|
case 1:
|
|
local totalDamage = receiveData.readDword();
|
|
local hitMax = receiveData.readDword();
|
|
local totalDamage2 = receiveData.readDword();
|
|
local sizeRate = receiveData.readDword();
|
|
obj.getVar("custom").setInt(11, hitMax);
|
|
obj.getVar("custom").setInt(12, totalDamage2);
|
|
obj.getVar("custom").setInt(13, sizeRate);
|
|
sq_SetCurrentAttackInfo(obj, sq_GetCustomAttackInfo(obj, 113));
|
|
sq_SetCurrentAttackBonusRate(sq_GetCurrentAttackInfo(obj), totalDamage);
|
|
obj.addSetStatePacket(20, null, STATE_PRIORITY_AUTO, false, "");
|
|
break;
|
|
case 2:
|
|
local totalDamage = receiveData.readDword();
|
|
local hitMax = receiveData.readDword();
|
|
local totalDamage2 = receiveData.readDword();
|
|
local sizeRate = receiveData.readDword();
|
|
obj.getVar("custom").setInt(12, totalDamage2);
|
|
obj.getVar("custom").setInt(13, sizeRate);
|
|
sq_SetCurrentAttackInfo(obj, sq_GetCustomAttackInfo(obj, 116));
|
|
sq_SetCurrentAttackBonusRate(sq_GetCurrentAttackInfo(obj), totalDamage);
|
|
local aniPath = "passiveobject/atswordman_bykk/swordmaster/animation/atdragonup/horizon/atdragonuptalismanswordeffect_00.ani";
|
|
local ani = sq_CreateAnimation("",aniPath);
|
|
obj.setCurrentAnimation(ani);
|
|
local currentAni = obj.getCurrentAnimation();
|
|
local delay = currentAni.getDelaySum(0, 5);
|
|
// obj.setTimeEvent(2, delay / hitMax, hitMax - 1, false);
|
|
sq_moveWithParent(sqrChr, obj);
|
|
break;
|
|
case 3:
|
|
sq_moveWithParent(sqrChr, obj);
|
|
obj.addSetStatePacket(20, null, STATE_PRIORITY_AUTO, false, "");
|
|
break;
|
|
case 4:
|
|
local totalDamage = receiveData.readDword();
|
|
local sizeRate = receiveData.readDword();
|
|
sq_SetCurrentAttackInfo(obj, sq_GetCustomAttackInfo(obj, 117));
|
|
sq_SetCurrentAttackBonusRate(sq_GetCurrentAttackInfo(obj), totalDamage);
|
|
local aniPath = "passiveobject/atswordman_bykk/swordmaster/animation/atdragonup/horizon/front_blast_normal.ani";
|
|
local ani = sq_CreateAnimation("",aniPath);
|
|
obj.setCurrentAnimation(ani);
|
|
sq_SetShake(obj, 16, 200);
|
|
local currentAni = obj.getCurrentAnimation();
|
|
sizeRate = sizeRate.tofloat() / 100.0;
|
|
currentAni.setImageRateFromOriginal(sizeRate, sizeRate);
|
|
currentAni.setAutoLayerWorkAnimationAddSizeRate(sizeRate);
|
|
sq_SetAttackBoundingBoxSizeRate(currentAni, sizeRate, sizeRate, sizeRate);
|
|
break;
|
|
}
|
|
break;
|
|
case SKILL_SWORDMASTER_BYKK_EXCALIBUR://雷鳴千軍破
|
|
switch(subtype){
|
|
case 1:
|
|
local totalDamage = receiveData.readDword();
|
|
local element = receiveData.readDword();
|
|
local time = receiveData.readDword();
|
|
local totalDamage2 = receiveData.readDword();
|
|
local sub = receiveData.readDword();
|
|
obj.getVar("custom").setInt(10, totalDamage);
|
|
obj.getVar("custom").setInt(11, element);
|
|
obj.getVar("custom").setInt(12, time);
|
|
obj.getVar("custom").setInt(13, totalDamage2);
|
|
obj.getVar("custom").setInt(14, sub);
|
|
obj.addSetStatePacket(20, null, STATE_PRIORITY_AUTO, false, "");
|
|
break;
|
|
case 2:
|
|
local totalDamage = receiveData.readDword();
|
|
local sub = receiveData.readDword();
|
|
local sizeRate = receiveData.readDword();
|
|
sq_SetCurrentAttackInfo(obj, sq_GetCustomAttackInfo(obj, 121));
|
|
sq_SetCurrentAttackBonusRate(sq_GetCurrentAttackInfo(obj), totalDamage);
|
|
local aniPath = "passiveobject/atswordman_bykk/swordmaster/animation/atexcalibur/create_nova_b_attack.ani";
|
|
if(sub > 0) aniPath = "passiveobject/atswordman_bykk/swordmaster/animation/atexcalibur/ex_blunt_nova.ani";
|
|
local ani = sq_CreateAnimation("",aniPath);
|
|
obj.setCurrentAnimation(ani);
|
|
sq_ChangeDrawLayer(obj, ENUM_DRAWLAYER_BOTTOM);
|
|
if(sub < 1){
|
|
local currentAni = obj.getCurrentAnimation();
|
|
currentAni.addLayerAnimation(0,sq_CreateAnimation("","passiveobject/atswordman_bykk/swordmaster/animation/atexcalibur/create_nova_b.ani"),true);
|
|
}
|
|
local currentAni = obj.getCurrentAnimation();
|
|
sizeRate = sizeRate.tofloat() / 100.0;
|
|
currentAni.setImageRateFromOriginal(sizeRate, sizeRate);
|
|
currentAni.setAutoLayerWorkAnimationAddSizeRate(sizeRate);
|
|
sq_SetAttackBoundingBoxSizeRate(currentAni, sizeRate, sizeRate, sizeRate);
|
|
break;
|
|
case 3:
|
|
local totalDamage = receiveData.readDword();
|
|
sq_SetCurrentAttackInfo(obj, sq_GetCustomAttackInfo(obj, 121));
|
|
sq_SetCurrentAttackBonusRate(sq_GetCurrentAttackInfo(obj), totalDamage);
|
|
local aniPath = "passiveobject/atswordman_bykk/swordmaster/animation/atexcalibur/ex_blunt_shockwave1.ani";
|
|
local ani = sq_CreateAnimation("",aniPath);
|
|
obj.setCurrentAnimation(ani);
|
|
local sizeRate = receiveData.readDword();
|
|
local currentAni = obj.getCurrentAnimation();
|
|
if(sizeRate > 100){
|
|
sizeRate = sizeRate.tofloat() / 100.0;
|
|
currentAni.setImageRateFromOriginal(sizeRate, sizeRate);
|
|
currentAni.setAutoLayerWorkAnimationAddSizeRate(sizeRate);
|
|
sizeRate = 1.5 * sizeRate;
|
|
}
|
|
else sizeRate = 1.5 * sizeRate.tofloat() / 100.0;
|
|
sq_SetAttackBoundingBoxSizeRate(currentAni, sizeRate, sizeRate, sizeRate);
|
|
sq_ChangeDrawLayer(obj, ENUM_DRAWLAYER_BOTTOM);
|
|
break;
|
|
case 10:
|
|
local totalDamage = receiveData.readDword();
|
|
local sizeRate = receiveData.readDword();
|
|
local aniPath = "passiveobject/atswordman_bykk/newswordmaster/animation/atexcalibur/new/newatexcaliburceffect_02.ani";
|
|
local ani = sq_CreateAnimation("",aniPath);
|
|
obj.setCurrentAnimation(ani);
|
|
sq_SetCurrentAttackInfo(obj, sq_GetCustomAttackInfo(obj, 198));
|
|
sq_SetCurrentAttackBonusRate(sq_GetCurrentAttackInfo(obj), totalDamage);
|
|
local currentAni = obj.getCurrentAnimation();
|
|
sizeRate = sizeRate.tofloat() / 100.0;
|
|
currentAni.setImageRateFromOriginal(sizeRate, sizeRate);
|
|
currentAni.setAutoLayerWorkAnimationAddSizeRate(sizeRate);
|
|
sq_SetAttackBoundingBoxSizeRate(currentAni, sizeRate, sizeRate, sizeRate);
|
|
local pooledObj = sq_AddDrawOnlyAniFromParent(obj, "passiveobject/atswordman_bykk/newswordmaster/animation/atexcalibur/new/newatexcaliburcbottom_00.ani", 0, 0, 0);
|
|
local pAni = pooledObj.getCurrentAnimation();
|
|
pAni.setImageRateFromOriginal(sizeRate, sizeRate);
|
|
pAni.setAutoLayerWorkAnimationAddSizeRate(sizeRate);
|
|
sq_ChangeDrawLayer(pooledObj, ENUM_DRAWLAYER_BOTTOM);
|
|
break;
|
|
}
|
|
break;
|
|
case SKILL_SWORDMASTER_BYKK_FUSIONBLADE://極詣 · 馭劍術 : 聚魔劍
|
|
switch(subtype){
|
|
case 1:
|
|
local totalDamage = receiveData.readDword();
|
|
sq_SetCurrentAttackInfo(obj, sq_GetCustomAttackInfo(obj, 123));
|
|
sq_SetCurrentAttackBonusRate(sq_GetCurrentAttackInfo(obj), totalDamage);
|
|
local aniPath = "passiveobject/atswordman_bykk/swordmaster/animation/atfusionblade/atfusionbladeexplosionfront_00.ani";
|
|
local ani = sq_CreateAnimation("",aniPath);
|
|
obj.setCurrentAnimation(ani);
|
|
local sizeRate = receiveData.readDword();
|
|
if(sizeRate > 100){
|
|
local currentAni = obj.getCurrentAnimation();
|
|
sizeRate = sizeRate.tofloat() / 100.0;
|
|
currentAni.setImageRateFromOriginal(sizeRate, sizeRate);
|
|
currentAni.setAutoLayerWorkAnimationAddSizeRate(sizeRate);
|
|
sq_SetAttackBoundingBoxSizeRate(currentAni, sizeRate, sizeRate, sizeRate);
|
|
}
|
|
local aniPath2 = "passiveobject/atswordman_bykk/swordmaster/animation/atfusionblade/atfusionbladeexplosionbottom_00.ani";
|
|
createOnlyDrawObject_AtSwordMan_bykk(obj,aniPath2,true,obj.getDirection(),sq_GetXPos(obj),sq_GetYPos(obj),0,ENUM_DRAWLAYER_BOTTOM);
|
|
break;
|
|
case 2:
|
|
local totalDamage = receiveData.readDword();
|
|
sq_SetCurrentAttackInfo(obj, sq_GetCustomAttackInfo(obj, 124));
|
|
sq_SetCurrentAttackBonusRate(sq_GetCurrentAttackInfo(obj), totalDamage);
|
|
local aniPath = "passiveobject/atswordman_bykk/swordmaster/animation/atfusionblade/atfusionbladeswordattack.ani";
|
|
local ani = sq_CreateAnimation("",aniPath);
|
|
obj.setCurrentAnimation(ani);
|
|
break;
|
|
case 3:
|
|
local element = receiveData.readDword();
|
|
local delay = receiveData.readDword();
|
|
local delay2 = receiveData.readDword();
|
|
local angle = receiveData.readDword();
|
|
local totalDamage = receiveData.readDword();
|
|
obj.getVar("custom").setInt(10, element);
|
|
obj.getVar("custom").setInt(11, delay);
|
|
obj.getVar("custom").setInt(12, delay2);
|
|
obj.getVar("custom").setInt(13, totalDamage);
|
|
sq_SetCustomRotate(obj, sq_ToRadian(angle.tofloat()));
|
|
obj.getVar("custom").setInt(20, sq_GetXPos(obj));
|
|
obj.getVar("custom").setInt(21, sq_GetZPos(obj));
|
|
obj.addSetStatePacket(20, null, STATE_PRIORITY_AUTO, false, "");
|
|
break;
|
|
}
|
|
break;
|
|
case SKILL_SWORDMASTER_BYKK_HALFMOON://破軍旋舞斬
|
|
switch(subtype){
|
|
case 1://character/swordman/atanimation/halfmoon2_obj.ani
|
|
local aniPath = "character/swordman/atanimation/halfmoon2_obj.ani";
|
|
local ani = sq_CreateAnimation("",aniPath);
|
|
obj.setCurrentAnimation(ani);
|
|
local totalDamage = receiveData.readDword();
|
|
local sizeRate = receiveData.readDword();
|
|
local speedRate = receiveData.readDword();
|
|
local hitMax = receiveData.readDword();
|
|
sq_SetCurrentAttackInfo(obj, sq_GetCustomAttackInfo(obj, 175));
|
|
sq_SetCurrentAttackBonusRate(sq_GetCurrentAttackInfo(obj), totalDamage);
|
|
local currentAni = obj.getCurrentAnimation();
|
|
currentAni.setSpeedRate(speedRate.tofloat());
|
|
sizeRate = sizeRate.tofloat() / 100.0;
|
|
currentAni.setImageRateFromOriginal(sizeRate, sizeRate);
|
|
currentAni.setAutoLayerWorkAnimationAddSizeRate(sizeRate);
|
|
sq_SetAttackBoundingBoxSizeRate(currentAni, sizeRate, sizeRate, sizeRate);
|
|
currentAni.setSpeedRate(speedRate.tofloat());
|
|
local pAni = obj.getCurrentAnimation();
|
|
local delay = pAni.getDelaySum(false);
|
|
if(hitMax > 1) obj.setTimeEvent(1, delay / (hitMax + 1), hitMax - 1, false);
|
|
sq_moveWithParent(sqrChr, obj);
|
|
break;
|
|
}
|
|
break;
|
|
case SKILL_SWORDMASTER_BYKK_ILLUSIONBLADE://幻劍術
|
|
switch(subtype){
|
|
case 1:
|
|
local totalDamage = receiveData.readDword();
|
|
local hitMax = receiveData.readDword();
|
|
local speedRate = receiveData.readDword();
|
|
obj.getVar("custom").setInt(11, hitMax);
|
|
obj.getVar("custom").setInt(12, sq_GetXPos(obj));
|
|
obj.getVar("custom").setInt(13, 250);
|
|
obj.getVar("custom").setInt(14, 0);
|
|
obj.getVar("custom").setInt(15, speedRate);
|
|
sq_SetCurrentAttackInfo(obj, sq_GetCustomAttackInfo(obj, 128));
|
|
sq_SetCurrentAttackBonusRate(sq_GetCurrentAttackInfo(obj), totalDamage);
|
|
obj.addSetStatePacket(20, null, STATE_PRIORITY_AUTO, false, "");
|
|
break;
|
|
case 2:
|
|
local totalDamage = receiveData.readDword();
|
|
local hitMax = receiveData.readDword();
|
|
local totalDamage2 = receiveData.readDword();
|
|
local sizeRate = receiveData.readDword();
|
|
local speedRate = receiveData.readDword();
|
|
obj.getVar("custom").setInt(10, totalDamage);
|
|
obj.getVar("custom").setInt(11, hitMax);
|
|
obj.getVar("custom").setInt(12, sq_GetXPos(obj));
|
|
obj.getVar("custom").setInt(13, 250);
|
|
obj.getVar("custom").setInt(14, 0);
|
|
obj.getVar("custom").setInt(15, totalDamage2);
|
|
obj.getVar("custom").setInt(16, sizeRate);
|
|
obj.getVar("custom").setInt(17, speedRate);
|
|
sq_SetCurrentAttackInfo(obj, sq_GetCustomAttackInfo(obj, 128));
|
|
sq_SetCurrentAttackBonusRate(sq_GetCurrentAttackInfo(obj), totalDamage);
|
|
obj.addSetStatePacket(20, null, STATE_PRIORITY_AUTO, false, "");
|
|
break;
|
|
case 3:
|
|
local aniPath = "passiveobject/atswordman_bykk/swordmaster/animation/atillusionblade/bluntmasterysub/illusionbladesub.ani";
|
|
local ani = sq_CreateAnimation("",aniPath);
|
|
obj.setCurrentAnimation(ani);
|
|
local totalDamage = receiveData.readDword();
|
|
local sizeRate = receiveData.readDword();
|
|
local speedRate = receiveData.readDword();
|
|
sq_SetCurrentAttackInfo(obj, sq_GetCustomAttackInfo(obj, 127));
|
|
sq_SetCurrentAttackBonusRate(sq_GetCurrentAttackInfo(obj), totalDamage);
|
|
local currentAni = obj.getCurrentAnimation();
|
|
currentAni.setSpeedRate(speedRate.tofloat());
|
|
sizeRate = sizeRate.tofloat() / 100.0;
|
|
currentAni.setImageRateFromOriginal(sizeRate, sizeRate);
|
|
currentAni.setAutoLayerWorkAnimationAddSizeRate(sizeRate);
|
|
sq_SetAttackBoundingBoxSizeRate(currentAni, sizeRate, sizeRate, sizeRate);
|
|
break;
|
|
}
|
|
break;
|
|
case SKILL_SWORDMASTER_BYKK_JACKCATCH://極 · 馭劍術 (幻劍陣)
|
|
switch(subtype){
|
|
case 1://魔法陣
|
|
sqrChr.getVar("jackCatch_circle").clear_obj_vector();
|
|
sqrChr.getVar("jackCatch_circle").push_obj_vector(obj);
|
|
obj.setTimeEvent(4, 1000, -1, true);
|
|
sq_ChangeDrawLayer(obj, ENUM_DRAWLAYER_BOTTOM);
|
|
local speedRate = receiveData.readDword();
|
|
obj.getVar("custom").setInt(11, speedRate);
|
|
obj.addSetStatePacket(20, null, STATE_PRIORITY_AUTO, false, "");
|
|
break;
|
|
case 2://火冰暗光特效
|
|
local element = receiveData.readDword();
|
|
local VarName = ["jackCatch_circle_fire","jackCatch_circle_ice","jackCatch_circle_dark","jackCatch_circle_light"];
|
|
sqrChr.getVar(VarName[element]).clear_obj_vector();
|
|
sqrChr.getVar(VarName[element]).push_obj_vector(obj);
|
|
obj.getVar("custom").setInt(10, element);
|
|
local speedRate = receiveData.readDword();
|
|
obj.getVar("custom").setInt(11, speedRate);
|
|
obj.addSetStatePacket(20, null, STATE_PRIORITY_AUTO, false, "");
|
|
break;
|
|
case 3://爆炸
|
|
local aniPath = "passiveobject/atswordman_bykk/swordmaster/animation/atjackcatch/boom_crack_normal.ani";
|
|
local ani = sq_CreateAnimation("",aniPath);
|
|
obj.setCurrentAnimation(ani);
|
|
local totalDamage = receiveData.readDword();
|
|
sq_SetCurrentAttackInfo(obj, sq_GetCustomAttackInfo(obj, 129));
|
|
sq_SetCurrentAttackBonusRate(sq_GetCurrentAttackInfo(obj), totalDamage);
|
|
local sizeRate = receiveData.readDword();
|
|
if(sizeRate > 100){
|
|
local currentAni = obj.getCurrentAnimation();
|
|
sizeRate = sizeRate.tofloat() / 100.0;
|
|
currentAni.setImageRateFromOriginal(sizeRate, sizeRate);
|
|
currentAni.setAutoLayerWorkAnimationAddSizeRate(sizeRate);
|
|
sq_SetAttackBoundingBoxSizeRate(currentAni, sizeRate, sizeRate, sizeRate);
|
|
}
|
|
break;
|
|
case 4:
|
|
local time = receiveData.readDword();
|
|
obj.getVar("custom").setInt(10, time);
|
|
sq_ChangeDrawLayer(obj, ENUM_DRAWLAYER_BOTTOM);
|
|
obj.addSetStatePacket(20, null, STATE_PRIORITY_AUTO, false, "");
|
|
break;
|
|
case 5:
|
|
local totalDamage = receiveData.readDword();
|
|
local element = receiveData.readDword();
|
|
local moveX = receiveData.readDword();
|
|
local moveY = receiveData.readDword();
|
|
obj.getVar("custom").setInt(10, totalDamage);
|
|
obj.getVar("custom").setInt(11, element);
|
|
obj.getVar("custom").setInt(12, moveX);
|
|
obj.getVar("custom").setInt(13, moveY);
|
|
obj.addSetStatePacket(20, null, STATE_PRIORITY_AUTO, false, "");
|
|
break;
|
|
}
|
|
break;
|
|
case SKILL_SWORDMASTER_BYKK_LAEVATEINN://誓約之劍 : 雷沃汀
|
|
switch(subtype){
|
|
case 1:
|
|
local aniPath = "passiveobject/atswordman_bykk/swordmaster/animation/atlaevateinn/slash_03.ani";
|
|
local ani = sq_CreateAnimation("",aniPath);
|
|
obj.setCurrentAnimation(ani);
|
|
local speedRate = receiveData.readDword();
|
|
local pAni = obj.getCurrentAnimation();
|
|
pAni.setSpeedRate(speedRate.tofloat());
|
|
break;
|
|
}
|
|
break;
|
|
case SKILL_SWORDMASTER_BYKK_MAGICSWORDSHOOT://颶風魔劍
|
|
switch(subtype){
|
|
case 1:
|
|
local totalDamage = receiveData.readDword();
|
|
local element = receiveData.readDword();
|
|
local hitMax = receiveData.readDword();
|
|
local totalDamage2 = receiveData.readDword();
|
|
local delay = receiveData.readDword();
|
|
obj.getVar("custom").setInt(10, totalDamage);
|
|
obj.getVar("custom").setInt(11, element);
|
|
obj.getVar("custom").setInt(12, totalDamage2);
|
|
obj.getVar("custom").setInt(13, hitMax);
|
|
obj.setTimeEvent(3, delay, 1, false);
|
|
obj.addSetStatePacket(20, null, STATE_PRIORITY_AUTO, false, "");
|
|
break;
|
|
}
|
|
break;
|
|
case SKILL_SWORDMASTER_BYKK_MAGICSWORDUP://魔劍奧義
|
|
switch(subtype){
|
|
case 0:
|
|
local aniPath = "passiveobject/atswordman_bykk/swordmaster/animation/atmagicswordup/p_fire_00.ani";
|
|
local ani = sq_CreateAnimation("",aniPath);
|
|
obj.setCurrentAnimation(ani);
|
|
local totalDamage = receiveData.readDword();
|
|
local level = receiveData.readDword();
|
|
local prob = receiveData.readDword();
|
|
local time = receiveData.readDword();
|
|
local damage = receiveData.readDword();
|
|
sq_SetCurrentAttackInfo(obj, sq_GetCustomAttackInfo(obj, 143));
|
|
sq_SetCurrentAttackBonusRate(sq_GetCurrentAttackInfo(obj), totalDamage);
|
|
local attackInfo = sq_GetCurrentAttackInfo(obj);
|
|
sq_SetChangeStatusIntoAttackInfo(attackInfo, 0, ACTIVESTATUS_BURN, prob, level, time, damage);
|
|
break;
|
|
case 1:
|
|
local totalDamage = receiveData.readDword();
|
|
local level = receiveData.readDword();
|
|
local prob = receiveData.readDword();
|
|
local time = receiveData.readDword();
|
|
sq_SetCurrentAttackInfo(obj, sq_GetCustomAttackInfo(obj, 145));
|
|
sq_SetCurrentAttackBonusRate(sq_GetCurrentAttackInfo(obj), totalDamage);
|
|
local attackInfo = sq_GetCurrentAttackInfo(obj);
|
|
sq_SetChangeStatusIntoAttackInfo(attackInfo, 0, ACTIVESTATUS_FREEZE, prob, level, time);
|
|
sq_SetCustomRotate(obj, sq_ToRadian(-45.0));
|
|
obj.addSetStatePacket(20, null, STATE_PRIORITY_AUTO, false, "");
|
|
break;
|
|
case 2:
|
|
local aniPath = "passiveobject/atswordman_bykk/swordmaster/animation/atmagicswordup/p_dark_14.ani";
|
|
local ani = sq_CreateAnimation("",aniPath);
|
|
obj.setCurrentAnimation(ani);
|
|
local totalDamage = receiveData.readDword();
|
|
local level = receiveData.readDword();
|
|
local prob = receiveData.readDword();
|
|
local time = receiveData.readDword();
|
|
sq_SetCurrentAttackInfo(obj, sq_GetCustomAttackInfo(obj, 142));
|
|
sq_SetCurrentAttackBonusRate(sq_GetCurrentAttackInfo(obj), totalDamage);
|
|
local attackInfo = sq_GetCurrentAttackInfo(obj);
|
|
sq_SetChangeStatusIntoAttackInfo(attackInfo, 0, ACTIVESTATUS_BLIND, prob, level, time);
|
|
break;
|
|
case 3:
|
|
local totalDamage = receiveData.readDword();
|
|
sq_SetCurrentAttackInfo(obj, sq_GetCustomAttackInfo(obj, 144));
|
|
sq_SetCurrentAttackBonusRate(sq_GetCurrentAttackInfo(obj), totalDamage);
|
|
obj.addSetStatePacket(20, null, STATE_PRIORITY_AUTO, false, "");
|
|
break;
|
|
}
|
|
break;
|
|
case SKILL_SWORDMASTER_BYKK_THUNDERSLASH://穿雲破空劍
|
|
switch(subtype){
|
|
case 1:
|
|
local aniPath = "character/swordman/effect/animation/atthunderslash/thunderslash_shockwave.ani";
|
|
local ani = sq_CreateAnimation("",aniPath);
|
|
obj.setCurrentAnimation(ani);
|
|
local totalDamage = receiveData.readDword();
|
|
local sizeRate = receiveData.readDword();
|
|
sq_SetCurrentAttackInfo(obj, sq_GetCustomAttackInfo(obj, 149));
|
|
sq_SetCurrentAttackBonusRate(sq_GetCurrentAttackInfo(obj), totalDamage);
|
|
sq_ChangeDrawLayer(obj, ENUM_DRAWLAYER_BOTTOM);
|
|
if(sizeRate > 100){
|
|
sizeRate = sizeRate.tofloat() / 100;
|
|
local currentAni = obj.getCurrentAnimation();
|
|
currentAni.setImageRateFromOriginal(sizeRate, sizeRate);
|
|
currentAni.setAutoLayerWorkAnimationAddSizeRate(sizeRate);
|
|
sq_SetAttackBoundingBoxSizeRate(currentAni, sizeRate, sizeRate, sizeRate);
|
|
}
|
|
break;
|
|
case 2:
|
|
local totalDamage = receiveData.readDword();
|
|
local element = receiveData.readDword();
|
|
local sizeRate = receiveData.readDword();
|
|
print("sizeRate = "+sizeRate);
|
|
local aniPath = "";
|
|
switch(element){
|
|
case 0: aniPath = "passiveobject/atswordman_bykk/swordmaster/animation/atthunderslash/lv95passive/atthunderslashlv95passivefirefront_00.ani"; break;
|
|
case 1: aniPath = "passiveobject/atswordman_bykk/swordmaster/animation/atthunderslash/lv95passive/atthunderslashlv95passivecoldfront_00.ani"; break;
|
|
case 2: aniPath = "passiveobject/atswordman_bykk/swordmaster/animation/atthunderslash/lv95passive/atthunderslashlv95passivedarkfront_00.ani"; break;
|
|
case 3: aniPath = "passiveobject/atswordman_bykk/swordmaster/animation/atthunderslash/lv95passive/atthunderslashlv95passivelightningfront_00.ani"; break;
|
|
}
|
|
local ani = sq_CreateAnimation("",aniPath);
|
|
obj.setCurrentAnimation(ani);
|
|
local aniPath2 = ["passiveobject/atswordman_bykk/swordmaster/animation/atthunderslash/lv95passive/atthunderslashlv95passivefirebottom_00.ani","passiveobject/atswordman_bykk/swordmaster/animation/atthunderslash/lv95passive/atthunderslashlv95passivecoldbottom_00.ani","passiveobject/atswordman_bykk/swordmaster/animation/atthunderslash/lv95passive/atthunderslashlv95passivedarkbottom_00.ani","passiveobject/atswordman_bykk/swordmaster/animation/atthunderslash/lv95passive/atthunderslashlv95passivelightningbottom_00.ani"];
|
|
createOnlyDrawObject_AtSwordMan_bykk(obj,aniPath2[element],true,obj.getDirection(),sq_GetXPos(obj),sq_GetYPos(obj),0,ENUM_DRAWLAYER_BOTTOM);
|
|
local atkSet = [147,150,146,148,149];
|
|
sq_SetCurrentAttackInfo(obj, sq_GetCustomAttackInfo(obj, atkSet[element]));
|
|
sq_SetCurrentAttackBonusRate(sq_GetCurrentAttackInfo(obj), totalDamage);
|
|
//obj.setTimeEvent()
|
|
break;
|
|
}
|
|
break;
|
|
case SKILL_SWORDMASTER_BYKK_TIMESLASH://極 · 馭劍術 (時空斬)
|
|
switch(subtype){
|
|
case 1:
|
|
sqrChr.getVar("timeslash_bottom").clear_obj_vector();
|
|
sqrChr.getVar("timeslash_bottom").push_obj_vector(obj);
|
|
sq_ChangeDrawLayer(obj, ENUM_DRAWLAYER_BOTTOM);
|
|
obj.addSetStatePacket(20, null, STATE_PRIORITY_AUTO, false, "");
|
|
break;
|
|
case 2:
|
|
local aniPath = "passiveobject/atswordman_bykk/swordmaster/animation/attimeslash/attimeslashattackbox.ani";
|
|
local ani = sq_CreateAnimation("",aniPath);
|
|
obj.setCurrentAnimation(ani);
|
|
local totalDamage = receiveData.readDword();
|
|
sq_SetCurrentAttackInfo(obj, sq_GetCustomAttackInfo(obj, 151));
|
|
sq_SetCurrentAttackBonusRate(sq_GetCurrentAttackInfo(obj), totalDamage);
|
|
break;
|
|
case 3:
|
|
local aniPath = "passiveobject/atswordman_bykk/swordmaster/animation/attimeslash/attimeslashattackbox.ani";
|
|
local ani = sq_CreateAnimation("",aniPath);
|
|
obj.setCurrentAnimation(ani);
|
|
local totalDamage = receiveData.readDword();
|
|
sq_SetCurrentAttackInfo(obj, sq_GetCustomAttackInfo(obj, 152));
|
|
sq_SetCurrentAttackBonusRate(sq_GetCurrentAttackInfo(obj), totalDamage);
|
|
break;
|
|
}
|
|
break;
|
|
case SKILL_SWORDMASTER_BYKK_UPPERSLASH://升龍劍
|
|
break;
|
|
case SKILL_SWORDMASTER_BYKK_WEAPONCOMBO://帝國劍術
|
|
switch(subtype){
|
|
case 0://短劍
|
|
local totalDamage = receiveData.readDword();
|
|
local element = receiveData.readDword();
|
|
local subState = receiveData.readDword();
|
|
local aniPath = "passiveobject/atswordman_bykk/swordmaster/animation/atweaponcombo/swd/slash_0"+(subState+1).tostring()+".ani";
|
|
if(element < 4){
|
|
switch(element){
|
|
case 0: aniPath = "passiveobject/atswordman_bykk/swordmaster/animation/atweaponcombo/swd/fireslash_0"+(subState+1).tostring()+".ani"; break;
|
|
case 1: aniPath = "passiveobject/atswordman_bykk/swordmaster/animation/atweaponcombo/swd/iceslash_0"+(subState+1).tostring()+".ani"; break;
|
|
case 2: aniPath = "passiveobject/atswordman_bykk/swordmaster/animation/atweaponcombo/swd/darkslash_0"+(subState+1).tostring()+"_slash.ani"; break;
|
|
case 3: aniPath = "passiveobject/atswordman_bykk/swordmaster/animation/atweaponcombo/swd/lightslash_0"+(subState+1).tostring()+".ani"; break;
|
|
}
|
|
}
|
|
local ani = sq_CreateAnimation("",aniPath);
|
|
obj.setCurrentAnimation(ani);
|
|
local atkSet = [[159,160,161,162],[163,164,165,166],[167,168,169,170],[155,156,157,158],[171,172,173,174]];
|
|
|
|
sq_SetCurrentAttackInfo(obj, sq_GetCustomAttackInfo(obj, atkSet[element][subState]));
|
|
sq_SetCurrentAttackBonusRate(sq_GetCurrentAttackInfo(obj), totalDamage);
|
|
break;
|
|
case 1://鈍器
|
|
local aniPath = "passiveobject/atswordman_bykk/swordmaster/animation/atweaponcombo/shock_01.ani";
|
|
local ani = sq_CreateAnimation("",aniPath);
|
|
obj.setCurrentAnimation(ani);
|
|
local totalDamage = receiveData.readDword();
|
|
sq_SetCurrentAttackInfo(obj, sq_GetCustomAttackInfo(obj, 153));
|
|
sq_SetCurrentAttackBonusRate(sq_GetCurrentAttackInfo(obj), totalDamage);
|
|
break;
|
|
case 3://巨劍
|
|
local aniPath = "passiveobject/atswordman_bykk/swordmaster/animation/atweaponcombo/hit/hit_wind.ani";
|
|
local ani = sq_CreateAnimation("",aniPath);
|
|
obj.setCurrentAnimation(ani);
|
|
local totalDamage = receiveData.readDword();
|
|
local sizeRate = receiveData.readDword();
|
|
sq_SetCurrentAttackInfo(obj, sq_GetCustomAttackInfo(obj, 153));
|
|
sq_SetCurrentAttackBonusRate(sq_GetCurrentAttackInfo(obj), totalDamage);
|
|
local aniPath = "passiveobject/atswordman_bykk/swordmaster/animation/atweaponcombo/hit/floor_shock.ani";
|
|
local pooledObj = createOnlyDrawObject_AtSwordMan_bykk(obj,aniPath,true,obj.getDirection(),sq_GetXPos(obj),sq_GetYPos(obj),0,ENUM_DRAWLAYER_BOTTOM);
|
|
if(sizeRate > 100){
|
|
local currentAni = obj.getCurrentAnimation();
|
|
local pAni = pooledObj.getCurrentAnimation();
|
|
sizeRate = sizeRate.tofloat() / 100.0;
|
|
currentAni.setImageRateFromOriginal(sizeRate, sizeRate);
|
|
currentAni.setAutoLayerWorkAnimationAddSizeRate(sizeRate);
|
|
sq_SetAttackBoundingBoxSizeRate(currentAni, sizeRate, sizeRate, sizeRate);
|
|
pAni.setImageRateFromOriginal(sizeRate, sizeRate);
|
|
pAni.setAutoLayerWorkAnimationAddSizeRate(sizeRate);
|
|
}
|
|
break;
|
|
}
|
|
break;
|
|
}
|
|
break;
|
|
case 2:
|
|
switch(skillIndex){
|
|
case SKILL_DEMONSLAYER_BLOODDANCE://血飲狂舞
|
|
switch(subtype){
|
|
case 1:
|
|
local totalDamage = receiveData.readDword();
|
|
local delay = receiveData.readDword();
|
|
sqrChr.getVar("blooddance_obj").clear_obj_vector();
|
|
sqrChr.getVar("blooddance_obj").push_obj_vector(obj);
|
|
local aniPath = "passiveobject/atswordman_bykk/demonslayer/animation/atblooddance/atblooddance_devilswordtechloop1.ani";
|
|
local ani = sq_CreateAnimation("",aniPath);
|
|
obj.setCurrentAnimation(ani);
|
|
sq_SetCurrentAttackInfo(obj, sq_GetCustomAttackInfo(obj, 63));
|
|
sq_SetCurrentAttackBonusRate(sq_GetCurrentAttackInfo(obj), totalDamage);
|
|
local pAni = obj.getCurrentAnimation();
|
|
local speedRate = 3000.0 / delay.tofloat();
|
|
pAni.setSpeedRate(speedRate);
|
|
break;
|
|
case 2:
|
|
local totalDamage = receiveData.readDword();
|
|
local aniPath = "passiveobject/atswordman_bykk/demonslayer/animation/atblooddance/atblooddance_devilswordtechfinish2.ani";
|
|
local ani = sq_CreateAnimation("",aniPath);
|
|
obj.setCurrentAnimation(ani);
|
|
sq_SetCurrentAttackInfo(obj, sq_GetCustomAttackInfo(obj, 64));
|
|
sq_SetCurrentAttackBonusRate(sq_GetCurrentAttackInfo(obj), totalDamage);
|
|
break;
|
|
}
|
|
break;
|
|
case SKILL_DEMONSLAYER_BLOODDEMONSWORD://汲血魔劍
|
|
break;
|
|
case SKILL_DEMONSLAYER_BLOODOCTOPUSSWORD://蛇舞血輪劍
|
|
switch(subtype){
|
|
case 1:
|
|
local totalDamage = receiveData.readDword();
|
|
local hitMax = receiveData.readDword();
|
|
local speedRate = receiveData.readDword();
|
|
local aniPath = "passiveobject/atswordman_bykk/demonslayer/animation/atbloodoctopussword/bloodoctopussword04_00.ani";
|
|
local ani = sq_CreateAnimation("",aniPath);
|
|
obj.setCurrentAnimation(ani);
|
|
sq_SetCurrentAttackInfo(obj, sq_GetCustomAttackInfo(obj, 100));
|
|
sq_SetCurrentAttackBonusRate(sq_GetCurrentAttackInfo(obj), totalDamage);
|
|
local pAni = obj.getCurrentAnimation();
|
|
pAni.setSpeedRate(speedRate.tofloat());
|
|
local currentAni = obj.getCurrentAnimation();
|
|
local delaySum = currentAni.getDelaySum(0, 12);
|
|
obj.setTimeEvent(1, delaySum / (hitMax + 1), hitMax, true);
|
|
break;
|
|
case 2:
|
|
local totalDamage = receiveData.readDword();
|
|
local speedRate = receiveData.readDword();
|
|
local aniPath = "passiveobject/atswordman_bykk/demonslayer/animation/atbloodoctopussword/bloodoctopussword01finisheffect_18.ani";
|
|
local ani = sq_CreateAnimation("",aniPath);
|
|
obj.setCurrentAnimation(ani);
|
|
sq_SetCurrentAttackInfo(obj, sq_GetCustomAttackInfo(obj, 101));
|
|
sq_SetCurrentAttackBonusRate(sq_GetCurrentAttackInfo(obj), totalDamage);
|
|
local pAni = obj.getCurrentAnimation();
|
|
pAni.setSpeedRate(speedRate.tofloat());
|
|
break;
|
|
}
|
|
break;
|
|
case SKILL_DEMONSLAYER_BLOODSEAL://喚魔 : 封之印
|
|
switch(subtype){
|
|
case 1://發射
|
|
local totalDamage = receiveData.readDword();//迦羅亞多段物理攻擊力
|
|
local sizeRate = receiveData.readDword();//印痕大小比率
|
|
local damageRate = receiveData.readDword();//印痕多段物理攻擊力百分比
|
|
local damageRate2 = receiveData.readDword();//爆炸物理攻擊力百分比
|
|
local lifeTime = sq_GetIntData(sqrChr, SKILL_DEMONSLAYER_BLOODSEAL, 2);//持續時間
|
|
local hitTime = sq_GetIntData(sqrChr, SKILL_DEMONSLAYER_BLOODSEAL, 3);//迦羅亞多段攻擊間隔
|
|
local createTime = sq_GetIntData(sqrChr, SKILL_DEMONSLAYER_BLOODSEAL, 0);//印痕掉落間隔
|
|
local lifeTime2 = sq_GetIntData(sqrChr, SKILL_DEMONSLAYER_BLOODSEAL, 5);//印痕持續時間
|
|
local hitTime2 = sq_GetIntData(sqrChr, SKILL_DEMONSLAYER_BLOODSEAL, 4);//印痕多段攻擊間隔
|
|
local movespeedRate = sq_GetLevelData(sqrChr, SKILL_DEMONSLAYER_BLOODSEAL, 1, sq_GetSkillLevel(sqrChr, SKILL_DEMONSLAYER_BLOODSEAL));//減速率
|
|
obj.getVar("custom").setInt(10, lifeTime);
|
|
obj.getVar("custom").setInt(11, totalDamage);
|
|
obj.getVar("custom").setInt(12, damageRate);
|
|
obj.getVar("custom").setInt(13, damageRate2);
|
|
obj.getVar("custom").setInt(14, hitTime);
|
|
obj.getVar("custom").setInt(15, movespeedRate);
|
|
|
|
obj.getVar("custom").setInt(20, createTime);
|
|
obj.getVar("custom").setInt(21, lifeTime2);
|
|
obj.getVar("custom").setInt(22, sizeRate);
|
|
obj.getVar("custom").setInt(23, hitTime2);
|
|
local aniPath = "passiveobject/atswordman_bykk/demonslayer/animation/atbloodseal/bloodseal_bullet_00.ani";
|
|
local ani = sq_CreateAnimation("",aniPath);
|
|
obj.setCurrentAnimation(ani);
|
|
sq_SetCurrentAttackInfo(obj, sq_GetCustomAttackInfo(obj, 65));
|
|
sq_SetCurrentAttackBonusRate(sq_GetCurrentAttackInfo(obj), totalDamage);
|
|
obj.sq_SetMoveParticle("particle/bloodseal_move.ptl", 0.0, 0.0);
|
|
break;
|
|
case 2://黏住主體
|
|
local lifeTime = receiveData.readDword();//持續時間
|
|
local totalDamage = receiveData.readDword();//迦羅亞多段物理攻擊力
|
|
local hitTime = receiveData.readDword();//迦羅亞多段攻擊間隔
|
|
local createTime = receiveData.readDword();//印痕掉落間隔
|
|
local lifeTime2 = receiveData.readDword();//印痕持續時間
|
|
local sizeRate = receiveData.readDword();//印痕大小比率
|
|
local damageRate = receiveData.readDword();//印痕多段物理攻擊力百分比
|
|
local hitTime2 = receiveData.readDword();//印痕多段攻擊間隔
|
|
local damageRate2 = receiveData.readDword();//爆炸物理攻擊力百分比
|
|
local totalDamage2 = totalDamage * damageRate2 / 100;//爆炸物理攻擊力
|
|
local powerDamage = totalDamage * damageRate / 100;//印痕多段物理攻擊力
|
|
local id = receiveData.readDword();
|
|
obj.getVar("custom").setInt(10, lifeTime);
|
|
obj.getVar("custom").setInt(11, totalDamage);
|
|
obj.getVar("custom").setInt(12, totalDamage2);
|
|
obj.getVar("custom").setInt(13, hitTime);
|
|
|
|
obj.getVar("custom").setInt(20, createTime);
|
|
obj.getVar("custom").setInt(21, lifeTime2);
|
|
obj.getVar("custom").setInt(22, powerDamage);
|
|
obj.getVar("custom").setInt(23, sizeRate);
|
|
obj.getVar("custom").setInt(24, hitTime2);
|
|
local targetObj = sq_GetObjectByObjectId(obj, id);
|
|
if(targetObj){
|
|
obj.getVar("target").clear_obj_vector();
|
|
obj.getVar("target").push_obj_vector(targetObj);
|
|
sq_moveWithParent(targetObj, obj);
|
|
}
|
|
else sq_SendDestroyPacketPassiveObject(obj);
|
|
sq_SetCurrentAttackInfo(obj, sq_GetCustomAttackInfo(obj, 65));
|
|
sq_SetCurrentAttackBonusRate(sq_GetCurrentAttackInfo(obj), totalDamage);
|
|
obj.addSetStatePacket(20, null, STATE_PRIORITY_AUTO, false, "");
|
|
break;
|
|
case 3://印痕
|
|
local lifeTime2 = receiveData.readDword();
|
|
local powerDamage = receiveData.readDword();
|
|
local sizeRate = receiveData.readDword();
|
|
local hitTime2 = receiveData.readDword();
|
|
obj.getVar("custom").setInt(21, lifeTime2);
|
|
obj.getVar("custom").setInt(22, powerDamage);
|
|
obj.getVar("custom").setInt(23, sizeRate);
|
|
obj.getVar("custom").setInt(24, hitTime2);
|
|
sq_ChangeDrawLayer(obj, ENUM_DRAWLAYER_BOTTOM);
|
|
obj.addSetStatePacket(20, null, STATE_PRIORITY_AUTO, false, "");
|
|
break;
|
|
}
|
|
break;
|
|
case SKILL_DEMONSLAYER_CLAWBLADE://蛇腹劍 : 纏
|
|
switch(subtype){
|
|
case 1:
|
|
local totalDamage = receiveData.readDword();
|
|
local aniPath = "character/swordman/effect/animation/atthunderslash/thunderslash_shockwave.ani";
|
|
local ani = sq_CreateAnimation("",aniPath);
|
|
obj.setCurrentAnimation(ani);
|
|
sq_SetCurrentAttackInfo(obj, sq_GetCustomAttackInfo(obj, 68));
|
|
sq_SetCurrentAttackBonusRate(sq_GetCurrentAttackInfo(obj), totalDamage);
|
|
sq_ChangeDrawLayer(obj, ENUM_DRAWLAYER_BOTTOM);
|
|
break;
|
|
case 2:
|
|
local totalDamage = receiveData.readDword();
|
|
local id = receiveData.readDword();
|
|
local hitMax = receiveData.readDword();
|
|
obj.getVar("custom").setInt(10, totalDamage);
|
|
obj.getVar("custom").setInt(11, hitMax);
|
|
local stateIndex = 20;
|
|
local object = sq_GetObjectByObjectId(obj, id);
|
|
if(!object) stateIndex = 21;
|
|
if(stateIndex == 20){
|
|
obj.setTimeEvent(1, 500, hitMax - 1, false);
|
|
sq_moveWithParent(object, obj);
|
|
obj.getVar("targetObj").clear_obj_vector();
|
|
obj.getVar("targetObj").push_obj_vector(object);
|
|
}
|
|
sq_SetCurrentAttackInfo(obj, sq_GetCustomAttackInfo(obj, 68));
|
|
sq_SetCurrentAttackBonusRate(sq_GetCurrentAttackInfo(obj), totalDamage);
|
|
obj.addSetStatePacket(stateIndex, null, STATE_PRIORITY_AUTO, false, "");
|
|
break;
|
|
}
|
|
break;
|
|
case SKILL_DEMONSLAYER_DARKSTRIKE://喚魔 : 塔莫斯之襲
|
|
switch(subtype){
|
|
case 1://totalDamage, hitMax, hitTime, sizeRate, sub, damageRate, id
|
|
local totalDamage = receiveData.readDword();
|
|
local hitMax = receiveData.readDword();
|
|
local hitTime = receiveData.readDword();
|
|
local sizeRate = receiveData.readDword();
|
|
local sub = receiveData.readDword();
|
|
local damageRate = receiveData.readDword();
|
|
local id = receiveData.readDword();
|
|
local totalDamage2 = totalDamage * damageRate / 100;
|
|
obj.getVar("custom").setInt(10, totalDamage);
|
|
obj.getVar("custom").setInt(11, hitMax);
|
|
obj.getVar("custom").setInt(12, hitTime);
|
|
obj.getVar("custom").setInt(13, sizeRate);
|
|
obj.getVar("custom").setInt(14, sub);
|
|
obj.getVar("custom").setInt(15, totalDamage2);
|
|
if(id != 0){
|
|
local object = sq_GetObjectByObjectId(obj, id);
|
|
if(object) sq_moveWithParent(object, obj);
|
|
}
|
|
obj.addSetStatePacket(20, null, STATE_PRIORITY_AUTO, false, "");
|
|
break;
|
|
case 2:
|
|
sqrChr.getVar("darkStrike_Attack").clear_obj_vector();
|
|
sqrChr.getVar("darkStrike_Attack").push_obj_vector(obj);
|
|
local lifeTime = receiveData.readDword();
|
|
obj.setTimeEvent(2, lifeTime, 1, false);
|
|
break;
|
|
}
|
|
break;
|
|
case SKILL_DEMONSLAYER_GIGABLADE://空絕斬 : 仟刃
|
|
switch(subtype){
|
|
case 1:
|
|
local totalDamage = receiveData.readDword();
|
|
local aniPath = "passiveobject/atswordman_bykk/demonslayer/animation/atgigabladekelkusexp/gigablade_specialatk_06.ani";
|
|
local ani = sq_CreateAnimation("",aniPath);
|
|
obj.setCurrentAnimation(ani);
|
|
sq_SetCurrentAttackInfo(obj, sq_GetCustomAttackInfo(obj, 73));
|
|
sq_SetCurrentAttackBonusRate(sq_GetCurrentAttackInfo(obj), totalDamage);
|
|
break;
|
|
case 2:
|
|
local totalDamage = receiveData.readDword();
|
|
local sizeRate = receiveData.readDword();
|
|
local aniPath = "passiveobject/atswordman_bykk/demonslayer/animation/atgigabladefinishexp/gigabladeexplosion_02.ani";
|
|
local ani = sq_CreateAnimation("",aniPath);
|
|
obj.setCurrentAnimation(ani);
|
|
sq_SetCurrentAttackInfo(obj, sq_GetCustomAttackInfo(obj, 72));
|
|
sq_SetCurrentAttackBonusRate(sq_GetCurrentAttackInfo(obj), totalDamage);
|
|
local currentAni = obj.getCurrentAnimation();
|
|
sizeRate = sizeRate.tofloat() / 100.0;
|
|
currentAni.setImageRateFromOriginal(sizeRate, sizeRate);
|
|
currentAni.setAutoLayerWorkAnimationAddSizeRate(sizeRate);
|
|
sq_SetAttackBoundingBoxSizeRate(currentAni, sizeRate, sizeRate, sizeRate);
|
|
createOnlyDrawObject_AtSwordMan_bykk(obj,"passiveobject/atswordman_bykk/demonslayer/animation/atgigabladefinishexp/floor_06.ani",true,obj.getDirection(), sq_GetXPos(obj), sq_GetYPos(obj), 0, ENUM_DRAWLAYER_BOTTOM);
|
|
sq_flashScreen(obj, 0, 80, 0, 127, sq_RGB(0, 0, 0), GRAPHICEFFECT_NONE, ENUM_DRAWLAYER_BOTTOM);
|
|
sq_flashScreen(obj, 0, 10, 400, 204, sq_RGB(255, 255, 255), GRAPHICEFFECT_NONE, ENUM_DRAWLAYER_BOTTOM);
|
|
break;
|
|
}
|
|
break;
|
|
case SKILL_DEMONSLAYER_GIGASLASH://空絕斬 : 地裂
|
|
switch(subtype){
|
|
case 1:
|
|
local totalDamage = receiveData.readDword();
|
|
local aniPath = "passiveobject/atswordman_bykk/demonslayer/animation/atgigaslash/atgigaslash_blow_ground_crack03.ani";
|
|
local ani = sq_CreateAnimation("",aniPath);
|
|
obj.setCurrentAnimation(ani);
|
|
sq_SetCurrentAttackInfo(obj, sq_GetCustomAttackInfo(obj, 74));
|
|
sq_SetCurrentAttackBonusRate(sq_GetCurrentAttackInfo(obj), totalDamage);
|
|
sq_ChangeDrawLayer(obj, ENUM_DRAWLAYER_BOTTOM);
|
|
break;
|
|
}
|
|
break;
|
|
case SKILL_DEMONSLAYER_GREED://貪欲之燔祭
|
|
break;
|
|
case SKILL_DEMONSLAYER_GROUPDANCE://群魔亂舞
|
|
switch(subtype){
|
|
case 1://totalDamage, sub, id
|
|
local totalDamage = receiveData.readDword();
|
|
local sub = receiveData.readDword();
|
|
local id = receiveData.readDword();
|
|
switch(sub){
|
|
case 0:
|
|
local count = sq_GetIntData(sqrChr, SKILL_DEMONSLAYER_WHIPSWORDBAL, 0), isSub2 = 0;
|
|
if(sq_GetSkillLevel(sqrChr, SKILL_DEMONSLAYER_QUEENOFMINE) > 0){
|
|
if(count < 6) count = 6;
|
|
isSub2 = 1;
|
|
}
|
|
local offsetX = sq_GetIntData(sqrChr, SKILL_DEMONSLAYER_WHIPSWORDBAL, 1), offsetY = 0, isSub = 0;
|
|
local skill_level = sq_GetSkillLevel(sqrChr, SKILL_DEMONSLAYER_DEVILSWORDTECH);
|
|
if(skill_level > 0){offsetY = 40; isSub = 1;}
|
|
obj.getVar("custom").setInt(20, count);
|
|
obj.getVar("custom").setInt(21, totalDamage);
|
|
obj.getVar("custom").setInt(22, isSub);
|
|
obj.getVar("custom").setInt(23, isSub2);
|
|
obj.getVar("custom").setInt(24, offsetX);
|
|
obj.getVar("custom").setInt(25, offsetY);
|
|
obj.getVar("custom").setInt(26, skill_level);
|
|
sq_SetCurrentAttackInfo(obj, sq_GetCustomAttackInfo(obj, 96));
|
|
break;
|
|
case 1: sq_SetCurrentAttackInfo(obj, sq_GetCustomAttackInfo(obj, 93)); break;
|
|
case 2: sq_SetCurrentAttackInfo(obj, sq_GetCustomAttackInfo(obj, 90)); break;
|
|
case 3: sq_SetCurrentAttackInfo(obj, sq_GetCustomAttackInfo(obj, 97)); break;
|
|
case 4:
|
|
obj.getVar("custom").setInt(21, totalDamage);
|
|
sq_SetCurrentAttackInfo(obj, sq_GetCustomAttackInfo(obj, 88));
|
|
break;
|
|
}
|
|
obj.getVar("custom").setInt(11, sub);
|
|
local object = sq_GetObjectByObjectId(obj, id);
|
|
if(!object) sq_SendDestroyPacketPassiveObject(obj);
|
|
obj.getVar("target").clear_obj_vector();
|
|
obj.getVar("target").push_obj_vector(object);
|
|
obj.getVar("move").setInt(10, sq_GetXPos(obj));
|
|
obj.getVar("move").setInt(11, sq_GetYPos(obj));
|
|
if(sq_getRandom(1,100) > 50){
|
|
obj.getVar("move").setInt(12, sq_GetDistancePos(sq_GetXPos(object), object.getDirection(), 150));
|
|
obj.getVar("move").setInt(13, sq_GetOppositeDirection(object.getDirection()));
|
|
}
|
|
else{
|
|
obj.getVar("move").setInt(12, sq_GetDistancePos(sq_GetXPos(object), object.getDirection(), -150));
|
|
obj.getVar("move").setInt(13, object.getDirection());
|
|
}
|
|
sq_SetCurrentAttackBonusRate(sq_GetCurrentAttackInfo(obj), totalDamage);
|
|
obj.setTimeEvent(4, 200, 1, false);
|
|
break;
|
|
}
|
|
break;
|
|
case SKILL_DEMONSLAYER_PHNOM://喚魔 : 逆天之普諾
|
|
switch(subtype){
|
|
case 1://totalDamage, hitMax, sizeRate, damageRate
|
|
local totalDamage = receiveData.readDword();
|
|
local hitMax = receiveData.readDword();
|
|
local sizeRate = receiveData.readDword();
|
|
local damageRate = receiveData.readDword();
|
|
local speedRate = receiveData.readDword();
|
|
local totalDamage2 = totalDamage * damageRate / 100;
|
|
obj.getVar("custom").setInt(10, totalDamage);
|
|
obj.getVar("custom").setInt(11, totalDamage2);
|
|
obj.getVar("custom").setInt(12, hitMax);
|
|
obj.getVar("custom").setInt(13, sizeRate);
|
|
obj.getVar("custom").setInt(14, speedRate);
|
|
obj.getVar("custom").setInt(15, 0);
|
|
obj.addSetStatePacket(20, null, STATE_PRIORITY_AUTO, false, "");
|
|
break;
|
|
case 2:
|
|
obj.addSetStatePacket(20, null, STATE_PRIORITY_AUTO, false, "");
|
|
break;
|
|
}
|
|
break;
|
|
case SKILL_DEMONSLAYER_PIKESWORD://蛇腹劍 : 刺
|
|
break;
|
|
case SKILL_DEMONSLAYER_PREDATORGALOA://貪食者迦羅亞
|
|
switch(subtype){
|
|
case 1://totalDamage, catchMax, hitMax, damageRate, lifeTime, hitTime, sub
|
|
if(sqrChr.getVar("predatorgaloaObj").get_obj_vector_size() > 0) sqrChr.getVar("predatorgaloaObj").push_obj_vector(obj);
|
|
else{
|
|
sqrChr.getVar("predatorgaloaObj").clear_obj_vector();
|
|
sqrChr.getVar("predatorgaloaObj").push_obj_vector(obj);
|
|
}
|
|
obj.setMapFollowParent(sqrChr);
|
|
obj.setMapFollowType(1);
|
|
local totalDamage = receiveData.readDword();
|
|
local catchMax = receiveData.readDword();
|
|
local hitMax = receiveData.readDword();
|
|
local damageRate = receiveData.readDword();
|
|
local lifeTime = receiveData.readDword();
|
|
local hitTime = receiveData.readDword();
|
|
local sub = receiveData.readDword();
|
|
local range = receiveData.readDword();
|
|
local skill_level = sq_GetSkillLevel(sqrChr, SKILL_DEMONSLAYER_PREDATORGALOA);
|
|
local nor_hp = sq_GetLevelData(sqrChr, SKILL_DEMONSLAYER_PREDATORGALOA, 3, skill_level);
|
|
local exp_hp = sq_GetLevelData(sqrChr, SKILL_DEMONSLAYER_PREDATORGALOA, 4, skill_level);
|
|
local create_number = sq_GetIntData(sqrChr, SKILL_DEMONSLAYER_PREDATORGALOA, 0);
|
|
local totalDamage2 = totalDamage * damageRate / 100;
|
|
obj.setTimeEvent(5, lifeTime, 1, false);
|
|
obj.getVar("custom").setInt(10, totalDamage);
|
|
obj.getVar("custom").setInt(11, totalDamage2);
|
|
obj.getVar("custom").setInt(12, catchMax);
|
|
obj.getVar("custom").setInt(13, hitMax);
|
|
obj.getVar("custom").setInt(14, lifeTime);
|
|
obj.getVar("custom").setInt(15, hitTime);
|
|
obj.getVar("custom").setInt(16, sub);
|
|
obj.getVar("custom").setInt(17, nor_hp);
|
|
obj.getVar("custom").setInt(18, exp_hp);
|
|
obj.getVar("custom").setInt(19, range);
|
|
obj.getVar("custom").setInt(20, 0);
|
|
obj.getVar("custom").setInt(21, create_number);
|
|
obj.getVar("tar").clear_obj_vector();
|
|
obj.getVar("tar").push_obj_vector(obj);
|
|
obj.addSetStatePacket(20, null, STATE_PRIORITY_AUTO, false, "");
|
|
break;
|
|
}
|
|
break;
|
|
case SKILL_DEMONSLAYER_RAGNAROK://弒神劍 : 諸神獻祭
|
|
switch(subtype){
|
|
case 1:
|
|
local totalDamage = receiveData.readDword();
|
|
local hitMax = receiveData.readDword();
|
|
local aniPath = "passiveobject/atswordman_bykk/demonslayer/animation/atragnarok/attack/ratka_07.ani";
|
|
local ani = sq_CreateAnimation("",aniPath);
|
|
obj.setCurrentAnimation(ani);
|
|
sq_SetCurrentAttackInfo(obj, sq_GetCustomAttackInfo(obj, 81));
|
|
sq_SetCurrentAttackBonusRate(sq_GetCurrentAttackInfo(obj), totalDamage);
|
|
local currentAni = obj.getCurrentAnimation();
|
|
local delaySum = currentAni.getDelaySum(false);
|
|
obj.setTimeEvent(1,delaySum / (hitMax + 1), hitMax, true);
|
|
//sq_ChangeDrawLayer(obj, ENUM_DRAWLAYER_BOTTOM);
|
|
break;
|
|
case 2:
|
|
local totalDamage = receiveData.readDword();
|
|
local hitMax = receiveData.readDword();
|
|
local totalDamage2 = receiveData.readDword();
|
|
obj.getVar("custom").setInt(10, totalDamage);
|
|
obj.getVar("custom").setInt(11, hitMax);
|
|
obj.getVar("custom").setInt(12, totalDamage2);
|
|
local aniPath = "passiveobject/atswordman_bykk/demonslayer/animation/atragnarok/attack/ratkb_10.ani";
|
|
local ani = sq_CreateAnimation("",aniPath);
|
|
obj.setCurrentAnimation(ani);
|
|
break;
|
|
case 3:
|
|
local totalDamage = receiveData.readDword();
|
|
local hitMax = receiveData.readDword();
|
|
local aniPath = "passiveobject/atswordman_bykk/demonslayer/animation/atragnarok/attack/ratkfloor_38.ani";
|
|
local ani = sq_CreateAnimation("",aniPath);
|
|
obj.setCurrentAnimation(ani);
|
|
sq_SetCurrentAttackInfo(obj, sq_GetCustomAttackInfo(obj, 82));
|
|
sq_SetCurrentAttackBonusRate(sq_GetCurrentAttackInfo(obj), totalDamage);
|
|
local currentAni = obj.getCurrentAnimation();
|
|
local delaySum = currentAni.getDelaySum(0, 10);
|
|
obj.setTimeEvent(1,delaySum / (hitMax + 1), hitMax, true);
|
|
sq_ChangeDrawLayer(obj, ENUM_DRAWLAYER_BOTTOM);
|
|
break;
|
|
}
|
|
break;
|
|
case SKILL_DEMONSLAYER_SNAKEDANCE://蛇腹劍 : 舞
|
|
break;
|
|
case SKILL_DEMONSLAYER_ULTIMATEBLADE://弒神劍 : 極
|
|
switch(subtype){
|
|
case 1://
|
|
local totalDamage = receiveData.readDword();
|
|
local aniPath = "passiveobject/atswordman_bykk/demonslayer/animation/atultimateblade/downeffect_dustf02.ani";
|
|
local ani = sq_CreateAnimation("",aniPath);
|
|
obj.setCurrentAnimation(ani);
|
|
sq_SetCurrentAttackInfo(obj, sq_GetCustomAttackInfo(obj, 85));
|
|
sq_SetCurrentAttackBonusRate(sq_GetCurrentAttackInfo(obj), totalDamage);
|
|
obj.setTimeEvent(1, 150, 1, false);
|
|
break;
|
|
case 2:
|
|
local totalDamage = receiveData.readDword();
|
|
local aniPath = "passiveobject/atswordman_bykk/demonslayer/animation/atultimateblade/finishdowneffect_dustf02.ani";
|
|
local ani = sq_CreateAnimation("",aniPath);
|
|
obj.setCurrentAnimation(ani);
|
|
sq_SetCurrentAttackInfo(obj, sq_GetCustomAttackInfo(obj, 84));
|
|
sq_SetCurrentAttackBonusRate(sq_GetCurrentAttackInfo(obj), totalDamage);
|
|
obj.setTimeEvent(1, 150, 1, false);
|
|
break;
|
|
}
|
|
break;
|
|
case SKILL_DEMONSLAYER_WHIPSWORDBAL://蛇腹劍 : 破
|
|
switch(subtype){
|
|
case 1:
|
|
local totalDamage = receiveData.readDword();
|
|
local isSub = receiveData.readDword();
|
|
local isSub2 = receiveData.readDword();
|
|
local aniPath = "passiveobject/atswordman_bykk/demonslayer/animation/atwhipswordbal/bal_swordattack.ani";
|
|
if(isSub > 0) aniPath = "passiveobject/atswordman_bykk/demonslayer/animation/atwhipswordbal/devilswordtech/bal_swordattack_devils.ani";
|
|
local ani = sq_CreateAnimation("",aniPath);
|
|
obj.setCurrentAnimation(ani);
|
|
sq_SetCurrentAttackInfo(obj, sq_GetCustomAttackInfo(obj, 86));
|
|
sq_SetCurrentAttackBonusRate(sq_GetCurrentAttackInfo(obj), totalDamage);
|
|
if(isSub2 > 0){
|
|
local currentAni = obj.getCurrentAnimation();
|
|
local sizeRate = 1.2;
|
|
currentAni.setImageRateFromOriginal(sizeRate, sizeRate);
|
|
currentAni.setAutoLayerWorkAnimationAddSizeRate(sizeRate);
|
|
sq_SetAttackBoundingBoxSizeRate(currentAni, sizeRate, sizeRate, sizeRate);
|
|
}
|
|
break;
|
|
}
|
|
break;
|
|
case SKILL_DEMONSLAYER_WILDWHIP://蛇腹劍 : 滅
|
|
switch(subtype){
|
|
case 1:
|
|
local totalDamage = receiveData.readDword();
|
|
local delay = receiveData.readDword();
|
|
sqrChr.getVar("wildwhip_obj").clear_obj_vector();
|
|
sqrChr.getVar("wildwhip_obj").push_obj_vector(obj);
|
|
local aniPath = "passiveobject/atswordman_bykk/demonslayer/animation/atwildwhip/devilswordtech/wildwhip_deviltechswordloop1.ani";
|
|
local ani = sq_CreateAnimation("",aniPath);
|
|
obj.setCurrentAnimation(ani);
|
|
sq_SetCurrentAttackInfo(obj, sq_GetCustomAttackInfo(obj, 87));
|
|
sq_SetCurrentAttackBonusRate(sq_GetCurrentAttackInfo(obj), totalDamage);
|
|
local speedRate = 8000.0 / delay.tofloat();
|
|
local pAni = obj.getCurrentAnimation();
|
|
pAni.setSpeedRate(speedRate);
|
|
break;
|
|
}
|
|
break;
|
|
}
|
|
break;
|
|
local attackInfo = sq_GetCurrentAttackInfo(obj);
|
|
if(attackInfo && sq_GetSkillLevel(sqrChr, SKILL_DEMONSLAYER_CALLDAIMUS) > 0){
|
|
local bleedingProb = sq_GetLevelData(sqrChr, SKILL_DEMONSLAYER_CALLDAIMUS, 0, sq_GetSkillLevel(sqrChr, SKILL_DEMONSLAYER_CALLDAIMUS));
|
|
local bleedingTime = sq_GetLevelData(sqrChr, SKILL_DEMONSLAYER_CALLDAIMUS, 1, sq_GetSkillLevel(sqrChr, SKILL_DEMONSLAYER_CALLDAIMUS));
|
|
local bleedingDamage = sq_GetLevelData(sqrChr, SKILL_DEMONSLAYER_CALLDAIMUS, 2, sq_GetSkillLevel(sqrChr, SKILL_DEMONSLAYER_CALLDAIMUS));
|
|
sq_SetChangeStatusIntoAttackInfo(attackInfo, 0, ACTIVESTATUS_BLEEDING,bleedingProb,sq_GetSkillLevel(sqrChr, 174) + 10, bleedingTime, bleedingDamage);
|
|
}
|
|
case 3://vagabond
|
|
switch(skillIndex){
|
|
case SKILL_VAGABOND_BIGJANG://如來神掌
|
|
switch(subtype){
|
|
case 1:
|
|
case 2:
|
|
local totalDamage = receiveData.readDword();
|
|
local damageRate = receiveData.readDword();
|
|
local dis = receiveData.readDword();
|
|
local sizeRate = receiveData.readDword();
|
|
local sub = receiveData.readDword();
|
|
local sub2 = receiveData.readDword();
|
|
local totalDamage2 = (totalDamage.tofloat() * damageRate.tofloat() / 100.0).tointeger();
|
|
obj.getVar("custom").setInt(20, totalDamage2);
|
|
obj.getVar("custom").setInt(10, sq_GetXPos(obj));
|
|
obj.getVar("custom").setInt(11, sq_GetZPos(obj));
|
|
obj.getVar("custom").setInt(12, dis);
|
|
print("dis = "+dis);
|
|
obj.getVar("custom").setInt(13, sizeRate);
|
|
obj.getVar("custom").setInt(14, sub2);
|
|
local attackIndex = 42, stateIndex = 20;
|
|
if(subtype == 2) attackIndex = 39;
|
|
if(sub > 0) stateIndex = 22;
|
|
sq_SetCurrentAttackInfo(obj, sq_GetCustomAttackInfo(obj, attackIndex));
|
|
sq_SetCurrentAttackBonusRate(sq_GetCurrentAttackInfo(obj), totalDamage);
|
|
obj.addSetStatePacket(stateIndex, null, STATE_PRIORITY_AUTO, false, "");
|
|
break;
|
|
}
|
|
break;
|
|
case SKILL_VAGABOND_BLASTSWORD://回天璇鳴劍
|
|
switch(subtype){
|
|
case 1:
|
|
local totalDamage = receiveData.readDword();
|
|
local sizeRate = receiveData.readDword();
|
|
cearteSkillPassiveObj_AtSwordMan_bykk(obj, obj, PASSIVEOBJECT_BYKK_VAGABOND, 0, 0, 0, obj.getDirection(), 3, SKILL_VAGABOND_BLASTSWORD, 2, sizeRate, 0, 0, 0, 0, 0, 0, 0, 0);
|
|
local aniPath = "passiveobject/atswordman_bykk/vagabond/animation/atblastsword/boom_base.ani";
|
|
local ani = sq_CreateAnimation("",aniPath);
|
|
obj.setCurrentAnimation(ani);
|
|
sq_SetCurrentAttackInfo(obj, sq_GetCustomAttackInfo(obj, 44));
|
|
sq_SetCurrentAttackBonusRate(sq_GetCurrentAttackInfo(obj), totalDamage);
|
|
local currentAni = obj.getCurrentAnimation();
|
|
sizeRate = sizeRate.tofloat() / 100.0;
|
|
currentAni.setImageRateFromOriginal(sizeRate, sizeRate);
|
|
currentAni.setAutoLayerWorkAnimationAddSizeRate(sizeRate);
|
|
sq_SetAttackBoundingBoxSizeRate(currentAni, sizeRate, sizeRate, sizeRate);
|
|
break;
|
|
case 2:
|
|
local sizeRate = receiveData.readDword();
|
|
local aniPath = "passiveobject/atswordman_bykk/vagabond/animation/atblastsword/boombottom_18.ani";
|
|
local ani = sq_CreateAnimation("",aniPath);
|
|
obj.setCurrentAnimation(ani);
|
|
local currentAni = obj.getCurrentAnimation();
|
|
sizeRate = sizeRate.tofloat() / 100.0;
|
|
currentAni.setImageRateFromOriginal(sizeRate, sizeRate);
|
|
currentAni.setAutoLayerWorkAnimationAddSizeRate(sizeRate);
|
|
sq_SetAttackBoundingBoxSizeRate(currentAni, sizeRate, sizeRate, sizeRate);
|
|
sq_ChangeDrawLayer(obj, ENUM_DRAWLAYER_BOTTOM);
|
|
break;
|
|
}
|
|
break;
|
|
case SKILL_VAGABOND_COALBAN://遊龍掌
|
|
switch(subtype){
|
|
case 1://totalDamage, sizeRate, dis, partl, angle, sub
|
|
local totalDamage = receiveData.readDword();
|
|
local sizeRate = receiveData.readDword();
|
|
local dis = receiveData.readDword();
|
|
local partl = receiveData.readDword();
|
|
local angle = receiveData.readDword();
|
|
local sub = receiveData.readDword();
|
|
obj.getVar("custom").setInt(10, dis);
|
|
obj.getVar("custom").setInt(11, sq_GetXPos(obj));
|
|
obj.getVar("custom").setInt(12, sq_GetZPos(obj));
|
|
obj.getVar("custom").setInt(15, angle);
|
|
local aniPath = "passiveobject/atswordman_bykk/vagabond/animation/atcoalban/strongshooting_04.ani";
|
|
local ani = sq_CreateAnimation("",aniPath);
|
|
obj.setCurrentAnimation(ani);
|
|
local MoveZ = 100,angle = 45;
|
|
switch(partl){
|
|
case 2: MoveZ = -100;angle = -45; break;
|
|
case 3: MoveZ = -10;angle = -5; break;
|
|
case 4: MoveZ = 30;angle = 10; break;
|
|
case 11: MoveZ = 50;angle = 45; break;
|
|
case 12: MoveZ = -50;angle = -45; break;
|
|
case 13: MoveZ = -5;angle = -5; break;
|
|
case 14: MoveZ = 15;angle = 10; break;
|
|
case 21: MoveZ = 150;angle = 45; break;
|
|
case 22: MoveZ = -150;angle = -45; break;
|
|
case 23: MoveZ = -15;angle = -5; break;
|
|
case 24: MoveZ = 45;angle = 10; break;
|
|
}
|
|
obj.getVar("custom").setInt(13, MoveZ);
|
|
obj.getVar("custom").setInt(14, angle);
|
|
sq_SetCurrentAttackInfo(obj, sq_GetCustomAttackInfo(obj, 45));
|
|
sq_SetCurrentAttackBonusRate(sq_GetCurrentAttackInfo(obj), totalDamage);
|
|
local currentAni = obj.getCurrentAnimation();
|
|
sizeRate = sizeRate.tofloat() / 130.0;
|
|
currentAni.setImageRateFromOriginal(sizeRate, sizeRate);
|
|
currentAni.setAutoLayerWorkAnimationAddSizeRate(sizeRate);
|
|
sq_SetAttackBoundingBoxSizeRate(currentAni, sizeRate, sizeRate, sizeRate);
|
|
obj.setTimeEvent(1, 100, -1, false);
|
|
break;
|
|
}
|
|
break;
|
|
case SKILL_VAGABOND_COMETBLADE://花舞仟魂殺
|
|
switch(subtype){
|
|
case 1:
|
|
local totalDamage = receiveData.readDword();
|
|
local sizeRate = receiveData.readDword();
|
|
local delaySum = receiveData.readDword();
|
|
local aniPath = "passiveobject/atswordman_bykk/vagabond/animation/atcometblade/cometblade03atkb_body.ani";
|
|
local ani = sq_CreateAnimation("",aniPath);
|
|
obj.setCurrentAnimation(ani);
|
|
sq_moveWithParent(sqrChr, obj);
|
|
sq_SetCurrentAttackInfo(obj, sq_GetCustomAttackInfo(obj, 61));
|
|
sq_SetCurrentAttackBonusRate(sq_GetCurrentAttackInfo(obj), totalDamage);
|
|
local currentAni = obj.getCurrentAnimation();
|
|
sizeRate = sizeRate.tofloat() / 100.0;
|
|
local speedRate = 4500.0 / delaySum.tofloat();
|
|
currentAni.setSpeedRate(speedRate);
|
|
sq_SetAttackBoundingBoxSizeRate(currentAni, sizeRate, sizeRate, sizeRate);
|
|
break;
|
|
case 2:
|
|
local sub = receiveData.readDword();
|
|
local sizeRateMin = receiveData.readDword();
|
|
local sizeRateMax = receiveData.readDword();
|
|
local rotateSetMin = receiveData.readDword();
|
|
local rotateSetMax = receiveData.readDword();
|
|
local createMax = receiveData.readDword();
|
|
local createFreq = receiveData.readDword();
|
|
obj.getVar("custom").setInt(10, sub);
|
|
obj.getVar("custom").setInt(11, sizeRateMin);
|
|
obj.getVar("custom").setInt(12, sizeRateMax);
|
|
obj.getVar("custom").setInt(13, rotateSetMin);
|
|
obj.getVar("custom").setInt(14, rotateSetMax);
|
|
obj.getVar("custom").setInt(15, createMax);
|
|
obj.setTimeEvent(1, createFreq * 5, createMax, false);
|
|
break;
|
|
case 3:
|
|
local sub = receiveData.readDword();
|
|
local sizeRate = receiveData.readDword();
|
|
local rotateSet = receiveData.readDword();
|
|
local aniPath = "passiveobject/atswordman_bykk/vagabond/animation/atcometblade/leaf.ani";
|
|
local ani = sq_CreateAnimation("",aniPath);
|
|
obj.setCurrentAnimation(ani);
|
|
local currentAni = obj.getCurrentAnimation();
|
|
sizeRate = sizeRate.tofloat() / 100.0;
|
|
currentAni.setImageRateFromOriginal(sizeRate, sizeRate);
|
|
sq_SetCustomRotate(obj, sq_ToRadian(rotateSet.tofloat()));
|
|
switch(sub){
|
|
case 1: obj.sq_SetMoveParticle("particle/atcometbladefinishleaf.ptl", 0.0, 0.0); break;
|
|
case 2: obj.sq_SetMoveParticle("particle/atcometbladefinishmiddleleaf.ptl", 0.0, 0.0); break;
|
|
case 3: obj.sq_SetMoveParticle("particle/atcometbladefinishsmallleaf.ptl", 0.0, 0.0); break;
|
|
}
|
|
break;
|
|
}
|
|
break;
|
|
case SKILL_VAGABOND_DUALWEAPON://兩儀功
|
|
break;
|
|
case SKILL_VAGABOND_EARTHPRESSURE://碎巖裂地掌
|
|
switch(subtype){
|
|
case 1:
|
|
local totalDamage = receiveData.readDword();
|
|
local range = receiveData.readDword();
|
|
local delay = receiveData.readDword();
|
|
local sizeRate = range.tofloat() / 130.0;
|
|
print(sizeRate);
|
|
local speedRate = 6000.0 / delay.tofloat();
|
|
local aniPath = "passiveobject/atswordman_bykk/vagabond/animation/atearthpressure/flooreffect.ani";
|
|
local ani = sq_CreateAnimation("",aniPath);
|
|
obj.setCurrentAnimation(ani);
|
|
sq_SetCurrentAttackInfo(obj, sq_GetCustomAttackInfo(obj, 46));
|
|
sq_SetCurrentAttackBonusRate(sq_GetCurrentAttackInfo(obj), totalDamage);
|
|
sq_ChangeDrawLayer(obj, ENUM_DRAWLAYER_BOTTOM);
|
|
local attackInfo = sq_GetCurrentAttackInfo(obj);
|
|
sq_SetAddWeaponDamage(attackInfo, true);
|
|
local currentAni = obj.getCurrentAnimation();
|
|
sq_AddAttackBox(currentAni, -270,-54,-15,540,108,137);
|
|
currentAni.setSpeedRate(speedRate);
|
|
currentAni.setImageRateFromOriginal(sizeRate, sizeRate);
|
|
currentAni.setAutoLayerWorkAnimationAddSizeRate(sizeRate);
|
|
sq_SetAttackBoundingBoxSizeRate(currentAni, sizeRate, sizeRate, sizeRate);
|
|
break;
|
|
}
|
|
break;
|
|
case SKILL_VAGABOND_FATALFLOWER://花開寒影
|
|
switch(subtype){
|
|
case 1:
|
|
local totalDamage = receiveData.readDword();
|
|
local hitMax = receiveData.readDword();
|
|
local damageRate = receiveData.readDword();
|
|
local delay = receiveData.readDword();
|
|
local aniPath = "passiveobject/atswordman_bykk/vagabond/animation/atfatalflower/newhellfireb_21.ani";
|
|
local ani = sq_CreateAnimation("",aniPath);
|
|
obj.setCurrentAnimation(ani);
|
|
sq_SetCurrentAttackInfo(obj, sq_GetCustomAttackInfo(obj, 47));
|
|
sq_SetCurrentAttackBonusRate(sq_GetCurrentAttackInfo(obj), totalDamage);
|
|
local totalDamage2 = totalDamage * damageRate / 100;
|
|
obj.getVar("custom").setInt(10, totalDamage2);
|
|
obj.getVar("custom").setInt(11, hitMax);
|
|
local speedRate = 5400.0 / delay.tofloat();
|
|
obj.getVar("custom").setInt(12, (speedRate * 100).tointeger());
|
|
local currentAni = obj.getCurrentAnimation();
|
|
currentAni.setSpeedRate(speedRate);
|
|
break;
|
|
case 2:
|
|
local sub = receiveData.readDword();
|
|
local speedRate = receiveData.readDword();
|
|
speedRate = speedRate.tofloat() / 100.0;
|
|
local charAni = sq_GetCustomAni(sqrChr, sub);
|
|
sq_Rewind(charAni);
|
|
obj.setCurrentAnimation(charAni);
|
|
local currentAni = obj.getCurrentAnimation();
|
|
currentAni.setSpeedRate(speedRate);
|
|
break;
|
|
}
|
|
break;
|
|
case SKILL_VAGABOND_FISTOFEXPLOSION://湮烈掌
|
|
switch(subtype){
|
|
case 1:
|
|
local totalDamage = receiveData.readDword();
|
|
local sizeRate = receiveData.readDword();
|
|
local lifeTime = receiveData.readDword();
|
|
local hitMax = receiveData.readDword();
|
|
local damageRate = receiveData.readDword();
|
|
local sub = receiveData.readDword();
|
|
local totalDamage2 = (totalDamage.tofloat() * damageRate.tofloat() / 100.0).tointeger();
|
|
obj.getVar("custom").setInt(10, totalDamage2);
|
|
obj.getVar("custom").setInt(11, lifeTime);
|
|
obj.getVar("custom").setInt(12, hitMax);
|
|
obj.getVar("custom").setInt(13, sub);
|
|
local aniPath = "passiveobject/atswordman_bykk/vagabond/animation/atfistofexplosion/shootfront_08.ani";
|
|
local ani = sq_CreateAnimation("",aniPath);
|
|
obj.setCurrentAnimation(ani);
|
|
sq_SetCurrentAttackInfo(obj, sq_GetCustomAttackInfo(obj, 49));
|
|
sq_SetCurrentAttackBonusRate(sq_GetCurrentAttackInfo(obj), totalDamage);
|
|
local currentAni = obj.getCurrentAnimation();
|
|
currentAni.addLayerAnimation(-1,sq_CreateAnimation("","passiveobject/atswordman_bykk/vagabond/animation/atfistofexplosion/shootback_04.ani"),true);
|
|
sizeRate = sizeRate.tofloat() / 100.0;
|
|
currentAni.setImageRateFromOriginal(sizeRate, sizeRate);
|
|
currentAni.setAutoLayerWorkAnimationAddSizeRate(sizeRate);
|
|
sq_SetAttackBoundingBoxSizeRate(currentAni, sizeRate, sizeRate, sizeRate);
|
|
break;
|
|
case 2:
|
|
local totalDamage = receiveData.readDword();
|
|
local lifeTime = receiveData.readDword();
|
|
local hitMax = receiveData.readDword();
|
|
local sub = receiveData.readDword();
|
|
local group = receiveData.readDword();
|
|
local uniqueId = receiveData.readDword();
|
|
local targetObj = sq_GetObject(sqrChr, group, uniqueId);
|
|
if(!targetObj) sq_SendDestroyPacketPassiveObject(obj);
|
|
obj.getVar("custom").setInt(10, totalDamage);
|
|
obj.getVar("custom").setInt(11, lifeTime);
|
|
obj.getVar("custom").setInt(12, hitMax);
|
|
obj.getVar("custom").setInt(13, sub);
|
|
sq_SetCurrentAttackInfo(obj, sq_GetCustomAttackInfo(obj, 49));
|
|
sq_SetCurrentAttackBonusRate(sq_GetCurrentAttackInfo(obj), totalDamage * 5 / 100);
|
|
sq_moveWithParent(targetObj, obj);
|
|
obj.getVar("targetObj").clear_obj_vector();
|
|
obj.getVar("targetObj").push_obj_vector(targetObj);
|
|
obj.addSetStatePacket(20, null, STATE_PRIORITY_AUTO, false, "");
|
|
break;
|
|
}
|
|
break;
|
|
case SKILL_VAGABOND_FLOWERBLADEDANCE://蓮花劍舞
|
|
break;
|
|
case SKILL_VAGABOND_GONEWITHTHEPETAL://落英驚鴻掌
|
|
switch(subtype){
|
|
case 1:
|
|
local totalDamage = receiveData.readDword();
|
|
local hitMax = receiveData.readDword();
|
|
local damageRate = receiveData.readDword();
|
|
local group = receiveData.readDword();
|
|
local uniqueId = receiveData.readDword();
|
|
local targetObj = sq_GetObject(sqrChr, group, uniqueId);
|
|
if(!targetObj) sq_SendDestroyPacketPassiveObject(obj);
|
|
local totalDamage2 = totalDamage * damageRate / 100;
|
|
//print(totalDamage+" && "+totalDamage2);
|
|
obj.getVar("custom").setInt(10, totalDamage2);
|
|
obj.getVar("custom").setInt(11, hitMax);
|
|
sq_SetCurrentAttackInfo(obj, sq_GetCustomAttackInfo(obj, 62));
|
|
sq_SetCurrentAttackBonusRate(sq_GetCurrentAttackInfo(obj), totalDamage);
|
|
if(hitMax > 1) obj.setTimeEvent(1, 150, hitMax, false);
|
|
else obj.setTimeEvent(2, 150, 1, true);
|
|
sq_moveWithParent(targetObj, obj);
|
|
obj.getVar("targetObj").clear_obj_vector();
|
|
obj.getVar("targetObj").push_obj_vector(targetObj);
|
|
obj.addSetStatePacket(20, null, STATE_PRIORITY_AUTO, false, "");
|
|
break;
|
|
}
|
|
break;
|
|
case SKILL_VAGABOND_HERMITTRIPLESTEP://櫻花劫
|
|
break;
|
|
case SKILL_VAGABOND_INHALATION://四象引
|
|
switch(subtype){
|
|
case 1:
|
|
local range = receiveData.readDword();
|
|
local aniPath = "character/swordman/effect/animation/atinhalation/bounds_01bottom.ani";
|
|
local ani = sq_CreateAnimation("",aniPath);
|
|
obj.setCurrentAnimation(ani);
|
|
local sizeRate = range.tofloat() / 300.0;
|
|
local currentAni = obj.getCurrentAnimation();
|
|
currentAni.setImageRateFromOriginal(sizeRate, sizeRate);
|
|
currentAni.setAutoLayerWorkAnimationAddSizeRate(sizeRate);
|
|
range = range / 2;
|
|
local objectManager = obj.getObjectManager();
|
|
local objectNumber = objectManager.getCollisionObjectNumber();
|
|
for(local i = 0; i < objectNumber; i++){
|
|
local object = objectManager.getCollisionObject(i);
|
|
if(object && object.isObjectType(OBJECTTYPE_ACTIVE) && obj.isEnemy(object)){
|
|
local activeObj = sq_GetCNRDObjectToActiveObject(object);
|
|
if(sq_Abs(sq_GetXPos(activeObj) - sq_GetXPos(obj)) <= range && sq_Abs(sq_GetYPos(activeObj) - sq_GetYPos(obj)) <= range / 2 && sq_GetZPos(activeObj) <= 100){
|
|
if(sq_IsHoldable(obj,activeObj) && sq_IsGrabable(obj,activeObj) && !sq_IsFixture(activeObj)){
|
|
sqrChr.getVar("inhalation_target").push_obj_vector(activeObj);
|
|
local pooledObj = createOnlyDrawObject_AtSwordMan_bykk(obj, "character/swordman/effect/animation/atinhalation/mon_00.ani", true, obj.getDirection(), sq_GetXPos(activeObj), sq_GetYPos(activeObj), sq_GetZPos(activeObj), ENUM_DRAWLAYER_NORMAL);
|
|
sq_moveWithParent(activeObj, pooledObj);
|
|
local AddAppendage = CNSquirrelAppendage.sq_AppendAppendage(activeObj, obj, -1, false, "character/atswordman/3_vagabond/inhalation/ap_inhalation.nut", true);
|
|
// AddAppendage.sq_SetValidTime(600);
|
|
sq_MoveToAppendageForce(activeObj, obj, activeObj, 0, 0, 100, 500, true, AddAppendage);
|
|
sq_HoldAndDelayDie(activeObj, obj, true, true, true, 0, 100, ENUM_DIRECTION_NEUTRAL , AddAppendage);
|
|
}
|
|
else if(sq_IsFixture(activeObj)){
|
|
local AddAppendage = CNSquirrelAppendage.sq_AppendAppendage(activeObj, obj, -1, false, "character/atswordman/3_vagabond/inhalation/ap_inhalation.nut", true);
|
|
sq_HoldAndDelayDie(activeObj, obj, true, true, true, 0, 100, ENUM_DIRECTION_NEUTRAL , AddAppendage);
|
|
AddAppendage.sq_SetValidTime(2000);
|
|
}
|
|
}
|
|
}
|
|
}
|
|
break;
|
|
case 2:
|
|
local totalDamage = receiveData.readDword();
|
|
local sizeRate = receiveData.readDword();
|
|
local aniPath = "passiveobject/atswordman_bykk/vagabond/animation/atinhalation/shockwave.ani";
|
|
local ani = sq_CreateAnimation("",aniPath);
|
|
obj.setCurrentAnimation(ani);
|
|
sq_SetCurrentAttackInfo(obj, sq_GetCustomAttackInfo(obj, 52));
|
|
sq_SetCurrentAttackBonusRate(sq_GetCurrentAttackInfo(obj), totalDamage);
|
|
sizeRate = sizeRate.tofloat() / 100.0;
|
|
local currentAni = obj.getCurrentAnimation();
|
|
sq_SetAttackBoundingBoxSizeRate(currentAni, sizeRate, 1.0, 1.0);
|
|
break;
|
|
}
|
|
break;
|
|
case SKILL_VAGABOND_MOONLIGHTSLASH://飛花逐月
|
|
break;
|
|
case SKILL_VAGABOND_NEARBLOW://圓舞斬
|
|
switch(subtype){
|
|
case 1:
|
|
local totalDamage = receiveData.readDword();
|
|
local range = receiveData.readDword();
|
|
local sizeRate = range.tofloat() / 150.0;
|
|
local aniPath = "passiveobject/atswordman_bykk/vagabond/animation/atnearblow/pierce_throw(d).ani";
|
|
local ani = sq_CreateAnimation("",aniPath);
|
|
obj.setCurrentAnimation(ani);
|
|
sq_SetCurrentAttackInfo(obj, sq_GetCustomAttackInfo(obj, 53));
|
|
sq_SetCurrentAttackBonusRate(sq_GetCurrentAttackInfo(obj), totalDamage);
|
|
local currentAni = obj.getCurrentAnimation();
|
|
currentAni.setImageRateFromOriginal(sizeRate, sizeRate);
|
|
currentAni.setAutoLayerWorkAnimationAddSizeRate(sizeRate);
|
|
sq_SetAttackBoundingBoxSizeRate(currentAni, sizeRate, sizeRate, sizeRate);
|
|
break;
|
|
case 2:
|
|
local totalDamage = receiveData.readDword();
|
|
local sizeRate = receiveData.readDword();
|
|
local aniPath = "character/swordman/effect/animation/atspaceignite/explosion_ex.ani";
|
|
local ani = sq_CreateAnimation("",aniPath);
|
|
obj.setCurrentAnimation(ani);
|
|
local currentAni = obj.getCurrentAnimation();
|
|
sq_AddAttackBox(currentAni, -171, -40, -58, 344, 80, 110);
|
|
sq_SetCurrentAttackInfo(obj, sq_GetCustomAttackInfo(obj, 53));
|
|
sq_SetCurrentAttackBonusRate(sq_GetCurrentAttackInfo(obj), totalDamage);
|
|
sizeRate = sizeRate.tofloat() / 100.0;
|
|
currentAni.setImageRateFromOriginal(sizeRate, sizeRate);
|
|
currentAni.setAutoLayerWorkAnimationAddSizeRate(sizeRate);
|
|
sq_SetAttackBoundingBoxSizeRate(currentAni, sizeRate, sizeRate, sizeRate);
|
|
break;
|
|
}
|
|
break;
|
|
case SKILL_VAGABOND_OVERBLOWSLASH://亂花葬
|
|
switch(subtype){
|
|
case 1://totalDamage,hitMax,sizeRate,damageRate
|
|
|
|
local totalDamage = receiveData.readDword();
|
|
local hitMax = receiveData.readDword();
|
|
local sizeRate = receiveData.readDword();
|
|
local damageRate = receiveData.readDword();
|
|
local delaySum = receiveData.readDword();
|
|
local totalDamage2 = (totalDamage.tofloat() * damageRate.tofloat() / 100.0).tointeger();
|
|
obj.getVar("custom").setInt(10, totalDamage2);
|
|
obj.getVar("custom").setInt(11, hitMax);
|
|
local aniPath = "passiveobject/atswordman_bykk/vagabond/animation/atoverblowslash/overblowslashneweffect_23.ani";
|
|
local ani = sq_CreateAnimation("",aniPath);
|
|
obj.setCurrentAnimation(ani);
|
|
sq_SetCurrentAttackInfo(obj, sq_GetCustomAttackInfo(obj, 54));//55
|
|
sq_SetCurrentAttackBonusRate(sq_GetCurrentAttackInfo(obj), totalDamage);
|
|
sizeRate = sizeRate.tofloat() / 100.0;
|
|
local currentAni = obj.getCurrentAnimation();
|
|
currentAni.setImageRateFromOriginal(sizeRate, sizeRate);
|
|
currentAni.setAutoLayerWorkAnimationAddSizeRate(sizeRate);
|
|
sq_SetAttackBoundingBoxSizeRate(currentAni, sizeRate, sizeRate, sizeRate);
|
|
local speedRate = 3500.0 / delaySum.tofloat();
|
|
currentAni.setSpeedRate(speedRate);
|
|
local delay = currentAni.getDelaySum(0,14);
|
|
local delay2 = currentAni.getDelaySum(0,19);
|
|
obj.setTimeEvent(1, delay, 1, false);
|
|
obj.setTimeEvent(3, delay2, 1, false);
|
|
break;
|
|
}
|
|
break;
|
|
case SKILL_VAGABOND_RAPIDSTEP://一花渡江
|
|
switch(subtype){
|
|
case 1:
|
|
local totalDamage = receiveData.readDword();
|
|
local sizeRate = receiveData.readDword();
|
|
local sub = receiveData.readDword();
|
|
obj.getVar("custom").setInt(10, sub);
|
|
local aniPath = "passiveobject/atswordman_bykk/vagabond/animation/atrapidstep/explosionarea_0"+(sub - 1).tostring()+".ani";
|
|
local ani = sq_CreateAnimation("",aniPath);
|
|
obj.setCurrentAnimation(ani);
|
|
sq_SetCurrentAttackInfo(obj, sq_GetCustomAttackInfo(obj, 56));
|
|
sq_SetCurrentAttackBonusRate(sq_GetCurrentAttackInfo(obj), totalDamage);
|
|
sizeRate = sizeRate.tofloat() / 100.0;
|
|
local currentAni = obj.getCurrentAnimation();
|
|
currentAni.setImageRateFromOriginal(sizeRate, sizeRate);
|
|
currentAni.setAutoLayerWorkAnimationAddSizeRate(sizeRate);
|
|
sq_SetAttackBoundingBoxSizeRate(currentAni, sizeRate, sizeRate, sizeRate);
|
|
currentAni.setSpeedRate(150.0);
|
|
break;
|
|
}
|
|
break;
|
|
case SKILL_VAGABOND_REVOLVINGSWORD://輪回劍
|
|
break;
|
|
case SKILL_VAGABOND_SOARCUT://櫻落斬
|
|
break;
|
|
case SKILL_VAGABOND_THREESIDE://三連斬
|
|
switch(subtype){
|
|
case 1:
|
|
local totalDamage = receiveData.readDword();
|
|
local aniPath = "passiveobject/atswordman_bykk/vagabond/animation/atthreeside/threeside_03.ani";
|
|
local ani = sq_CreateAnimation("",aniPath);
|
|
obj.setCurrentAnimation(ani);
|
|
sq_SetCurrentAttackInfo(obj, sq_GetCustomAttackInfo(obj, 57));
|
|
sq_SetCurrentAttackBonusRate(sq_GetCurrentAttackInfo(obj), totalDamage);
|
|
local pAni = obj.getCurrentAnimation();
|
|
pAni.setSpeedRate(250.0);
|
|
break;
|
|
case 2:
|
|
local totalDamage = receiveData.readDword();
|
|
local aniPath = "passiveobject/atswordman_bykk/vagabond/animation/atthreeside/threeside_ex_threeside_00.ani";
|
|
local ani = sq_CreateAnimation("",aniPath);
|
|
obj.setCurrentAnimation(ani);
|
|
sq_SetCurrentAttackInfo(obj, sq_GetCustomAttackInfo(obj, 57));
|
|
sq_SetCurrentAttackBonusRate(sq_GetCurrentAttackInfo(obj), totalDamage);
|
|
obj.sq_SetMoveParticle("particle/threeside.ptl", 0.0, 0.0);
|
|
sq_SetSpeedToMoveParticle(obj,0,500);
|
|
break;
|
|
}
|
|
break;
|
|
case SKILL_VAGABOND_ZWEIVOLTAGEEX://嘯空十字斬
|
|
switch(subtype){
|
|
case 2:
|
|
sqrChr.getVar("zwei").clear_obj_vector();
|
|
sqrChr.getVar("zwei").push_obj_vector(obj);
|
|
case 1:
|
|
local totalDamage = receiveData.readDword();
|
|
local lifeTime = receiveData.readDword();
|
|
local damageRate = receiveData.readDword();
|
|
local isStone = receiveData.readDword();
|
|
local totalDamage2 = totalDamage * damageRate / 100;
|
|
obj.getVar("custom").setInt(10, totalDamage2);
|
|
obj.getVar("custom").setInt(11, lifeTime);
|
|
obj.getVar("custom").setInt(12, isStone);
|
|
sq_SetCurrentAttackInfo(obj, sq_GetCustomAttackInfo(obj, 59));
|
|
sq_SetCurrentAttackBonusRate(sq_GetCurrentAttackInfo(obj), totalDamage);
|
|
obj.addSetStatePacket(20, null, STATE_PRIORITY_AUTO, false, "");
|
|
break;
|
|
case 3:
|
|
local totalDamage = receiveData.readDword();
|
|
local aniPath = "passiveobject/atswordman_bykk/vagabond/animation/atzweivoltage/explosion/zweivoltage_finisheff_leaf_00.ani";
|
|
local ani = sq_CreateAnimation("",aniPath);
|
|
obj.setCurrentAnimation(ani);
|
|
sq_SetCurrentAttackInfo(obj, sq_GetCustomAttackInfo(obj, 58));
|
|
sq_SetCurrentAttackBonusRate(sq_GetCurrentAttackInfo(obj), totalDamage);
|
|
break;
|
|
}
|
|
break;
|
|
}
|
|
break;
|
|
case 4:
|
|
switch(skillIndex){
|
|
case SKILL_DARKEMPLER_BLACKMIRROR://魔鏡幻影陣
|
|
switch(subtype){
|
|
case 1://totalDamage,passive_hp,damageRate,time,count,decreaseRate,speedRate
|
|
local totalDamage = receiveData.readDword();
|
|
local passive_hp = receiveData.readDword();
|
|
local time = receiveData.readDword();
|
|
local count = receiveData.readDword();
|
|
local decreaseRate = receiveData.readDword();
|
|
local speedRate = receiveData.readDword();
|
|
local damageRate = receiveData.readDword();
|
|
local totalDamage2 = totalDamage * damageRate / 100;
|
|
obj.getVar("custom").setInt(1, totalDamage);
|
|
obj.getVar("custom").setInt(2, passive_hp);
|
|
obj.getVar("custom").setInt(3, time);
|
|
obj.getVar("custom").setInt(4, count);
|
|
obj.getVar("custom").setInt(5, decreaseRate);
|
|
obj.getVar("custom").setInt(6, speedRate);
|
|
obj.getVar("custom").setInt(7, totalDamage2);
|
|
local aniPath = "passiveobject/atswordman_bykk/darktempler/animation/atblackmirror/mirror_attackbox_dummy.ani";
|
|
local ani = sq_CreateAnimation("",aniPath);
|
|
obj.setCurrentAnimation(ani);
|
|
sq_SetCurrentAttackInfo(obj, sq_GetCustomAttackInfo(obj, 1));
|
|
sq_SetCurrentAttackBonusRate(sq_GetCurrentAttackInfo(obj), totalDamage);
|
|
sq_AddDrawOnlyAniFromParent(obj,"character/swordman/effect/animation/atblackmirror/bottom_00.ani",0,0,0);
|
|
createOnlyDrawObject_AtSwordMan_bykk(obj,"character/swordman/effect/animation/atblackmirror/bottom_00.ani",true,obj.getDirection(),sq_GetXPos(obj),sq_GetYPos(obj),sq_GetZPos(obj),ENUM_DRAWLAYER_BOTTOM);
|
|
createOnlyDrawObject_AtSwordMan_bykk(obj,"character/swordman/effect/animation/atblackmirror/move_shadow_bykk.ani",true,obj.getDirection(),sq_GetXPos(obj),sq_GetYPos(obj),sq_GetZPos(obj),ENUM_DRAWLAYER_NORMAL);
|
|
obj.setTimeEvent(0,4460,1,false);
|
|
obj.setTimeEvent(2,300,1,false);
|
|
break;
|
|
case 2:
|
|
local totalDamage = receiveData.readDword();
|
|
local sub = receiveData.readDword();
|
|
obj.getVar("custom").setInt(0, sub);
|
|
obj.getVar("custom").setInt(1, totalDamage);
|
|
obj.addSetStatePacket(20, null, STATE_PRIORITY_AUTO, false, "");
|
|
break;
|
|
}
|
|
break;
|
|
case SKILL_DARKEMPLER_BUCKSHOT://釋魂飛彈
|
|
switch(subtype){
|
|
case 1:
|
|
local totalDamage = receiveData.readDword();
|
|
obj.getVar("custom").setInt(10,totalDamage);
|
|
local sub = receiveData.readDword();
|
|
local direction = receiveData.readDword();
|
|
obj.getVar("custom").setInt(1,sub);
|
|
obj.getVar("custom").setInt(2,direction);
|
|
obj.getVar("custom").setInt(3,sq_GetXPos(obj));
|
|
obj.getVar("custom").setInt(5,sq_GetZPos(obj));
|
|
switch(sub){
|
|
case 1: obj.getVar("custom").setFloat(0,0.1); break;
|
|
case 2: obj.getVar("custom").setFloat(0,0.15); break;
|
|
case 3: obj.getVar("custom").setFloat(0,0.2); break;
|
|
case 4: obj.getVar("custom").setFloat(0,0.25); break;
|
|
case 5: obj.getVar("custom").setInt(2,sq_GetOppositeDirection(direction));obj.getVar("custom").setFloat(0,0.1); break;
|
|
case 6: obj.getVar("custom").setInt(2,sq_GetOppositeDirection(direction));obj.getVar("custom").setFloat(0,0.15); break;
|
|
case 7: obj.getVar("custom").setInt(2,sq_GetOppositeDirection(direction));obj.getVar("custom").setFloat(0,0.2); break;
|
|
case 8: obj.getVar("custom").setInt(2,sq_GetOppositeDirection(direction));obj.getVar("custom").setFloat(0,0.25); break;
|
|
}
|
|
local group = receiveData.readDword();
|
|
local uniqueId = receiveData.readDword();
|
|
local targetObj = sq_GetObject(sqrChr, group, uniqueId);
|
|
local create_number = receiveData.readDword();
|
|
obj.getVar("custom").setInt(4,create_number);
|
|
obj.getVar().clear_obj_vector();
|
|
obj.getVar().push_obj_vector(targetObj);
|
|
sq_AddDrawOnlyAniFromParent(obj,"passiveobject/atswordman_bykk/darktempler/animation/atbuckshot/buckshot_bulletshooter.ani",-30,0,0);
|
|
obj.setTimeEvent(1,240,1,false);
|
|
break;
|
|
case 2:
|
|
local totalDamage = receiveData.readDword();
|
|
local sub = receiveData.readDword();
|
|
local direction = receiveData.readDword();
|
|
local group = receiveData.readDword();
|
|
local uniqueId = receiveData.readDword();
|
|
local create_number = receiveData.readDword();
|
|
obj.getVar("custom").setInt(0,totalDamage);
|
|
obj.getVar("custom").setInt(1,sub);
|
|
obj.getVar("custom").setInt(2,direction);
|
|
obj.getVar("custom").setInt(3,group);
|
|
obj.getVar("custom").setInt(4,uniqueId);
|
|
obj.getVar("custom").setInt(5,create_number);
|
|
local aniPath = "passiveobject/atswordman_bykk/darktempler/animation/atbuckshot/buckshot_bulletshooter.ani";
|
|
local ani = sq_CreateAnimation("",aniPath);
|
|
obj.setCurrentAnimation(ani);
|
|
break;
|
|
case 3:
|
|
local totalDamage = receiveData.readDword();
|
|
local direction = receiveData.readDword();
|
|
local createMin = receiveData.readDword();
|
|
local createMax = receiveData.readDword();
|
|
local enemyMax = receiveData.readDword();
|
|
local soulnum = receiveData.readDword();
|
|
totalDamage = totalDamage * soulnum;
|
|
obj.getVar("custom").setInt(0,totalDamage);
|
|
obj.getVar("custom").setInt(1,direction);
|
|
obj.getVar("custom").setInt(2,enemyMax);
|
|
obj.getVar("custom").setInt(3,soulnum);
|
|
|
|
local boss_number = sqrChr.getVar("targetBoss").get_obj_vector_size();
|
|
local named_number = sqrChr.getVar("targetNamed").get_obj_vector_size();
|
|
local normal_number = sqrChr.getVar("targetNormal").get_obj_vector_size();
|
|
|
|
local loadSlot = sqrChr.sq_GetSkillLoad(65);//SKILL_DARKEMPLER_BUCKSHOT
|
|
if(!loadSlot) sq_SendDestroyPacketPassiveObject(obj);
|
|
local slotCount = loadSlot.getRemainLoadNumber();
|
|
|
|
if(slotCount < createMin * soulnum) sq_SendDestroyPacketPassiveObject(obj);
|
|
if(createMax * soulnum > slotCount) createMax = (slotCount / soulnum).tointeger();
|
|
if((boss_number + named_number + normal_number) * enemyMax < createMax) createMax = (boss_number + named_number + normal_number) * enemyMax;
|
|
|
|
obj.getVar("targetObj").clear_obj_vector();
|
|
for(local i = 0; i < boss_number; i++){
|
|
local bossObj = sqrChr.getVar("targetBoss").get_obj_vector(i);
|
|
if(bossObj) obj.getVar("targetObj").push_obj_vector(bossObj)
|
|
}
|
|
for(local i = 0; i < named_number; i++){
|
|
local namedObj = sqrChr.getVar("targetNamed").get_obj_vector(i);
|
|
if(namedObj) obj.getVar("targetObj").push_obj_vector(namedObj)
|
|
}
|
|
for(local i = 0; i < normal_number; i++){
|
|
local normalObj = sqrChr.getVar("targetNormal").get_obj_vector(i);
|
|
if(normalObj) obj.getVar("targetObj").push_obj_vector(normalObj)
|
|
}
|
|
|
|
obj.setTimeEvent(10,30,createMax,true);
|
|
obj.setTimeEvent(11,40*createMax,1,false);
|
|
obj.getVar("custom").setInt(20,0);
|
|
|
|
break;
|
|
}
|
|
break;
|
|
case SKILL_DARKEMPLER_DEADLYCAPE://暗影囚殺
|
|
switch(subtype){
|
|
case 1:
|
|
sqrChr.getVar("deadlycape_effect").clear_obj_vector();
|
|
sqrChr.getVar("deadlycape_effect").push_obj_vector(obj);
|
|
obj.addSetStatePacket(20, null, STATE_PRIORITY_AUTO, false, "");
|
|
break;
|
|
case 2:
|
|
local totalDamage = receiveData.readDword();
|
|
local aniPath = "passiveobject/atswordman_bykk/darktempler/animation/atdeadlycape/ex_exp_normal_0.ani";
|
|
local ani = sq_CreateAnimation("",aniPath);
|
|
obj.setCurrentAnimation(ani);
|
|
sq_SetCurrentAttackInfo(obj, sq_GetCustomAttackInfo(obj, 4));
|
|
sq_SetCurrentAttackBonusRate(sq_GetCurrentAttackInfo(obj), totalDamage);
|
|
break;
|
|
}
|
|
break;
|
|
case SKILL_DARKEMPLER_DESTROYER://暗影盛宴
|
|
switch(subtype){
|
|
case 1:
|
|
local totalDamage = receiveData.readDword();
|
|
local sizeRate = receiveData.readDword();
|
|
local aniPath = "passiveobject/atswordman_bykk/darktempler/animation/atdestroyer/boom/boom_attackbox_dummy.ani";
|
|
local ani = sq_CreateAnimation("",aniPath);
|
|
obj.setCurrentAnimation(ani);
|
|
sq_SetCurrentAttackInfo(obj, sq_GetCustomAttackInfo(obj, 5));
|
|
sq_SetCurrentAttackBonusRate(sq_GetCurrentAttackInfo(obj), totalDamage);
|
|
sizeRate = sizeRate.tofloat() / 100.0;
|
|
local currentAni = obj.getCurrentAnimation();
|
|
sq_SetAttackBoundingBoxSizeRate(currentAni, sizeRate, 1.0, 1.0);
|
|
break;
|
|
case 2:
|
|
local totalDamage = receiveData.readDword();
|
|
local delay = receiveData.readDword();
|
|
obj.getVar("custom").setInt(10, totalDamage);
|
|
obj.getVar("custom").setInt(11, delay);
|
|
obj.getVar("custom").setInt(12, sq_GetXPos(obj));
|
|
obj.getVar("custom").setInt(13, sq_GetZPos(obj));
|
|
obj.getVar("custom").setInt(14, 300);
|
|
obj.addSetStatePacket(20, null, STATE_PRIORITY_AUTO, false, "");
|
|
break;
|
|
}
|
|
break;
|
|
case SKILL_DARKEMPLER_DEUSEXRAY://天罰死光
|
|
switch(subtype){
|
|
case 1:
|
|
sqrChr.getVar("deusexray").clear_obj_vector();
|
|
sqrChr.getVar("deusexray").push_obj_vector(obj);
|
|
obj.addSetStatePacket(20, null, STATE_PRIORITY_AUTO, false, "");
|
|
break;
|
|
case 2:
|
|
local totalDamage = receiveData.readDword();
|
|
local aniPath = "passiveobject/atswordman_bykk/darktempler/animation/atdeusexray/finishfront_23.ani";
|
|
local ani = sq_CreateAnimation("",aniPath);
|
|
obj.setCurrentAnimation(ani);
|
|
local pAni = obj.getCurrentAnimation();
|
|
pAni.addLayerAnimation(-1,sq_CreateAnimation("","passiveobject/atswordman_bykk/darktempler/animation/atdeusexray/finishback_03.ani"),true);
|
|
sq_SetCurrentAttackInfo(obj, sq_GetCustomAttackInfo(obj, 9));
|
|
sq_SetCurrentAttackBonusRate(sq_GetCurrentAttackInfo(obj), totalDamage);
|
|
break;
|
|
case 3:
|
|
local totalDamage = receiveData.readDword();
|
|
local aniPath = "passiveobject/atswordman_bykk/darktempler/animation/atdeusexray/talisman/finishfront1_talisman_finishfront_23.ani";
|
|
local ani = sq_CreateAnimation("",aniPath);
|
|
obj.setCurrentAnimation(ani);
|
|
local pAni = obj.getCurrentAnimation();
|
|
pAni.addLayerAnimation(-1,sq_CreateAnimation("","passiveobject/atswordman_bykk/darktempler/animation/atdeusexray/talisman/finishback_talisman_finishback_03.ani"),true);
|
|
pAni.setSpeedRate(200.0);
|
|
sq_SetCurrentAttackInfo(obj, sq_GetCustomAttackInfo(obj, 9));
|
|
sq_SetCurrentAttackBonusRate(sq_GetCurrentAttackInfo(obj), totalDamage);
|
|
break;
|
|
}
|
|
break;
|
|
case SKILL_DARKEMPLER_DOOMSDAY://末日殺戮
|
|
switch(subtype){
|
|
case 1:
|
|
local totalDamage = receiveData.readDword();
|
|
local hitMax = receiveData.readDword();
|
|
obj.getVar("custom").setInt(10, hitMax);
|
|
local aniPath = "passiveobject/atswordman_bykk/darktempler/animation/atdoomsday/finishmoveeffect.ani";
|
|
local ani = sq_CreateAnimation("",aniPath);
|
|
obj.setCurrentAnimation(ani);
|
|
sq_SetCurrentAttackInfo(obj, sq_GetCustomAttackInfo(obj, 11));
|
|
sq_SetCurrentAttackBonusRate(sq_GetCurrentAttackInfo(obj), totalDamage);
|
|
break;
|
|
case 2:
|
|
sqrChr.getVar("doomsday_effect").clear_obj_vector();
|
|
sqrChr.getVar("doomsday_effect").push_obj_vector(obj);
|
|
obj.addSetStatePacket(20, null, STATE_PRIORITY_AUTO, false, "");
|
|
break;
|
|
case 3:
|
|
sqrChr.getVar("doomsday_effect_b").clear_obj_vector();
|
|
sqrChr.getVar("doomsday_effect_b").push_obj_vector(obj);
|
|
sq_ChangeDrawLayer(obj, ENUM_DRAWLAYER_BOTTOM);
|
|
obj.addSetStatePacket(20, null, STATE_PRIORITY_AUTO, false, "");
|
|
break;
|
|
}
|
|
break;
|
|
case SKILL_DARKEMPLER_EVOLVE://汲魂之力
|
|
break;
|
|
case SKILL_DARKEMPLER_HIDDENBLADE://影刃
|
|
break;
|
|
case SKILL_DARKEMPLER_IMMOLATION://死亡獻祭
|
|
switch(subtype){
|
|
case 1:
|
|
local totalDamage = receiveData.readDword();
|
|
local aniPath = "passiveobject/atswordman_bykk/darktempler/animation/atimmolation/boom_06.ani";
|
|
local ani = sq_CreateAnimation("",aniPath);
|
|
obj.setCurrentAnimation(ani);
|
|
sq_SetCurrentAttackInfo(obj, sq_GetCustomAttackInfo(obj, 19));
|
|
sq_SetCurrentAttackBonusRate(sq_GetCurrentAttackInfo(obj), totalDamage);
|
|
break;
|
|
case 2:
|
|
sqrChr.getVar("immolation_magiccircle").clear_obj_vector();
|
|
sqrChr.getVar("immolation_magiccircle").push_obj_vector(obj);
|
|
local totalDamage = receiveData.readDword();
|
|
local hitTime = receiveData.readDword();
|
|
local level = receiveData.readDword();
|
|
local time = receiveData.readDword();
|
|
sq_SetCurrentAttackInfo(obj, sq_GetCustomAttackInfo(obj, 20));
|
|
sq_SetCurrentAttackBonusRate(sq_GetCurrentAttackInfo(obj), totalDamage);
|
|
obj.setTimeEvent(1, hitTime, -1, false);
|
|
local attackInfo = sq_GetCurrentAttackInfo(obj);
|
|
if(attackInfo) sq_SetChangeStatusIntoAttackInfo(attackInfo, 0, ACTIVESTATUS_SLOW, 100, level, time, 0);
|
|
sq_ChangeDrawLayer(obj, ENUM_DRAWLAYER_BOTTOM);
|
|
obj.addSetStatePacket(20, null, STATE_PRIORITY_AUTO, false, "");
|
|
break;
|
|
case 3:
|
|
local totalDamage = receiveData.readDword();
|
|
local hitTime = receiveData.readDword();
|
|
local level = receiveData.readDword();
|
|
local time = receiveData.readDword();
|
|
local damageRate = receiveData.readDword();
|
|
local lifeTime = receiveData.readDword();
|
|
local totalDamage2 = totalDamage * damageRate / 100;
|
|
obj.getVar("custom").setInt(10,totalDamage2);
|
|
obj.getVar("custom").setInt(11,lifeTime);
|
|
sq_SetCurrentAttackInfo(obj, sq_GetCustomAttackInfo(obj, 20));
|
|
sq_SetCurrentAttackBonusRate(sq_GetCurrentAttackInfo(obj), totalDamage);
|
|
obj.setTimeEvent(1, hitTime, -1, false);
|
|
local attackInfo = sq_GetCurrentAttackInfo(obj);
|
|
if(attackInfo) sq_SetChangeStatusIntoAttackInfo(attackInfo, 0, ACTIVESTATUS_SLOW, 100, level, time, 0);
|
|
obj.addSetStatePacket(20, null, STATE_PRIORITY_AUTO, false, "");
|
|
break;
|
|
}
|
|
break;
|
|
case SKILL_DARKEMPLER_JIHAD://天罰之劍
|
|
switch(subtype){
|
|
case 1:
|
|
local totalDamage = receiveData.readDword();
|
|
local damageRate = receiveData.readDword();
|
|
local totalDamage2 = totalDamage * damageRate / 100;
|
|
obj.getVar("custom").setInt(10, totalDamage2);
|
|
sq_SetCurrentAttackInfo(obj, sq_GetCustomAttackInfo(obj, 22));
|
|
sq_SetCurrentAttackBonusRate(sq_GetCurrentAttackInfo(obj), totalDamage);
|
|
sq_ChangeDrawLayer(obj, ENUM_DRAWLAYER_BOTTOM);
|
|
obj.addSetStatePacket(20, null, STATE_PRIORITY_AUTO, false, "");
|
|
break;
|
|
case 2:
|
|
local totalDamage = receiveData.readDword();
|
|
sq_SetCurrentAttackInfo(obj, sq_GetCustomAttackInfo(obj, 21));
|
|
sq_SetCurrentAttackBonusRate(sq_GetCurrentAttackInfo(obj), totalDamage);
|
|
obj.addSetStatePacket(20, null, STATE_PRIORITY_AUTO, false, "");
|
|
break;
|
|
}
|
|
break;
|
|
case SKILL_DARKEMPLER_LACERTHORNS://暗影綻放:死亡荊棘
|
|
switch(subtype){
|
|
case 1:
|
|
local aniPath = "character/swordman/effect/animation/atlacerthorns/atlacerthornsboom_03.ani";
|
|
local ani = sq_CreateAnimation("",aniPath);
|
|
obj.setCurrentAnimation(ani);
|
|
obj.setTimeEvent(1, 200, 1, false);
|
|
break;
|
|
case 2:
|
|
local aniPath = "character/swordman/effect/animation/atlacerthorns/atlacerthornsboom_06.ani";
|
|
local ani = sq_CreateAnimation("",aniPath);
|
|
obj.setCurrentAnimation(ani);
|
|
break;
|
|
}
|
|
break;
|
|
case SKILL_DARKEMPLER_LOYALSLAVE://靈魂傀儡
|
|
switch(subtype){
|
|
case 1:
|
|
local lifeTime = receiveData.readDword();
|
|
local hitTime = receiveData.readDword();
|
|
local group = receiveData.readDword();
|
|
local uniqueId = receiveData.readDword();
|
|
obj.getVar("custom").setInt(10, lifeTime);
|
|
obj.getVar("custom").setInt(11, hitTime);
|
|
local targetObj = sq_GetObject(sqrChr, group, uniqueId);
|
|
local activeObj = sq_GetCNRDObjectToActiveObject(targetObj);
|
|
activeObj.getVar("loyalslave").clear_ct_vector();
|
|
activeObj.getVar("loyalslave").push_ct_vector();
|
|
obj.getVar().clear_obj_vector();
|
|
obj.getVar().push_obj_vector(targetObj);
|
|
sq_moveWithParent(targetObj, obj);
|
|
obj.addSetStatePacket(20, null, STATE_PRIORITY_AUTO, false, "");
|
|
break;
|
|
}
|
|
break;
|
|
case SKILL_DARKEMPLER_MADNESS://釋魂狂怒
|
|
switch(subtype){
|
|
case 1:
|
|
sqrChr.getVar("madness").clear_obj_vector();
|
|
sqrChr.getVar("madness").push_obj_vector(obj);
|
|
local range = receiveData.readDword();
|
|
local DelaySum = receiveData.readDword();
|
|
local totalDamage = receiveData.readDword();
|
|
local aniPath = "passiveobject/atswordman_bykk/darktempler/animation/atmadness/madness_magiccircle.ani";
|
|
local ani = sq_CreateAnimation("",aniPath);
|
|
obj.setCurrentAnimation(ani);
|
|
sq_SetCurrentAttackInfo(obj, sq_GetCustomAttackInfo(obj, 23));
|
|
sq_SetCurrentAttackBonusRate(sq_GetCurrentAttackInfo(obj), totalDamage);
|
|
local currentAni = obj.getCurrentAnimation();
|
|
local sizeRate = range.tofloat() / 225.0;
|
|
currentAni.setImageRateFromOriginal(sizeRate, sizeRate);
|
|
currentAni.setAutoLayerWorkAnimationAddSizeRate(sizeRate);
|
|
local objectManager = obj.getObjectManager();
|
|
local objectNumber = objectManager.getCollisionObjectNumber();
|
|
for(local i = 0; i < objectNumber; i++){
|
|
local object = objectManager.getCollisionObject(i);
|
|
if(object && object.isObjectType(OBJECTTYPE_ACTIVE) && obj.isEnemy(object)){
|
|
local activeObj = sq_GetCNRDObjectToActiveObject(object);
|
|
if(sq_Abs(sq_GetXPos(activeObj) - sq_GetXPos(obj)) <= range && sq_Abs(sq_GetYPos(activeObj) - sq_GetYPos(obj)) <= range / 2 && sq_GetZPos(activeObj) <= 100){
|
|
if(sq_IsHoldable(obj,activeObj) && sq_IsGrabable(obj,activeObj) && !sq_IsFixture(activeObj)){
|
|
sqrChr.getVar("madness_target").push_obj_vector(activeObj);
|
|
local AddAppendage = CNSquirrelAppendage.sq_AppendAppendage(activeObj, obj, -1, false, "character/atswordman/4_darktempler/madness/ap_madness.nut", true);
|
|
AddAppendage.sq_SetValidTime(DelaySum + 300);
|
|
sq_MoveToAppendageForce(activeObj, obj, activeObj, 0, 0, 80, 300, true, AddAppendage);
|
|
sq_HoldAndDelayDie(activeObj, obj, true, true, true, 0, 100, ENUM_DIRECTION_NEUTRAL , AddAppendage);
|
|
}
|
|
}
|
|
}
|
|
}
|
|
break;
|
|
case 2:
|
|
local speedRate = receiveData.readDword();
|
|
local sub = receiveData.readDword();
|
|
local direction = receiveData.readDword();
|
|
local baseX = receiveData.readDword();
|
|
local baseY = receiveData.readDword();
|
|
local totalDamage = receiveData.readDword();
|
|
local isdamageSet = receiveData.readDword();
|
|
local range = receiveData.readDword();
|
|
obj.getVar("custom").setInt(10,speedRate);
|
|
obj.getVar("custom").setInt(11,sub);
|
|
obj.getVar("custom").setInt(12,direction);
|
|
obj.getVar("custom").setInt(13,sq_GetXPos(obj));
|
|
obj.getVar("custom").setInt(14,sq_GetZPos(obj));
|
|
obj.getVar("custom").setInt(15,baseX);
|
|
obj.getVar("custom").setInt(16,baseY);
|
|
obj.getVar("custom").setInt(20,isdamageSet);
|
|
obj.getVar("custom").setInt(21,range);
|
|
switch(sub){
|
|
case 1: obj.getVar("custom").setFloat(0,0.1); break;
|
|
case 2: obj.getVar("custom").setFloat(0,0.15); break;
|
|
case 3: obj.getVar("custom").setFloat(0,0.2); break;
|
|
case 4: obj.getVar("custom").setFloat(0,0.25); break;
|
|
case 5: obj.getVar("custom").setInt(12,sq_GetOppositeDirection(direction));obj.getVar("custom").setFloat(0,0.1); break;
|
|
case 6: obj.getVar("custom").setInt(12,sq_GetOppositeDirection(direction));obj.getVar("custom").setFloat(0,0.15); break;
|
|
case 7: obj.getVar("custom").setInt(12,sq_GetOppositeDirection(direction));obj.getVar("custom").setFloat(0,0.2); break;
|
|
case 8: obj.getVar("custom").setInt(12,sq_GetOppositeDirection(direction));obj.getVar("custom").setFloat(0,0.25); break;
|
|
}
|
|
// sq_SetCurrentAttackInfo(obj, sq_GetCustomAttackInfo(obj, 23));
|
|
// sq_SetCurrentAttackBonusRate(sq_GetCurrentAttackInfo(obj), totalDamage);
|
|
obj.addSetStatePacket(20, null, STATE_PRIORITY_AUTO, false, "");
|
|
break;
|
|
case 3:
|
|
local speedRate = receiveData.readDword();
|
|
local totalDamage = receiveData.readDword();
|
|
local range = receiveData.readDword();
|
|
obj.getVar("custom").setInt(10,speedRate);
|
|
obj.getVar("custom").setInt(11,totalDamage);
|
|
obj.getVar("custom").setInt(12,range);
|
|
obj.setTimeEvent(12, 240 / speedRate * 100, 1, false);
|
|
break;
|
|
}
|
|
break;
|
|
case SKILL_DARKEMPLER_PUNISHMENT://神罰·滅世裁決
|
|
switch(subtype){
|
|
case 1:
|
|
sqrChr.getVar("punishment_attack3").clear_obj_vector();
|
|
sqrChr.getVar("punishment_attack3").push_obj_vector(obj);
|
|
local range = receiveData.readDword() + 999;
|
|
local aniPath = "character/swordman/effect/animation/atpunishment/casting/atpunishment_magic_circle4.ani";
|
|
local ani = sq_CreateAnimation("",aniPath);
|
|
obj.setCurrentAnimation(ani);
|
|
sq_ChangeDrawLayer(obj, ENUM_DRAWLAYER_BOTTOM);
|
|
local objectManager = obj.getObjectManager();
|
|
local objectNumber = objectManager.getCollisionObjectNumber();
|
|
for(local i = 0; i < objectNumber; i++){
|
|
local object = objectManager.getCollisionObject(i);
|
|
if(object && object.isObjectType(OBJECTTYPE_ACTIVE) && obj.isEnemy(object) && sq_Abs(sq_GetXPos(obj) - sq_GetXPos(object)) <= range && sq_Abs(sq_GetYPos(obj) - sq_GetYPos(object)) <= range / 2){
|
|
local activeObj = sq_GetCNRDObjectToActiveObject(object);
|
|
local apdPath = "character/atswordman/4_darktempler/punishment/ap_punishment.nut";
|
|
local AddAppendage = CNSquirrelAppendage.sq_AppendAppendage(activeObj, obj, SKILL_DARKEMPLER_PUNISHMENT, false, apdPath, true);
|
|
sq_HoldAndDelayDie(activeObj, obj, true, true, true, 0, 100, ENUM_DIRECTION_NEUTRAL, AddAppendage);
|
|
sqrChr.getVar("punishment_target").push_obj_vector(activeObj);
|
|
}
|
|
}
|
|
break;
|
|
case 2:
|
|
sqrChr.getVar("punishment_attack").clear_obj_vector();
|
|
sqrChr.getVar("punishment_attack").push_obj_vector(obj);
|
|
local aniPath = "character/swordman/atanimation/punishment_attack_motion2.ani";
|
|
local ani = sq_CreateAnimation("",aniPath);
|
|
obj.setCurrentAnimation(ani);
|
|
obj.getVar("punishment_base").setInt(10, sq_GetXPos(obj));
|
|
break;
|
|
case 3:
|
|
sqrChr.getVar("punishment_attack2").clear_obj_vector();
|
|
sqrChr.getVar("punishment_attack2").push_obj_vector(obj);
|
|
local aniPath = "character/swordman/effect/animation/atpunishment/attack/atpunishment_attack_eff2_1.ani";
|
|
local ani = sq_CreateAnimation("",aniPath);
|
|
obj.setCurrentAnimation(ani);
|
|
local pAni = obj.getCurrentAnimation();
|
|
break;
|
|
}
|
|
break;
|
|
case SKILL_DARKEMPLER_SCAFFOLD://暗影禁錮
|
|
switch(subtype){
|
|
case 1:
|
|
local totalDamage = receiveData.readDword();
|
|
local totalDamage2 = receiveData.readDword();
|
|
local lifeTime = receiveData.readDword();
|
|
obj.getVar("custom").setInt(0, totalDamage);
|
|
obj.getVar("custom").setInt(1, totalDamage2);
|
|
obj.getVar("custom").setInt(2, lifeTime);
|
|
obj.addSetStatePacket(20, null, STATE_PRIORITY_AUTO, false, "");
|
|
break;
|
|
case 2:
|
|
local totalDamage = receiveData.readDword();
|
|
local lifeTime = receiveData.readDword();
|
|
obj.getVar("custom").setInt(0, totalDamage);
|
|
obj.getVar("custom").setInt(1, lifeTime);
|
|
obj.addSetStatePacket(20, null, STATE_PRIORITY_AUTO, false, "");
|
|
break;
|
|
}
|
|
break;
|
|
case SKILL_DARKEMPLER_SHADOWBINDING://暗影纏襲
|
|
switch(subtype){
|
|
case 1:
|
|
sqrChr.getVar("bindingObj").clear_obj_vector();
|
|
sqrChr.getVar("bindingObj").push_obj_vector(obj);
|
|
local totalDamage = receiveData.readDword();
|
|
local damageRate = receiveData.readDword();
|
|
local lifeTime = receiveData.readDword();
|
|
local totalDamage2 = totalDamage * damageRate / 100;
|
|
obj.getVar("custom").setInt(0, totalDamage);
|
|
obj.getVar("custom").setInt(1, totalDamage2);
|
|
obj.getVar("custom").setInt(2, lifeTime);
|
|
obj.getVar("custom").setInt(3, 160);
|
|
obj.getVar("custom").setInt(4, sq_GetXPos(obj));
|
|
obj.getVar("custom").setInt(5, sq_GetYPos(obj));
|
|
sq_ChangeDrawLayer(obj, ENUM_DRAWLAYER_BOTTOM);
|
|
obj.addSetStatePacket(20, null, STATE_PRIORITY_AUTO, false, "");
|
|
break;
|
|
case 2:
|
|
local totalDamage = receiveData.readDword();
|
|
local uniqueId = receiveData.readDword();
|
|
obj.getVar("custom").setInt(0, uniqueId);
|
|
if(sqrChr.getVar("binding").get_obj_vector_size() <= 0) sqrChr.getVar("binding").clear_obj_vector();
|
|
sqrChr.getVar("binding").push_obj_vector(obj);
|
|
local aniPath = "character/swordman/effect/animation/atshadowbinding/monster_shadowbinding_monster_front.ani";
|
|
local ani = sq_CreateAnimation("",aniPath);
|
|
obj.setCurrentAnimation(ani);
|
|
sq_SetCurrentAttackInfo(obj, sq_GetCustomAttackInfo(obj, 27));
|
|
sq_SetCurrentAttackBonusRate(sq_GetCurrentAttackInfo(obj), totalDamage);
|
|
obj.setTimeEvent(4,400,-1,true);
|
|
break;
|
|
case 3:
|
|
local totalDamage = receiveData.readDword();
|
|
local aniPath = "passiveobject/atswordman_bykk/darktempler/animation/atshadowbinding/drill_eff_03.ani";
|
|
local ani = sq_CreateAnimation("",aniPath);
|
|
obj.setCurrentAnimation(ani);
|
|
sq_SetCurrentAttackInfo(obj, sq_GetCustomAttackInfo(obj, 26));
|
|
sq_SetCurrentAttackBonusRate(sq_GetCurrentAttackInfo(obj), totalDamage);
|
|
break;
|
|
}
|
|
break;
|
|
case SKILL_DARKEMPLER_SHADOWHARVEST://暗影旋渦
|
|
switch(subtype){
|
|
case 1://武器
|
|
local totalDamage = receiveData.readDword();
|
|
local totalDamage2 = receiveData.readDword();
|
|
local range = receiveData.readDword();
|
|
local lifeTime = receiveData.readDword();
|
|
local hitTime = receiveData.readDword();
|
|
local isSeal = receiveData.readDword();
|
|
local passive_level = receiveData.readDword();
|
|
obj.getVar("custom").setInt(0, totalDamage2);
|
|
obj.getVar("custom").setInt(1, range);
|
|
obj.getVar("custom").setInt(2, lifeTime);
|
|
obj.getVar("custom").setInt(3, hitTime);
|
|
obj.getVar("custom").setInt(4, isSeal);
|
|
obj.getVar("custom").setInt(5, totalDamage);
|
|
obj.getVar("custom").setInt(10, passive_level);
|
|
sq_SetCurrentAttackInfo(obj, sq_GetCustomAttackInfo(obj, 31));
|
|
sq_SetCurrentAttackBonusRate(sq_GetCurrentAttackInfo(obj), totalDamage);
|
|
obj.addSetStatePacket(20, null, STATE_PRIORITY_AUTO, false, "");
|
|
break;
|
|
case 2://旋渦
|
|
local totalDamage = receiveData.readDword();
|
|
local range = receiveData.readDword();
|
|
local lifeTime = receiveData.readDword();
|
|
local hitTime = receiveData.readDword();
|
|
local isSeal = receiveData.readDword();
|
|
obj.getVar("custom").setInt(0, totalDamage);
|
|
obj.getVar("custom").setInt(1, range);
|
|
obj.getVar("custom").setInt(2, lifeTime);
|
|
obj.getVar("custom").setInt(3, hitTime);
|
|
obj.getVar("custom").setInt(4, isSeal);
|
|
sq_ChangeDrawLayer(obj, ENUM_DRAWLAYER_BOTTOM);
|
|
obj.addSetStatePacket(20, null, STATE_PRIORITY_AUTO, false, "");
|
|
break;
|
|
}
|
|
break;
|
|
case SKILL_DARKEMPLER_SHADOWLANCER://暗影之矛
|
|
switch(subtype){
|
|
case 1:
|
|
local totalDamage = receiveData.readDword();
|
|
local hitMax = receiveData.readDword();
|
|
local speedRate = receiveData.readDword();
|
|
local aniPath = "passiveobject/atswordman_bykk/darktempler/animation/atshadowlancer/05_shadow_sword.ani";
|
|
local ani = sq_CreateAnimation("",aniPath);
|
|
obj.setCurrentAnimation(ani);
|
|
sq_SetCurrentAttackInfo(obj, sq_GetCustomAttackInfo(obj, 32));
|
|
sq_SetCurrentAttackBonusRate(sq_GetCurrentAttackInfo(obj), totalDamage);
|
|
local pAni = obj.getCurrentAnimation();
|
|
pAni.setSpeedRate(speedRate.tofloat());
|
|
local DelaySum = pAni.getDelaySum(false);
|
|
obj.setTimeEvent(1,DelaySum/(hitMax*2),hitMax,false);
|
|
sq_moveWithParent(sqrChr, obj);
|
|
break;
|
|
}
|
|
break;
|
|
case SKILL_DARKEMPLER_SHADOWPUPPET://魅影暗魂斬
|
|
switch(subtype){
|
|
case 1://邪光totalDamage,lifeTime,hitTime
|
|
local totalDamage = receiveData.readDword();
|
|
local lifeTime = receiveData.readDword();
|
|
local hitTime = receiveData.readDword();
|
|
local sub = receiveData.readDword();
|
|
local aniPath = "passiveobject/atswordman_bykk/darktempler/animation/atshadowpuppet/object_shadowpuppet_finish_normal.ani";
|
|
if(sub > 0) aniPath = "passiveobject/atswordman_bykk/darktempler/animation/atshadowpuppet/lv95passive/shootingblade_00.ani";
|
|
local ani = sq_CreateAnimation("",aniPath);
|
|
obj.setCurrentAnimation(ani);
|
|
sq_SetCurrentAttackInfo(obj, sq_GetCustomAttackInfo(obj, 35));
|
|
sq_SetCurrentAttackBonusRate(sq_GetCurrentAttackInfo(obj), totalDamage);
|
|
obj.sq_SetMoveParticle("particle/shadowpuppet.ptl", 0.0, 0.0);
|
|
sq_SetSpeedToMoveParticle(obj,0,500);
|
|
obj.setTimeEvent(1, lifeTime, 1, false);
|
|
obj.setTimeEvent(2, hitTime, -1, false);
|
|
break;
|
|
case 2://幻影
|
|
local totalDamage = receiveData.readDword();
|
|
local lifeTime = receiveData.readDword();
|
|
local hitTime = receiveData.readDword();
|
|
local direction = receiveData.readDword();
|
|
local sub = receiveData.readDword();
|
|
obj.getVar("custom").setInt(0, totalDamage);
|
|
obj.getVar("custom").setInt(1, lifeTime);
|
|
obj.getVar("custom").setInt(2, hitTime);
|
|
obj.getVar("custom").setInt(3, direction);
|
|
obj.getVar("custom").setInt(4, sub);
|
|
sq_SetCurrentAttackInfo(obj, sq_GetCustomAttackInfo(obj, 34));
|
|
sq_SetCurrentAttackBonusRate(sq_GetCurrentAttackInfo(obj), totalDamage);
|
|
obj.addSetStatePacket(20, null, STATE_PRIORITY_AUTO, false, "");
|
|
break;
|
|
case 3:
|
|
local aniPath = "passiveobject/atswordman_bykk/darktempler/animation/atshadowpuppet/_puppetdash_shadowpuppet_dash.ani";
|
|
local ani = sq_CreateAnimation("",aniPath);
|
|
obj.setCurrentAnimation(ani);
|
|
obj.getVar("custom").setInt(0, sq_GetXPos(obj));
|
|
break;
|
|
}
|
|
break;
|
|
case SKILL_DARKEMPLER_SOULDRAIN://靈魂攝取
|
|
switch(subtype){
|
|
case 1://幻影
|
|
local totalDamage = receiveData.readDword();
|
|
local lifeTime = receiveData.readDword();
|
|
local enemyMax = receiveData.readDword();
|
|
local hitMax = receiveData.readDword();
|
|
local range = receiveData.readDword();
|
|
local hitTime = receiveData.readDword();
|
|
sqrChr.getVar("souldrain").push_obj_vector(obj);
|
|
local number = sqrChr.getVar("souldrain").get_obj_vector_size();
|
|
obj.getVar("custom").setInt(0, totalDamage);
|
|
obj.getVar("custom").setInt(1, lifeTime);
|
|
obj.getVar("custom").setInt(2, enemyMax);
|
|
obj.getVar("custom").setInt(3, hitMax);
|
|
obj.getVar("custom").setInt(4, range);
|
|
obj.getVar("custom").setInt(5, hitTime);
|
|
obj.getVar("custom").setInt(6, number);
|
|
obj.addSetStatePacket(20, null, STATE_PRIORITY_AUTO, false, "");
|
|
break;
|
|
case 2://攻擊特效START
|
|
case 3://攻擊特效LOOP
|
|
case 4://攻擊特效END
|
|
local totalDamage = receiveData.readDword();
|
|
local uniqueId = receiveData.readDword();
|
|
obj.getVar("custom").setInt(0, uniqueId);
|
|
local aniPath1 = "character/swordman/effect/animation/atsouldrain/";
|
|
local aniPath2 = "firstboom_01.ani";
|
|
if(subtype == 3) aniPath2 = "loopboom_01.ani";
|
|
if(subtype == 4) aniPath2 = "lastboom_02.ani";
|
|
local ani = sq_CreateAnimation("",aniPath1 + aniPath2);
|
|
obj.setCurrentAnimation(ani);
|
|
local attackIndex = 38;
|
|
if(subtype == 3) attackIndex = 37;
|
|
if(subtype == 4) attackIndex = 36;
|
|
sq_SetCurrentAttackInfo(obj, sq_GetCustomAttackInfo(obj, attackIndex));
|
|
sq_SetCurrentAttackBonusRate(sq_GetCurrentAttackInfo(obj), totalDamage);
|
|
obj.setTimeEvent(3, 80, 1, false);
|
|
break;
|
|
}
|
|
break;
|
|
case SKILL_DARKEMPLER_STARFALL://魔影轟殺
|
|
switch(subtype){
|
|
case 1:
|
|
local totalDamage = receiveData.readDword();
|
|
local range = receiveData.readDword();
|
|
local sub = receiveData.readDword();
|
|
obj.getVar("custom").setInt(10, totalDamage);
|
|
local boss_number = 0;
|
|
local named_number = 0;
|
|
obj.getVar("target").clear_obj_vector();
|
|
local objectManager = obj.getObjectManager();
|
|
local objectNumber = objectManager.getCollisionObjectNumber();
|
|
for(local i = 0; i < objectNumber; i++){
|
|
local object = objectManager.getCollisionObject(i);
|
|
if(object && object.isObjectType(OBJECTTYPE_ACTIVE) && obj.isEnemy(object) && sq_Abs(sq_GetXPos(obj) - sq_GetXPos(object)) <= range && sq_Abs(sq_GetYPos(obj) - sq_GetYPos(object)) <= range / 2 && isFrontObject(obj,object)){
|
|
local activeObj = sq_GetCNRDObjectToActiveObject(object);
|
|
if(sq_IsBoss(activeObj)){
|
|
boss_number = boss_number + 1;
|
|
obj.getVar("target").push_obj_vector(activeObj);
|
|
}
|
|
else if(sq_IsNamed(activeObj)){
|
|
named_number = named_number + 1;
|
|
obj.getVar("target").push_obj_vector(activeObj);
|
|
}
|
|
}
|
|
}
|
|
if(boss_number < 1 && named_number < 1){
|
|
local targetObj = obj.sq_FindFirstTarget(0, range, range / 2, range);
|
|
if(targetObj) obj.getVar("target").push_obj_vector(targetObj);
|
|
}
|
|
|
|
if(obj.getVar("target").get_obj_vector_size() > 0) obj.addSetStatePacket(20, null, STATE_PRIORITY_AUTO, false, "");
|
|
else{
|
|
local disX = sq_GetDistancePos(sq_GetXPos(obj),obj.getDirection(),(sub-1) * 50);
|
|
sq_setCurrentAxisPos(obj, 0, disX);
|
|
obj.addSetStatePacket(21, null, STATE_PRIORITY_AUTO, false, "");
|
|
}
|
|
break;
|
|
}
|
|
break;
|
|
}
|
|
break;
|
|
}
|
|
|
|
local attackInfo = sq_GetCurrentAttackInfo(obj);
|
|
if(attackInfo){
|
|
local element_kk_fire = sqrChr.getVar("element_kk").getInt(0);
|
|
local element_kk_water = sqrChr.getVar("element_kk").getInt(1);
|
|
local element_kk_dark = sqrChr.getVar("element_kk").getInt(2);
|
|
local element_kk_light = sqrChr.getVar("element_kk").getInt(3);
|
|
if(!attackInfo.isValidElement(ENUM_ELEMENT_FIRE) && element_kk_fire > 0) attackInfo.setElement(ENUM_ELEMENT_FIRE);
|
|
if(!attackInfo.isValidElement(ENUM_ELEMENT_WATER) && element_kk_water > 0) attackInfo.setElement(ENUM_ELEMENT_WATER);
|
|
if(!attackInfo.isValidElement(ENUM_ELEMENT_DARK) && element_kk_dark > 0) attackInfo.setElement(ENUM_ELEMENT_DARK);
|
|
if(!attackInfo.isValidElement(ENUM_ELEMENT_LIGHT) && element_kk_light > 0) attackInfo.setElement(ENUM_ELEMENT_LIGHT);
|
|
}
|
|
}
|