2972 lines
144 KiB
C
2972 lines
144 KiB
C
|
|
function setState_po_atgunner_bykk(obj, state, datas)
|
|
{
|
|
if(!obj) return;
|
|
local sqrChr = sq_GetCNRDObjectToSQRCharacter(obj.getTopCharacter());
|
|
local job = obj.getVar("job").getInt(0);
|
|
local skillIndex = obj.getVar("skillIndex").getInt(0);
|
|
local subtype = obj.getVar("subtype").getInt(0);
|
|
obj.getVar("state").setInt(0, state);
|
|
|
|
switch(job){
|
|
case 0:
|
|
break;
|
|
case 1:
|
|
switch(skillIndex){
|
|
case SKILL_BYKK_WALKSHOOT:
|
|
switch(subtype){
|
|
case 3:
|
|
local aniPath0 = "character/gunner/effect/animation/1_ranger/walkshoot/";
|
|
local aniPath = ["atbodyreadystay.ani","atbodyreadyfront.ani","atbodyreadyback.ani","atbodyrightstay.ani","atbodyrightfront.ani","atbodyrightback.ani","atbodyleftstay.ani","atbodyleftfront.ani","atbodyleftback.ani"];
|
|
local aniPath30 = "passiveobject/atgunner_bykk/dummy.ani";
|
|
if(state < 30){
|
|
local ani = sq_CreateAnimation("", aniPath0 + aniPath[state - 20]);
|
|
obj.setCurrentAnimation(ani);
|
|
if(state != 20 && state != 23 && state != 26){
|
|
local frameIndex = obj.getVar("custom").getInt(0);
|
|
local currentAni = obj.getCurrentAnimation();
|
|
currentAni.setCurrentFrameWithChildLayer(frameIndex);
|
|
}
|
|
local speedRate = obj.getVar("custom").getFloat(10);
|
|
local pAni = obj.getCurrentAnimation();
|
|
pAni.setSpeedRate(speedRate);
|
|
}
|
|
else{
|
|
local ani = sq_CreateAnimation("", aniPath30);
|
|
obj.setCurrentAnimation(ani);
|
|
}
|
|
break;
|
|
}
|
|
break;
|
|
case SKILL_BYKK_KILLPOINT:
|
|
switch(subtype){
|
|
case 1:
|
|
switch(state){
|
|
case 20://旋转
|
|
local ani = sq_CreateAnimation("", "character/gunner/effect/animation/1_ranger/atkillpoint/anionly_killpoint_spinchain.ani");
|
|
obj.setCurrentAnimation(ani);
|
|
obj.getVar("move").setInt(0, sq_GetXPos(obj));
|
|
obj.getVar("move").setInt(1, sq_GetYPos(obj));
|
|
local targetObj = obj.getVar("tar").get_obj_vector(0);
|
|
local speed = 50;
|
|
if(targetObj) speed = 50 * sq_Abs(sq_GetXPos(obj) - sq_GetXPos(targetObj)) / 400;
|
|
// if(speed <= 1) speed = 1;
|
|
//print("speed = "+speed);
|
|
obj.getVar("move").setInt(2, speed);
|
|
obj.setTimeEvent(1, 2, speed, true);
|
|
break;
|
|
case 21://击中
|
|
sq_setCurrentAxisPos(obj, 2, 0);
|
|
local ani = sq_CreateAnimation("", "character/gunner/effect/animation/1_ranger/atkillpoint/killpointchaina_chain.ani");
|
|
obj.setCurrentAnimation(ani);
|
|
local targetObj = obj.getVar("tar").get_obj_vector(0);
|
|
if(!sq_IsFixture(targetObj)){
|
|
local currentAni = obj.getCurrentAnimation();
|
|
obj.getVar("move").setInt(0, sq_GetXPos(obj));
|
|
obj.setTimeEvent(2, currentAni.getDelaySum(false) / 30, 30, true);
|
|
}
|
|
break;
|
|
case 22://定身
|
|
local ani = sq_CreateAnimation("", "character/gunner/effect/animation/1_ranger/atkillpoint/killpointchainb_chain.ani");
|
|
obj.setCurrentAnimation(ani);
|
|
obj.setTimeEvent(3, 100, -1, false);
|
|
break;
|
|
case 23://消失
|
|
local ani = sq_CreateAnimation("", "character/gunner/effect/animation/1_ranger/atkillpoint/killpointchainc_chain.ani");
|
|
obj.setCurrentAnimation(ani);
|
|
break;
|
|
case 24://未命中,消失
|
|
local ani = sq_CreateAnimation("", "character/gunner/effect/animation/1_ranger/atkillpoint/killpointchainmiss_chain.ani");
|
|
obj.setCurrentAnimation(ani);
|
|
break;
|
|
}
|
|
break;
|
|
}
|
|
break;
|
|
}
|
|
break;
|
|
case 2:
|
|
switch(skillIndex){
|
|
case SKILL_BYKK_FLAMETHROWER:
|
|
switch(subtype){
|
|
case 1:
|
|
local aniPath = ["character/gunner/effect/animation/2_blaster/subweapon/flamethrower/atfire_start.ani","character/gunner/effect/animation/2_blaster/subweapon/flamethrower/atfire_loop.ani","character/gunner/effect/animation/2_blaster/subweapon/flamethrower/atfire_end.ani"];
|
|
if(obj.getVar("custom").getInt(10) > 0) aniPath = ["character/gunner/effect/animation/2_blaster/atajreinforceparts/flamethrower/fire_start.ani","character/gunner/effect/animation/2_blaster/atajreinforceparts/flamethrower/fire_loop.ani","character/gunner/effect/animation/2_blaster/atajreinforceparts/flamethrower/fire_end.ani"];
|
|
local ani = sq_CreateAnimation("", aniPath[state - 20]);
|
|
obj.setCurrentAnimation(ani);
|
|
if(state == 22) obj.removeAllTimeEvent();
|
|
local sizeRate = obj.getVar("custom").getInt(11);
|
|
if(sizeRate > 100){
|
|
sizeRate = sizeRate.tofloat() / 100.0;
|
|
local currentAni = obj.getCurrentAnimation();
|
|
currentAni.setImageRateFromOriginal(sizeRate, sizeRate);
|
|
currentAni.setAutoLayerWorkAnimationAddSizeRate(sizeRate);
|
|
sq_SetAttackBoundingBoxSizeRate(currentAni, sizeRate, sizeRate, sizeRate);
|
|
}
|
|
break;
|
|
}
|
|
break;
|
|
case SKILL_BYKK_FLAMETHROWERBOOST:
|
|
switch(subtype){
|
|
case 1:
|
|
local aniPath = ["character/gunner/effect/animation/2_blaster/subweapon/flamethrowerboost/atfire_start.ani","character/gunner/effect/animation/2_blaster/subweapon/flamethrowerboost/atfire_loop.ani","character/gunner/effect/animation/2_blaster/subweapon/flamethrowerboost/atfire_end.ani"];
|
|
if(obj.getVar("custom").getInt(10) > 0) aniPath = ["character/gunner/effect/animation/2_blaster/atajreinforceparts/flamethrowerboost/fire_start.ani","character/gunner/effect/animation/2_blaster/atajreinforceparts/flamethrowerboost/fire_loop.ani","character/gunner/effect/animation/2_blaster/atajreinforceparts/flamethrowerboost/fire_end.ani"];
|
|
local ani = sq_CreateAnimation("", aniPath[state - 20]);
|
|
obj.setCurrentAnimation(ani);
|
|
if(state == 22) obj.removeAllTimeEvent();
|
|
local sizeRate = obj.getVar("custom").getInt(11);
|
|
if(sizeRate > 100){
|
|
sizeRate = sizeRate.tofloat() / 100.0;
|
|
local currentAni = obj.getCurrentAnimation();
|
|
currentAni.setImageRateFromOriginal(sizeRate, sizeRate);
|
|
currentAni.setAutoLayerWorkAnimationAddSizeRate(sizeRate);
|
|
sq_SetAttackBoundingBoxSizeRate(currentAni, sizeRate, sizeRate, sizeRate);
|
|
}
|
|
break;
|
|
}
|
|
break;
|
|
case 71:
|
|
switch(subtype){
|
|
case 1:
|
|
switch(state){
|
|
case 20:
|
|
local ani = sq_CreateAnimation("", "passiveobject/atgunner_bykk/2_blaster/animation/extruder/ball1.ani");
|
|
obj.setCurrentAnimation(ani);
|
|
local pAni = obj.getCurrentAnimation();
|
|
pAni.addLayerAnimation(1,sq_CreateAnimation("","passiveobject/atgunner_bykk/2_blaster/animation/extruder/ball2.ani"),true);
|
|
pAni.addLayerAnimation(2,sq_CreateAnimation("","passiveobject/atgunner_bykk/2_blaster/animation/extruder/ball3.ani"),true);
|
|
pAni.addLayerAnimation(3,sq_CreateAnimation("","passiveobject/atgunner_bykk/2_blaster/animation/extruder/ball4.ani"),true);
|
|
pAni.addLayerAnimation(4,sq_CreateAnimation("","passiveobject/atgunner_bykk/2_blaster/animation/extruder/ball5.ani"),true);
|
|
pAni.addLayerAnimation(5,sq_CreateAnimation("","passiveobject/atgunner_bykk/2_blaster/animation/extruder/fullcharge1.ani"),true);
|
|
pAni.addLayerAnimation(6,sq_CreateAnimation("","passiveobject/atgunner_bykk/2_blaster/animation/extruder/fullcharge2.ani"),true);
|
|
pAni.addLayerAnimation(7,sq_CreateAnimation("","passiveobject/atgunner_bykk/2_blaster/animation/extruder/newfullcharge01.ani"),true);
|
|
pAni.addLayerAnimation(8,sq_CreateAnimation("","passiveobject/atgunner_bykk/2_blaster/animation/extruder/newfullcharge02.ani"),true);
|
|
obj.getVar("custom").setInt(12, sq_GetXPos(obj));
|
|
obj.setTimeEvent(1, 6, 100, true);
|
|
break;
|
|
case 21:
|
|
local ani = sq_CreateAnimation("", "passiveobject/atgunner_bykk/2_blaster/animation/extruder/ajextruder/ajextruderboom_09.ani");
|
|
obj.setCurrentAnimation(ani);
|
|
sq_SetShake(obj, 5, 300);
|
|
sq_flashScreen(obj,80,100,80,150, sq_RGB(255, 255, 255), GRAPHICEFFECT_NONE, ENUM_DRAWLAYER_BOTTOM);
|
|
local totalDamage = obj.getVar("custom").getInt(10);
|
|
sq_SetCurrentAttackInfo(obj, sq_GetCustomAttackInfo(obj, 31));
|
|
sq_SetCurrentAttackPower(sq_GetCurrentAttackInfo(obj), totalDamage);
|
|
local sizeRate = obj.getVar("custom").getInt(11);
|
|
local currentAni = obj.getCurrentAnimation();
|
|
sizeRate = sizeRate.tofloat() / 100.0;
|
|
currentAni.setImageRateFromOriginal(sizeRate, sizeRate);
|
|
currentAni.setAutoLayerWorkAnimationAddSizeRate(sizeRate);
|
|
sq_SetAttackBoundingBoxSizeRate(currentAni, sizeRate, sizeRate, sizeRate);
|
|
break;
|
|
}
|
|
break;
|
|
}
|
|
break;
|
|
case SKILL_BYKK_STINGER:
|
|
switch(subtype){
|
|
case 1:
|
|
switch(state){
|
|
case 20:
|
|
local ani = sq_CreateAnimation("", "passiveobject/atgunner_bykk/2_blaster/animation/stinger/atmainnormal.ani");
|
|
obj.setCurrentAnimation(ani);
|
|
local pAni = obj.getCurrentAnimation();
|
|
pAni.addLayerAnimation(1,sq_CreateAnimation("","passiveobject/atgunner_bykk/2_blaster/animation/stinger/maindodge.ani"), true);
|
|
break;
|
|
case 21:
|
|
obj.sq_RemoveMoveParticle();
|
|
obj.removeAllTimeEvent();
|
|
local ani = sq_CreateAnimation("", "passiveobject/atgunner_bykk/2_blaster/animation/stinger/atmaindisjoint.ani");
|
|
obj.setCurrentAnimation(ani);
|
|
local pAni = obj.getCurrentAnimation();
|
|
pAni.addLayerAnimation(1,sq_CreateAnimation("","passiveobject/atgunner_bykk/2_blaster/animation/stinger/atmaindisjointeffect.ani"), true);
|
|
local totalDamage = obj.getVar("custom").getInt(10);
|
|
local sizeRate = obj.getVar("custom").getInt(11);
|
|
local createMax = obj.getVar("custom").getInt(12);
|
|
for(local i = 0; i < createMax; i++){
|
|
local angle = 360 / createMax * i;
|
|
createSkillPassive_ATGunner_bykk(obj,obj,PASSIVEOBJ_BYKK_ATGUNNER,0,0,0,obj.getDirection(),2,SKILL_BYKK_STINGER,2,totalDamage,sizeRate,i,angle,0,0,0,0);
|
|
}
|
|
obj.setTimeEvent(0, 200, 1, false);
|
|
sq_CreateParticle("passiveobject/atgunner_bykk/particle/2_blaster/stingerdisjoint.ptl", obj, 0, 0, 0, true, 30, 0, 2);
|
|
break;
|
|
}
|
|
break;
|
|
case 2:
|
|
switch(state){
|
|
case 20:
|
|
local ani = sq_CreateAnimation("", "passiveobject/character/gunner/animation/stinger/atsubnormal.ani");
|
|
obj.setCurrentAnimation(ani);
|
|
local pAni = obj.getCurrentAnimation();
|
|
pAni.addLayerAnimation(-1,sq_CreateAnimation("","passiveobject/character/gunner/animation/stinger/subdodge.ani"), true);
|
|
break;
|
|
case 21:
|
|
obj.sq_RemoveMoveParticle();
|
|
local ani = sq_CreateAnimation("", "passiveobject/character/gunner/animation/stinger/atexpdodge.ani");
|
|
obj.setCurrentAnimation(ani);
|
|
local pAni = obj.getCurrentAnimation();
|
|
pAni.addLayerAnimation(1,sq_CreateAnimation("","passiveobject/character/gunner/animation/stinger/atexpnormal.ani"), true);
|
|
local totalDamage = obj.getVar("custom").getInt(10);
|
|
local sizeRate = obj.getVar("custom").getInt(11);
|
|
sq_SetCurrentAttackInfo(obj, sq_GetCustomAttackInfo(obj, 22));
|
|
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);
|
|
}
|
|
obj.sq_PlaySound("FM31_HIT");
|
|
break;
|
|
}
|
|
break;
|
|
case 3:
|
|
switch(state){
|
|
case 20:
|
|
local sub = obj.getVar("custom").getInt(12);
|
|
local aniPath = "passiveobject/atgunner_bykk/2_blaster/animation/lancer/stingerfm92mk2lancermissile"+sub.tostring()+"_00.ani";
|
|
local ani = sq_CreateAnimation("", aniPath);
|
|
obj.setCurrentAnimation(ani);
|
|
local pAni = obj.getCurrentAnimation();
|
|
obj.setTimeEvent(1, 300, 1, false);
|
|
break;
|
|
case 21:
|
|
local ani = sq_CreateAnimation("", "passiveobject/atgunner_bykk/2_blaster/animation/lancer/stingerfm92mk2lancerex_00.ani");
|
|
obj.setCurrentAnimation(ani);
|
|
createOnlyDrawObject_ATGunner_bykk(obj,"passiveobject/atgunner_bykk/2_blaster/animation/lancer/stingerfm92mk2lancerexbottom_00.ani",true,obj.getDirection(),sq_GetXPos(obj),sq_GetYPos(obj),0,ENUM_DRAWLAYER_BOTTOM);
|
|
local totalDamage = obj.getVar("custom").getInt(10);
|
|
local sizeRate = obj.getVar("custom").getInt(11);
|
|
sq_SetCurrentAttackInfo(obj, sq_GetCustomAttackInfo(obj, 36));
|
|
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);
|
|
}
|
|
sq_SetShake(obj, 1, 50);
|
|
obj.sq_PlaySound("FM31_HIT");
|
|
break;
|
|
}
|
|
break;
|
|
}
|
|
break;
|
|
case SKILL_BYKK_URANIUMBOMB:
|
|
switch(subtype){
|
|
case 3:
|
|
switch(state){
|
|
case 20:
|
|
local ani = sq_CreateAnimation("", "passiveobject/atgunner_bykk/2_blaster/animation/uraniumbomb/biguraniumbomb/mechadropappear.ani");
|
|
obj.setCurrentAnimation(ani);
|
|
if(obj.getDirection() == ENUM_DIRECTION_LEFT) sq_SetVelocity(obj, 0, -1200.0);
|
|
else sq_SetVelocity(obj, 0, 1200.0);
|
|
break;
|
|
case 21:
|
|
local ani = sq_CreateAnimation("", "passiveobject/atgunner_bykk/2_blaster/animation/uraniumbomb/biguraniumbomb/mechadropmove.ani");
|
|
obj.setCurrentAnimation(ani);
|
|
createSkillPassive_ATGunner_bykk(obj,sqrChr,PASSIVEOBJ_BYKK_ATGUNNER,0,0,0,obj.getDirection(),2,SKILL_BYKK_URANIUMBOMB,4,0,0,0,0,0,0,0,0);
|
|
break;
|
|
case 22:
|
|
local ani = sq_CreateAnimation("", "passiveobject/atgunner_bykk/2_blaster/animation/uraniumbomb/biguraniumbomb/mechadropdisappear.ani");
|
|
obj.setCurrentAnimation(ani);
|
|
break;
|
|
}
|
|
break;
|
|
}
|
|
break;
|
|
case SKILL_BYKK_SOLARSYSTEM:
|
|
switch(subtype){
|
|
case 1:
|
|
switch(state){
|
|
case 20:
|
|
local ani = sq_CreateAnimation("", "passiveobject/atgunner_bykk/2_blaster/animation/atsolasystem/solasystemenergeball_00.ani");
|
|
obj.setCurrentAnimation(ani);
|
|
break;
|
|
case 21:
|
|
local ani = sq_CreateAnimation("", "passiveobject/atgunner_bykk/2_blaster/animation/atsolasystem/solasystemenergeballex_00.ani");
|
|
obj.setCurrentAnimation(ani);
|
|
local totalDamage = obj.getVar("custom").getInt(11);
|
|
local damage = obj.getVar("custom").getInt(12);
|
|
sq_SetCurrentAttackInfo(obj, sq_GetCustomAttackInfo(obj, 45));
|
|
sq_SetCurrentAttackBonusRate(sq_GetCurrentAttackInfo(obj), totalDamage);
|
|
local attackInfo = sq_GetCurrentAttackInfo(obj);
|
|
sq_SetChangeStatusIntoAttackInfo(attackInfo, 0, ACTIVESTATUS_BURN ,100, sq_GetSkillLevel(sqrChr, 174) + 10,1000, damage);
|
|
local aniPath = "passiveobject/atgunner_bykk/2_blaster/animation/atsolasystem/solasystemenergeballexbottom_00.ani";
|
|
createOnlyDrawObject_ATGunner_bykk(obj,aniPath,true,obj.getDirection(),sq_GetXPos(obj),sq_GetYPos(obj),0,ENUM_DRAWLAYER_BOTTOM);
|
|
sq_SetShake(obj, 10, 300);
|
|
break;
|
|
}
|
|
break;
|
|
}
|
|
break;
|
|
case SKILL_BYKK_ANCIENTTRIGGER:
|
|
switch(subtype){
|
|
case 8:
|
|
case 9:
|
|
switch(state){
|
|
case 20:
|
|
local aniPath = "passiveobject/atgunner_bykk/2_blaster/animation/ancienttrigger/start_in_atgate_in.ani";
|
|
if(subtype == 9) aniPath = "passiveobject/atgunner_bykk/2_blaster/animation/ancienttrigger/start_out_atgate_out.ani";
|
|
local ani = sq_CreateAnimation("", aniPath);
|
|
obj.setCurrentAnimation(ani);
|
|
break;
|
|
case 21:
|
|
local aniPath = "passiveobject/atgunner_bykk/2_blaster/animation/ancienttrigger/loop_in_atgate_in.ani";
|
|
if(subtype == 9) aniPath = "passiveobject/atgunner_bykk/2_blaster/animation/ancienttrigger/loop_out_atgate_out.ani";
|
|
local ani = sq_CreateAnimation("", aniPath);
|
|
obj.setCurrentAnimation(ani);
|
|
break;
|
|
}
|
|
local currentAni = obj.getCurrentAnimation();
|
|
currentAni.setImageRateFromOriginal(0.9, 0.9);
|
|
break;
|
|
}
|
|
break;
|
|
case SKILL_BYKK_PLASMABOOST:
|
|
switch(subtype){
|
|
case 1:
|
|
switch(state){
|
|
case 20:
|
|
local ani = sq_CreateAnimation("", "passiveobject/atgunner_bykk/2_blaster/animation/plasmaboost/plasmaboostlaserloop_00.ani");
|
|
obj.setCurrentAnimation(ani);
|
|
break;
|
|
case 21:
|
|
local ani = sq_CreateAnimation("", "passiveobject/atgunner_bykk/2_blaster/animation/plasmaboost/plasmaboostlaserend_00.ani");
|
|
obj.setCurrentAnimation(ani);
|
|
local time = obj.getVar("custom").getInt(10);
|
|
//print("ttime = "+time);
|
|
local size = obj.getVar("tar").get_obj_vector_size();
|
|
if(size > 0){
|
|
for(local i = 0; i < size; i++){
|
|
local targetObj = obj.getVar("tar").get_obj_vector(i);
|
|
if(targetObj){
|
|
local activeObj = sq_GetCNRDObjectToActiveObject(targetObj);
|
|
local addAppendage = CNSquirrelAppendage.sq_GetAppendage(activeObj, "character/atgunner/2_blaster_bykk/ap_plasmaboost.nut");
|
|
if(addAppendage) addAppendage.sq_SetValidTime(time);
|
|
}
|
|
}
|
|
}
|
|
break;
|
|
}
|
|
break;
|
|
}
|
|
break;
|
|
case SKILL_BYKK_FSC_7:
|
|
switch(subtype){
|
|
case 1:
|
|
switch(state){
|
|
case 20:
|
|
local ani = sq_CreateAnimation("", "passiveobject/atgunner_bykk/2_blaster/animation/atfsc7/fscbullet_00.ani");
|
|
obj.setCurrentAnimation(ani);
|
|
sq_AddDrawOnlyAniFromParent(obj, "passiveobject/atgunner_bykk/2_blaster/animation/atfsc7/fsca_00.ani", 0, 0, 0);
|
|
obj.sq_SetMoveParticle("particle/2_blaster/extruder.ptl", 0.0, 0.0);
|
|
sq_SetSpeedToMoveParticle(obj, 0, 1000);
|
|
obj.setTimeEvent(1, 1000, 1, false);
|
|
break;
|
|
case 21:
|
|
local ani = sq_CreateAnimation("", "passiveobject/atgunner_bykk/2_blaster/animation/atfsc7/fscdisappearbullet_03.ani");
|
|
obj.setCurrentAnimation(ani);
|
|
obj.sq_RemoveMoveParticle();
|
|
local totalDamage = obj.getVar("custom").getInt(10);
|
|
local hitMax = obj.getVar("custom").getInt(11);
|
|
local sizeRate = obj.getVar("custom").getInt(12);
|
|
createSkillPassive_ATGunner_bykk(obj,obj,PASSIVEOBJ_BYKK_ATGUNNER,0,0,0,obj.getDirection(),2,SKILL_BYKK_FSC_7,2,totalDamage,hitMax,sizeRate,0,0,0,0,0);
|
|
break;
|
|
}
|
|
break;
|
|
}
|
|
break;
|
|
case SKILL_BYKK_STINGEREX:
|
|
switch(subtype){
|
|
case 2:
|
|
switch(state){
|
|
case 20:
|
|
local ani = sq_CreateAnimation("", "passiveobject/atgunner_bykk/2_blaster/animation/stingerex/atstinger/boostermissilereturn_02.ani");
|
|
obj.setCurrentAnimation(ani);
|
|
obj.sq_SetMoveParticle("particle/2_blaster/subweapon/stinger.ptl", 0.0, 0.0);
|
|
sq_SetCustomRotate(obj, sq_ToRadian(-45.0));
|
|
// sq_SetSpeedToMoveParticle(obj,0,200);
|
|
break;
|
|
case 21:
|
|
sq_SetCustomRotate(obj, sq_ToRadian(0.0));
|
|
local ani = sq_CreateAnimation("", "passiveobject/atgunner_bykk/2_blaster/animation/stingerex/atstinger/explosion_08.ani");
|
|
obj.setCurrentAnimation(ani);
|
|
local totalDamage = obj.getVar("custom").getInt(10);
|
|
local hitMax = obj.getVar("custom").getInt(11);
|
|
local sizeRate = obj.getVar("custom").getInt(12);
|
|
sq_SetCurrentAttackInfo(obj, sq_GetCustomAttackInfo(obj, 22));
|
|
sq_SetCurrentAttackBonusRate(sq_GetCurrentAttackInfo(obj), totalDamage * hitMax);
|
|
local aniPath = "passiveobject/atgunner_bykk/2_blaster/animation/stingerex/atstinger/groundcrack_00.ani";
|
|
createOnlyDrawObjectEX_ATGunner_bykk(obj,aniPath,true,obj.getDirection(),sq_GetXPos(obj),sq_GetYPos(obj),0,ENUM_DRAWLAYER_BOTTOM,sizeRate,sizeRate)
|
|
if(sizeRate > 100){
|
|
sizeRate = sizeRate.tofloat() / 100.0;
|
|
local currentAni = obj.getCurrentAnimation();
|
|
currentAni.setImageRateFromOriginal(sizeRate, sizeRate);
|
|
currentAni.setAutoLayerWorkAnimationAddSizeRate(sizeRate);
|
|
sq_SetAttackBoundingBoxSizeRate(currentAni, sizeRate, sizeRate, sizeRate);
|
|
}
|
|
sq_SetMyShake(obj, 6, 120);
|
|
break;
|
|
}
|
|
break;
|
|
}
|
|
break;
|
|
case SKILL_BYKK_OPERATIONRAZE:
|
|
switch(subtype){
|
|
case 5:
|
|
switch(state){
|
|
case 20:
|
|
local ani = sq_CreateAnimation("", "passiveobject/atgunner_bykk/2_blaster/animation/atoperationraze/missile02_01.ani");
|
|
obj.setCurrentAnimation(ani);
|
|
obj.sq_SetMoveParticle("particle/2_blaster/subweapon/stingerexp.ptl", 0.0, 0.0);
|
|
sq_SetSpeedToMoveParticle(obj,0,sq_getRandom(200, 250));
|
|
break;
|
|
case 21:
|
|
local ani = sq_CreateAnimation("", "passiveobject/atgunner_bykk/2_blaster/animation/atoperationraze/orboom01_01.ani");
|
|
obj.setCurrentAnimation(ani);
|
|
local totalDamage = obj.getVar("custom").getInt(10);
|
|
sq_SetCurrentAttackInfo(obj, sq_GetCustomAttackInfo(obj, 13));
|
|
sq_SetCurrentAttackBonusRate(sq_GetCurrentAttackInfo(obj), totalDamage);
|
|
obj.sq_PlaySound("FM31_HIT");
|
|
sq_SetShake(obj, 5, 100);
|
|
break;
|
|
}
|
|
break;
|
|
case 6:
|
|
switch(state){
|
|
case 20:
|
|
local ani = sq_CreateAnimation("", "passiveobject/atgunner_bykk/2_blaster/animation/atoperationraze/missile01out_02.ani");
|
|
obj.setCurrentAnimation(ani);
|
|
obj.sq_SetMoveParticle("particle/2_blaster/subweapon/stingerexp.ptl", 0.0, 0.0);
|
|
sq_SetSpeedToMoveParticle(obj, 0, 0);
|
|
sq_SetCustomRotate(obj, sq_ToRadian(180.0));
|
|
break;
|
|
case 21:
|
|
sq_SetCustomRotate(obj, sq_ToRadian(0.0));
|
|
local ani = sq_CreateAnimation("", "passiveobject/atgunner_bykk/2_blaster/animation/atoperationraze/orboom02_15.ani");
|
|
obj.setCurrentAnimation(ani);
|
|
local totalDamage = obj.getVar("custom").getInt(10);
|
|
sq_SetCurrentAttackInfo(obj, sq_GetCustomAttackInfo(obj, 11));
|
|
sq_SetCurrentAttackBonusRate(sq_GetCurrentAttackInfo(obj), totalDamage);
|
|
obj.sq_PlaySound("FM31_HIT");
|
|
sq_SetShake(obj, 10, 300);
|
|
break;
|
|
}
|
|
break;
|
|
}
|
|
break;
|
|
case SKILL_BYKK_PHLEGETHON:
|
|
switch(subtype){
|
|
case 1:
|
|
local aniPath = ["passiveobject/atgunner_bykk/2_blaster/animation/phlegethon/phlegethonstartfront_00.ani","passiveobject/atgunner_bykk/2_blaster/animation/phlegethon/phlegethonloopfront_00.ani","passiveobject/atgunner_bykk/2_blaster/animation/phlegethon/phlegethonendfront_03.ani"];
|
|
if(obj.getVar("custom").getInt(13) > 0) aniPath = ["passiveobject/atgunner_bykk/2_blaster/animation/phlegethon/booststartfront_00.ani","passiveobject/atgunner_bykk/2_blaster/animation/phlegethon/boostloopfront_00.ani","passiveobject/atgunner_bykk/2_blaster/animation/phlegethon/boostendfront_01.ani"];
|
|
local ani = sq_CreateAnimation("", aniPath[state - 20]);
|
|
obj.setCurrentAnimation(ani);
|
|
switch(state){
|
|
case 20: obj.sq_PlaySound("PHLEGETHON_FIRE"); break;
|
|
case 21:
|
|
obj.stopSound(2333);
|
|
obj.sq_PlaySound("PHLEGETHON_FIRE_LOOP", 2333);
|
|
break;
|
|
case 22:
|
|
obj.sq_PlaySound("PHLEGETHON_FIRE_LOOP_END");
|
|
obj.removeAllTimeEvent();
|
|
break;
|
|
}
|
|
break;
|
|
case 2:
|
|
local aniPath = ["character/gunner/effect/animation/2_blaster/atphlegethon/flamebottomloop_00.ani","character/gunner/effect/animation/2_blaster/atphlegethon/flamebottomend_00.ani"];
|
|
local ani = sq_CreateAnimation("", aniPath[state - 20]);
|
|
obj.setCurrentAnimation(ani);
|
|
break;
|
|
}
|
|
break;
|
|
}
|
|
break;
|
|
case 3:
|
|
switch(skillIndex){
|
|
case SKILL_BYKK_HYPERFLARE:
|
|
switch(subtype){
|
|
case 1:
|
|
switch(state){
|
|
case 20:
|
|
local ani = sq_CreateAnimation("", "passiveobject/atgunner_bykk/3_mechanic/animation/athyperflare/hyperflare1attackfront_00.ani");
|
|
obj.setCurrentAnimation(ani);
|
|
obj.sq_PlaySound("HYPERFLARE_SUMMON");
|
|
local currentAni = obj.getCurrentAnimation();
|
|
currentAni.addLayerAnimation(6,sq_CreateAnimation("","passiveobject/atgunner_bykk/3_mechanic/animation/athyperflare/hyperflare1attackfront_30.ani"),true);
|
|
currentAni.addLayerAnimation(6,sq_CreateAnimation("","passiveobject/atgunner_bykk/3_mechanic/animation/athyperflare/hyperflare1attackfront_34.ani"),true);
|
|
local pooledObj = sq_AddDrawOnlyAniFromParent(obj, "passiveobject/atgunner_bykk/3_mechanic/animation/athyperflare/hyperflare1attackbottom_00.ani", 0, 0, 0);
|
|
sq_ChangeDrawLayer(pooledObj, ENUM_DRAWLAYER_BOTTOM);
|
|
break;
|
|
case 21:
|
|
local ani = sq_CreateAnimation("", "passiveobject/atgunner_bykk/3_mechanic/animation/athyperflare/hyperflare2attackfront_00.ani");
|
|
obj.setCurrentAnimation(ani);
|
|
local pooledObj = sq_AddDrawOnlyAniFromParent(obj, "passiveobject/atgunner_bykk/3_mechanic/animation/athyperflare/hyperflare2attackbottom_00.ani", 0, 0, 0);
|
|
sq_ChangeDrawLayer(pooledObj, ENUM_DRAWLAYER_BOTTOM);
|
|
local currentAni = obj.getCurrentAnimation();
|
|
obj.setTimeEvent(3, currentAni.getDelaySum(0, 15), 1, false);
|
|
break;
|
|
}
|
|
break;
|
|
case 0:
|
|
switch(state){
|
|
case 20:
|
|
local ani = sq_CreateAnimation("", "passiveobject/atgunner_bykk/3_mechanic/animation/athyperflare/hyperflare1attackback_33.ani");
|
|
obj.setCurrentAnimation(ani);
|
|
local currentAni = obj.getCurrentAnimation();
|
|
currentAni.addLayerAnimation(6,sq_CreateAnimation("","passiveobject/atgunner_bykk/3_mechanic/animation/athyperflare/hyperflare1attackback_00.ani"),true);
|
|
break;
|
|
case 21:
|
|
local ani = sq_CreateAnimation("", "passiveobject/atgunner_bykk/3_mechanic/animation/athyperflare/hyperflare2attackback_35.ani");
|
|
obj.setCurrentAnimation(ani);
|
|
break;
|
|
}
|
|
break;
|
|
}
|
|
break;
|
|
}
|
|
break;
|
|
case 4:
|
|
switch(skillIndex){
|
|
case SKILL_BYKK_NAPALMBOMB:
|
|
switch(subtype){
|
|
case 3:
|
|
local aniPath = [["passiveobject/atgunner_bykk/4_spitfire/animation/napalmbombrenewal/napalm_floora_fire01.ani",
|
|
"passiveobject/atgunner_bykk/4_spitfire/animation/napalmbombrenewal/napalm_floora_ice01.ani",
|
|
"passiveobject/atgunner_bykk/4_spitfire/animation/napalmbombrenewal/napalm_floora_normal01.ani",
|
|
"passiveobject/atgunner_bykk/4_spitfire/animation/napalmbombrenewal/napalm_floora_light01.ani",
|
|
"passiveobject/atgunner_bykk/4_spitfire/animation/napalmbombrenewal/napalm_floora_normal01.ani"],
|
|
["passiveobject/atgunner_bykk/4_spitfire/animation/napalmbombrenewal/napalm_floorb_fire01.ani",
|
|
"passiveobject/atgunner_bykk/4_spitfire/animation/napalmbombrenewal/napalm_floorb_ice01.ani",
|
|
"passiveobject/atgunner_bykk/4_spitfire/animation/napalmbombrenewal/napalm_floorb_normal02.ani",
|
|
"passiveobject/atgunner_bykk/4_spitfire/animation/napalmbombrenewal/napalm_floorb_light01.ani",
|
|
"passiveobject/atgunner_bykk/4_spitfire/animation/napalmbombrenewal/napalm_floorb_normal02.ani"],
|
|
["passiveobject/atgunner_bykk/4_spitfire/animation/napalmbombrenewal/napalm_floorc_fire01.ani",
|
|
"passiveobject/atgunner_bykk/4_spitfire/animation/napalmbombrenewal/napalm_floorc_ice01.ani",
|
|
"passiveobject/atgunner_bykk/4_spitfire/animation/napalmbombrenewal/napalm_floorc_normal01.ani",
|
|
"passiveobject/atgunner_bykk/4_spitfire/animation/napalmbombrenewal/napalm_floorc_light01.ani",
|
|
"passiveobject/atgunner_bykk/4_spitfire/animation/napalmbombrenewal/napalm_floorc_normal01.ani"]];
|
|
local elementSelect = obj.getVar("custom").getInt(0);
|
|
local ani = sq_CreateAnimation("", aniPath[state - 20][elementSelect]);
|
|
obj.setCurrentAnimation(ani);
|
|
local sizeRate = obj.getVar("custom").getInt(4);
|
|
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);
|
|
}
|
|
if(state == 20){
|
|
sq_SetCurrentAttackInfo(obj, sq_GetCustomAttackInfo(obj, 98));
|
|
sq_SetCurrentAttackBonusRate(sq_GetCurrentAttackInfo(obj), obj.getVar("custom").getInt(1));
|
|
local attackInfo = sq_GetCurrentAttackInfo(obj);
|
|
if(elementSelect < 4) attackInfo.setElement(elementSelect);
|
|
}
|
|
else if(state == 21){
|
|
local lifeTime = obj.getVar("custom").getInt(2);
|
|
local hitTime = obj.getVar("custom").getInt(3);
|
|
obj.setTimeEvent(1, lifeTime, 1, false);
|
|
obj.setTimeEvent(2, hitTime, -1, true);
|
|
}
|
|
break;
|
|
}
|
|
break;
|
|
case SKILL_BYKK_GRENADELIGHT:
|
|
switch(subtype){
|
|
case 3:
|
|
switch(state){
|
|
case 20:
|
|
local ani = sq_CreateAnimation("", "passiveobject/atgunner_bykk/4_spitfire/animation/atstandby-ready/flashfrontstart_00.ani");
|
|
obj.setCurrentAnimation(ani);
|
|
sq_SetCurrentAttackInfo(obj, sq_GetCustomAttackInfo(obj, 117));
|
|
sq_SetCurrentAttackBonusRate(sq_GetCurrentAttackInfo(obj), obj.getVar("custom").getInt(0));
|
|
local attackInfo = sq_GetCurrentAttackInfo(obj);
|
|
if(attackInfo){
|
|
sq_SetAddWeaponDamage(attackInfo, true);
|
|
sq_setAttackInfoType(obj, obj.getVar("atkType").getInt(0));
|
|
sq_SetChangeStatusIntoAttackInfo(attackInfo, 0, ACTIVESTATUS_LIGHTNING,obj.getVar("custom").getInt(4),obj.getVar("custom").getInt(5),obj.getVar("custom").getInt(6));
|
|
if(sqrChr && sqrChr.getState() != STATE_DIE){
|
|
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);
|
|
}
|
|
}
|
|
obj.setTimeEvent(2, 180, -1, false);
|
|
break;
|
|
case 21:
|
|
local ani = sq_CreateAnimation("", "passiveobject/atgunner_bykk/4_spitfire/animation/atstandby-ready/flashfrontloop_00.ani");
|
|
obj.setCurrentAnimation(ani);
|
|
obj.setTimeEvent(1, 1500, 1, false);
|
|
break;
|
|
case 22:
|
|
local ani = sq_CreateAnimation("", "passiveobject/atgunner_bykk/4_spitfire/animation/atstandby-ready/flashfrontend_00.ani");
|
|
obj.setCurrentAnimation(ani);
|
|
break;
|
|
}
|
|
local sizeRate = obj.getVar("custom").getInt(1);
|
|
if(sizeRate > 100){
|
|
sizeRate = sizeRate.tofloat() / 100.0;
|
|
sq_SetAttackBoundingBoxSizeRate(currentAni, sizeRate, sizeRate, sizeRate);
|
|
}
|
|
break;
|
|
case 4:
|
|
switch(state){
|
|
case 20:
|
|
local ani = sq_CreateAnimation("", "passiveobject/atgunner_bykk/4_spitfire/animation/atstandby-ready/flashbottomstart_00.ani");
|
|
obj.setCurrentAnimation(ani);
|
|
break;
|
|
case 21:
|
|
local ani = sq_CreateAnimation("", "passiveobject/atgunner_bykk/4_spitfire/animation/atstandby-ready/flashbottomloop_00.ani");
|
|
obj.setCurrentAnimation(ani);
|
|
obj.setTimeEvent(1, 1500, 1, false);
|
|
break;
|
|
case 22:
|
|
local ani = sq_CreateAnimation("", "passiveobject/atgunner_bykk/4_spitfire/animation/atstandby-ready/flashbottomend_00.ani");
|
|
obj.setCurrentAnimation(ani);
|
|
break;
|
|
}
|
|
local sizeRate = obj.getVar("custom").getInt(1);
|
|
if(sizeRate > 100){
|
|
sizeRate = sizeRate.tofloat() / 100.0;
|
|
currentAni.setImageRateFromOriginal(sizeRate, sizeRate);
|
|
currentAni.setAutoLayerWorkAnimationAddSizeRate(sizeRate);
|
|
sq_SetAttackBoundingBoxSizeRate(currentAni, sizeRate, sizeRate, sizeRate);
|
|
}
|
|
break;
|
|
}
|
|
break;
|
|
case SKILL_BYKK_GRENADEWATER:
|
|
switch(subtype){
|
|
case 3:
|
|
switch(state){
|
|
case 20:
|
|
local ani = sq_CreateAnimation("", "passiveobject/atgunner_bykk/4_spitfire/animation/atstandby-ready/frozenstart_01.ani");
|
|
obj.setCurrentAnimation(ani);
|
|
sq_SetCurrentAttackInfo(obj, sq_GetCustomAttackInfo(obj, 119));
|
|
sq_SetCurrentAttackBonusRate(sq_GetCurrentAttackInfo(obj), obj.getVar("custom").getInt(0));
|
|
local attackInfo = sq_GetCurrentAttackInfo(obj);
|
|
if(attackInfo){
|
|
sq_SetAddWeaponDamage(attackInfo, true);
|
|
sq_setAttackInfoType(obj, obj.getVar("atkType").getInt(0));
|
|
sq_SetChangeStatusIntoAttackInfo(attackInfo, 0, ACTIVESTATUS_FREEZE,obj.getVar("custom").getInt(4),obj.getVar("custom").getInt(5),obj.getVar("custom").getInt(6));
|
|
if(sqrChr && sqrChr.getState() != STATE_DIE){
|
|
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);
|
|
}
|
|
}
|
|
obj.setTimeEvent(2, 160, -1, false);
|
|
break;
|
|
case 21:
|
|
local ani = sq_CreateAnimation("", "passiveobject/atgunner_bykk/4_spitfire/animation/atstandby-ready/frozenloop_00.ani");
|
|
obj.setCurrentAnimation(ani);
|
|
obj.setTimeEvent(1, 1000, 1, false);
|
|
break;
|
|
case 22:
|
|
local ani = sq_CreateAnimation("", "passiveobject/atgunner_bykk/4_spitfire/animation/atstandby-ready/frozenend_00.ani");
|
|
obj.setCurrentAnimation(ani);
|
|
break;
|
|
}
|
|
local sizeRate = obj.getVar("custom").getInt(1);
|
|
if(sizeRate > 100){
|
|
sizeRate = sizeRate.tofloat() / 100.0;
|
|
sq_SetAttackBoundingBoxSizeRate(currentAni, sizeRate, sizeRate, sizeRate);
|
|
}
|
|
break;
|
|
}
|
|
break;
|
|
case SKILL_BYKK_M18CLAYMORE:
|
|
switch(subtype){
|
|
case 1:
|
|
switch(state){
|
|
case 20:
|
|
local aniPath = "passiveobject/atgunner_bykk/4_spitfire/animation/m18claymore/m18claymore_start_claymore.ani";
|
|
local ani = sq_CreateAnimation("", aniPath);
|
|
obj.setCurrentAnimation(ani);
|
|
break;
|
|
case 21:
|
|
local ani = sq_CreateAnimation("", "passiveobject/atgunner_bykk/4_spitfire/animation/m18claymore/m18claymore_loop_claymore.ani");
|
|
obj.setCurrentAnimation(ani);
|
|
obj.setTimeEvent(1, obj.getVar("custom").getInt(2), 1, false);
|
|
obj.setTimeEvent(4, 100, -1, false);
|
|
break;
|
|
case 22:
|
|
local ani = sq_CreateAnimation("", "passiveobject/atgunner_bykk/4_spitfire/animation/m18claymore/m18claymore_ready_claymore.ani");
|
|
obj.setCurrentAnimation(ani);
|
|
local totalDamage = obj.getVar("custom").getInt(0);
|
|
local hitMax = obj.getVar("custom").getInt(1);
|
|
local sizeRate = obj.getVar("custom").getInt(3);
|
|
local prob = obj.getVar("custom").getInt(4);
|
|
local time = obj.getVar("custom").getInt(5);
|
|
createSkillPassive_ATGunner_bykk(obj,obj,PASSIVEOBJ_BYKK_ATGUNNER,0,0,0,sq_GetDirection(obj),4,SKILL_BYKK_M18CLAYMORE,2,totalDamage,hitMax,sizeRate,prob,time,0,0,0);
|
|
break;
|
|
case 23:
|
|
local ani = sq_CreateAnimation("", "passiveobject/atgunner_bykk/4_spitfire/animation/m18claymore/atm18claymore_airstart_claymore.ani");
|
|
obj.setCurrentAnimation(ani);
|
|
obj.getVar("move").setInt(0, sq_GetZPos(obj));
|
|
obj.setTimeEvent(3, 2, 40, true);
|
|
break;
|
|
}
|
|
break;
|
|
case 3:
|
|
switch(state){
|
|
case 20:
|
|
local ani = sq_CreateAnimation("", "passiveobject/atgunner_bykk/4_spitfire/animation/m18claymore/lv95atn-02x/claymorethrow_00.ani");
|
|
obj.setCurrentAnimation(ani);
|
|
local flagIndex = obj.getVar("custom").getInt(6);
|
|
local ptlSelect = obj.getVar("custom").getInt(7);
|
|
if(flagIndex == 202) ptlSelect = 3;
|
|
local ptlPath = ["particle/4_spitfire/grenadecenter.ptl","particle/4_spitfire/grenadeup.ptl","particle/4_spitfire/grenadedown.ptl","particle/4_spitfire/grenadejump.ptl"];
|
|
obj.sq_SetMoveParticle(ptlPath[ptlSelect], 0.0, 0.0);
|
|
break;
|
|
case 21:
|
|
local ani = sq_CreateAnimation("", "passiveobject/atgunner_bykk/4_spitfire/animation/m18claymore/lv95atn-02x/claymoresearchloop.ani");
|
|
obj.setCurrentAnimation(ani);
|
|
obj.setTimeEvent(1, obj.getVar("custom").getInt(2), 1, false);
|
|
obj.setTimeEvent(5, 100, -1, false);
|
|
break;
|
|
case 22:
|
|
local ani = sq_CreateAnimation("", "passiveobject/atgunner_bykk/4_spitfire/animation/m18claymore/lv95atn-02x/claymoreshoot_00.ani");
|
|
obj.setCurrentAnimation(ani);
|
|
break;
|
|
}
|
|
break;
|
|
}
|
|
break;
|
|
case SKILL_BYKK_LOCKONSUPPORT:
|
|
switch(subtype){
|
|
case 2:
|
|
switch(state){
|
|
case 20:
|
|
local ani = sq_CreateAnimation("", "passiveobject/atgunner_bykk/4_spitfire/animation/lockonsupport/bombbard/lockonsupport_floor_loop_bombbard.ani");
|
|
obj.setCurrentAnimation(ani);
|
|
local currentAni = obj.getCurrentAnimation();
|
|
currentAni.addLayerAnimation(6,sq_CreateAnimation("","passiveobject/atgunner_bykk/4_spitfire/animation/lockonsupport/lockonsupport_readya_grenadb01.ani"),true);
|
|
sq_SetCurrentAttackInfo(obj, sq_GetCustomAttackInfo(obj, 109));
|
|
obj.getVar("tar").clear_obj_vector();
|
|
obj.sq_SetMaxHitCounterPerObject(1);
|
|
obj.setTimeEvent(1, 500, 3, false);
|
|
break;
|
|
case 21:
|
|
local ani = sq_CreateAnimation("", "passiveobject/atgunner_bykk/4_spitfire/animation/lockonsupport/bombbard/lockonsupport_floor_end_bombbard.ani");
|
|
obj.setCurrentAnimation(ani);
|
|
break;
|
|
}
|
|
local sizeRate = obj.getVar("custom").getInt(1);
|
|
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:
|
|
switch(state){
|
|
case 20:
|
|
local ani = sq_CreateAnimation("", "passiveobject/atgunner_bykk/4_spitfire/animation/lockonsupport/target/lockonsupport_targetmarka_start_eff01.ani");
|
|
obj.setCurrentAnimation(ani);
|
|
break;
|
|
case 21:
|
|
local ani = sq_CreateAnimation("", "passiveobject/atgunner_bykk/4_spitfire/animation/lockonsupport/target/lockonsupport_targetmarka_loop_eff01.ani");
|
|
obj.setCurrentAnimation(ani);
|
|
break;
|
|
case 22:
|
|
local ani = sq_CreateAnimation("", "passiveobject/atgunner_bykk/4_spitfire/animation/lockonsupport/target/lockonsupport_targetmarka_end_eff01.ani");
|
|
obj.setCurrentAnimation(ani);
|
|
break;
|
|
}
|
|
break;
|
|
}
|
|
break;
|
|
case SKILL_BYKK_GRAVITYGRENADE:
|
|
switch(subtype){
|
|
case 2:
|
|
switch(state){
|
|
case 20:
|
|
local ani = sq_CreateAnimation("", "passiveobject/atgunner_bykk/4_spitfire/animation/grenadegravity/01_start/grenadegravity_start_background.ani");
|
|
obj.setCurrentAnimation(ani);
|
|
sq_AddDrawOnlyAniFromParent(obj, "passiveobject/atgunner_bykk/4_spitfire/animation/grenadegravity/01_start/grenadegravity_start_front.ani",0,0,0);
|
|
sq_AddDrawOnlyAniFromParent(obj, "passiveobject/atgunner_bykk/4_spitfire/animation/grenadegravity/01_start/grenadegravity_start_background01.ani",0,-1,0);
|
|
break;
|
|
case 21:
|
|
local ani = sq_CreateAnimation("", "passiveobject/atgunner_bykk/4_spitfire/animation/grenadegravity/02_loop/grenadegravity_loop_background.ani");
|
|
obj.setCurrentAnimation(ani);
|
|
local totalDamage = obj.getVar("custom").getInt(0);
|
|
sq_SetCurrentAttackInfo(obj, sq_GetCustomAttackInfo(obj, 103));
|
|
sq_SetCurrentAttackBonusRate(sq_GetCurrentAttackInfo(obj), totalDamage);
|
|
local attackInfo = sq_GetCurrentAttackInfo(obj);
|
|
if(attackInfo){
|
|
sq_SetAddWeaponDamage(attackInfo, true);
|
|
sq_setAttackInfoType(obj, obj.getVar("atkType").getInt(0));
|
|
if(sqrChr && sqrChr.getState() != STATE_DIE){
|
|
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);
|
|
}
|
|
}
|
|
//print("life = "+obj.getVar("custom").getInt(2));
|
|
//print("hit = "+obj.getVar("custom").getInt(3));
|
|
obj.setTimeEvent(1, obj.getVar("custom").getInt(2), 1, false);
|
|
obj.setTimeEvent(2, obj.getVar("custom").getInt(3), -1, true);
|
|
|
|
if(sqrChr && sqrChr.getState() != STATE_DIE){
|
|
if(CNSquirrelAppendage.sq_IsAppendAppendage(sqrChr, "appendage/character/ap_common_suck.nut")) CNSquirrelAppendage.sq_RemoveAppendage(sqrChr, "appendage/character/ap_common_suck.nut");
|
|
local appendage = CNSquirrelAppendage.sq_AppendAppendage(sqrChr, obj, -1, false, "appendage/character/ap_common_suck.nut", false);
|
|
if(appendage){
|
|
CNSquirrelAppendage.sq_Append(appendage, sqrChr, obj);
|
|
local auraAppendage = appendage.sq_getAuraMaster("auraMaster");
|
|
if(!auraAppendage) auraAppendage = appendage.sq_AddAuraMaster("auraMaster", sqrChr, obj, 1200, 18, 5, 0);
|
|
if(auraAppendage) auraAppendage.setAttractionInfo(600, 600, 165 * obj.getVar("custom").getInt(4) / 100, 100);
|
|
}
|
|
}
|
|
break;
|
|
case 22:
|
|
local ani = sq_CreateAnimation("", "passiveobject/atgunner_bykk/4_spitfire/animation/lockonsupport/bombbard/lockonsupport_floor_end_bombbard.ani");
|
|
obj.setCurrentAnimation(ani);
|
|
local totalDamageExp = obj.getVar("custom").getInt(1);
|
|
local sizeRate = obj.getVar("custom").getInt(4);
|
|
createSkillPassive_ATGunner_bykk(obj,obj,PASSIVEOBJ_BYKK_ATGUNNER,0,0,0,sq_GetDirection(obj),4,skillIndex,3,totalDamageExp,sizeRate,0,0,0,0,0,0);
|
|
if(!sqrChr) break;
|
|
CNSquirrelAppendage.sq_RemoveAppendage(sqrChr, "appendage/character/ap_common_suck.nut");
|
|
break;
|
|
}
|
|
local sizeRate = obj.getVar("custom").getInt(4);
|
|
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:
|
|
switch(state){
|
|
case 20:
|
|
local ani = sq_CreateAnimation("", "passiveobject/atgunner_bykk/4_spitfire/animation/lockonsupport/target/lockonsupport_targetmarka_start_eff01.ani");
|
|
obj.setCurrentAnimation(ani);
|
|
break;
|
|
case 21:
|
|
local ani = sq_CreateAnimation("", "passiveobject/atgunner_bykk/4_spitfire/animation/lockonsupport/target/lockonsupport_targetmarka_loop_eff01.ani");
|
|
obj.setCurrentAnimation(ani);
|
|
break;
|
|
case 22:
|
|
local ani = sq_CreateAnimation("", "passiveobject/atgunner_bykk/4_spitfire/animation/lockonsupport/target/lockonsupport_targetmarka_end_eff01.ani");
|
|
obj.setCurrentAnimation(ani);
|
|
break;
|
|
}
|
|
break;
|
|
}
|
|
break;
|
|
case SKILL_BYKK_CHELLI:
|
|
switch(subtype){
|
|
case 2:
|
|
switch(state){
|
|
case 20:
|
|
local ani = sq_CreateAnimation("", "passiveobject/atgunner_bykk/4_spitfire/animation/atchelli/start/atchelliboomstartbottom_00.ani");
|
|
obj.setCurrentAnimation(ani);
|
|
local totalDamage = obj.getVar("custom").getInt(0);
|
|
sq_SetCurrentAttackInfo(obj, sq_GetCustomAttackInfo(obj, 127));
|
|
sq_SetCurrentAttackBonusRate(sq_GetCurrentAttackInfo(obj), totalDamage);
|
|
obj.setTimeEvent(1, 300, obj.getVar("custom").getInt(1) + 1, true);
|
|
createSkillPassive_ATGunner_bykk(obj,obj,PASSIVEOBJ_BYKK_ATGUNNER,0,0,0,sq_GetDirection(obj),4,skillIndex,3,obj.getVar("custom").getInt(1),obj.getVar("custom").getInt(3),0,0,0,0,0,0);
|
|
|
|
// if(sqrChr && sqrChr.getState() != STATE_DIE){
|
|
// if(CNSquirrelAppendage.sq_IsAppendAppendage(sqrChr, "appendage/character/ap_common_suck2.nut")) CNSquirrelAppendage.sq_RemoveAppendage(sqrChr, "appendage/character/ap_common_suck2.nut");
|
|
// local appendage = CNSquirrelAppendage.sq_AppendAppendage(sqrChr, obj, -1, false, "appendage/character/ap_common_suck2.nut", false);
|
|
// if(appendage){
|
|
// CNSquirrelAppendage.sq_Append(appendage, sqrChr, obj);
|
|
// local auraAppendage = appendage.sq_getAuraMaster("auraMaster");
|
|
// if(!auraAppendage) auraAppendage = appendage.sq_AddAuraMaster("auraMaster", sqrChr, obj, 1200, 18, 5, 0);
|
|
// if(auraAppendage) auraAppendage.setAttractionInfo(300, 300, 280, 100);
|
|
// }
|
|
// }
|
|
break;
|
|
case 21:
|
|
local ani = sq_CreateAnimation("", "passiveobject/atgunner_bykk/4_spitfire/animation/atchelli/loop/atchellibottomloopbottom_00.ani");
|
|
obj.setCurrentAnimation(ani);
|
|
break;
|
|
case 22:
|
|
local ani = sq_CreateAnimation("", "passiveobject/atgunner_bykk/4_spitfire/animation/atchelli/loopend/atchellibottomloopendbottom_00.ani");
|
|
obj.setCurrentAnimation(ani);
|
|
local totalDamage = obj.getVar("custom").getInt(2);
|
|
sq_SetCurrentAttackInfo(obj, sq_GetCustomAttackInfo(obj, 126));
|
|
sq_SetCurrentAttackBonusRate(sq_GetCurrentAttackInfo(obj), totalDamage);
|
|
obj.setTimeEvent(2, 100, obj.getVar("custom").getInt(3) + 1, true);
|
|
break;
|
|
case 23:
|
|
local ani = sq_CreateAnimation("", "passiveobject/atgunner_bykk/4_spitfire/animation/atchelli/end/atchelliexplosionnonebottom_00.ani");
|
|
obj.setCurrentAnimation(ani);
|
|
local totalDamageExp = obj.getVar("custom").getInt(4);
|
|
local grenadeSave = obj.getVar("custom").getInt(7);
|
|
local grenadeDamageSave = obj.getVar("custom").getInt(8);
|
|
// print("totalDamageExp = "+totalDamageExp);
|
|
// print("grenadeSave = "+grenadeSave);
|
|
// print("grenadeDamageSave = "+grenadeDamageSave);
|
|
if(grenadeSave > 0) totalDamageExp = totalDamageExp + grenadeDamageSave;
|
|
// print("totalDamageExp2 = "+totalDamageExp);
|
|
sq_SetCurrentAttackInfo(obj, sq_GetCustomAttackInfo(obj, 122));
|
|
sq_SetCurrentAttackBonusRate(sq_GetCurrentAttackInfo(obj), totalDamageExp);
|
|
local attackInfo = sq_GetCurrentAttackInfo(obj);
|
|
if(attackInfo){
|
|
sq_SetAddWeaponDamage(attackInfo, true);
|
|
sq_setAttackInfoType(obj, obj.getVar("atkType").getInt(0));
|
|
if(sqrChr && sqrChr.getState() != STATE_DIE){
|
|
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);
|
|
}
|
|
}
|
|
if(obj.getVar("grenadeNone").getBool(0)) createSkillPassive_ATGunner_bykk(obj,obj,PASSIVEOBJ_BYKK_ATGUNNER,0,0,0,sq_GetDirection(obj),4,skillIndex,4,0,0,0,0,0,0,0,0);
|
|
else if(obj.getVar("grenadeLight").getBool(0)) createSkillPassive_ATGunner_bykk(obj,obj,PASSIVEOBJ_BYKK_ATGUNNER,0,0,0,sq_GetDirection(obj),4,skillIndex,5,0,0,0,0,0,0,0,0);
|
|
else if(obj.getVar("grenadeWater").getBool(0)) createSkillPassive_ATGunner_bykk(obj,obj,PASSIVEOBJ_BYKK_ATGUNNER,0,0,0,sq_GetDirection(obj),4,skillIndex,6,0,0,0,0,0,0,0,0);
|
|
else createSkillPassive_ATGunner_bykk(obj,obj,PASSIVEOBJ_BYKK_ATGUNNER,0,0,0,sq_GetDirection(obj),4,skillIndex,7,0,0,0,0,0,0,0,0);
|
|
// if(!sqrChr) return;
|
|
// CNSquirrelAppendage.sq_RemoveAppendage(sqrChr, "appendage/character/ap_common_suck2.nut");
|
|
return;
|
|
break;
|
|
}
|
|
local attackInfo = sq_GetCurrentAttackInfo(obj);
|
|
if(attackInfo){
|
|
sq_SetAddWeaponDamage(attackInfo, true);
|
|
sq_setAttackInfoType(obj, obj.getVar("atkType").getInt(0));
|
|
if(sqrChr && sqrChr.getState() != STATE_DIE){
|
|
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);
|
|
}
|
|
}
|
|
break;
|
|
case 3:
|
|
switch(state){
|
|
case 20:
|
|
local ani = sq_CreateAnimation("", "passiveobject/atgunner_bykk/4_spitfire/animation/atchelli/start/atchelliboomstartfront_00.ani");
|
|
obj.setCurrentAnimation(ani);
|
|
local currentAni = obj.getCurrentAnimation();
|
|
currentAni.addLayerAnimation(-1,sq_CreateAnimation("","passiveobject/atgunner_bykk/4_spitfire/animation/atchelli/start/atchelliboomstartback_00.ani"),true);
|
|
obj.setTimeEvent(3, 300, obj.getVar("custom").getInt(0) + 1, true);
|
|
break;
|
|
case 21:
|
|
local ani = sq_CreateAnimation("", "passiveobject/atgunner_bykk/4_spitfire/animation/atchelli/loop/atchellibottomloopfront_00.ani");
|
|
obj.setCurrentAnimation(ani);
|
|
local currentAni = obj.getCurrentAnimation();
|
|
currentAni.addLayerAnimation(-1,sq_CreateAnimation("","passiveobject/atgunner_bykk/4_spitfire/animation/atchelli/loop/atchellibottomloopback_00.ani"),true);
|
|
break;
|
|
case 22:
|
|
local ani = sq_CreateAnimation("", "passiveobject/atgunner_bykk/4_spitfire/animation/atchelli/loopend/atchellibottomloopendfront_00.ani");
|
|
obj.setCurrentAnimation(ani);
|
|
local currentAni = obj.getCurrentAnimation();
|
|
currentAni.addLayerAnimation(-1,sq_CreateAnimation("","passiveobject/atgunner_bykk/4_spitfire/animation/atchelli/loopend/atchellibottomloopendback_00.ani"),true);
|
|
obj.setTimeEvent(4, 100, obj.getVar("custom").getInt(1) + 1, true);
|
|
break;
|
|
}
|
|
break;
|
|
}
|
|
break;
|
|
case SKILL_BYKK_DDAY:
|
|
switch(subtype){
|
|
case 5:
|
|
local aniPath = ["passiveobject/atgunner_bykk/4_spitfire/animation/atdday/bot/thrower01on_01.ani", "passiveobject/atgunner_bykk/4_spitfire/animation/atdday/bot/thrower02moveshot_02.ani", "passiveobject/atgunner_bykk/4_spitfire/animation/atdday/bot/thrower03shot_02.ani", "passiveobject/atgunner_bykk/4_spitfire/animation/atdday/bot/thrower04dashloop_02.ani", "passiveobject/atgunner_bykk/4_spitfire/animation/atdday/bot/thrower05off_01.ani"];
|
|
local ani = sq_CreateAnimation("", aniPath[state - 20]);
|
|
obj.setCurrentAnimation(ani);
|
|
switch(state){
|
|
case 20:
|
|
sq_AddDrawOnlyAniFromParent(obj, "passiveobject/atgunner_bykk/4_spitfire/animation/atdday/bot/ddayportal_eff_a.ani", 0, 0, 0);
|
|
break;
|
|
case 22:
|
|
obj.stopTimeEvent(32);
|
|
obj.setTimeEvent(32, 80, 3, true);
|
|
break;
|
|
case 21:
|
|
obj.setTimeEvent(32, 200, -1, true);
|
|
case 23:
|
|
obj.getVar("move").setInt(0, sq_GetXPos(obj));
|
|
obj.getVar("move").setInt(1, sq_GetYPos(obj));
|
|
obj.setTimeEvent(31, 15, 40, true);
|
|
break;
|
|
case 24:
|
|
local pooledObj = sq_AddDrawOnlyAniFromParent(obj, "passiveobject/atgunner_bykk/4_spitfire/animation/atdday/bot/ddayportal_eff_a.ani", 50, 0, 0);
|
|
sq_SetCurrentDirection(pooledObj, sq_GetOppositeDirection(sq_GetDirection(pooledObj)));
|
|
break;
|
|
}
|
|
break;
|
|
case 7:
|
|
case 8:
|
|
local aniPath = ["passiveobject/atgunner_bykk/4_spitfire/animation/atdday/bot/dasha01on_add_body_a_dod.ani", "passiveobject/atgunner_bykk/4_spitfire/animation/atdday/bot/dasha02loop_add_body_a_nor.ani", "passiveobject/atgunner_bykk/4_spitfire/animation/atdday/bot/dasha03off_add_body_a_dod.ani"];
|
|
if(subtype == 8) aniPath = ["passiveobject/atgunner_bykk/4_spitfire/animation/atdday/bot/dashb01on_add_body_b_dod.ani", "passiveobject/atgunner_bykk/4_spitfire/animation/atdday/bot/dashb02loop_add_body_b_nor.ani", "passiveobject/atgunner_bykk/4_spitfire/animation/atdday/bot/dashb03off_add_body_b_dod.ani"];
|
|
local ani = sq_CreateAnimation("", aniPath[state - 20]);
|
|
obj.setCurrentAnimation(ani);
|
|
switch(state){
|
|
case 20:
|
|
sq_AddDrawOnlyAniFromParent(obj, "passiveobject/atgunner_bykk/4_spitfire/animation/atdday/bot/ddayportal_eff_a.ani", 0, 0, 0);
|
|
break;
|
|
case 21:
|
|
obj.getVar("move").setInt(0, sq_GetXPos(obj));
|
|
obj.getVar("move").setInt(1, sq_GetYPos(obj));
|
|
obj.setTimeEvent(41, 12, 100, true);
|
|
obj.setTimeEvent(42, sq_getRandom(300, 400), -1, false);
|
|
break;
|
|
case 22:
|
|
obj.stopTimeEvent(42);
|
|
local pooledObj = sq_AddDrawOnlyAniFromParent(obj, "passiveobject/atgunner_bykk/4_spitfire/animation/atdday/bot/ddayportal_eff_a.ani", 50, 0, 0);
|
|
sq_SetCurrentDirection(pooledObj, sq_GetOppositeDirection(sq_GetDirection(pooledObj)));
|
|
break;
|
|
}
|
|
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);
|
|
}
|
|
}
|
|
|
|
function onEndCurrentAni_po_atgunner_bykk(obj)
|
|
{
|
|
if(!obj) return;
|
|
|
|
local sqrChr = sq_GetCNRDObjectToSQRCharacter(obj.getTopCharacter());
|
|
local job = obj.getVar("job").getInt(0);
|
|
local skillIndex = obj.getVar("skillIndex").getInt(0);
|
|
local subtype = obj.getVar("subtype").getInt(0);
|
|
local state = obj.getVar("state").getInt(0);
|
|
|
|
switch(job){
|
|
case 0:
|
|
break;
|
|
case 1:
|
|
switch(skillIndex){
|
|
case SKILL_BYKK_AIRRAID: sq_SendDestroyPacketPassiveObject(obj); break;
|
|
case SKILL_BYKK_HEADSHOT: sq_SendDestroyPacketPassiveObject(obj); break;
|
|
case SKILL_BYKK_TWINGUNBLADE: sq_SendDestroyPacketPassiveObject(obj); break;
|
|
case SKILL_BYKK_RANDOMSHOOT: sq_SendDestroyPacketPassiveObject(obj); break;
|
|
case SKILL_BYKK_CHAINSNATCH: sq_SendDestroyPacketPassiveObject(obj); break;
|
|
case SKILL_BYKK_WALKSHOOT:
|
|
if(subtype <= 2) sq_SendDestroyPacketPassiveObject(obj);
|
|
break;
|
|
case SKILL_BYKK_MULTIHEADSHOT: sq_SendDestroyPacketPassiveObject(obj); break;
|
|
case SKILL_BYKK_SUPPRESSINGFIRE: sq_SendDestroyPacketPassiveObject(obj); break;
|
|
case SKILL_BYKK_KILLPOINT:
|
|
switch(subtype){
|
|
case 1:
|
|
switch(state){
|
|
case 21: obj.addSetStatePacket(22, null, STATE_PRIORITY_AUTO, false, ""); break;
|
|
case 23:
|
|
case 24:
|
|
if(sqrChr.getVar("KillPoint_Bool").getBool(0)) sqrChr.getVar("KillPoint_Bool").setBool(0, false);
|
|
sq_SendDestroyPacketPassiveObject(obj);
|
|
break;
|
|
}
|
|
break;
|
|
}
|
|
break;
|
|
case SKILL_BYKK_BLOODNCHAIN: sq_SendDestroyPacketPassiveObject(obj); break;
|
|
case SKILL_BYKK_RUINATIONAREA: sq_SendDestroyPacketPassiveObject(obj); break;
|
|
}
|
|
break;
|
|
case 2:
|
|
switch(skillIndex){
|
|
case SKILL_BYKK_FLAMETHROWER:
|
|
case SKILL_BYKK_FLAMETHROWERBOOST:
|
|
switch(subtype){
|
|
case 1:
|
|
switch(state){
|
|
case 20: obj.addSetStatePacket(21, null, STATE_PRIORITY_AUTO, false, ""); break;
|
|
case 22: sq_SendDestroyPacketPassiveObject(obj); break;
|
|
}
|
|
break;
|
|
case 2: sq_SendDestroyPacketPassiveObject(obj); break;
|
|
}
|
|
break;
|
|
case SKILL_BYKK_CANNONBALL: sq_SendDestroyPacketPassiveObject(obj); break;
|
|
case SKILL_BYKK_STEYRHEAVYRIFLE: sq_SendDestroyPacketPassiveObject(obj); break;
|
|
case SKILL_BYKK_LASERRIFLE: sq_SendDestroyPacketPassiveObject(obj); break;
|
|
case 71:
|
|
sq_SendDestroyPacketPassiveObject(obj);
|
|
CNSquirrelAppendage.sq_RemoveAppendage(sqrChr, "appendage/character/ap_common_suck.nut");
|
|
break;
|
|
case SKILL_BYKK_FM31: sq_SendDestroyPacketPassiveObject(obj); break;
|
|
case SKILL_BYKK_STINGER:
|
|
switch(subtype){
|
|
case 1:
|
|
switch(state){
|
|
case 21: sq_SendDestroyPacketPassiveObject(obj); break;
|
|
}
|
|
break;
|
|
case 2:
|
|
switch(state){
|
|
case 21: sq_SendDestroyPacketPassiveObject(obj); break;
|
|
}
|
|
break;
|
|
case 3:
|
|
switch(state){
|
|
case 20: obj.addSetStatePacket(21, null, STATE_PRIORITY_AUTO, false, ""); break;
|
|
case 21: sq_SendDestroyPacketPassiveObject(obj); break;
|
|
}
|
|
break;
|
|
}
|
|
break;
|
|
case SKILL_BYKK_URANIUMBOMB:
|
|
switch(subtype){
|
|
case 1:
|
|
case 2:
|
|
sq_SendDestroyPacketPassiveObject(obj);
|
|
break;
|
|
case 3:
|
|
switch(state){
|
|
case 20: obj.addSetStatePacket(21, null, STATE_PRIORITY_AUTO, false, ""); break;
|
|
case 21: obj.addSetStatePacket(22, null, STATE_PRIORITY_AUTO, false, ""); break;
|
|
case 22: sq_SendDestroyPacketPassiveObject(obj); break;
|
|
}
|
|
break;
|
|
}
|
|
break;
|
|
case SKILL_BYKK_SOLARSYSTEM:
|
|
switch(subtype){
|
|
case 1:
|
|
case 2:
|
|
sq_SendDestroyPacketPassiveObject(obj);
|
|
break;
|
|
case 3: sq_SendDestroyPacketPassiveObject(obj); break;
|
|
}
|
|
break;
|
|
case SKILL_BYKK_ANCIENTTRIGGER:
|
|
switch(subtype){
|
|
case 8:
|
|
case 9:
|
|
switch(state){
|
|
case 20: obj.addSetStatePacket(21, null, STATE_PRIORITY_AUTO, false, ""); break;
|
|
}
|
|
break;
|
|
}
|
|
break;
|
|
case SKILL_BYKK_PLASMABOOST: sq_SendDestroyPacketPassiveObject(obj); break;
|
|
case SKILL_BYKK_FSC_7: sq_SendDestroyPacketPassiveObject(obj); break;
|
|
case SKILL_BYKK_STINGEREX: sq_SendDestroyPacketPassiveObject(obj); break;
|
|
case SKILL_BYKK_PT_15: sq_SendDestroyPacketPassiveObject(obj); break;
|
|
case SKILL_BYKK_OPERATIONRAZE:
|
|
switch(subtype){
|
|
case 1: sq_SendDestroyPacketPassiveObject(obj); break;
|
|
case 2: sq_SendDestroyPacketPassiveObject(obj); break;
|
|
case 5: sq_SendDestroyPacketPassiveObject(obj); break;
|
|
case 6: sq_SendDestroyPacketPassiveObject(obj); break;
|
|
}
|
|
break;
|
|
case SKILL_BYKK_PHLEGETHON:
|
|
switch(subtype){
|
|
case 1:
|
|
switch(state){
|
|
case 20: obj.addSetStatePacket(21, null, STATE_PRIORITY_AUTO, false, ""); break;
|
|
case 21: obj.addSetStatePacket(21, null, STATE_PRIORITY_AUTO, false, ""); break;
|
|
case 22: sq_SendDestroyPacketPassiveObject(obj); break;
|
|
}
|
|
break;
|
|
case 2:
|
|
switch(state){
|
|
case 21: sq_SendDestroyPacketPassiveObject(obj); break;
|
|
}
|
|
break;
|
|
}
|
|
break;
|
|
}
|
|
break;
|
|
case 3:
|
|
switch(skillIndex){
|
|
case SKILL_BYKK_HYPERFLARE:
|
|
switch(subtype){
|
|
case 0:
|
|
case 1:
|
|
switch(state){
|
|
case 21: sq_SendDestroyPacketPassiveObject(obj); break;
|
|
}
|
|
break;
|
|
case 3: sq_SendDestroyPacketPassiveObject(obj); break;
|
|
case 4: sq_SendDestroyPacketPassiveObject(obj); break;
|
|
}
|
|
break;
|
|
}
|
|
break;
|
|
case 4:
|
|
switch(skillIndex){
|
|
case SKILL_BYKK_OVERCHARGE: sq_SendDestroyPacketPassiveObject(obj); break;
|
|
case SKILL_BYKK_CROSSSHOOT: sq_SendDestroyPacketPassiveObject(obj); break;
|
|
case SKILL_BYKK_CHARGEBUSTER: sq_SendDestroyPacketPassiveObject(obj); break;
|
|
case SKILL_BYKK_NAPALMBOMB:
|
|
switch(subtype){
|
|
case 1:
|
|
case 2:
|
|
sq_SendDestroyPacketPassiveObject(obj);
|
|
break;
|
|
case 3:
|
|
switch(state){
|
|
case 20: obj.addSetStatePacket(21, null, STATE_PRIORITY_AUTO, false, ""); break;
|
|
case 22: sq_SendDestroyPacketPassiveObject(obj); break;
|
|
}
|
|
break;
|
|
}
|
|
break;
|
|
case SKILL_BYKK_C4:
|
|
switch(subtype){
|
|
case 3: sq_SendDestroyPacketPassiveObject(obj); break;
|
|
}
|
|
break;
|
|
case SKILL_BYKK_GRENADENONE: sq_SendDestroyPacketPassiveObject(obj); break;
|
|
case SKILL_BYKK_GRENADELIGHT:
|
|
switch(subtype){
|
|
case 1:
|
|
case 2:
|
|
sq_SendDestroyPacketPassiveObject(obj);
|
|
break;
|
|
case 3:
|
|
case 4:
|
|
switch(state){
|
|
case 20: obj.addSetStatePacket(21, null, STATE_PRIORITY_AUTO, false, ""); break;
|
|
case 22: sq_SendDestroyPacketPassiveObject(obj); break;
|
|
}
|
|
break;
|
|
}
|
|
break;
|
|
case SKILL_BYKK_GRENADEWATER:
|
|
switch(subtype){
|
|
case 1:
|
|
case 2:
|
|
sq_SendDestroyPacketPassiveObject(obj);
|
|
break;
|
|
case 3:
|
|
switch(state){
|
|
case 20: obj.addSetStatePacket(21, null, STATE_PRIORITY_AUTO, false, ""); break;
|
|
case 22: sq_SendDestroyPacketPassiveObject(obj); break;
|
|
}
|
|
break;
|
|
}
|
|
break;
|
|
case SKILL_BYKK_M18CLAYMORE:
|
|
switch(subtype){
|
|
case 1:
|
|
case 3:
|
|
switch(state){
|
|
case 20: obj.addSetStatePacket(21, null, STATE_PRIORITY_AUTO, false, ""); break;
|
|
case 22: sq_SendDestroyPacketPassiveObject(obj); break;
|
|
case 23: obj.addSetStatePacket(20, null, STATE_PRIORITY_AUTO, false, ""); break;
|
|
}
|
|
break;
|
|
case 2: sq_SendDestroyPacketPassiveObject(obj); break;
|
|
case 4: sq_SendDestroyPacketPassiveObject(obj); break;
|
|
}
|
|
break;
|
|
case SKILL_BYKK_LOCKONSUPPORT:
|
|
switch(subtype){
|
|
case 2:
|
|
switch(state){
|
|
case 21: sq_SendDestroyPacketPassiveObject(obj); break;
|
|
}
|
|
break;
|
|
case 3: sq_SendDestroyPacketPassiveObject(obj); break;
|
|
case 4:
|
|
switch(state){
|
|
case 20: obj.addSetStatePacket(21, null, STATE_PRIORITY_AUTO, false, ""); break;
|
|
case 22: sq_SendDestroyPacketPassiveObject(obj); break;
|
|
}
|
|
break;
|
|
}
|
|
break;
|
|
case SKILL_BYKK_GRAVITYGRENADE:
|
|
switch(subtype){
|
|
case 2:
|
|
switch(state){
|
|
case 20: obj.addSetStatePacket(21, null, STATE_PRIORITY_AUTO, false, ""); break;
|
|
case 22: sq_SendDestroyPacketPassiveObject(obj); break;
|
|
}
|
|
break;
|
|
case 3: sq_SendDestroyPacketPassiveObject(obj); break;
|
|
}
|
|
break;
|
|
case SKILL_BYKK_OPENFIRE:
|
|
switch(subtype){
|
|
case 1: sq_SendDestroyPacketPassiveObject(obj); break;
|
|
}
|
|
break;
|
|
case SKILL_BYKK_PHOTOBILIZER:
|
|
switch(subtype){
|
|
case 1: sq_SendDestroyPacketPassiveObject(obj); break;
|
|
case 2: sq_SendDestroyPacketPassiveObject(obj); break;
|
|
case 3: sq_SendDestroyPacketPassiveObject(obj); break;
|
|
}
|
|
break;
|
|
case SKILL_BYKK_CHELLI:
|
|
switch(subtype){
|
|
case 2:
|
|
switch(state){
|
|
case 20: obj.addSetStatePacket(21, null, STATE_PRIORITY_AUTO, false, ""); break;
|
|
case 23: sq_SendDestroyPacketPassiveObject(obj); break;
|
|
}
|
|
break;
|
|
case 3:
|
|
switch(state){
|
|
case 20: obj.addSetStatePacket(21, null, STATE_PRIORITY_AUTO, false, ""); break;
|
|
case 22: sq_SendDestroyPacketPassiveObject(obj); break;
|
|
}
|
|
break;
|
|
case 4:
|
|
case 5:
|
|
case 6:
|
|
case 7:
|
|
sq_SendDestroyPacketPassiveObject(obj);
|
|
break;
|
|
}
|
|
break;
|
|
case SKILL_BYKK_EMPSTORM:
|
|
switch(subtype){
|
|
case 8:
|
|
sq_SendDestroyPacketPassiveObject(obj);
|
|
if(sqrChr && sqrChr.getState() != STATE_DIE){
|
|
local size = sqrChr.getVar("empStromObj").get_obj_vector_size();
|
|
if(size > 0){
|
|
for(local i = 0; i < size; i++){
|
|
local empStromObj = sqrChr.getVar("empStromObj").get_obj_vector(i);
|
|
if(empStromObj){
|
|
local colObj = sq_GetCNRDObjectToCollisionObject(empStromObj);
|
|
colObj.setTimeEvent(31, 1000, 1, true);
|
|
}
|
|
}
|
|
}
|
|
}
|
|
break;
|
|
case 9: sq_SendDestroyPacketPassiveObject(obj); break;
|
|
}
|
|
break;
|
|
case SKILL_BYKK_DDAY:
|
|
switch(subtype){
|
|
case 3:
|
|
sq_SendDestroyPacketPassiveObject(obj);
|
|
break;
|
|
case 4: sq_SendDestroyPacketPassiveObject(obj); break;
|
|
case 5:
|
|
switch(state){
|
|
case 20: obj.addSetStatePacket(21, null, STATE_PRIORITY_AUTO, false, ""); break;
|
|
case 22: obj.addSetStatePacket(23, null, STATE_PRIORITY_AUTO, false, ""); break;
|
|
case 24: sq_SendDestroyPacketPassiveObject(obj); break;
|
|
}
|
|
break;
|
|
case 7:
|
|
case 8:
|
|
switch(state){
|
|
case 20: obj.addSetStatePacket(21, null, STATE_PRIORITY_AUTO, false, ""); break;
|
|
case 22: sq_SendDestroyPacketPassiveObject(obj); break;
|
|
}
|
|
break;
|
|
}
|
|
break;
|
|
|
|
}
|
|
break;
|
|
}
|
|
}
|
|
|
|
function onTimeEvent_po_atgunner_bykk(obj, timeEventIndex, timeEventCount)
|
|
{
|
|
if(!obj) return;
|
|
|
|
local sqrChr = sq_GetCNRDObjectToSQRCharacter(obj.getTopCharacter());
|
|
local job = obj.getVar("job").getInt(0);
|
|
local skillIndex = obj.getVar("skillIndex").getInt(0);
|
|
local subtype = obj.getVar("subtype").getInt(0);
|
|
local state = obj.getVar("state").getInt(0);
|
|
|
|
switch(job){
|
|
case 0:
|
|
break;
|
|
case 1:
|
|
switch(skillIndex){
|
|
case SKILL_BYKK_HEADSHOT:
|
|
switch(timeEventIndex){
|
|
case 1: sq_SendDestroyPacketPassiveObject(obj); break;
|
|
}
|
|
break;
|
|
case SKILL_BYKK_RANDOMSHOOT:
|
|
switch(timeEventIndex){
|
|
case 0:
|
|
//print("count = "+obj.getVar("custom").getInt(1));
|
|
if(obj.getVar("custom").getInt(1) >= obj.getVar("custom").getInt(0)){
|
|
if(!sqrChr || sqrChr.getState() == STATE_DIE) break;
|
|
sqrChr.sq_IntVectClear();
|
|
sqrChr.sq_AddSetStatePacket(STATE_STAND, STATE_PRIORITY_IGNORE_FORCE, true);
|
|
sq_SendDestroyPacketPassiveObject(obj);
|
|
break;
|
|
}
|
|
else obj.getVar("custom").setInt(1, obj.getVar("custom").getInt(1) + 1);
|
|
if(subtype == 3){
|
|
local loadSlot = sqrChr.sq_GetSkillLoad(30);
|
|
if(loadSlot && loadSlot.getRemainLoadNumber() > 0){
|
|
loadSlot.decreaseLoadCount(1);
|
|
local attackInfo = sq_GetCurrentAttackInfo(obj);
|
|
attackInfo.setElement(ENUM_ELEMENT_LIGHT);
|
|
local totalDamage = sqrChr.sq_GetBonusRateWithPassive(30, -1, 1, 1.0) + 100;
|
|
obj.getVar("custom").setInt(3, totalDamage);
|
|
obj.resetHitObjectList();
|
|
}
|
|
else{
|
|
obj.getVar("custom").setInt(3, 0);
|
|
local totalDamage = obj.getVar("custom").getInt(2);
|
|
sq_SetCurrentAttackInfo(obj, sq_GetCustomAttackInfo(obj, 66));
|
|
sq_SetCurrentAttackBonusRate(sq_GetCurrentAttackInfo(obj), totalDamage);
|
|
}
|
|
}
|
|
else if(subtype == 4) obj.resetHitObjectList();
|
|
break;
|
|
case 1: sq_SendDestroyPacketPassiveObject(obj); break;
|
|
}
|
|
break;
|
|
case SKILL_BYKK_WALKSHOOT:
|
|
switch(timeEventIndex){
|
|
case 10:
|
|
if(sqrChr.getState() != STATE_BYKK_WALKSHOOT) sq_SendDestroyPacketPassiveObject(obj);
|
|
break;
|
|
}
|
|
break;
|
|
case SKILL_BYKK_DOUBLEGUNHAWK:
|
|
switch(timeEventIndex){
|
|
case 0: obj.resetHitObjectList(); break;
|
|
case 1:
|
|
local vx = sq_GetAccel(0, 200, timeEventCount, 20, true);
|
|
local dstX = sq_GetDistancePos(obj.getVar("move").getInt(0), obj.getDirection(), vx);
|
|
sq_setCurrentAxisPos(obj, 0, dstX);
|
|
local moveY = 10;
|
|
if(obj.getVar("custom").getInt(0) == 2) moveY = 15;
|
|
else if(obj.getVar("custom").getInt(0) == 3) moveY = 25;
|
|
if(obj.getVar("custom").getInt(1) > 0) moveY = -moveY;
|
|
local moveYset = 0;
|
|
if(obj.getVar("custom").getInt(2) == 1) moveYset = -50;
|
|
else if(obj.getVar("custom").getInt(2) == 2) moveYset = 50;
|
|
obj.getVar("move").setInt(3, -moveY - moveYset);
|
|
local vy = sq_GetAccel(0, moveY + moveYset, timeEventCount, 20, true);
|
|
sq_setCurrentAxisPos(obj, 1, obj.getVar("move").getInt(1) + vy);
|
|
|
|
if(timeEventCount >= 20){
|
|
obj.setTimeEvent(2, obj.getVar("custom").getInt(4), 1, false);
|
|
}
|
|
break;
|
|
case 2:
|
|
obj.getVar("move").setInt(0, sq_GetXPos(obj));
|
|
obj.getVar("move").setInt(1, sq_GetYPos(obj));
|
|
local dis = sq_Abs(sq_GetXPos(obj) - sq_GetXPos(sqrChr));
|
|
local speed = 20 * 300 / dis;
|
|
obj.setTimeEvent(3, obj.getVar("custom").getInt(3) / speed, 20, true);
|
|
break;
|
|
case 3:
|
|
local vx = sq_GetAccel(obj.getVar("move").getInt(0), sq_GetXPos(sqrChr), timeEventCount, 20, false);
|
|
local vy = sq_GetAccel(obj.getVar("move").getInt(1), sq_GetYPos(sqrChr), timeEventCount, 20, false);
|
|
sq_setCurrentAxisPos(obj, 0, vx);
|
|
sq_setCurrentAxisPos(obj, 1, vy);
|
|
if(timeEventCount >= 20){
|
|
local sqrState = sqrChr.getState();
|
|
if(obj.getVar("custom").getInt(0) <= 2){
|
|
if(sqrState == 0 || sqrState == 8 || sqrState == 14 || sqrState == 3){
|
|
if(obj.getVar("custom").getInt(1) == 0){
|
|
sqrChr.getVar("DoubleGunhawk_Phase").setInt(0, obj.getVar("custom").getInt(0) + 1);
|
|
sq_AddDrawOnlyAniFromParent(sqrChr, "character/gunner/effect/animation/doublegunhawk/catch.ani", 0, 0, -20);
|
|
}
|
|
sqrChr.sq_IntVectClear();
|
|
sqrChr.sq_IntVectPush(1);
|
|
sqrChr.sq_AddSetStatePacket(STATE_BYKK_DOUBLEGUNHAWK, STATE_PRIORITY_IGNORE_FORCE, true);
|
|
sq_SendDestroyPacketPassiveObject(obj);
|
|
break;
|
|
}
|
|
}
|
|
local xPos = sq_GetXPos(obj);
|
|
local dis = sq_Abs(xPos - obj.getVar("move").getInt(0));
|
|
obj.getVar("move").setInt(2, sq_GetDistancePos(xPos, sq_GetOppositeDirection(sq_GetDirection(obj)), dis));
|
|
obj.getVar("move").setInt(0, sq_GetXPos(obj));
|
|
obj.getVar("move").setInt(1, sq_GetYPos(obj));
|
|
local speed = 20 * 300 / dis;
|
|
obj.setTimeEvent(4, obj.getVar("custom").getInt(3) / speed, 20, true);
|
|
}
|
|
break;
|
|
case 4:
|
|
local vx = sq_GetUniformVelocity(obj.getVar("move").getInt(0), obj.getVar("move").getInt(2), timeEventCount, 20);
|
|
local vy = sq_GetUniformVelocity(obj.getVar("move").getInt(1), obj.getVar("move").getInt(1) + obj.getVar("move").getInt(3), timeEventCount, 20);
|
|
sq_setCurrentAxisPos(obj, 0, vx);
|
|
sq_setCurrentAxisPos(obj, 1, vy);
|
|
if(timeEventCount >= 20) sq_SendDestroyPacketPassiveObject(obj);
|
|
break;
|
|
case 5:
|
|
local aniPath = ["passiveobject/atgunner_bykk/1_ranger/animation/doublegunhawk/fire1.ani", "passiveobject/atgunner_bykk/1_ranger/animation/doublegunhawk/fire2.ani", "passiveobject/atgunner_bykk/1_ranger/animation/doublegunhawk/fire3.ani", "passiveobject/atgunner_bykk/1_ranger/animation/doublegunhawk/fire4.ani"];
|
|
local sizeRate = 100;
|
|
local phase = obj.getVar("custom").getInt(0);
|
|
if(phase == 2) sizeRate = 200;
|
|
else if(phase == 3) sizeRate = 300;
|
|
local sub = timeEventCount % 4;
|
|
local pooledObj = createOnlyDrawObjectEX_ATGunner_bykk(obj,aniPath[sub],true,sq_getRandom(0, 1),sq_GetXPos(obj) + sq_getRandom(-20, 20),sq_GetYPos(obj) + sq_getRandom(0, 10),sq_GetZPos(obj),ENUM_DRAWLAYER_NORMAL, sizeRate, sizeRate / 2);
|
|
// local pooledObj = sq_AddDrawOnlyAniFromParent(obj, aniPath[sub], sq_getRandom(-20, 20), sq_getRandom(0, 10), 0);
|
|
sq_moveWithParent(obj, pooledObj);
|
|
if(phase == 3 && timeEventCount % 3 == 0){
|
|
if(obj.isExistTimeEvent(4)) break;
|
|
local aniPath = "passiveobject/atgunner_bykk/1_ranger/animation/doublegunhawk/dodge.ani";
|
|
local pooledObj = createOnlyDrawObjectEX_ATGunner_bykk(obj,aniPath,true,sq_getRandom(0, 1),sq_GetXPos(obj),sq_GetYPos(obj),sq_GetZPos(obj),ENUM_DRAWLAYER_NORMAL, 100, 100);
|
|
sq_moveWithParent(obj, pooledObj);
|
|
}
|
|
break;
|
|
}
|
|
break;
|
|
case SKILL_BYKK_SUPPRESSINGFIRE:
|
|
switch(timeEventIndex){
|
|
case 1:
|
|
local subState = sqrChr.getSkillSubState();
|
|
if(subState != 1 || sqrChr.getState() != STATE_BYKK_SUPPRESSINGFIRE){
|
|
sq_SendDestroyPacketPassiveObject(obj);
|
|
break;
|
|
}
|
|
local hitTime_min = obj.getVar("custom").getInt(1);
|
|
local hitTime_max = obj.getVar("custom").getInt(2);
|
|
if(sqrChr.getRapidInputFrequency() > 0){
|
|
obj.setTimeEvent(1, hitTime_max, 1, false);
|
|
}
|
|
else obj.setTimeEvent(1, hitTime_min, 1, false);
|
|
local loadSlot = sqrChr.sq_GetSkillLoad(30);
|
|
if(loadSlot && loadSlot.getRemainLoadNumber() > 0){
|
|
loadSlot.decreaseLoadCount(1);
|
|
sq_SetCurrentAttackInfo(obj, sq_GetCustomAttackInfo(obj, 87));
|
|
// print("totalDamageSet2 = "+obj.getVar("custom").getInt(4));
|
|
sq_SetCurrentAttackBonusRate(sq_GetCurrentAttackInfo(obj), obj.getVar("custom").getInt(4));
|
|
local attackInfo = sq_GetCurrentAttackInfo(obj);
|
|
attackInfo.setElement(ENUM_ELEMENT_LIGHT);
|
|
// sq_SetCurrentAttackeDamageAct(attackInfo, 0);
|
|
// sq_SetCurrentAttacknBackForce(attackInfo, 1);
|
|
sq_SetCurrentAttacknUpForce(attackInfo, 5);
|
|
local totalDamage = sqrChr.sq_GetBonusRateWithPassive(30, -1, 1, 1.0) + 100;
|
|
local sizeRate = obj.getVar("custom").getInt(3);
|
|
local delay = hitTime_min;
|
|
if(sqrChr.getRapidInputFrequency() > 0) delay = hitTime_max;
|
|
createSkillPassive_ATGunner_bykk(obj,obj,PASSIVEOBJ_BYKK_ATGUNNER,0,0,0,obj.getDirection(),1,SKILL_BYKK_SUPPRESSINGFIRE,4,totalDamage,sizeRate,delay,0,0,0,0,0);
|
|
}
|
|
else{
|
|
sq_SetCurrentAttackInfo(obj, sq_GetCustomAttackInfo(obj, 87));
|
|
//print("totalDamageSet2 = "+obj.getVar("custom").getInt(4));
|
|
sq_SetCurrentAttackBonusRate(sq_GetCurrentAttackInfo(obj), obj.getVar("custom").getInt(4));
|
|
local attackInfo = sq_GetCurrentAttackInfo(obj);
|
|
sq_SetCurrentAttacknUpForce(attackInfo, 5);
|
|
}
|
|
break;
|
|
}
|
|
break;
|
|
case SKILL_BYKK_KILLPOINT:
|
|
switch(timeEventIndex){
|
|
case 1:
|
|
local timeEventMax = obj.getVar("move").getInt(2);
|
|
local targetObj = obj.getVar("tar").get_obj_vector(0);
|
|
if(targetObj && targetObj.getState() != STATE_DIE){
|
|
local vx = sq_GetUniformVelocity(obj.getVar("move").getInt(0), sq_GetXPos(targetObj), timeEventCount, timeEventMax);
|
|
local vy = sq_GetUniformVelocity(obj.getVar("move").getInt(1), sq_GetYPos(targetObj), timeEventCount, timeEventMax);
|
|
sq_setCurrentAxisPos(obj, 0, vx);
|
|
sq_setCurrentAxisPos(obj, 1, vy);
|
|
}
|
|
else{
|
|
if(state == 20 && timeEventCount >= 50) obj.addSetStatePacket(24, null, STATE_PRIORITY_AUTO, false, "");
|
|
}
|
|
break;
|
|
case 2:
|
|
local targetObj = obj.getVar("tar").get_obj_vector(0);
|
|
if(targetObj){
|
|
local vx = sq_GetUniformVelocity(0, 125, timeEventCount, 30);
|
|
local dstX = sq_GetDistancePos(obj.getVar("move").getInt(0), obj.getDirection(), vx);
|
|
sq_setCurrentAxisPos(obj, 0, dstX);
|
|
sq_setCurrentAxisPos(targetObj, 0, dstX);
|
|
}
|
|
break;
|
|
case 3:
|
|
local targetObj = obj.getVar("tar").get_obj_vector(0);
|
|
if(targetObj){
|
|
if(!CNSquirrelAppendage.sq_IsAppendAppendage(targetObj, "character/atgunner/1_ranger_bykk/ap_killpoint.nut")){
|
|
if(state != 23){
|
|
obj.stopTimeEvent(3);
|
|
obj.addSetStatePacket(23, null, STATE_PRIORITY_AUTO, false, "");
|
|
}
|
|
}
|
|
}
|
|
else sq_SendDestroyPacketPassiveObject(obj);
|
|
break;
|
|
}
|
|
break;
|
|
case SKILL_BYKK_RUINATIONAREA:
|
|
switch(timeEventIndex){
|
|
case 0: obj.resetHitObjectList(); break;
|
|
}
|
|
break;
|
|
}
|
|
break;
|
|
case 2:
|
|
switch(skillIndex){
|
|
case SKILL_BYKK_FLAMETHROWER:
|
|
case SKILL_BYKK_FLAMETHROWERBOOST:
|
|
switch(timeEventIndex){
|
|
case 1: obj.resetHitObjectList(); break;
|
|
case 2:
|
|
if(!sqrChr || sqrChr.getState() == STATE_DIE){
|
|
obj.removeAllTimeEvent();
|
|
obj.addSetStatePacket(22, null, STATE_PRIORITY_AUTO, false, "");
|
|
break;
|
|
}
|
|
sq_setCurrentAxisPos(obj, 0, sq_GetDistancePos(sq_GetXPos(sqrChr), obj.getDirection(), 140));
|
|
sq_setCurrentAxisPos(obj, 1, sq_GetYPos(sqrChr));
|
|
break;
|
|
}
|
|
break;
|
|
case SKILL_BYKK_CANNONBALL:
|
|
switch(timeEventIndex){
|
|
case 1: sq_SendDestroyPacketPassiveObject(obj); break;
|
|
case 11:
|
|
case 12:
|
|
case 13:
|
|
case 14:
|
|
local sizeRate = 200 / 100;
|
|
sizeRate = sizeRate.tofloat();
|
|
switch(timeEventIndex){
|
|
case 11:
|
|
local pooledObj = sq_AddDrawOnlyAniFromParent(obj,"passiveobject/common/animation/noneexplosionparticle1.ani", sq_getRandom(-10,10), sq_getRandom(-10,10), sq_getRandom(-10,10));
|
|
local currentAni = pooledObj.getCurrentAnimation();
|
|
currentAni.setImageRateFromOriginal(sizeRate, sizeRate);
|
|
break;
|
|
case 12:
|
|
local pooledObj = sq_AddDrawOnlyAniFromParent(obj,"passiveobject/common/animation/noneexplosionparticle2.ani", 0, 2, 0);
|
|
local currentAni = pooledObj.getCurrentAnimation();
|
|
currentAni.setImageRateFromOriginal(sizeRate, sizeRate);
|
|
break;
|
|
case 13:
|
|
local pooledObj = sq_AddDrawOnlyAniFromParent(obj,"passiveobject/common/animation/noneexplosionparticle3.ani", 0, 1, 1);
|
|
local currentAni = pooledObj.getCurrentAnimation();
|
|
local angle = sq_ToRadian(360.0 * timeEventCount / 16);
|
|
sq_SetfRotateAngle(currentAni, angle);
|
|
currentAni.setImageRateFromOriginal(sizeRate * 2.0, sizeRate * 2.0);
|
|
break;
|
|
case 14:
|
|
local pooledObj = sq_AddDrawOnlyAniFromParent(obj,"passiveobject/common/animation/noneexplosionparticle4.ani", sq_getRandom(-30,30), sq_getRandom(-30,30), sq_getRandom(-30,30));
|
|
local currentAni = pooledObj.getCurrentAnimation();
|
|
currentAni.setImageRateFromOriginal(sizeRate, sizeRate);
|
|
break;
|
|
}
|
|
break;
|
|
}
|
|
break;
|
|
case SKILL_BYKK_STEYRHEAVYRIFLE:
|
|
switch(timeEventIndex){
|
|
case 1:
|
|
local totalDamage = obj.getVar("custom").getInt(10);
|
|
local sizeRate = obj.getVar("custom").getInt(12);
|
|
local sub = obj.getVar("custom").getInt(13);
|
|
createSkillPassive_ATGunner_bykk(obj,obj,PASSIVEOBJ_BYKK_ATGUNNER,0,0,0,obj.getDirection(),2,SKILL_BYKK_STEYRHEAVYRIFLE,2,totalDamage,sizeRate,sub,0,0,0,0,0);
|
|
break;
|
|
case 11:
|
|
case 12:
|
|
case 13:
|
|
case 14:
|
|
local sizeRate = obj.getVar("custom").getInt(10) / 100.0;
|
|
// sizeRate = sizeRate.tofloat();
|
|
switch(timeEventIndex){
|
|
case 11:
|
|
local pooledObj = sq_AddDrawOnlyAniFromParent(obj,"passiveobject/common/animation/fireexplosionparticle1.ani", sq_getRandom(-10,10), sq_getRandom(-10,10), sq_getRandom(-10,10));
|
|
local currentAni = pooledObj.getCurrentAnimation();
|
|
currentAni.setImageRateFromOriginal(sizeRate, sizeRate);
|
|
break;
|
|
case 12:
|
|
local pooledObj = sq_AddDrawOnlyAniFromParent(obj,"passiveobject/common/animation/fireexplosionparticle2.ani", 0, 2, 0);
|
|
local currentAni = pooledObj.getCurrentAnimation();
|
|
currentAni.setImageRateFromOriginal(sizeRate, sizeRate);
|
|
break;
|
|
case 13:
|
|
local pooledObj = sq_AddDrawOnlyAniFromParent(obj,"passiveobject/common/animation/fireexplosionparticle3.ani", 0, 1, 1);
|
|
local currentAni = pooledObj.getCurrentAnimation();
|
|
local angle = sq_ToRadian(360.0 * timeEventCount / 16);
|
|
sq_SetfRotateAngle(currentAni, angle);
|
|
currentAni.setImageRateFromOriginal(sizeRate * 2.0, sizeRate * 2.0);
|
|
break;
|
|
case 14:
|
|
local pooledObj = sq_AddDrawOnlyAniFromParent(obj,"passiveobject/common/animation/fireexplosionparticle4.ani", sq_getRandom(-30,30), sq_getRandom(-30,30), sq_getRandom(-30,30));
|
|
local currentAni = pooledObj.getCurrentAnimation();
|
|
currentAni.setImageRateFromOriginal(sizeRate, sizeRate);
|
|
break;
|
|
}
|
|
break;
|
|
}
|
|
break;
|
|
case 71:
|
|
switch(timeEventIndex){
|
|
case 1:
|
|
local v = sq_GetAccel(0, 265, timeEventCount, 100, true);
|
|
local dstX = sq_GetDistancePos(obj.getVar("custom").getInt(12), obj.getDirection(), v);
|
|
sq_setCurrentAxisPos(obj, 0, dstX);
|
|
if(timeEventCount >= 100) obj.addSetStatePacket(21, null, STATE_PRIORITY_AUTO, false, "");
|
|
break;
|
|
}
|
|
break;
|
|
case SKILL_BYKK_FM31:
|
|
switch(timeEventIndex){
|
|
case 1:
|
|
sq_AddDrawOnlyAniFromParent(obj, "passiveobject/atgunner_bykk/2_blaster/animation/fm-31bullet/smoke.ani", 0, 0, 0);
|
|
break;
|
|
case 11:
|
|
case 12:
|
|
case 13:
|
|
case 14:
|
|
local sizeRate = obj.getVar("custom").getInt(11).tofloat() / 100.0;
|
|
//print("sizeRate = "+sizeRate);
|
|
switch(timeEventIndex){
|
|
case 11:
|
|
local pooledObj = sq_AddDrawOnlyAniFromParent(obj,"passiveobject/common/animation/fireexplosionparticle1.ani", sq_getRandom(-10,10), sq_getRandom(-10,10), sq_getRandom(-10,10));
|
|
local currentAni = pooledObj.getCurrentAnimation();
|
|
currentAni.setImageRateFromOriginal(sizeRate, sizeRate);
|
|
break;
|
|
case 12:
|
|
local pooledObj = sq_AddDrawOnlyAniFromParent(obj,"passiveobject/common/animation/fireexplosionparticle2.ani", 0, 2, 0);
|
|
local currentAni = pooledObj.getCurrentAnimation();
|
|
currentAni.setImageRateFromOriginal(sizeRate, sizeRate);
|
|
break;
|
|
case 13:
|
|
local pooledObj = sq_AddDrawOnlyAniFromParent(obj,"passiveobject/common/animation/fireexplosionparticle3.ani", 0, 1, 1);
|
|
local currentAni = pooledObj.getCurrentAnimation();
|
|
currentAni.setSpeedRate(150.0);
|
|
local angle = sq_ToRadian(360.0 * timeEventCount / 16);
|
|
sq_SetfRotateAngle(currentAni, angle);
|
|
currentAni.setImageRateFromOriginal(sizeRate * 2.0, sizeRate * 2.0);
|
|
break;
|
|
case 14:
|
|
local pooledObj = sq_AddDrawOnlyAniFromParent(obj,"passiveobject/common/animation/fireexplosionparticle4.ani", sq_getRandom(-30,30), sq_getRandom(-30,30), sq_getRandom(-30,30));
|
|
local currentAni = pooledObj.getCurrentAnimation();
|
|
currentAni.setImageRateFromOriginal(sizeRate, sizeRate);
|
|
break;
|
|
}
|
|
break;
|
|
}
|
|
break;
|
|
case SKILL_BYKK_STINGER:
|
|
switch(timeEventIndex){
|
|
case 0: sq_SendDestroyPacketPassiveObject(obj); break;
|
|
case 1:
|
|
if(state != 21) obj.addSetStatePacket(21, null, STATE_PRIORITY_AUTO, false, "");
|
|
break;
|
|
case 10:
|
|
local sub = timeEventCount % 6;
|
|
local totalDamage = obj.getVar("custom").getInt(10);
|
|
local sizeRate = obj.getVar("custom").getInt(11);
|
|
local targetObj = obj.getVar("tar").get_obj_vector(0);
|
|
if(targetObj){
|
|
createSkillPassive_ATGunner_bykk(obj,targetObj,PASSIVEOBJ_BYKK_ATGUNNER,0,0,-sq_GetZPos(obj),obj.getDirection(),2,SKILL_BYKK_STINGER,3,totalDamage,sizeRate,sub,0,0,0,0,0);
|
|
}
|
|
else sq_SendDestroyPacketPassiveObject(obj);
|
|
if(timeEventCount >= obj.getVar("custom").getInt(12)) sq_SendDestroyPacketPassiveObject(obj);
|
|
break;
|
|
}
|
|
break;
|
|
case SKILL_BYKK_URANIUMBOMB:
|
|
switch(timeEventIndex){
|
|
case 1: sq_SendDestroyPacketPassiveObject(obj); break;
|
|
case 2:
|
|
local sizeRate = obj.getVar("custom").getInt(12);
|
|
local aniPath = "passiveobject/atgunner_bykk/2_blaster/animation/uraniumbomb/biguraniumbomb/floor_dodge.ani";
|
|
local aniPath2 = "passiveobject/atgunner_bykk/2_blaster/animation/uraniumbomb/biguraniumbomb/floor_normal.ani";
|
|
local aniPath3 = "passiveobject/atgunner_bykk/2_blaster/animation/uraniumbomb/biguraniumbomb/cloud_dodge.ani";
|
|
local xPos = sq_GetXPos(obj), yPos = sq_GetYPos(obj);
|
|
createOnlyDrawObjectEX_ATGunner_bykk(obj,aniPath,true,obj.getDirection(),xPos,yPos,0,ENUM_DRAWLAYER_BOTTOM,sizeRate / 2,sizeRate / 2);
|
|
createOnlyDrawObjectEX_ATGunner_bykk(obj,aniPath2,true,obj.getDirection(),xPos,yPos,-1,ENUM_DRAWLAYER_BOTTOM,sizeRate / 2,sizeRate / 2);
|
|
createOnlyDrawObjectEX_ATGunner_bykk(obj,aniPath3,true,obj.getDirection(),xPos,yPos+1,0,ENUM_DRAWLAYER_BOTTOM,sizeRate / 2,sizeRate / 2);
|
|
break;
|
|
case 10:
|
|
local hitMax = obj.getVar("custom").getInt(17);
|
|
local delay = hitMax>=8?75:120;
|
|
obj.setTimeEvent(12, delay, hitMax, false);
|
|
break;
|
|
case 11:
|
|
local ani = sq_CreateAnimation("", "passiveobject/atgunner_bykk/2_blaster/animation/uraniumbomb/biguraniumbomb/attackbox.ani");
|
|
obj.setCurrentAnimation(ani);
|
|
local currentAni = obj.getCurrentAnimation();
|
|
sq_SetFrameDelayTime(currentAni, 0, 200000);
|
|
sq_SetAttackBoundingBoxSizeRate(currentAni, 2.0, 3.0, 2.0);
|
|
local totalDamage = obj.getVar("custom").getInt(11);
|
|
sq_SetCurrentAttackInfo(obj, sq_GetCustomAttackInfo(obj, 58));
|
|
sq_SetCurrentAttackBonusRate(sq_GetCurrentAttackInfo(obj), totalDamage);
|
|
local prob = obj.getVar("custom").getInt(13);
|
|
local time = obj.getVar("custom").getInt(14);
|
|
local damage = obj.getVar("custom").getInt(15);
|
|
local level = obj.getVar("custom").getInt(16);
|
|
local attackInfo = sq_GetCurrentAttackInfo(obj);
|
|
sq_SetChangeStatusIntoAttackInfo(attackInfo, 0, ACTIVESTATUS_LIGHTNING ,prob, level,time, damage);
|
|
local hitMax = obj.getVar("custom").getInt(17);
|
|
obj.sq_SetMaxHitCounterPerObject(hitMax);
|
|
local delay = hitMax>=8?50:100;
|
|
obj.setTimeEvent(13, delay, 20, false);
|
|
obj.setTimeEvent(1, delay * 20, 1, false);
|
|
break;
|
|
case 12:
|
|
local sizeRate = obj.getVar("custom").getInt(12);
|
|
local xPos = [0,80,100,120,130,150,170,180,200,220,230,250,270,290,300,310,320,330,340,350], yPos = [0,-50,0,50,-45,0,45,-55,0,55,-45,0,45,-10];
|
|
createSkillPassive_ATGunner_bykk(obj,obj,PASSIVEOBJ_BYKK_ATGUNNER,xPos[timeEventCount] - sq_getRandom(150, 250),sq_getRandom(-65,65),550,obj.getDirection(),2,SKILL_BYKK_URANIUMBOMB,5,sizeRate,0,0,0,0,0,0,0);
|
|
break;
|
|
case 13:
|
|
obj.resetHitObjectList();
|
|
break;
|
|
case 20:
|
|
local totalDamage = obj.getVar("custom").getInt(11);
|
|
local sizeRate = obj.getVar("custom").getInt(12);
|
|
local prob = obj.getVar("custom").getInt(13);
|
|
local time = obj.getVar("custom").getInt(14);
|
|
local damage = obj.getVar("custom").getInt(15);
|
|
local level = obj.getVar("custom").getInt(16);
|
|
|
|
local ani = sq_CreateAnimation("", "passiveobject/atgunner_bykk/2_blaster/animation/uraniumbomb/biguraniumbomb/attackbox.ani");
|
|
obj.setCurrentAnimation(ani);
|
|
local currentAni = obj.getCurrentAnimation();
|
|
sq_SetFrameDelayTime(currentAni, 0, 1400);
|
|
obj.setTimeEvent(2, 200, 1, false);
|
|
sq_SetCurrentAttackInfo(obj, sq_GetCustomAttackInfo(obj, 58));
|
|
sq_SetCurrentAttackBonusRate(sq_GetCurrentAttackInfo(obj), totalDamage);
|
|
local attackInfo = sq_GetCurrentAttackInfo(obj);
|
|
sq_SetChangeStatusIntoAttackInfo(attackInfo, 0, ACTIVESTATUS_LIGHTNING ,prob, level,time, damage);
|
|
local currentAni = obj.getCurrentAnimation();
|
|
sizeRate = sizeRate.tofloat() / 200.0;
|
|
//print("sizeRate = "+sizeRate);
|
|
currentAni.setImageRateFromOriginal(sizeRate, sizeRate);
|
|
currentAni.setAutoLayerWorkAnimationAddSizeRate(sizeRate);
|
|
sq_SetAttackBoundingBoxSizeRate(currentAni, sizeRate, sizeRate, sizeRate);
|
|
break;
|
|
}
|
|
break;
|
|
case SKILL_BYKK_SOLARSYSTEM:
|
|
switch(timeEventIndex){
|
|
case 1:
|
|
obj.sq_RemoveMoveParticle();
|
|
obj.addSetStatePacket(21, null, STATE_PRIORITY_AUTO, false, "");
|
|
if(sqrChr && sqrChr.getState() != STATE_DIE) CNSquirrelAppendage.sq_RemoveAppendage(sqrChr, "appendage/character/ap_common_suck.nut");
|
|
break;
|
|
case 10:
|
|
local totalDamage = obj.getVar("custom").getInt(11);
|
|
sq_SetCurrentAttackInfo(obj, sq_GetCustomAttackInfo(obj, 47));
|
|
sq_SetCurrentAttackBonusRate(sq_GetCurrentAttackInfo(obj), totalDamage);
|
|
obj.setTimeEvent(11, 50, 4, false);
|
|
break;
|
|
case 11: obj.resetHitObjectList(); break;
|
|
}
|
|
break;
|
|
case SKILL_BYKK_ANCIENTTRIGGER:
|
|
switch(timeEventIndex){
|
|
case 0:
|
|
local totalDamage = obj.getVar("custom").getInt(10);
|
|
local hitMax = obj.getVar("custom").getInt(11);
|
|
local lifeTime = obj.getVar("custom").getInt(12) - 300;
|
|
local ani = sq_CreateAnimation("", "passiveobject/atgunner_bykk/2_blaster/animation/plasmaboost/plasmaboostlaserloop_00.ani");
|
|
//local ani = sq_CreateAnimation("", "passiveobject/atgunner_bykk/2_blaster/animation/ancienttrigger/hitmain2fullcharge.ani");
|
|
obj.setCurrentAnimation(ani);
|
|
local currentAni = obj.getCurrentAnimation();
|
|
sq_AddAttackBox(currentAni,-800,-64,0,2052,131,190);
|
|
currentAni.addLayerAnimation(1,sq_CreateAnimation("","passiveobject/atgunner_bykk/2_blaster/animation/ancienttrigger/fullmuzzle1.ani"),true);
|
|
currentAni.addLayerAnimation(2,sq_CreateAnimation("","passiveobject/atgunner_bykk/2_blaster/animation/ancienttrigger/fullmuzzle2.ani"),true);
|
|
currentAni.addLayerAnimation(3,sq_CreateAnimation("","passiveobject/atgunner_bykk/2_blaster/animation/ancienttrigger/fullspark.ani"),true);
|
|
sq_SetCurrentAttackInfo(obj, sq_GetCustomAttackInfo(obj, 2));
|
|
sq_SetCurrentAttackBonusRate(sq_GetCurrentAttackInfo(obj), totalDamage);
|
|
obj.setTimeEvent(1, lifeTime / hitMax, hitMax, false);
|
|
createSkillPassive_ATGunner_bykk(obj,obj,PASSIVEOBJ_BYKK_ATGUNNER,0,0,0,obj.getDirection(),2,SKILL_BYKK_ANCIENTTRIGGER,2,0,0,0,0,0,0,0,0);
|
|
createSkillPassive_ATGunner_bykk(obj,obj,PASSIVEOBJ_BYKK_ATGUNNER,0,0,0,obj.getDirection(),2,SKILL_BYKK_ANCIENTTRIGGER,2,1,0,0,0,0,0,0,0);
|
|
createSkillPassive_ATGunner_bykk(obj,obj,PASSIVEOBJ_BYKK_ATGUNNER,0,0,0,obj.getDirection(),2,SKILL_BYKK_ANCIENTTRIGGER,3,0,0,0,0,0,0,0,0);
|
|
createSkillPassive_ATGunner_bykk(obj,obj,PASSIVEOBJ_BYKK_ATGUNNER,0,0,0,obj.getDirection(),2,SKILL_BYKK_ANCIENTTRIGGER,3,1,0,0,0,0,0,0,0);
|
|
createSkillPassive_ATGunner_bykk(obj,obj,PASSIVEOBJ_BYKK_ATGUNNER,0,0,0,obj.getDirection(),2,SKILL_BYKK_ANCIENTTRIGGER,4,0,0,0,0,0,0,0,0);
|
|
createSkillPassive_ATGunner_bykk(obj,obj,PASSIVEOBJ_BYKK_ATGUNNER,0,0,0,obj.getDirection(),2,SKILL_BYKK_ANCIENTTRIGGER,5,0,0,0,0,0,0,0,0);
|
|
createSkillPassive_ATGunner_bykk(obj,obj,PASSIVEOBJ_BYKK_ATGUNNER,0,0,0,obj.getDirection(),2,SKILL_BYKK_ANCIENTTRIGGER,5,1,0,0,0,0,0,0,0);
|
|
createSkillPassive_ATGunner_bykk(obj,obj,PASSIVEOBJ_BYKK_ATGUNNER,0,0,0,obj.getDirection(),2,SKILL_BYKK_ANCIENTTRIGGER,5,2,0,0,0,0,0,0,0);
|
|
createSkillPassive_ATGunner_bykk(obj,obj,PASSIVEOBJ_BYKK_ATGUNNER,0,0,0,obj.getDirection(),2,SKILL_BYKK_ANCIENTTRIGGER,5,3,0,0,0,0,0,0,0);
|
|
createSkillPassive_ATGunner_bykk(obj,obj,PASSIVEOBJ_BYKK_ATGUNNER,0,0,-20,obj.getDirection(),2,SKILL_BYKK_ANCIENTTRIGGER,7,0,0,0,0,0,0,0,0);
|
|
createSkillPassive_ATGunner_bykk(obj,obj,PASSIVEOBJ_BYKK_ATGUNNER,0,0,20,obj.getDirection(),2,SKILL_BYKK_ANCIENTTRIGGER,7,0,0,0,0,0,0,0,0);
|
|
createSkillPassive_ATGunner_bykk(obj,sqrChr,PASSIVEOBJ_BYKK_ATGUNNER,100,-20,-sq_GetZPos(sqrChr),obj.getDirection(),2,SKILL_BYKK_ANCIENTTRIGGER,6,0,0,0,0,0,0,0,0);
|
|
break;
|
|
case 1:
|
|
obj.resetHitObjectList();
|
|
sq_SetShake(obj, 5, 100);
|
|
break;
|
|
}
|
|
break;
|
|
case SKILL_BYKK_PLASMABOOST:
|
|
switch(timeEventIndex){
|
|
case 1: obj.resetHitObjectList(); break;
|
|
case 2:
|
|
if(!sqrChr || sqrChr.getState() == STATE_DIE){
|
|
obj.removeAllTimeEvent();
|
|
obj.addSetStatePacket(21, null, STATE_PRIORITY_AUTO, false, "");
|
|
break;
|
|
}
|
|
sq_setCurrentAxisPos(obj, 0, sq_GetDistancePos(sq_GetXPos(sqrChr), obj.getDirection(), 92));
|
|
sq_setCurrentAxisPos(obj, 1, sq_GetYPos(sqrChr));
|
|
break;
|
|
}
|
|
break;
|
|
case SKILL_BYKK_FSC_7:
|
|
switch(timeEventIndex){
|
|
case 1: sq_SendDestroyPacketPassiveObject(obj); break;
|
|
case 2:
|
|
local currentAni = obj.getCurrentAnimation();
|
|
local delaySum = currentAni.getDelaySum(10, 29);
|
|
local hitMax = obj.getVar("custom").getInt(11);
|
|
obj.setTimeEvent(3, delaySum / hitMax / 2, hitMax - 1, false);
|
|
sq_SetMyShake(obj, 3, delaySum);
|
|
break;
|
|
case 3: obj.resetHitObjectList();print(timeEventCount); break;
|
|
case 4:
|
|
obj.removeAllTimeEvent();
|
|
obj.sq_RemoveMoveParticle();
|
|
obj.addSetStatePacket(21, null, STATE_PRIORITY_AUTO, false, "");
|
|
break;
|
|
}
|
|
break;
|
|
case SKILL_BYKK_STINGEREX:
|
|
switch(timeEventIndex){
|
|
case 1:
|
|
local boss_number = 0;
|
|
local nameed_number = 0;
|
|
local targetObj;
|
|
local objectManager = obj.getObjectManager();
|
|
local objectNumber = objectManager.getCollisionObjectNumber();
|
|
for (local i = 0; i < objectNumber; i++){
|
|
local object = objectManager.getCollisionObject(i);
|
|
if(object.isObjectType(OBJECTTYPE_ACTIVE) && obj.isEnemy(object)){
|
|
local activeObj = sq_GetCNRDObjectToActiveObject(object);
|
|
if(sq_IsBoss(activeObj)){
|
|
boss_number = boss_number + 1;
|
|
targetObj = activeObj;
|
|
break;
|
|
}
|
|
else if(sq_IsNamed(activeObj)){
|
|
nameed_number = nameed_number + 1;
|
|
targetObj = activeObj;
|
|
break;
|
|
}
|
|
}
|
|
}
|
|
if(boss_number <= 0 || nameed_number <= 0){
|
|
targetObj = sq_FindTarget(sqrChr, -600, 2000, 400, 400);
|
|
}
|
|
if(!targetObj){
|
|
sq_SendDestroyPacketPassiveObject(obj);
|
|
return;
|
|
} else {
|
|
sq_AddDrawOnlyAniFromParent(targetObj, "passiveobject/atgunner_bykk/2_blaster/animation/stingerex/targetingmark.ani", 0, 0, 0);
|
|
local totalDamage = obj.getVar("custom").getInt(10);
|
|
local hitMax = obj.getVar("custom").getInt(11);
|
|
local sizeRate = obj.getVar("custom").getInt(12);
|
|
createSkillPassive_ATGunner_bykk(sqrChr,targetObj,PASSIVEOBJ_BYKK_ATGUNNER,-550,0,500,obj.getDirection(),2,SKILL_BYKK_STINGEREX,2,totalDamage,hitMax,sizeRate,0,0,0,0,0);
|
|
sq_SendDestroyPacketPassiveObject(obj);
|
|
return;
|
|
}
|
|
break;
|
|
}
|
|
break;
|
|
case SKILL_BYKK_PT_15:
|
|
switch(timeEventIndex){
|
|
case 1:
|
|
break;
|
|
}
|
|
break;
|
|
case SKILL_BYKK_OPERATIONRAZE:
|
|
switch(timeEventIndex){
|
|
case 1: obj.resetHitObjectList(); break;
|
|
case 2: sq_SendDestroyPacketPassiveObject(obj); break;
|
|
case 3:
|
|
sq_AddDrawOnlyAniFromParent(obj, "passiveobject/atgunner_bykk/2_blaster/animation/atoperationraze/missilefire_02.ani", 0, 0, 0);
|
|
obj.setTimeEvent(4, 20, 4, true);
|
|
break;
|
|
case 4:
|
|
local totalDamage = obj.getVar("custom").getInt(10);
|
|
local ypos = [0,-15,-5,5,15];
|
|
sq_AddDrawOnlyAniFromParent(obj, "passiveobject/atgunner_bykk/2_blaster/animation/atoperationraze/missileshootout_01.ani", 0, ypos[timeEventCount], 0);
|
|
createSkillPassive_ATGunner_bykk(obj,obj,PASSIVEOBJ_BYKK_ATGUNNER,0,ypos[timeEventCount] + sq_getRandom(-10,10),0,obj.getDirection(),2,SKILL_BYKK_OPERATIONRAZE,5,totalDamage,0,0,0,0,0,0,0);
|
|
break;
|
|
}
|
|
break;
|
|
case SKILL_BYKK_PHLEGETHON:
|
|
switch(timeEventIndex){
|
|
case 1: obj.resetHitObjectList(); break;
|
|
case 2:
|
|
if(!sqrChr || sqrChr.getState() == STATE_DIE){
|
|
obj.removeAllTimeEvent();
|
|
obj.addSetStatePacket(22, null, STATE_PRIORITY_AUTO, false, "");
|
|
break;
|
|
}
|
|
sq_setCurrentAxisPos(obj, 0, sq_GetXPos(sqrChr));
|
|
sq_setCurrentAxisPos(obj, 1, sq_GetYPos(sqrChr));
|
|
break;
|
|
case 3: obj.addSetStatePacket(21, null, STATE_PRIORITY_AUTO, false, ""); break;
|
|
}
|
|
break;
|
|
}
|
|
break;
|
|
case 3:
|
|
switch(skillIndex){
|
|
case SKILL_BYKK_HYPERFLARE:
|
|
switch(subtype){
|
|
case 0:
|
|
case 1:
|
|
switch(timeEventIndex){
|
|
case 1:
|
|
obj.addSetStatePacket(21, null, STATE_PRIORITY_AUTO, false, "");
|
|
obj.getVar("move").setInt(0, sq_GetXPos(obj));
|
|
obj.setTimeEvent(2, 10, 8, true);
|
|
break;
|
|
case 2:
|
|
local dstX = sq_GetDistancePos(obj.getVar("move").getInt(0), sq_GetDirection(obj), timeEventCount * 2);
|
|
sq_setCurrentAxisPos(obj, 0, dstX);
|
|
break;
|
|
case 3:
|
|
sq_AddDrawOnlyAniFromParent(obj, "passiveobject/atgunner_bykk/3_mechanic/animation/athyperflare/hyperflare2attackback_00.ani", 0, -1, 0);
|
|
sq_AddDrawOnlyAniFromParent(obj, "passiveobject/atgunner_bykk/3_mechanic/animation/athyperflare/hyperflare2attackback_34.ani", 0, -1, 0);
|
|
createSkillPassive_ATGunner_bykk(obj,obj,PASSIVEOBJ_BYKK_ATGUNNER,0,1,0,obj.getDirection(),3,SKILL_BYKK_HYPERFLARE,4,0,0,0,0,0,0,0,0);
|
|
break;
|
|
}
|
|
break;
|
|
case 2:
|
|
switch(timeEventIndex){
|
|
case 1:
|
|
local hitMax = obj.getVar("custom").getInt(0);
|
|
local hitTime = obj.getVar("custom").getInt(1);
|
|
obj.setTimeEvent(2, hitTime, hitMax, false);
|
|
break;
|
|
case 2:
|
|
obj.resetHitObjectList();
|
|
local hitMax = obj.getVar("custom").getInt(0);
|
|
if(timeEventCount >= hitMax) sq_SendDestroyPacketPassiveObject(obj);
|
|
break;
|
|
}
|
|
break;
|
|
case 3:
|
|
switch(timeEventIndex){
|
|
case 1: obj.resetHitObjectList(); break;
|
|
}
|
|
break;
|
|
case 4:
|
|
switch(timeEventIndex){
|
|
case 1:
|
|
local pooledObj = sq_AddDrawOnlyAniFromParent(obj, "passiveobject/atgunner_bykk/3_mechanic/animation/athyperflare/hyperflare2attackbottom_00.ani", 0, 0, 0);
|
|
sq_ChangeDrawLayer(pooledObj, ENUM_DRAWLAYER_BOTTOM);
|
|
break;
|
|
}
|
|
break;
|
|
}
|
|
break;
|
|
}
|
|
break;
|
|
case 4:
|
|
switch(skillIndex){
|
|
case SKILL_BYKK_OVERCHARGE:
|
|
switch(timeEventIndex){
|
|
case 1: sq_SendDestroyPacketPassiveObject(obj); break;
|
|
}
|
|
break;
|
|
case SKILL_BYKK_NAPALMBOMB:
|
|
switch(timeEventIndex){
|
|
case 1: obj.addSetStatePacket(22, null, STATE_PRIORITY_AUTO, false, ""); break;
|
|
case 2: obj.resetHitObjectList(); break;
|
|
}
|
|
break;
|
|
case SKILL_BYKK_C4:
|
|
switch(timeEventIndex){
|
|
case 1:
|
|
if(!sqrChr || sqrChr.getState() == STATE_DIE) sq_SendDestroyPacketPassiveObject(obj);
|
|
local targetNum = obj.getVar("custom").getInt(1);
|
|
local targetObj = sqrChr.getVar("C4Tar").get_obj_vector(targetNum);
|
|
if(targetObj && targetObj.getState() != STATE_DIE){
|
|
local vx = sq_GetUniformVelocity(obj.getVar("move").getInt(0), sq_GetXPos(targetObj), timeEventCount, 50);
|
|
local vy = sq_GetUniformVelocity(obj.getVar("move").getInt(1), sq_GetYPos(targetObj), timeEventCount, 50);
|
|
local vz = sq_GetUniformVelocity(obj.getVar("move").getInt(2), sq_GetZPos(targetObj) + sq_GetObjectHeight(targetObj) / 2, timeEventCount, 50);
|
|
sq_setCurrentAxisPos(obj, 0, vx);
|
|
sq_setCurrentAxisPos(obj, 1, vy);
|
|
sq_setCurrentAxisPos(obj, 2, vz);
|
|
if(timeEventCount >= 50){
|
|
local totalDamage = obj.getVar("custom").getInt(0);
|
|
local lifeTime = obj.getVar("custom").getInt(2);
|
|
local speedRate = obj.getVar("custom").getInt(3);
|
|
local group = sq_GetGroup(targetObj);
|
|
local uniqueId = sq_GetUniqueId(targetObj);
|
|
createSkillPassive_ATGunner_bykk(obj,obj,PASSIVEOBJ_BYKK_ATGUNNER,0,1,0,sq_GetDirection(obj),4,SKILL_BYKK_C4,2,totalDamage,lifeTime,speedRate,group,uniqueId,0,0,0);
|
|
sq_SendDestroyPacketPassiveObject(obj);
|
|
}
|
|
}
|
|
else sq_SendDestroyPacketPassiveObject(obj);
|
|
break;
|
|
case 2:
|
|
local totalDamage = obj.getVar("custom").getInt(0);
|
|
local targetObj = obj.getVar("tar").get_obj_vector(0);
|
|
if(targetObj){
|
|
local group = sq_GetGroup(targetObj);
|
|
local uniqueId = sq_GetUniqueId(targetObj);
|
|
createSkillPassive_ATGunner_bykk(obj,obj,PASSIVEOBJ_BYKK_ATGUNNER,0,0,0,sq_GetDirection(obj),4,SKILL_BYKK_C4,3,totalDamage,group,uniqueId,0,0,0,0,0);
|
|
sq_SendDestroyPacketPassiveObject(obj);
|
|
}
|
|
break;
|
|
case 3: sq_SendDestroyPacketPassiveObject(obj); break;
|
|
case 4:
|
|
local targetObj = obj.getVar("tar").get_obj_vector(0);
|
|
if(targetObj && targetObj.getState() != STATE_DIE){
|
|
sq_SendHitObjectPacket(obj,targetObj,0,0,sq_GetZPos(obj));
|
|
if(CNSquirrelAppendage.sq_IsAppendAppendage(targetObj, "appendage/character/ap_common_debuff.nut")) CNSquirrelAppendage.sq_RemoveAppendage(targetObj, "appendage/character/ap_common_debuff.nut");
|
|
}
|
|
break;
|
|
}
|
|
break;
|
|
case SKILL_BYKK_GRENADELIGHT:
|
|
case SKILL_BYKK_GRENADEWATER:
|
|
switch(timeEventIndex){
|
|
case 1: obj.addSetStatePacket(22, null, STATE_PRIORITY_AUTO, false, ""); break;
|
|
case 2: obj.resetHitObjectList(); break;
|
|
}
|
|
break;
|
|
case SKILL_BYKK_M18CLAYMORE:
|
|
switch(timeEventIndex){
|
|
case 1: obj.addSetStatePacket(22, null, STATE_PRIORITY_AUTO, false, "");print("test"); break;
|
|
case 2: obj.resetHitObjectList(); break;
|
|
case 3:
|
|
local vz = sq_GetUniformVelocity(obj.getVar("move").getInt(0), 0, timeEventCount, 20);
|
|
sq_setCurrentAxisPos(obj, 2, vz);
|
|
break;
|
|
case 4:
|
|
case 5:
|
|
local sizeRate = obj.getVar("custom").getInt(3);
|
|
local set01 = -35, set02 = 318, set03 = 50, set04 = 200;
|
|
if(timeEventIndex == 5){set01 = -175; set02 = 350; set03 = 65; set04 = 200;}
|
|
if(sizeRate > 100){
|
|
set01 = set01 * sizeRate / 100;
|
|
set02 = set02 * sizeRate / 100;
|
|
set03 = set03 * sizeRate / 100;
|
|
set04 = set04 * sizeRate / 100;
|
|
}
|
|
local targetObj = obj.sq_FindFirstTarget(set01, set02, set03, set04);
|
|
if(targetObj){
|
|
obj.stopTimeEvent(timeEventIndex);
|
|
obj.addSetStatePacket(22, null, STATE_PRIORITY_AUTO, false, "");
|
|
}
|
|
break;
|
|
}
|
|
break;
|
|
case SKILL_BYKK_LOCKONSUPPORT:
|
|
switch(timeEventIndex){
|
|
case 1:
|
|
local size = obj.getVar("tar").get_obj_vector_size();
|
|
if(size > 0){
|
|
obj.stopTimeEvent(1);
|
|
local sizeRate = obj.getVar("custom").getInt(1);
|
|
createOnlyDrawObjectEX_ATGunner_bykk(obj,"passiveobject/atgunner_bykk/4_spitfire/animation/lockonsupport/lockonsupport_readyb_floor_eff02_other.ani",true,sq_GetDirection(obj),sq_GetXPos(obj),sq_GetYPos(obj),sq_GetZPos(obj),ENUM_DRAWLAYER_BOTTOM,sizeRate,sizeRate);
|
|
obj.setTimeEvent(2, 300, obj.getVar("custom").getInt(2), true);
|
|
}
|
|
else if(timeEventCount >= 3) obj.addSetStatePacket(21, null, STATE_PRIORITY_AUTO, false, "");
|
|
break;
|
|
case 2:
|
|
local size = obj.getVar("tar").get_obj_vector_size();
|
|
if(size > 0){
|
|
local totalDamage = obj.getVar("custom").getInt(0);
|
|
local prob = obj.getVar("custom").getInt(3);
|
|
local time = obj.getVar("custom").getInt(4);
|
|
for(local i = 0; i < size; i++){
|
|
local targetObj = obj.getVar("tar").get_obj_vector(i);
|
|
if(targetObj){
|
|
local group = sq_GetGroup(targetObj);//组
|
|
local uniqueId = sq_GetUniqueId(targetObj);//唯一ID
|
|
createSkillPassive_ATGunner_bykk(obj,targetObj,PASSIVEOBJ_BYKK_ATGUNNER,0,0,sq_GetZPos(targetObj) + sq_GetObjectHeight(targetObj) / 2,sq_GetDirection(obj),4,skillIndex,3,totalDamage,prob,time,group,uniqueId,0,0,0);
|
|
if(timeEventCount >= obj.getVar("custom").getInt(2)){
|
|
local activeObj = sq_GetCNRDObjectToActiveObject(targetObj);
|
|
local size = activeObj.getVar("biaoji").get_obj_vector_size();
|
|
if(size > 0){
|
|
for(local i = 0; i < size; i++){
|
|
local aObj = activeObj.getVar("biaoji").get_obj_vector(i);
|
|
if(aObj){
|
|
local colObj = sq_GetCNRDObjectToCollisionObject(aObj);
|
|
colObj.addSetStatePacket(22, null, STATE_PRIORITY_AUTO, false, "");
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
sq_SetMyShake(obj, 2, 60);
|
|
if(timeEventCount >= obj.getVar("custom").getInt(2)) obj.addSetStatePacket(21, null, STATE_PRIORITY_AUTO, false, "");
|
|
break;
|
|
}
|
|
break;
|
|
case SKILL_BYKK_GRAVITYGRENADE:
|
|
switch(timeEventIndex){
|
|
case 1: obj.addSetStatePacket(22, null, STATE_PRIORITY_AUTO, false, "");print("test"); break;
|
|
case 2: obj.resetHitObjectList(); break;
|
|
}
|
|
break;
|
|
case SKILL_BYKK_OPENFIRE:
|
|
switch(timeEventIndex){
|
|
case 1:
|
|
local ani = sq_CreateAnimation("", "passiveobject/atgunner_bykk/4_spitfire/animation/atopenfire/atopenfireboomm1_c03.ani");
|
|
obj.setCurrentAnimation(ani);
|
|
sq_SetCurrentAttackInfo(obj, sq_GetCustomAttackInfo(obj, 94));
|
|
sq_SetCurrentAttackBonusRate(sq_GetCurrentAttackInfo(obj), obj.getVar("custom").getInt(0));
|
|
local attackInfo = sq_GetCurrentAttackInfo(obj);
|
|
if(attackInfo){
|
|
sq_SetAddWeaponDamage(attackInfo, true);
|
|
sq_setAttackInfoType(obj, obj.getVar("atkType").getInt(0));
|
|
if(sqrChr && sqrChr.getState() != STATE_DIE){
|
|
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);
|
|
}
|
|
}
|
|
//passiveobject/atgunner_bykk/4_spitfire/animation/atopenfire/atopenfireboomm2_f03.ani
|
|
local pooledObj = sq_AddDrawOnlyAniFromParent(obj, "passiveobject/atgunner_bykk/4_spitfire/animation/atopenfire/atopenfireboomm2_f03.ani", 0, 0, 0);
|
|
sq_ChangeDrawLayer(pooledObj, ENUM_DRAWLAYER_BOTTOM);
|
|
sq_AddDrawOnlyAniFromParent(obj, "passiveobject/atgunner_bykk/4_spitfire/animation/atopenfire/atopenfireboomb1_a01.ani", 0, 0, 0);
|
|
local pooledObj = sq_AddDrawOnlyAniFromParent(obj, "passiveobject/atgunner_bykk/4_spitfire/animation/atopenfire/atopenfireboomb2_f01.ani", 0, 0, 0);
|
|
sq_ChangeDrawLayer(pooledObj, ENUM_DRAWLAYER_BOTTOM);
|
|
sq_AddDrawOnlyAniFromParent(obj, "passiveobject/atgunner_bykk/4_spitfire/animation/atopenfire/atopenfireboomf1_a02.ani", 0, 0, 0);
|
|
local pooledObj = sq_AddDrawOnlyAniFromParent(obj, "passiveobject/atgunner_bykk/4_spitfire/animation/atopenfire/atopenfireboomf2_f02.ani", 0, 0, 0);
|
|
sq_ChangeDrawLayer(pooledObj, ENUM_DRAWLAYER_BOTTOM);
|
|
local currentAni = obj.getCurrentAnimation();
|
|
local delay = currentAni.getDelaySum(false);
|
|
local hitMax = obj.getVar("custom").getInt(1);
|
|
obj.setTimeEvent(2, delay / (hitMax * 2), hitMax - 1, false);
|
|
sq_SetMyShake(obj, 2, delay);
|
|
break;
|
|
case 2: obj.resetHitObjectList(); break;
|
|
}
|
|
break;
|
|
case SKILL_BYKK_PHOTOBILIZER:
|
|
switch(timeEventIndex){
|
|
case 1:
|
|
local ani = sq_CreateAnimation("", "passiveobject/atgunner_bykk/4_spitfire/animation/atphotobilizer/atphotobilizerexplosionattackbox.ani");
|
|
obj.setCurrentAnimation(ani);
|
|
sq_SetCurrentAttackInfo(obj, sq_GetCustomAttackInfo(obj, 95));
|
|
sq_SetCurrentAttackBonusRate(sq_GetCurrentAttackInfo(obj), obj.getVar("custom").getInt(0));
|
|
local attackInfo = sq_GetCurrentAttackInfo(obj);
|
|
if(attackInfo){
|
|
sq_SetAddWeaponDamage(attackInfo, true);
|
|
sq_setAttackInfoType(obj, obj.getVar("atkType").getInt(0));
|
|
if(sqrChr && sqrChr.getState() != STATE_DIE){
|
|
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);
|
|
}
|
|
}
|
|
local currentAni = obj.getCurrentAnimation();
|
|
local delay = currentAni.getDelaySum(false);
|
|
local hitMax = obj.getVar("custom").getInt(1);
|
|
obj.setTimeEvent(2, delay / (hitMax * 2), hitMax - 1, false);
|
|
break;
|
|
case 2:
|
|
obj.resetHitObjectList();
|
|
createSkillPassive_ATGunner_bykk(obj,obj,PASSIVEOBJ_BYKK_ATGUNNER,sq_getRandom(-100,100),sq_getRandom(-25,25),0,sq_GetDirection(obj),4,skillIndex,3,0,0,0,0,0,0,0,0);
|
|
if(timeEventCount % 2 == 0) createSkillPassive_ATGunner_bykk(obj,obj,PASSIVEOBJ_BYKK_ATGUNNER,sq_getRandom(-150,150),sq_getRandom(-25,25),0,sq_GetDirection(obj),4,skillIndex,3,0,0,0,0,0,0,0,0);
|
|
break;
|
|
case 3:
|
|
local vx = sq_GetUniformVelocity(obj.getVar("custom").getInt(2), obj.getVar("custom").getInt(0), timeEventCount, 40);
|
|
local vy = sq_GetUniformVelocity(obj.getVar("custom").getInt(3), obj.getVar("custom").getInt(1), timeEventCount, 40);
|
|
sq_setCurrentAxisPos(obj, 0, vx);
|
|
sq_setCurrentAxisPos(obj, 1, vy);
|
|
local alpha = sq_GetUniformVelocity(100, 255, timeEventCount, 40);
|
|
local currentAni = obj.getCurrentAnimation();
|
|
currentAni.setRGBA(255, 255, 255, alpha);
|
|
if(timeEventCount >= 40){
|
|
obj.getVar("custom").setInt(2, sq_GetXPos(obj));
|
|
obj.getVar("custom").setInt(3, sq_GetYPos(obj));
|
|
obj.setTimeEvent(4, sq_getRandom(5,10), 40, true);
|
|
}
|
|
break;
|
|
case 4:
|
|
local vx = sq_GetUniformVelocity(obj.getVar("custom").getInt(2), obj.getVar("custom").getInt(5), timeEventCount, 40);
|
|
local vy = sq_GetUniformVelocity(obj.getVar("custom").getInt(3), obj.getVar("custom").getInt(6), timeEventCount, 40);
|
|
local vz = sq_GetUniformVelocity(obj.getVar("custom").getInt(4), 0, timeEventCount, 40);
|
|
sq_setCurrentAxisPos(obj, 0, vx);
|
|
sq_setCurrentAxisPos(obj, 1, vy);
|
|
sq_setCurrentAxisPos(obj, 2, vz);
|
|
if(timeEventCount >= 40){
|
|
local aObj = sqrChr.getVar("pBilizerObj").get_obj_vector(0);
|
|
if(aObj){
|
|
local colObj = sq_GetCNRDObjectToCollisionObject(aObj);
|
|
colObj.setTimeEvent(1, 1000, 1, true);
|
|
}
|
|
sq_SendDestroyPacketPassiveObject(obj);
|
|
}
|
|
break;
|
|
case 5: sq_SendDestroyPacketPassiveObject(obj); break;
|
|
}
|
|
break;
|
|
case SKILL_BYKK_CHELLI:
|
|
switch(timeEventIndex){
|
|
case 1:
|
|
if(timeEventCount >= obj.getVar("custom").getInt(1)) obj.addSetStatePacket(22, null, STATE_PRIORITY_AUTO, false, "");
|
|
else obj.resetHitObjectList();
|
|
break;
|
|
case 2:
|
|
if(state == 23) break;
|
|
if(timeEventCount >= obj.getVar("custom").getInt(3)) obj.addSetStatePacket(23, null, STATE_PRIORITY_AUTO, false, "");
|
|
else obj.resetHitObjectList();
|
|
break;
|
|
case 3: if(timeEventCount >= obj.getVar("custom").getInt(0)) obj.addSetStatePacket(22, null, STATE_PRIORITY_AUTO, false, ""); break;
|
|
case 4: if(timeEventCount >= obj.getVar("custom").getInt(1)) sq_SendDestroyPacketPassiveObject(obj); break;
|
|
case 5: sq_SendDestroyPacketPassiveObject(obj); break;
|
|
}
|
|
break;
|
|
case SKILL_BYKK_EMPSTORM:
|
|
switch(timeEventIndex){
|
|
case 1:
|
|
// sq_AddDrawOnlyAniFromParent(obj, "passiveobject/atgunner_bykk/4_spitfire/animation/empstorm/emp_bomb_circle_inner.ani", 0, 0, 61 + 20);
|
|
break;
|
|
case 2://震动波
|
|
local zPos = 20;
|
|
sq_AddDrawOnlyAniFromParent(obj, "passiveobject/atgunner_bykk/4_spitfire/animation/empstorm/emp_nova1.ani", 0, -1, 59 + zPos);
|
|
sq_AddDrawOnlyAniFromParent(obj, "passiveobject/atgunner_bykk/4_spitfire/animation/empstorm/emp_nova3.ani", 0, -1, 59 + zPos);
|
|
sq_AddDrawOnlyAniFromParent(obj, "passiveobject/atgunner_bykk/4_spitfire/animation/empstorm/emp_nova2.ani", 0, 1, 61 + zPos);
|
|
sq_AddDrawOnlyAniFromParent(obj, "passiveobject/atgunner_bykk/4_spitfire/animation/empstorm/emp_nova4.ani", 0, 1, 61 + zPos);
|
|
obj.setTimeEvent(1, 200, 1, false);
|
|
sq_SetShake(obj, 10, 300);
|
|
sq_flashScreen(obj,80,300,240,150, sq_RGB(255,255,255), GRAPHICEFFECT_NONE, ENUM_DRAWLAYER_BOTTOM);
|
|
break;
|
|
case 3://闪电
|
|
sq_AddDrawOnlyAniFromParent(obj, "passiveobject/atgunner_bykk/4_spitfire/animation/empstorm/emp_glow.ani", 0, 1, -sq_GetZPos(obj) + 70);
|
|
sq_AddDrawOnlyAniFromParent(obj, "passiveobject/atgunner_bykk/4_spitfire/animation/empstorm/emp_spark.ani", 0, 2, -sq_GetZPos(obj) + 70);
|
|
local pooledObj = sq_AddDrawOnlyAniFromParent(obj, "passiveobject/atgunner_bykk/4_spitfire/animation/empstorm/emp_thunder"+sq_getRandom(1,3).tostring()+".ani", 0, 1, 70);
|
|
sq_SetCustomRotate(pooledObj, sq_ToRadian(sq_getRandom(270,360).tofloat()));
|
|
local pooledObj1 = sq_AddDrawOnlyAniFromParent(obj, "passiveobject/atgunner_bykk/4_spitfire/animation/empstorm/emp_thunder"+sq_getRandom(1,3).tostring()+".ani", 0, 1, 70);
|
|
sq_SetCustomRotate(pooledObj1, sq_ToRadian(sq_getRandom(45,120).tofloat()));
|
|
obj.sq_PlaySound("R_EMPSTORM_ELEC");
|
|
break;
|
|
case 10:
|
|
sq_AddDrawOnlyAniFromParent(obj, "passiveobject/atgunner_bykk/4_spitfire/animation/empstorm/exp_dodge_light.ani", 0, 1, 30);
|
|
local ani = sq_CreateAnimation("", "passiveobject/atgunner_bykk/4_spitfire/animation/empstorm/emp_bomb_up.ani");
|
|
obj.setCurrentAnimation(ani);
|
|
local currentAni = obj.getCurrentAnimation();
|
|
currentAni.addLayerAnimation(1001,sq_CreateAnimation("","passiveobject/atgunner_bykk/4_spitfire/animation/empstorm/emp_bomb_spark.ani"),true);
|
|
obj.setTimeEvent(11, 500, 1, false);
|
|
obj.sq_PlaySound("EMPSTORM_READY");
|
|
break;
|
|
case 11:
|
|
obj.setTimeEvent(12, 4, 50, true);
|
|
obj.sq_PlaySound("EMPSTORM_OPEN");
|
|
break;
|
|
case 12:
|
|
local vz = sq_GetUniformVelocity(1, 65, timeEventCount, 50);
|
|
sq_setCurrentAxisPos(obj, 2, vz);
|
|
if(timeEventCount >= 50){
|
|
createSkillPassive_ATGunner_bykk(obj,obj,PASSIVEOBJ_BYKK_ATGUNNER,0,-2,30,sq_GetDirection(obj),4,SKILL_BYKK_EMPSTORM,5,0,0,0,0,0,0,0,0);
|
|
createSkillPassive_ATGunner_bykk(obj,obj,PASSIVEOBJ_BYKK_ATGUNNER,0,-2,-sq_GetZPos(obj),sq_GetDirection(obj),4,SKILL_BYKK_EMPSTORM,7,0,0,0,0,0,0,0,0);
|
|
obj.sq_PlaySound("EMPSTORM_LOOP", 1233);
|
|
}
|
|
break;
|
|
case 20:
|
|
local totalDamage = obj.getVar("custom").getInt(1);
|
|
createSkillPassive_ATGunner_bykk(obj,obj,PASSIVEOBJ_BYKK_ATGUNNER,0,0,-sq_GetZPos(obj),sq_GetDirection(obj),4,SKILL_BYKK_EMPSTORM,9,totalDamage,0,0,0,0,0,0,0);
|
|
obj.setTimeEvent(21, 500, 1, false);
|
|
break;
|
|
case 21:
|
|
local totalDamage = obj.getVar("custom").getInt(2);
|
|
sq_SetCurrentAttackInfo(obj, sq_GetCustomAttackInfo(obj, 130));
|
|
sq_SetCurrentAttackBonusRate(sq_GetCurrentAttackInfo(obj), totalDamage);
|
|
local attackInfo = sq_GetCurrentAttackInfo(obj);
|
|
if(attackInfo){
|
|
sq_SetAddWeaponDamage(attackInfo, true);
|
|
sq_setAttackInfoType(obj, obj.getVar("atkType").getInt(0));
|
|
if(sqrChr && sqrChr.getState() != STATE_DIE){
|
|
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);
|
|
}
|
|
}
|
|
local hitMax = obj.getVar("custom").getInt(3);
|
|
sq_SetShake(obj, 2, 100 * hitMax);
|
|
obj.setTimeEvent(22, 100, hitMax, true);
|
|
break;
|
|
case 22:
|
|
local offset = [[150,20],[135,45],[108, 50],[95, 65],[-155, 20],[-140, 45],[-110, 50],[-100, 70]];
|
|
local randomNum = sq_getRandom(1,8);
|
|
sq_AddDrawOnlyAniFromParent(obj, "passiveobject/atgunner_bykk/4_spitfire/animation/empstorm/elec_dodge"+randomNum.tostring()+".ani", 0, 3, 73);
|
|
sq_AddDrawOnlyAniFromParent(obj, "passiveobject/atgunner_bykk/4_spitfire/animation/empstorm/elec_floor_dodge.ani", offset[randomNum - 1][0], offset[randomNum - 1][1], 0);
|
|
randomNum = sq_getRandom(1,8);
|
|
sq_AddDrawOnlyAniFromParent(obj, "passiveobject/atgunner_bykk/4_spitfire/animation/empstorm/elec_dodge"+randomNum.tostring()+".ani", 0, 3, 73);
|
|
sq_AddDrawOnlyAniFromParent(obj, "passiveobject/atgunner_bykk/4_spitfire/animation/empstorm/elec_floor_dodge.ani", offset[randomNum - 1][0], offset[randomNum - 1][1], 0);
|
|
sq_AddDrawOnlyAniFromParent(obj, "passiveobject/atgunner_bykk/4_spitfire/animation/empstorm/red_shock.ani", offset[randomNum - 1][0], offset[randomNum - 1][1], 0);
|
|
sq_flashScreen(obj,0,0,60,80, sq_RGB(0,0,0), GRAPHICEFFECT_NONE, ENUM_DRAWLAYER_BOTTOM);
|
|
obj.resetHitObjectList();
|
|
local time = sq_GetObjectTime(obj);
|
|
obj.sq_PlaySound("R_EMPSTORM_ELEC");
|
|
if(timeEventCount >= obj.getVar("custom").getInt(3)){
|
|
//sq_SendDestroyPacketPassiveObject(obj);
|
|
// print("test");
|
|
obj.setTimeEvent(23, 300, 1, false);
|
|
}
|
|
break;
|
|
case 23:
|
|
local totalDamageExp = obj.getVar("custom").getInt(4);
|
|
createSkillPassive_ATGunner_bykk(obj,obj,PASSIVEOBJ_BYKK_ATGUNNER,0,2,-sq_GetZPos(obj),sq_GetDirection(obj),4,SKILL_BYKK_EMPSTORM,8,totalDamageExp,0,0,0,0,0,0,0);
|
|
local size = sqrChr.getVar("empTar").get_obj_vector_size();
|
|
if(size > 0){
|
|
for(local i = 0; i < size; i++){
|
|
local targetObj = sqrChr.getVar("empTar").get_obj_vector(i);
|
|
if(targetObj && targetObj.getState() != STATE_DIE && CNSquirrelAppendage.sq_IsAppendAppendage(targetObj, "character/atgunner/4_spitfire_bykk/ap_empstorm.nut")) CNSquirrelAppendage.sq_RemoveAppendage(targetObj, "character/atgunner/4_spitfire_bykk/ap_empstorm.nut");
|
|
}
|
|
}
|
|
sq_SendDestroyPacketPassiveObject(obj);
|
|
break;
|
|
case 30:
|
|
local randomNum = sq_getRandom(1, 4);
|
|
for(local i = 0; i < randomNum; i++){
|
|
local pooledObj = sq_AddDrawOnlyAniFromParent(obj, "passiveobject/atgunner_bykk/4_spitfire/animation/empstorm/exp_big_spark_dodge.ani", 0, 2, 50);
|
|
local pooledObj1 = sq_AddDrawOnlyAniFromParent(obj, "passiveobject/atgunner_bykk/4_spitfire/animation/empstorm/exp_small_spark_dodge.ani", 0, 2, 50);
|
|
sq_SetCustomRotate(pooledObj, sq_ToRadian(sq_getRandom(0,360).tofloat()));
|
|
sq_SetCustomRotate(pooledObj1, sq_ToRadian(sq_getRandom(0,360).tofloat()));
|
|
}
|
|
if(timeEventCount == 1){
|
|
for(local i = 1; i < 7; i++){
|
|
local num = 1;
|
|
if(i > 1 && i < 6) num = 2;
|
|
sq_CreateParticle("passiveobject/atgunner_bykk/particle/4_spitfire/empstormexp"+i.tostring()+".ptl", obj, sq_getRandom(-50, 50), 0, 50 + sq_getRandom(-20, 30), true, 50, 0, num);
|
|
}
|
|
}
|
|
break;
|
|
case 31: sq_SendDestroyPacketPassiveObject(obj); break;
|
|
}
|
|
break;
|
|
case SKILL_BYKK_DDAY:
|
|
switch(timeEventIndex){
|
|
case 1://创建各种时钟
|
|
obj.setTimeEvent(2, 300, 1, false);//轰炸机
|
|
obj.setTimeEvent(3, 600, 1, false);//射手队
|
|
obj.setTimeEvent(4, 1200, 1, false);//丢雷队
|
|
obj.setTimeEvent(5, 800, 1, false);//攻击框
|
|
break;
|
|
case 2: obj.setTimeEvent(21, 150, 12, true); break;
|
|
case 21:
|
|
createSkillPassive_ATGunner_bykk(obj,obj,PASSIVEOBJ_BYKK_ATGUNNER,sq_getRandom(-180, 180),sq_getRandom(-80, 80),0,sq_GetDirection(obj),4,SKILL_BYKK_DDAY,3,0,0,0,0,0,0,0,0);
|
|
createSkillPassive_ATGunner_bykk(obj,obj,PASSIVEOBJ_BYKK_ATGUNNER,sq_getRandom(-180, 180),sq_getRandom(-80, 80),800,sq_GetDirection(obj),4,SKILL_BYKK_DDAY,4,0,0,0,0,0,0,0,0);
|
|
if(timeEventCount > 11) obj.sq_PlaySound("R_D_DAY_SHELL");
|
|
break;
|
|
case 22:
|
|
obj.sq_SetMoveParticle("particle/4_spitfire/ddaymissile.ptl", 0.0, 0.0);
|
|
sq_SetSpeedToMoveParticle(obj,0,50);
|
|
break;
|
|
case 3:
|
|
createSkillPassive_ATGunner_bykk(obj,obj,PASSIVEOBJ_BYKK_ATGUNNER,-300,-45,0,sq_GetDirection(obj),4,SKILL_BYKK_DDAY,5,1,0,0,0,0,0,0,0);
|
|
createSkillPassive_ATGunner_bykk(obj,obj,PASSIVEOBJ_BYKK_ATGUNNER,-300,-15,0,sq_GetDirection(obj),4,SKILL_BYKK_DDAY,5,2,0,0,0,0,0,0,0);
|
|
createSkillPassive_ATGunner_bykk(obj,obj,PASSIVEOBJ_BYKK_ATGUNNER,-300,15,0,sq_GetDirection(obj),4,SKILL_BYKK_DDAY,5,3,0,0,0,0,0,0,0);
|
|
createSkillPassive_ATGunner_bykk(obj,obj,PASSIVEOBJ_BYKK_ATGUNNER,-300,45,0,sq_GetDirection(obj),4,SKILL_BYKK_DDAY,5,4,0,0,0,0,0,0,0);
|
|
break;
|
|
case 31:
|
|
local vx = sq_GetUniformVelocity(0, 250, timeEventCount, 40);
|
|
local dstX = sq_GetDistancePos(obj.getVar("move").getInt(0), obj.getDirection(), vx);
|
|
sq_setCurrentAxisPos(obj, 0, dstX);
|
|
if(state == 21){
|
|
local moveY = 30;
|
|
if(obj.getVar("custom").getInt(0) == 2 || obj.getVar("custom").getInt(0) == 4) moveY = -moveY;
|
|
if(timeEventCount <= 20){
|
|
local vy = sq_GetUniformVelocity(0, moveY, timeEventCount, 20);
|
|
sq_setCurrentAxisPos(obj, 1, obj.getVar("move").getInt(1) + vy);
|
|
}
|
|
else if(timeEventCount <= 40){
|
|
local vy = sq_GetUniformVelocity(0, moveY, timeEventCount - 20, 20);
|
|
sq_setCurrentAxisPos(obj, 1, obj.getVar("move").getInt(1) + vy);
|
|
}
|
|
}
|
|
if(timeEventCount >= 40){
|
|
if(state == 21) obj.addSetStatePacket(22, null, STATE_PRIORITY_AUTO, false, "");
|
|
else if(state == 23) obj.addSetStatePacket(24, null, STATE_PRIORITY_AUTO, false, "");
|
|
}
|
|
break;
|
|
case 32:
|
|
local offset = [[70, 88],[60, 106]];
|
|
local num = obj.getVar().getInt(0);
|
|
createSkillPassive_ATGunner_bykk(obj,obj,PASSIVEOBJ_BYKK_ATGUNNER,offset[num][0], 0, offset[num][1],sq_GetDirection(obj),4,SKILL_BYKK_DDAY,6,0,0,0,0,0,0,0,0);
|
|
if(num == 0) obj.getVar().setInt(0, 1);
|
|
else obj.getVar().setInt(0, 0);
|
|
obj.sq_PlaySound("R_D_DAY_BULLET");
|
|
break;
|
|
case 4:
|
|
createSkillPassive_ATGunner_bykk(obj,obj,PASSIVEOBJ_BYKK_ATGUNNER,-325,-45,0,sq_GetDirection(obj),4,SKILL_BYKK_DDAY,7,0,0,0,0,0,0,0,0);
|
|
createSkillPassive_ATGunner_bykk(obj,obj,PASSIVEOBJ_BYKK_ATGUNNER,-350,-15,0,sq_GetDirection(obj),4,SKILL_BYKK_DDAY,8,0,0,0,0,0,0,0,0);
|
|
createSkillPassive_ATGunner_bykk(obj,obj,PASSIVEOBJ_BYKK_ATGUNNER,-375,-60,0,sq_GetDirection(obj),4,SKILL_BYKK_DDAY,8,0,0,0,0,0,0,0,0);
|
|
createSkillPassive_ATGunner_bykk(obj,obj,PASSIVEOBJ_BYKK_ATGUNNER,-375,60,0,sq_GetDirection(obj),4,SKILL_BYKK_DDAY,8,0,0,0,0,0,0,0,0);
|
|
createSkillPassive_ATGunner_bykk(obj,obj,PASSIVEOBJ_BYKK_ATGUNNER,-350,15,0,sq_GetDirection(obj),4,SKILL_BYKK_DDAY,8,0,0,0,0,0,0,0,0);
|
|
createSkillPassive_ATGunner_bykk(obj,obj,PASSIVEOBJ_BYKK_ATGUNNER,-325,45,0,sq_GetDirection(obj),4,SKILL_BYKK_DDAY,7,0,0,0,0,0,0,0,0);
|
|
break;
|
|
case 41:
|
|
local vx = sq_GetUniformVelocity(0, 600, timeEventCount, 100);
|
|
local dstX = sq_GetDistancePos(obj.getVar("move").getInt(0), obj.getDirection(), vx);
|
|
sq_setCurrentAxisPos(obj, 0, dstX);
|
|
if(timeEventCount >= 100){
|
|
obj.addSetStatePacket(22, null, STATE_PRIORITY_AUTO, false, "");
|
|
}
|
|
break;
|
|
case 42:
|
|
createSkillPassive_ATGunner_bykk(obj,obj,PASSIVEOBJ_BYKK_ATGUNNER,-30,0,80,sq_GetDirection(obj),4,SKILL_BYKK_DDAY,9,0,0,0,0,0,0,0,0);
|
|
break;
|
|
case 5:
|
|
local totalDamage = obj.getVar("custom").getInt(0);
|
|
local hitMax = obj.getVar("custom").getInt(1);
|
|
createSkillPassive_ATGunner_bykk(obj,obj,PASSIVEOBJ_BYKK_ATGUNNER,0,0,0,sq_GetDirection(obj),4,SKILL_BYKK_DDAY,2,totalDamage,hitMax,0,0,0,0,0,0);
|
|
obj.setTimeEvent(6, 50 * hitMax, 1, false);
|
|
break;
|
|
case 6: sq_SendDestroyPacketPassiveObject(obj); break;
|
|
case 7: obj.resetHitObjectList(obj); 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);
|
|
}
|
|
}
|
|
|
|
function onAttack_po_atgunner_bykk(obj, damager, boundingBox, isStuck)
|
|
{
|
|
if(!obj) return;
|
|
|
|
local sqrChr = sq_GetCNRDObjectToSQRCharacter(obj.getTopCharacter());
|
|
local job = obj.getVar("job").getInt(0);
|
|
local skillIndex = obj.getVar("skillIndex").getInt(0);
|
|
local subtype = obj.getVar("subtype").getInt(0);
|
|
local state = obj.getVar("state").getInt(0);
|
|
|
|
switch(job){
|
|
case 0:
|
|
break;
|
|
case 1:
|
|
switch(skillIndex){
|
|
case SKILL_BYKK_AIRRAID:
|
|
switch(subtype){
|
|
case 1:
|
|
if(damager.isObjectType(OBJECTTYPE_ACTIVE)){
|
|
local totalDamage = obj.getVar("custom").getInt(0);
|
|
if(totalDamage > 0){
|
|
local group = sq_GetGroup(damager);
|
|
local uniqueId = sq_GetUniqueId(damager);
|
|
createSkillPassive_ATGunner_bykk(obj,obj,PASSIVEOBJ_BYKK_ATGUNNER,0,0,0,sq_GetDirection(obj),1,SKILL_BYKK_HEADSHOT,3,totalDamage,group,uniqueId,0,0,0,0,0);
|
|
}
|
|
sq_AddDrawOnlyAniFromParent(damager, "character/gunner/effect/animation/1_ranger/atairraid/atchainenlighten/hiteffect_08.ani", 0, 0, sq_GetCenterZPos(boundingBox));
|
|
}
|
|
break;
|
|
}
|
|
break;
|
|
case SKILL_BYKK_HEADSHOT:
|
|
if(subtype == 4) break;
|
|
if(subtype >= 40 && subtype <= 44){
|
|
if(obj.getVar("Bool").getBool(0) == false) obj.getVar("Bool").setBool(0, true);
|
|
else break;
|
|
local totalDamage = obj.getVar("custom").getInt(5);
|
|
local isDown = obj.getVar("custom").getInt(0);
|
|
local isAir = obj.getVar("custom").getInt(7);//sq_GetCenterZPos(boundingBox) - 100
|
|
createSkillPassive_ATGunner_bykk(obj,obj,PASSIVEOBJ_BYKK_ATGUNNER,sq_getRandom(0,80),0,0,sq_GetDirection(obj),1,SKILL_BYKK_HEADSHOT,4,totalDamage,subtype - 40,isDown,isAir,0,0,0,0);
|
|
}
|
|
else if(subtype >= 30 && subtype <= 34){
|
|
local statusTime = obj.getVar("custom").getInt(6);
|
|
if(statusTime > 0) sq_sendSetActiveStatusPacket(damager, obj, obj.getVar("custom").getInt(5), 100.0, 100, false, statusTime);
|
|
}
|
|
if(sq_getRandom(1, 100) >= obj.getVar("custom").getInt(2) && obj.getVar("custom").getInt(1) != 3){
|
|
sq_SendDestroyPacketPassiveObject(obj);
|
|
break;
|
|
}
|
|
if(damager.isObjectType(OBJECTTYPE_ACTIVE)){
|
|
if(subtype == 2){
|
|
local totalDamage = obj.getVar("custom").getInt(4);
|
|
local group = sq_GetGroup(damager);
|
|
local uniqueId = sq_GetUniqueId(damager);
|
|
createSkillPassive_ATGunner_bykk(obj,obj,PASSIVEOBJ_BYKK_ATGUNNER,0,0,0,sq_GetDirection(obj),1,SKILL_BYKK_HEADSHOT,3,totalDamage,group,uniqueId,0,0,0,0,0);
|
|
}
|
|
if(obj.getVar("custom").getInt(3) > 0) break;
|
|
local aniPath = "character/gunner/effect/animation/headshotmonsterdown.ani";
|
|
createOnlyDrawObject_ATGunner_bykk(obj,aniPath,true,sq_GetOppositeDirection(obj.getDirection()),sq_GetXPos(damager),sq_GetYPos(damager),sq_GetCenterZPos(boundingBox),ENUM_DRAWLAYER_NORMAL);
|
|
}
|
|
break;
|
|
case SKILL_BYKK_CHAINSNATCH:
|
|
if(damager.isObjectType(OBJECTTYPE_ACTIVE)){
|
|
local totalDamage = obj.getVar("custom").getInt(0);
|
|
if(totalDamage > 0){
|
|
local group = sq_GetGroup(damager);
|
|
local uniqueId = sq_GetUniqueId(damager);
|
|
createSkillPassive_ATGunner_bykk(obj,obj,PASSIVEOBJ_BYKK_ATGUNNER,0,0,0,sq_GetDirection(obj),1,SKILL_BYKK_HEADSHOT,3,totalDamage,group,uniqueId,0,0,0,0,0);
|
|
}
|
|
}
|
|
break;
|
|
case SKILL_BYKK_RANDOMSHOOT:
|
|
if(damager.isObjectType(OBJECTTYPE_ACTIVE)){
|
|
local totalDamage = obj.getVar("custom").getInt(3);
|
|
if(totalDamage > 0){
|
|
local group = sq_GetGroup(damager);
|
|
local uniqueId = sq_GetUniqueId(damager);
|
|
createSkillPassive_ATGunner_bykk(obj,obj,PASSIVEOBJ_BYKK_ATGUNNER,0,0,0,sq_GetDirection(obj),1,SKILL_BYKK_HEADSHOT,3,totalDamage,group,uniqueId,0,0,0,0,0);
|
|
}
|
|
}
|
|
break;
|
|
case SKILL_BYKK_WALKSHOOT:
|
|
switch(subtype){
|
|
case 1:
|
|
case 10:
|
|
if(sq_getRandom(1, 100) >= obj.getVar("custom").getInt(2) && obj.getVar("custom").getInt(1) != 3){
|
|
sq_SendDestroyPacketPassiveObject(obj);
|
|
break;
|
|
}
|
|
if(damager.isObjectType(OBJECTTYPE_ACTIVE)){
|
|
if(subtype == 10){
|
|
local totalDamage = obj.getVar("custom").getInt(4);
|
|
local group = sq_GetGroup(damager);
|
|
local uniqueId = sq_GetUniqueId(damager);
|
|
createSkillPassive_ATGunner_bykk(obj,obj,PASSIVEOBJ_BYKK_ATGUNNER,0,0,0,sq_GetDirection(obj),1,SKILL_BYKK_HEADSHOT,3,totalDamage,group,uniqueId,0,0,0,0,0);
|
|
}
|
|
}
|
|
break;
|
|
case 2:
|
|
if(damager.isObjectType(OBJECTTYPE_ACTIVE)){
|
|
if(obj.getVar("custom").getInt(0) > 0){
|
|
local totalDamage = obj.getVar("custom").getInt(4);
|
|
local group = sq_GetGroup(damager);
|
|
local uniqueId = sq_GetUniqueId(damager);
|
|
createSkillPassive_ATGunner_bykk(obj,obj,PASSIVEOBJ_BYKK_ATGUNNER,0,0,0,sq_GetDirection(obj),1,SKILL_BYKK_HEADSHOT,3,totalDamage,group,uniqueId,0,0,0,0,0);
|
|
}
|
|
}
|
|
break;
|
|
}
|
|
break;
|
|
case SKILL_BYKK_KILLPOINT:
|
|
switch(subtype){
|
|
case 1:
|
|
switch(state){
|
|
case 20:
|
|
if(sqrChr.getVar("KillPoint_Bool").getBool(0) == false) sqrChr.getVar("KillPoint_Bool").setBool(0, true);
|
|
local apdPath = "character/atgunner/1_ranger_bykk/ap_killpoint.nut";
|
|
local targetObj = obj.getVar("tar").get_obj_vector(0);
|
|
if(isSameObject(damager, targetObj)){
|
|
sq_AddDrawOnlyAniFromParent(damager, "character/gunner/effect/animation/1_ranger/atkillpoint/killpointatkeff_b.ani", 0, 0, sq_GetCenterZPos(boundingBox));
|
|
sq_setCurrentAxisPos(obj, 1, sq_GetYPos(damager) + 1);
|
|
if(CNSquirrelAppendage.sq_IsAppendAppendage(damager, apdPath)) CNSquirrelAppendage.sq_RemoveAppendage(damager, apdPath);
|
|
local AddAppendage = CNSquirrelAppendage.sq_AppendAppendage(damager, obj, -1, false, apdPath, true);
|
|
local holdTime = obj.getVar("custom").getInt(0);
|
|
sq_HoldAndDelayDie(damager, obj, true, true, true, 200, 200, ENUM_DIRECTION_NEUTRAL, AddAppendage);
|
|
AddAppendage.sq_SetValidTime(holdTime);
|
|
obj.addSetStatePacket(21, null, STATE_PRIORITY_AUTO, false, "");
|
|
}
|
|
break;
|
|
}
|
|
break;
|
|
}
|
|
break;
|
|
case SKILL_BYKK_CHAINDEVIDER:
|
|
if(damager.isObjectType(OBJECTTYPE_ACTIVE)) sq_AddDrawOnlyAniFromParent(damager, "character/gunner/effect/animation/1_ranger/atbloodnchain/hit/bloodattc05.ani", 0, 0, sq_GetCenterZPos(boundingBox));
|
|
break;
|
|
}
|
|
break;
|
|
case 2:
|
|
switch(skillIndex){
|
|
case SKILL_BYKK_FLAMETHROWERBOOST:
|
|
switch(subtype){
|
|
case 1:
|
|
local holdTime = obj.getVar("custom").getInt(12);
|
|
if(holdTime > 0){
|
|
if(damager.isObjectType(OBJECTTYPE_ACTIVE)){
|
|
if(!obj.getVar("tar").is_obj_vector(damager)){
|
|
obj.getVar("tar").push_obj_vector(damager);
|
|
local AddAppendage = CNSquirrelAppendage.sq_AppendAppendage(damager, obj, -1, false, "appendage/character/ap_common_hold.nut", true);
|
|
AddAppendage.sq_SetValidTime(holdTime);
|
|
sq_HoldAndDelayDie(damager, obj, true, true, true, 200, 200, ENUM_DIRECTION_NEUTRAL , AddAppendage);
|
|
}
|
|
}
|
|
}
|
|
break;
|
|
}
|
|
break;
|
|
case SKILL_BYKK_CANNONBALL:
|
|
if(obj.getVar("custom").getInt(12) > 0){
|
|
obj.sq_RemoveMoveParticle();
|
|
local totalDamage = obj.getVar("custom").getInt(10);
|
|
createSkillPassive_ATGunner_bykk(obj,obj,PASSIVEOBJ_BYKK_ATGUNNER,0,0,0,obj.getDirection(),2,SKILL_BYKK_CANNONBALL,2,totalDamage,0,0,0,0,0,0,0);
|
|
sq_SendDestroyPacketPassiveObject(obj);
|
|
}
|
|
break;
|
|
case SKILL_BYKK_STEYRHEAVYRIFLE:
|
|
if(subtype == 2) break;
|
|
if(!damager.isObjectType(OBJECTTYPE_ACTIVE)) break;
|
|
obj.sq_RemoveMoveParticle();
|
|
sq_setCurrentAxisPos(obj, 0, sq_GetDistancePos(sq_GetXPos(obj), obj.getDirection(), 60));
|
|
sq_moveWithParent(damager, obj);
|
|
local ani = sq_CreateAnimation("", "passiveobject/character/gunner/animation/subweaponbulletsteyrhit.ani");
|
|
obj.setCurrentAnimation(ani);
|
|
local currentAni = obj.getCurrentAnimation();
|
|
local delaySum = currentAni.getDelaySum(false);
|
|
local expCount = obj.getVar("custom").getInt(11);
|
|
local delay = delaySum / expCount;
|
|
if(delay > 200) delay = 200;
|
|
obj.setTimeEvent(1, delay, expCount, true);
|
|
break;
|
|
case SKILL_BYKK_FM31:
|
|
switch(subtype){
|
|
case 1:
|
|
local totalDamage = obj.getVar("custom").getInt(10);
|
|
local sizeRate = obj.getVar("custom").getInt(11);
|
|
createSkillPassive_ATGunner_bykk(obj,obj,PASSIVEOBJ_BYKK_ATGUNNER,0,0,0,obj.getDirection(),2,SKILL_BYKK_FM31,2,totalDamage,sizeRate,0,0,0,0,0,0);
|
|
sq_SendDestroyPacketPassiveObject(obj);
|
|
break;
|
|
}
|
|
break;
|
|
case SKILL_BYKK_PLASMABOOST:
|
|
if(!damager.isObjectType(OBJECTTYPE_ACTIVE)) break;
|
|
if(!obj.getVar("tar").is_obj_vector(damager)) obj.getVar("tar").push_obj_vector(damager);
|
|
if(!CNSquirrelAppendage.sq_IsAppendAppendage(damager, "character/atgunner/2_blaster_bykk/ap_plasmaboost.nut")){
|
|
local AddAppendage = CNSquirrelAppendage.sq_AppendAppendage(damager, obj, -1, false, "character/atgunner/2_blaster_bykk/ap_plasmaboost.nut", true);
|
|
sq_HoldAndDelayDie(damager, obj, true, true, true, 200, 200, ENUM_DIRECTION_NEUTRAL , AddAppendage);
|
|
AddAppendage.sq_DeleteEffectFront();
|
|
AddAppendage.sq_AddEffectBack("character/gunner/effect/animation/plasmaboost/monster/hit_loop.ani");
|
|
}
|
|
break;
|
|
case SKILL_BYKK_FSC_7:
|
|
switch(subtype){
|
|
case 1:
|
|
switch(state){
|
|
case 20:
|
|
if(!damager.isObjectType(OBJECTTYPE_ACTIVE)) break;
|
|
if(!obj.isExistTimeEvent(4)) obj.setTimeEvent(4, 50, 1, false);
|
|
break;
|
|
}
|
|
break;
|
|
}
|
|
break;
|
|
case SKILL_BYKK_OPERATIONRAZE:
|
|
switch(subtype){
|
|
case 3:
|
|
if(damager.isObjectType(OBJECTTYPE_ACTIVE)){
|
|
sq_AddDrawOnlyAniFromParent(obj,"passiveobject/common/animation/fireexplosionparticle1.ani", sq_getRandom(-10,10), sq_getRandom(-10,10), sq_getRandom(-10,10));
|
|
sq_AddDrawOnlyAniFromParent(obj,"passiveobject/common/animation/fireexplosionparticle2.ani", 0, 2, 0);
|
|
sq_AddDrawOnlyAniFromParent(obj,"passiveobject/common/animation/fireexplosionparticle3.ani", 0, 1, 1);
|
|
sq_AddDrawOnlyAniFromParent(obj,"passiveobject/common/animation/fireexplosionparticle4.ani", sq_getRandom(-30,30), sq_getRandom(-30,30), sq_getRandom(-30,30));
|
|
sq_SendDestroyPacketPassiveObject(obj);
|
|
}
|
|
break;
|
|
}
|
|
break;
|
|
}
|
|
break;
|
|
case 3:
|
|
break;
|
|
case 4:
|
|
switch(skillIndex){
|
|
case SKILL_BYKK_OVERCHARGE:
|
|
if(subtype == 4) break;
|
|
if(subtype >= 40 && subtype <= 44){
|
|
if(obj.getVar("Bool").getBool(0) == false) obj.getVar("Bool").setBool(0, true);
|
|
else break;
|
|
local totalDamage = obj.getVar("custom").getInt(5);
|
|
local isDown = obj.getVar("custom").getInt(0);
|
|
local isAir = obj.getVar("custom").getInt(7);//sq_GetCenterZPos(boundingBox) - 100
|
|
createSkillPassive_ATGunner_bykk(obj,obj,PASSIVEOBJ_BYKK_ATGUNNER,sq_getRandom(0,80),0,0,sq_GetDirection(obj),1,SKILL_BYKK_HEADSHOT,4,totalDamage,subtype - 40,isDown,isAir,0,0,0,0);
|
|
}
|
|
else if(subtype >= 30 && subtype <= 34){
|
|
local statusTime = obj.getVar("custom").getInt(6);
|
|
if(statusTime > 0) sq_sendSetActiveStatusPacket(damager, obj, obj.getVar("custom").getInt(5), 100.0, 100, false, statusTime);
|
|
}
|
|
if(sq_getRandom(1, 100) >= obj.getVar("custom").getInt(2) && obj.getVar("custom").getInt(1) != 3){
|
|
sq_SendDestroyPacketPassiveObject(obj);
|
|
break;
|
|
}
|
|
if(damager.isObjectType(OBJECTTYPE_ACTIVE)){
|
|
if(subtype == 2){
|
|
local totalDamage = obj.getVar("custom").getInt(4);
|
|
local group = sq_GetGroup(damager);
|
|
local uniqueId = sq_GetUniqueId(damager);
|
|
createSkillPassive_ATGunner_bykk(obj,obj,PASSIVEOBJ_BYKK_ATGUNNER,0,0,0,sq_GetDirection(obj),1,SKILL_BYKK_HEADSHOT,3,totalDamage,group,uniqueId,0,0,0,0,0);
|
|
}
|
|
if(obj.getVar("custom").getInt(3) > 0) break;
|
|
local aniPath = "character/gunner/effect/animation/headshotmonsterdown.ani";
|
|
createOnlyDrawObject_ATGunner_bykk(obj,aniPath,true,sq_GetOppositeDirection(obj.getDirection()),sq_GetXPos(damager),sq_GetYPos(damager),sq_GetCenterZPos(boundingBox),ENUM_DRAWLAYER_NORMAL);
|
|
}
|
|
break;
|
|
case SKILL_BYKK_GRENADENONE:
|
|
case SKILL_BYKK_GRENADELIGHT:
|
|
case SKILL_BYKK_GRENADEWATER:
|
|
switch(subtype){
|
|
case 1:
|
|
local isEx = obj.getVar("custom").getInt(2);
|
|
if(isEx > 0) break;
|
|
if(obj.getVar().getBool(0) == false){
|
|
obj.getVar().setBool(0, true);
|
|
local totalDamage = obj.getVar("custom").getInt(0);
|
|
local sizeRate = obj.getVar("custom").getInt(1);
|
|
local sub = 0;
|
|
if(sq_GetZPos(obj) > 0){sub = 1;}
|
|
local prob = obj.getVar("custom").getInt(4);
|
|
local time = obj.getVar("custom").getInt(5);
|
|
local level = obj.getVar("custom").getInt(6);
|
|
createSkillPassive_ATGunner_bykk(obj,obj,PASSIVEOBJ_BYKK_ATGUNNER,0,0,0,sq_GetDirection(obj),4,skillIndex,2,totalDamage,sizeRate,sub,prob,time,level,0,0);
|
|
sq_SendDestroyPacketPassiveObject(obj);
|
|
}
|
|
break;
|
|
}
|
|
break;
|
|
case SKILL_BYKK_LOCKONSUPPORT:
|
|
switch(subtype){
|
|
case 2:
|
|
if(damager.isObjectType(OBJECTTYPE_ACTIVE)){
|
|
if(!obj.getVar("tar").is_obj_vector(damager)){
|
|
obj.getVar("tar").push_obj_vector(damager);
|
|
local group = sq_GetGroup(damager);//组
|
|
local uniqueId = sq_GetUniqueId(damager);//唯一ID
|
|
createSkillPassive_ATGunner_bykk(obj,damager,PASSIVEOBJ_BYKK_ATGUNNER,0,0,sq_GetZPos(damager) + sq_GetObjectHeight(damager) / 2,sq_GetDirection(obj),4,skillIndex,4,group,uniqueId,0,0,0,0,0,0);
|
|
}
|
|
}
|
|
break;
|
|
}
|
|
break;
|
|
case SKILL_BYKK_CHELLI:
|
|
switch(subtype){
|
|
case 1:
|
|
if(obj.getVar().getBool(0) == false && damager.isObjectType(OBJECTTYPE_ACTIVE)){
|
|
obj.getVar().setBool(0, true);
|
|
local activeObj = sq_GetCNRDObjectToActiveObject(damager);
|
|
sqrChr.getVar("chelliTarget").push_obj_vector(damager);
|
|
local totalDamage_phase1 = obj.getVar("custom").getInt(0);
|
|
local hitMax_phase1 = obj.getVar("custom").getInt(1);
|
|
local totalDamage_phase2 = obj.getVar("custom").getInt(2);
|
|
local hitMax_phase2 = obj.getVar("custom").getInt(3);
|
|
local totalDamageExp = obj.getVar("custom").getInt(4);
|
|
local grenadeMax = obj.getVar("custom").getInt(5);
|
|
local grenadeAddRate = obj.getVar("custom").getInt(6);
|
|
createSkillPassive_ATGunner_bykk(obj,activeObj,PASSIVEOBJ_BYKK_ATGUNNER,0,0,-sq_GetZPos(obj),sq_GetDirection(obj),4,skillIndex,2,totalDamage_phase1,hitMax_phase1,totalDamage_phase2,hitMax_phase2,totalDamageExp,grenadeMax,grenadeAddRate,0);
|
|
sq_SendDestroyPacketPassiveObject(obj);
|
|
}
|
|
break;
|
|
case 2:
|
|
// print("state = "+state);
|
|
if(obj.getVar().getBool(0) == false && damager.isObjectType(OBJECTTYPE_ACTIVE)){
|
|
if(!sqrChr.getVar("chelliTarget").is_obj_vector(damager)){
|
|
sqrChr.getVar("chelliTarget").push_obj_vector(damager);
|
|
sq_moveWithParent(damager, obj);
|
|
obj.getVar().setBool(0, true);
|
|
}
|
|
}
|
|
break;
|
|
}
|
|
break;
|
|
case SKILL_BYKK_EMPSTORM:
|
|
if(damager.isObjectType(OBJECTTYPE_ACTIVE)){
|
|
local size = sqrChr.getVar("empTar").get_obj_vector_size();
|
|
if(size < 1) sqrChr.getVar("empTar").clear_obj_vector();
|
|
if(!sqrChr.getVar("empTar").is_obj_vector(damager)) sqrChr.getVar("empTar").push_obj_vector(damager);
|
|
if(!CNSquirrelAppendage.sq_IsAppendAppendage(damager, "character/atgunner/4_spitfire_bykk/ap_empstorm.nut")){
|
|
local AddAppendage = CNSquirrelAppendage.sq_AppendAppendage(damager, obj, -1, false, "character/atgunner/4_spitfire_bykk/ap_empstorm.nut", true);
|
|
sq_HoldAndDelayDie(damager, obj, true, true, true, 200, 200, ENUM_DIRECTION_NEUTRAL, AddAppendage);
|
|
}
|
|
}
|
|
break;
|
|
}
|
|
break;
|
|
}
|
|
}
|
|
|
|
function onKeyFrameFlag_po_atgunner_bykk(obj, flagIndex)
|
|
{
|
|
if(!obj) return;
|
|
|
|
local sqrChr = sq_GetCNRDObjectToSQRCharacter(obj.getTopCharacter());
|
|
local job = obj.getVar("job").getInt(0);
|
|
local skillIndex = obj.getVar("skillIndex").getInt(0);
|
|
local subtype = obj.getVar("subtype").getInt(0);
|
|
local state = obj.getVar("state").getInt(0);
|
|
|
|
switch(job){
|
|
case 0:
|
|
break;
|
|
case 1:
|
|
switch(skillIndex){
|
|
case SKILL_BYKK_WALKSHOOT:
|
|
switch(flagIndex){
|
|
case 101: sq_SetMyShake(obj, 2, 20); break;
|
|
}
|
|
break;
|
|
}
|
|
break;
|
|
case 2:
|
|
break;
|
|
case 3:
|
|
break;
|
|
case 4:
|
|
switch(skillIndex){
|
|
case SKILL_BYKK_M18CLAYMORE:
|
|
local totalDamage = obj.getVar("custom").getInt(0);
|
|
local hitMax = obj.getVar("custom").getInt(1);
|
|
local sizeRate = obj.getVar("custom").getInt(3);
|
|
local prob = obj.getVar("custom").getInt(4);
|
|
local time = obj.getVar("custom").getInt(5);
|
|
createSkillPassive_ATGunner_bykk(obj,obj,PASSIVEOBJ_BYKK_ATGUNNER,0,0,0,sq_GetDirection(obj),4,SKILL_BYKK_M18CLAYMORE,4,totalDamage,hitMax,sizeRate,prob,time,0,0,0);
|
|
break;
|
|
case SKILL_BYKK_DDAY:
|
|
switch(flagIndex){
|
|
case 5001:
|
|
local offset = [[70, 88],[60, 106]];
|
|
local num = obj.getVar().getInt(0);
|
|
createSkillPassive_ATGunner_bykk(obj,obj,PASSIVEOBJ_BYKK_ATGUNNER,offset[num][0], 0, offset[num][1],sq_GetDirection(obj),4,SKILL_BYKK_DDAY,6,0,0,0,0,0,0,0,0);
|
|
if(num == 0) obj.getVar().setInt(0, 1);
|
|
else obj.getVar().setInt(0, 0);
|
|
break;
|
|
}
|
|
break;
|
|
}
|
|
break;
|
|
}
|
|
return true;
|
|
}
|