function setState_po_thief_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: break; case 2: switch(skillIndex){ case SKILL_BYKK_NICOLASSUMMONZOMBIE: switch(subtype){ case 1: switch(state){ case 20: local aniPath = "passiveobject/6_thief_bykk/necromancer_bykk/animation/nicolas/animation/zombiesummon/ball.ani"; local ani = sq_CreateAnimation("",aniPath); obj.setCurrentAnimation(ani); obj.sq_SetMoveParticle("particle/zombiesummonball.ptl", 0.0, 0.0); break; case 21: local aniPath = "passiveobject/6_thief_bykk/necromancer_bykk/animation/nicolas/animation/zombiesummon/ballwork.ani"; local ani = sq_CreateAnimation("",aniPath); obj.setCurrentAnimation(ani); break; } break; } break; case SKILL_BYKK_NICOLASBLACKARACHNIA: switch(subtype){ case 3: switch(state){ case 20: local aniPath = "monster/character/thief/2_necromancer_bykk/nicolas/animation/effect/blackarachnia/smallweb_normal.ani"; if(obj.getVar("custom").getInt(2) > 0) aniPath = "monster/character/thief/2_necromancer_bykk/nicolas/animation/effect/blackarachnia/talisman_smallweb_normal.ani"; local ani = sq_CreateAnimation("",aniPath); obj.setCurrentAnimation(ani); break; case 21: local aniPath = "monster/character/thief/2_necromancer_bykk/nicolas/animation/effect/blackarachnia/smallwebloop_normal.ani"; if(obj.getVar("custom").getInt(2) > 0) aniPath = "monster/character/thief/2_necromancer_bykk/nicolas/animation/effect/blackarachnia/talisman_smallwebloop_normal.ani"; local ani = sq_CreateAnimation("",aniPath); obj.setCurrentAnimation(ani); local lifeTime = obj.getVar("custom").getInt(1); obj.setTimeEvent(11, lifeTime, 1, false); break; } break; } break; case SKILL_BYKK_APPORTBALLACRE: switch(subtype){ case 1: switch(state){ case 20://出现 local aniPath = "passiveobject/6_thief_bykk/necromancer_bykk/animation/ballacre/appear_normal.ani"; local ani = sq_CreateAnimation("",aniPath); obj.setCurrentAnimation(ani); local currentAni = obj.getCurrentAnimation(); currentAni.addLayerAnimation(10001,sq_CreateAnimation("","passiveobject/6_thief_bykk/necromancer_bykk/animation/ballacre/appear_front_dodge.ani"),true); currentAni.addLayerAnimation(10002,sq_CreateAnimation("","passiveobject/6_thief_bykk/necromancer_bykk/animation/ballacre/appear_front_normal.ani"),true); currentAni.addLayerAnimation(-2,sq_CreateAnimation("","passiveobject/6_thief_bykk/necromancer_bykk/animation/ballacre/appear_back_dodge.ani"),true); currentAni.addLayerAnimation(-1,sq_CreateAnimation("","passiveobject/6_thief_bykk/necromancer_bykk/animation/ballacre/appear_back_normal.ani"),true); local delay = currentAni.getDelaySum(false); obj.setTimeEvent(10, delay, 1, false); break; case 21://静止 local aniPath = "passiveobject/6_thief_bykk/necromancer_bykk/animation/ballacre/stay_normal.ani"; local ani = sq_CreateAnimation("",aniPath); obj.setCurrentAnimation(ani); if(!obj.isExistTimeEvent(11)) obj.setTimeEvent(11, 10, -1, true); if(obj.isExistTimeEvent(14)) obj.stopTimeEvent(14); sqrChr.getVar("ballacre_strongattack_bool").setBool(0, false); break; case 22://普攻第1击 local aniPath = "passiveobject/6_thief_bykk/necromancer_bykk/animation/ballacre/attack_pierce.ani"; local ani = sq_CreateAnimation("",aniPath); obj.setCurrentAnimation(ani); local totalDamage = sq_GetBonusRateWithPassive(sqrChr, SKILL_BYKK_APPORTBALLACRE, -1, 5, 1.0) + 100; sq_SetCurrentAttackInfo(obj, sq_GetCustomAttackInfo(obj, 46)); sq_SetCurrentAttackBonusRate(sq_GetCurrentAttackInfo(obj), totalDamage); if(obj.isExistTimeEvent(11)) obj.stopTimeEvent(11); if(obj.isExistTimeEvent(13)) obj.stopTimeEvent(13); // obj.setTimeEvent(14, 10, -1, false); sqrChr.getVar("ballacre_strongattack_bool").setBool(0, false); obj.sq_PlaySound("R_BALAC_ATK"); local speedRate = obj.getVar("setSpeedRate").getFloat(0); // print("speedRate1 = "+speedRate); local pAni = obj.getCurrentAnimation(); pAni.setSpeedRate(speedRate); local delay = 25.0 / speedRate * 100.0; obj.setTimeEvent(15, delay.tointeger(), 5, true); break; case 23://普攻第2击 local aniPath = "passiveobject/6_thief_bykk/necromancer_bykk/animation/ballacre/attack_swing_rl.ani"; local ani = sq_CreateAnimation("",aniPath); obj.setCurrentAnimation(ani); local totalDamage = sq_GetBonusRateWithPassive(sqrChr, SKILL_BYKK_APPORTBALLACRE, -1, 7, 1.0) + 100; sq_SetCurrentAttackInfo(obj, sq_GetCustomAttackInfo(obj, 53)); sq_SetCurrentAttackBonusRate(sq_GetCurrentAttackInfo(obj), totalDamage); sqrChr.getVar("ballacre_strongattack_bool").setBool(0, false); obj.sq_PlaySound("R_BALAC_ATK"); local speedRate = obj.getVar("setSpeedRate").getFloat(0); // print("speedRate2 = "+speedRate); local pAni = obj.getCurrentAnimation(); pAni.setSpeedRate(speedRate); local delay = 25.0 / speedRate * 100.0; obj.setTimeEvent(16, delay.tointeger(), 5, true); break; case 24://普攻第3击 local aniPath = "passiveobject/6_thief_bykk/necromancer_bykk/animation/ballacre/attack_hand_pierce.ani"; local ani = sq_CreateAnimation("",aniPath); obj.setCurrentAnimation(ani); local totalDamage = sq_GetBonusRateWithPassive(sqrChr, SKILL_BYKK_APPORTBALLACRE, -1, 10, 1.0) + 100; sq_SetCurrentAttackInfo(obj, sq_GetCustomAttackInfo(obj, 44)); sq_SetCurrentAttackBonusRate(sq_GetCurrentAttackInfo(obj), totalDamage); obj.sq_PlaySound("BALAC_ATK_HAND"); local speedRate = obj.getVar("setSpeedRate").getFloat(0); // print("speedRate3 = "+speedRate); local pAni = obj.getCurrentAnimation(); pAni.setSpeedRate(speedRate); local currentAni = obj.getCurrentAnimation(); local delay = currentAni.getDelaySum(0, 1); obj.setTimeEvent(12, delay, 1, false); break; case 25://普攻第4击 local aniPath = "passiveobject/6_thief_bykk/necromancer_bykk/animation/ballacre/attack_swing_down.ani"; local ani = sq_CreateAnimation("",aniPath); obj.setCurrentAnimation(ani); local totalDamage = sq_GetBonusRateWithPassive(sqrChr, SKILL_BYKK_APPORTBALLACRE, -1, 8, 1.0) + 100; sq_SetCurrentAttackInfo(obj, sq_GetCustomAttackInfo(obj, 48)); sq_SetCurrentAttackBonusRate(sq_GetCurrentAttackInfo(obj), totalDamage); if(obj.isExistTimeEvent(14)) obj.stopTimeEvent(14); if(obj.isExistTimeEvent(0)) obj.stopTimeEvent(0); obj.sq_PlaySound("R_BALAC_ATK"); local speedRate = obj.getVar("setSpeedRate").getFloat(0); // print("speedRate4 = "+speedRate); local pAni = obj.getCurrentAnimation(); pAni.setSpeedRate(speedRate); break; case 26://跳打 local aniPath = "passiveobject/6_thief_bykk/necromancer_bykk/animation/ballacre/attack_jump_attack.ani"; local ani = sq_CreateAnimation("",aniPath); obj.setCurrentAnimation(ani); local totalDamage = sq_GetBonusRateWithPassive(sqrChr, SKILL_BYKK_APPORTBALLACRE, -1, 11, 1.0) + 100; sq_SetCurrentAttackInfo(obj, sq_GetCustomAttackInfo(obj, 45)); sq_SetCurrentAttackBonusRate(sq_GetCurrentAttackInfo(obj), totalDamage); obj.sq_PlaySound("BALAC_JUMPATK"); break; case 27://暗击拳 local aniPath = "passiveobject/6_thief_bykk/necromancer_bykk/animation/ballacre/attack_dash_upper.ani"; local ani = sq_CreateAnimation("",aniPath); obj.setCurrentAnimation(ani); local totalDamage = sq_GetBonusRateWithPassive(sqrChr, SKILL_BYKK_APPORTBALLACRE, -1, 13, 1.0) + 100; sq_SetCurrentAttackInfo(obj, sq_GetCustomAttackInfo(obj, 43)); sq_SetCurrentAttackBonusRate(sq_GetCurrentAttackInfo(obj), totalDamage); if(obj.isExistTimeEvent(11)) obj.stopTimeEvent(11); local speedRate = obj.getVar("setSpeedRate").getFloat(0); // print("speedRate5 = "+speedRate); local pAni = obj.getCurrentAnimation(); pAni.setSpeedRate(speedRate); local delay = 10.0 / speedRate * 100.0; obj.setTimeEvent(15, delay.tointeger(), 5, false); obj.getVar("anjiquan_tar").clear_obj_vector(); obj.sq_PlaySound("BALAC_DASHATK"); break; case 28://杀戮乱舞 local aniPath = "passiveobject/6_thief_bykk/necromancer_bykk/animation/ballacre/attack_swing_loop.ani"; local ani = sq_CreateAnimation("",aniPath); obj.setCurrentAnimation(ani); local totalDamage = sq_GetBonusRateWithPassive(sqrChr, SKILL_BYKK_APPORTBALLACRE, -1, 12, 1.0) + 100; sq_SetCurrentAttackInfo(obj, sq_GetCustomAttackInfo(obj, 51)); sq_SetCurrentAttackBonusRate(sq_GetCurrentAttackInfo(obj), totalDamage); obj.stopTimeEvent(11); obj.getVar("move").setInt(0, sq_GetXPos(obj)); local speedRate = obj.getVar("setSpeedRate").getFloat(0); if(speedRate.tointeger() < 200) speedRate = 200.0; local pAni = obj.getCurrentAnimation(); pAni.setSpeedRate(speedRate); local delay = 22.0 / speedRate * 100.0; obj.setTimeEvent(13, delay.tointeger(), 100, true); break; case 29://巴拉克强击 local aniPath = "passiveobject/6_thief_bykk/necromancer_bykk/animation/ballacre/strong_attack_body.ani"; local ani = sq_CreateAnimation("",aniPath); obj.setCurrentAnimation(ani); local totalDamage = sq_GetBonusRateWithPassive(sqrChr, SKILL_BYKK_APPORTBALLACRE, -1, 17, 1.0) + 100; sq_SetCurrentAttackInfo(obj, sq_GetCustomAttackInfo(obj, 47)); sq_SetCurrentAttackBonusRate(sq_GetCurrentAttackInfo(obj), totalDamage); if(obj.isExistTimeEvent(0)) obj.stopTimeEvent(0); if(obj.isExistTimeEvent(13)) obj.stopTimeEvent(13); local speedRate = obj.getVar("setSpeedRate").getFloat(0); if(speedRate.tointeger() < 200) speedRate = 200.0; local pAni = obj.getCurrentAnimation(); pAni.setSpeedRate(speedRate); break; case 30://杀戮乱舞护石形态 local aniPath = "passiveobject/6_thief_bykk/necromancer_bykk/animation/ballacre/talisman/genosiderballacre_talisman_swing_lr_sword_spirit_dodge.ani"; local ani = sq_CreateAnimation("",aniPath); obj.setCurrentAnimation(ani); local speedRate = obj.getVar("setSpeedRate").getFloat(0); if(speedRate.tointeger() < 200) speedRate = 200.0; local pAni = obj.getCurrentAnimation(); pAni.setSpeedRate(speedRate); break; case 31://野心出现 local aniPath = "passiveobject/6_thief_bykk/necromancer_bykk/animation/ballacre/attack_cast_hand_appear.ani"; local ani = sq_CreateAnimation("",aniPath); obj.setCurrentAnimation(ani); local speedRate = obj.getVar("setSpeedRate").getFloat(0); local pAni = obj.getCurrentAnimation(); pAni.setSpeedRate(speedRate); if(obj.isExistTimeEvent(11)) obj.stopTimeEvent(11); local delay = 25.0 / speedRate * 100.0; obj.setTimeEvent(17, delay.tointeger(), 3, true); obj.sq_PlaySound("BALAC_AMBITION"); break; case 32://野心握拳 local aniPath = "passiveobject/6_thief_bykk/necromancer_bykk/animation/ballacre/attack_cast_hand_grab.ani"; local ani = sq_CreateAnimation("",aniPath); obj.setCurrentAnimation(ani); local speedRate = obj.getVar("setSpeedRate").getFloat(0); local pAni = obj.getCurrentAnimation(); pAni.setSpeedRate(speedRate); obj.sq_PlaySound("BALAC_AMBITION_FIN"); break; case 33://野心护石 local aniPath = "passiveobject/6_thief_bykk/necromancer_bykk/animation/ambitionofballacre/talisman/ambitionofballacre_talisman_cast_set05n01.ani"; local ani = sq_CreateAnimation("",aniPath); obj.setCurrentAnimation(ani); local speedRate = obj.getVar("setSpeedRate").getFloat(0); local pAni = obj.getCurrentAnimation(); pAni.setSpeedRate(speedRate); if(obj.isExistTimeEvent(11)) obj.stopTimeEvent(11); local delay = 25.0 / speedRate * 100.0; obj.setTimeEvent(17, delay.tointeger(), 3, true); obj.sq_PlaySound("BALAC_AMBITION_FIN"); break; case 34://愤怒开始 local aniPath = "passiveobject/6_thief_bykk/necromancer_bykk/animation/ballacre/attack_cast_guillotine_start.ani"; local ani = sq_CreateAnimation("",aniPath); obj.setCurrentAnimation(ani); local totalDamage = sq_GetBonusRateWithPassive(sqrChr, SKILL_BYKK_GUILLOTINE, -1, 0, 1.0) + 100; sq_SetCurrentAttackInfo(obj, sq_GetCustomAttackInfo(obj, 59)); sq_SetCurrentAttackBonusRate(sq_GetCurrentAttackInfo(obj), totalDamage); local speedRate = obj.getVar("setSpeedRate").getFloat(0); local pAni = obj.getCurrentAnimation(); pAni.setSpeedRate(speedRate); if(obj.isExistTimeEvent(11)) obj.stopTimeEvent(11); local delay = 25.0 / speedRate * 100.0; obj.setTimeEvent(17, delay.tointeger(), 3, true); obj.sq_PlaySound("BALAC_GUILLOTINE"); break; case 35://愤怒蓄力 local aniPath = "passiveobject/6_thief_bykk/necromancer_bykk/animation/ballacre/attack_cast_guillotine_charge.ani"; local ani = sq_CreateAnimation("",aniPath); obj.setCurrentAnimation(ani); local speedRate = obj.getVar("setSpeedRate").getFloat(0); local pAni = obj.getCurrentAnimation(); pAni.setSpeedRate(speedRate); break; case 36://愤怒结束 local aniPath = "passiveobject/6_thief_bykk/necromancer_bykk/animation/ballacre/attack_cast_guillotine_finish.ani"; local ani = sq_CreateAnimation("",aniPath); obj.setCurrentAnimation(ani); local totalDamage = sq_GetBonusRateWithPassive(sqrChr, SKILL_BYKK_GUILLOTINE, -1, 2, 1.0) + 100; if(obj.getVar("guillotine_bool").getBool(0)){ totalDamage = sq_GetBonusRateWithPassive(sqrChr, SKILL_BYKK_GUILLOTINE, -1, 2, 1.8) + 100; } sq_SetCurrentAttackInfo(obj, sq_GetCustomAttackInfo(obj, 56)); sq_SetCurrentAttackBonusRate(sq_GetCurrentAttackInfo(obj), totalDamage); local speedRate = obj.getVar("setSpeedRate").getFloat(0); local pAni = obj.getCurrentAnimation(); pAni.setSpeedRate(speedRate); if(obj.getVar("guillotine_bool").getBool(0)){ if(obj.isExistTimeEvent(11)) obj.stopTimeEvent(11); local delay = 25.0 / speedRate * 100.0; obj.setTimeEvent(17, delay.tointeger(), 3, true); } obj.sq_PlaySound("BALAC_GUILLOTINE_FIN"); break; case 37://千魂祭 local aniPath = "passiveobject/6_thief_bykk/necromancer_bykk/animation/ballacre/attack_cast_phantom_strom.ani"; local ani = sq_CreateAnimation("",aniPath); obj.setCurrentAnimation(ani); local speedRate = obj.getVar("setSpeedRate").getFloat(0); local pAni = obj.getCurrentAnimation(); pAni.setSpeedRate(speedRate); if(obj.isExistTimeEvent(11)) obj.stopTimeEvent(11); obj.getVar("move").setInt(0, sq_GetXPos(obj)); local delay = 10.0 / speedRate * 100.0; obj.setTimeEvent(13, delay.tointeger(), 60, true); obj.getVar("phantom_bool").setBool(0, true); break; case 38://暴君极刑斩 local aniPath = "passiveobject/6_thief_bykk/necromancer_bykk/animation/ballacre/executionerslash/newexecutionerslash_body.ani"; if(obj.getVar("isStone_executionerslash").getBool(0)) aniPath = "passiveobject/6_thief_bykk/necromancer_bykk/animation/ballacre/talisman/executionerslash/executionerslashtalisman_body.ani"; local ani = sq_CreateAnimation("",aniPath); obj.setCurrentAnimation(ani); local speedRate = obj.getVar("setSpeedRate").getFloat(0); local pAni = obj.getCurrentAnimation(); pAni.setSpeedRate(speedRate); if(obj.isExistTimeEvent(11)) obj.stopTimeEvent(11); pAni = obj.getCurrentAnimation(); sq_flashScreen(obj,pAni.getDelaySum(0, 3),pAni.getDelaySum(4, 17),0,255,sq_RGB(0,0,0), GRAPHICEFFECT_NONE, ENUM_DRAWLAYER_BOTTOM); local pooledObj = sq_AddDrawOnlyAniFromParent(obj, "passiveobject/6_thief_bykk/necromancer_bykk/animation/ballacre/executionerslash/executionerslash_smoke_g.ani", 50, 0, 50); local currentAni = pooledObj.getCurrentAnimation(); currentAni.setSpeedRate(140.0); obj.sq_PlaySound("R_BALAC_EXECUTIONSLASH"); break; case 39://亡者君临 : 巴拉克之戮 local aniPath = "passiveobject/6_thief_bykk/necromancer_bykk/animation/ballacreadvent/ballacrecast02_set08n_empty.ani"; local ani = sq_CreateAnimation("",aniPath); obj.setCurrentAnimation(ani); obj.removeAllTimeEvent(); break; } break; case 2: switch(state){ case 20: local aniPath = "passiveobject/6_thief_bykk/necromancer_bykk/animation/ballacre/talisman/ballacretalismanswordloop_00.ani"; local ani = sq_CreateAnimation("",aniPath); obj.setCurrentAnimation(ani); local pAni = obj.getCurrentAnimation(); local delay = pAni.getDelaySum(0, 0); obj.setTimeEvent(0, delay / 4, -1, false); obj.setTimeEvent(20, delay / 10, 50, true); break; case 21: local aniPath = "passiveobject/6_thief_bykk/necromancer_bykk/animation/ballacre/talisman/ballacretalismanswordend_00.ani"; local ani = sq_CreateAnimation("",aniPath); obj.setCurrentAnimation(ani); obj.removeAllTimeEvent(); break; } break; } break; case SKILL_BYKK_AMBITIONOFBALLACRE: switch(subtype){ case 1: switch(state){ case 20: local aniPath = "passiveobject/6_thief_bykk/necromancer_bykk/animation/ambitionofballacre/hand_normal.ani"; local ani = sq_CreateAnimation("",aniPath); obj.setCurrentAnimation(ani); sq_SetCurrentAttackInfo(obj, sq_GetCustomAttackInfo(obj, 41)); sq_SetCurrentAttackBonusRate(sq_GetCurrentAttackInfo(obj), obj.getVar("custom").getInt(0)); local speedRate = obj.getVar("custom").getInt(3); local currentAni = obj.getCurrentAnimation(); currentAni.setSpeedRate(speedRate.tofloat() / 100.0); break; case 21: local aniPath = "passiveobject/6_thief_bykk/necromancer_bykk/animation/ambitionofballacre/hand_grab_normal.ani"; local ani = sq_CreateAnimation("",aniPath); obj.setCurrentAnimation(ani); sq_SetCurrentAttackInfo(obj, sq_GetCustomAttackInfo(obj, 42)); sq_SetCurrentAttackBonusRate(sq_GetCurrentAttackInfo(obj), obj.getVar("custom").getInt(1)); local speedRate = obj.getVar("setSpeedRate").getFloat(0); local pAni = obj.getCurrentAnimation(); pAni.setSpeedRate(speedRate); sq_SetMyShake(obj, 5, 240); break; } local sizeRate = obj.getVar("custom").getInt(2); local currentAni = obj.getCurrentAnimation(); sizeRate = sizeRate.tofloat() / 100.0; currentAni.setImageRateFromOriginal(sizeRate, sizeRate); currentAni.setAutoLayerWorkAnimationAddSizeRate(sizeRate); sq_SetAttackBoundingBoxSizeRate(currentAni, sizeRate, sizeRate, sizeRate); break; } break; case SKILL_BYKK_PHANTOMSTROM: switch(subtype){ case 1: switch(state){ case 20: local aniPath = "passiveobject/6_thief_bykk/necromancer_bykk/animation/phantomstrom/sphere/start_circle_back_normal.ani"; local ani = sq_CreateAnimation("",aniPath); obj.setCurrentAnimation(ani); local pAni = obj.getCurrentAnimation(); pAni.setSpeedRate(150.0); local delay = pAni.getDelaySum(false); local flashScreenObj = sq_flashScreen(obj,delay,9999999,0,255, sq_RGB(0,0,0), GRAPHICEFFECT_NONE, ENUM_DRAWLAYER_BOTTOM); sqrChr.getVar("flashobj").clear_obj_vector(); sqrChr.getVar("flashobj").push_obj_vector(flashScreenObj); local range = 400; 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, 800, 100); } break; case 21: local aniPath = "passiveobject/6_thief_bykk/necromancer_bykk/animation/phantomstrom/sphere/loop_circle_back_normal.ani"; local ani = sq_CreateAnimation("",aniPath); obj.setCurrentAnimation(ani); obj.setTimeEvent(10, obj.getVar("custom").getInt(3), 1, false); local aniPath = "passiveobject/6_thief_bykk/necromancer_bykk/animation/phantomstrom/sphere/bottom.ani"; local pooledObj = createOnlyDrawObject_Theif_bykk(obj,aniPath,true,obj.getDirection(),sq_GetXPos(obj),sq_GetYPos(obj),0,ENUM_DRAWLAYER_BOTTOM); obj.getVar("effect").clear_obj_vector(); obj.getVar("effect").push_obj_vector(pooledObj); obj.sq_PlaySound("FANTOM_BLACKHOLE_LOOP", 2000); break; case 22: obj.stopSound(2000); obj.sq_PlaySound("FANTOM_EXP"); local aniPath = "passiveobject/6_thief_bykk/necromancer_bykk/animation/phantomstrom/sphere/end_circle_back_normal.ani"; local ani = sq_CreateAnimation("",aniPath); obj.setCurrentAnimation(ani); local totalDamage = obj.getVar("custom").getInt(1); local totalDamage2 = obj.getVar("custom").getInt(2); local strom2Time = obj.getVar("custom").getInt(5); local strom2HitTime = obj.getVar("custom").getInt(6); createSkillPassive_Theif_bykk(sqrChr,obj,PASSIVEOBJ_NUM_THIEF,0,0,0,obj.getDirection(),2,SKILL_BYKK_PHANTOMSTROM,2,totalDamage,totalDamage2,strom2Time,strom2HitTime,0,0,0,0); local effect_obj = obj.getVar("effect").get_obj_vector(0); if(effect_obj) effect_obj.setValid(false); if(!sqrChr) break; CNSquirrelAppendage.sq_RemoveAppendage(sqrChr, "appendage/character/ap_common_suck.nut"); break; } break; case 2: switch(state){ case 20: local aniPath = "passiveobject/6_thief_bykk/necromancer_bykk/animation/phantomstrom/ghost/expstart_floor.ani"; local ani = sq_CreateAnimation("",aniPath); obj.setCurrentAnimation(ani); local currentAni = obj.getCurrentAnimation(); currentAni.addLayerAnimation(-1,sq_CreateAnimation("","passiveobject/6_thief_bykk/necromancer_bykk/animation/phantomstrom/ghost/expstart_back_dodge.ani"),true); 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, 800, 100); } obj.sq_PlaySound("FANTOM_COLUMN_LOOP", 2000); break; case 21: obj.stopSound(2000); obj.sq_PlaySound("FANTOM_FIN"); local aniPath = "passiveobject/6_thief_bykk/necromancer_bykk/animation/phantomstrom/ghost/expendfront_normal_back.ani"; local ani = sq_CreateAnimation("",aniPath); obj.setCurrentAnimation(ani); obj.setTimeEvent(20, 600, -1, false); local currentAni = obj.getCurrentAnimation(); currentAni.addLayerAnimation(-1000,sq_CreateAnimation("","passiveobject/6_thief_bykk/necromancer_bykk/animation/phantomstrom/ghost/expendfloor_common_dodge.ani"),true); currentAni.addLayerAnimation(-1,sq_CreateAnimation("","passiveobject/6_thief_bykk/necromancer_bykk/animation/phantomstrom/ghost/expendback_dodge.ani"),true); obj.setTimeEvent(11, obj.getVar("custom").getInt(2), 1, false); break; } break; } break; case SKILL_BYKK_BALLACREADVENT: switch(subtype){ case 2: switch(state){ case 20: local aniPath = "passiveobject/6_thief_bykk/necromancer_bykk/animation/ballacreadvent/beadstart02_set07n.ani"; local ani = sq_CreateAnimation("",aniPath); obj.setCurrentAnimation(ani); break; case 21: local aniPath = "passiveobject/6_thief_bykk/necromancer_bykk/animation/ballacreadvent/beadloop_set01d.ani"; local ani = sq_CreateAnimation("",aniPath); obj.setCurrentAnimation(ani); break; } local pAni = obj.getCurrentAnimation(); pAni.setSpeedRate(obj.getVar("custom").getInt(0).tofloat() / 100.0); break; case 6: switch(state){ case 20: local aniPath = "character/thief/effect/animation/2_necromancer_bykk/ballacreadvent/bg/bgstart_set07d02.ani"; local ani = sq_CreateAnimation("",aniPath); obj.setCurrentAnimation(ani); break; case 21: local aniPath = "character/thief/effect/animation/2_necromancer_bykk/ballacreadvent/bg/bg_set07d02.ani"; local ani = sq_CreateAnimation("",aniPath); obj.setCurrentAnimation(ani); break; case 22: local aniPath = "character/thief/effect/animation/2_necromancer_bykk/ballacreadvent/bg/bgend_set07d02.ani"; local ani = sq_CreateAnimation("",aniPath); obj.setCurrentAnimation(ani); break; } local pAni = obj.getCurrentAnimation(); pAni.setSpeedRate(obj.getVar("custom").getInt(0).tofloat() / 100.0); break; } break; case SKILL_BYKK_DARKSOUL: switch(subtype){ case 3: switch(state){ case 20: local aniPath = "passiveobject/6_thief_bykk/necromancer_bykk/animation/darksoul/lv95keyofaceron/passivemagicspherestart_00.ani"; local ani = sq_CreateAnimation("",aniPath); obj.setCurrentAnimation(ani); obj.setTimeEvent(12, 100, -1, false); break; case 21: local aniPath = "passiveobject/6_thief_bykk/necromancer_bykk/animation/darksoul/lv95keyofaceron/passivemagicsphereloop_00.ani"; local ani = sq_CreateAnimation("",aniPath); obj.setCurrentAnimation(ani); obj.sq_SetMoveParticle("particle/darksoul.ptl", 0.0, 0.0); obj.setTimeEvent(10, 100, -1, false); break; case 22: local aniPath = "passiveobject/6_thief_bykk/necromancer_bykk/animation/darksoul/lv95keyofaceron/passivemagicsphereend_00.ani"; local ani = sq_CreateAnimation("",aniPath); obj.setCurrentAnimation(ani); break; } break; case 4: switch(state){ case 20: local aniPath = "passiveobject/6_thief_bykk/necromancer_bykk/animation/darksoul/lv95keyofaceron/passiveskeletonstart_00.ani"; local ani = sq_CreateAnimation("",aniPath); obj.setCurrentAnimation(ani); break; case 21: local aniPath = "passiveobject/6_thief_bykk/necromancer_bykk/animation/darksoul/lv95keyofaceron/passiveskeletonloop_00.ani"; local ani = sq_CreateAnimation("",aniPath); obj.setCurrentAnimation(ani); break; case 22: local aniPath = "passiveobject/6_thief_bykk/necromancer_bykk/animation/darksoul/lv95keyofaceron/passiveskeletonend_00.ani"; local ani = sq_CreateAnimation("",aniPath); obj.setCurrentAnimation(ani); local totalDamage = obj.getVar("custom").getInt(1); createSkillPassive_Theif_bykk(obj,obj,PASSIVEOBJ_NUM_THIEF,0,0,0,obj.getDirection(),2,SKILL_BYKK_NICOLASSUMMONZOMBIE,3,totalDamage,100,0,0,0,0,0,0); break; } break; } break; case SKILL_BYKK_DARKLURE: switch(subtype){ case 1: switch(state){ case 20: local aniPath = "passiveobject/6_thief_bykk/necromancer_bykk/animation/darklure/bead_normal.ani"; local ani = sq_CreateAnimation("",aniPath); obj.setCurrentAnimation(ani); local currentAni = obj.getCurrentAnimation(); currentAni.addLayerAnimation(6,sq_CreateAnimation("","passiveobject/6_thief_bykk/necromancer_bykk/animation/darklure/bead_dodge.ani"),true); obj.sq_SetMoveParticle("particle/darklure.ptl", 0.0, 0.0); obj.setTimeEvent(10, obj.getVar("custom").getInt(6), 1, false); break; case 21: case 22: obj.sq_RemoveMoveParticle(); local aniPath = "passiveobject/6_thief_bykk/necromancer_bykk/animation/darklure/bead_exp.ani"; if(state == 22) aniPath = "passiveobject/6_thief_bykk/necromancer_bykk/animation/darklure/bead_exp_sky.ani"; local ani = sq_CreateAnimation("",aniPath); obj.setCurrentAnimation(ani); local totalDamage = obj.getVar("custom").getInt(0); local lifeTime = obj.getVar("custom").getInt(1); local hitTime = obj.getVar("custom").getInt(2); local increaseRate = obj.getVar("custom").getInt(3); local increaseRate_cur = obj.getVar("custom").getInt(4); local sizeRate = obj.getVar("custom").getInt(5); local sub = 0; if(obj.getVar().getBool(0)){totalDamage = totalDamage * (100 + increaseRate) / 100; sub = 2;} if(state == 22) sub = 1; local objectManager = obj.getObjectManager(); for (local i = 0; i < objectManager.getCollisionObjectNumber(); i++){ local object = objectManager.getCollisionObject(i); if (object && object.isObjectType(OBJECTTYPE_ACTIVE) && obj.isEnemy(object)){ local activeObj = sq_GetCNRDObjectToActiveObject(object); local addAppendage = CNSquirrelAppendage.sq_GetAppendage(activeObj, APDPATH_DARKLURE); if(!addAppendage){ addAppendage = CNSquirrelAppendage.sq_AppendAppendage(activeObj, sqrChr, -1, false, APDPATH_DARKLURE, true); } addAppendage.sq_SetValidTime(lifeTime); addAppendage.getVar("custom").setInt(0, increaseRate_cur); } } createSkillPassive_Theif_bykk(obj,obj,PASSIVEOBJ_NUM_THIEF,0,0,0,obj.getDirection(),2,SKILL_BYKK_DARKLURE,2,totalDamage,lifeTime,hitTime,sizeRate,sub,0,0,0); break; } break; } break; case SKILL_BYKK_LIVINGDEAD: switch(subtype){ case 1: switch(state){ case 20: local aniPath = "passiveobject/6_thief_bykk/necromancer_bykk/animation/livingdead/start_livingdead.ani"; local ani = sq_CreateAnimation("",aniPath); obj.setCurrentAnimation(ani); break; case 21: local aniPath = "passiveobject/6_thief_bykk/necromancer_bykk/animation/livingdead/attact1start_livingdead.ani"; local ani = sq_CreateAnimation("",aniPath); obj.setCurrentAnimation(ani); local aniPath = "passiveobject/6_thief_bykk/necromancer_bykk/animation/livingdead/loopmagiccircle.ani"; local pooledObj = createOnlyDrawObject_Theif_bykk(obj,aniPath,true,obj.getDirection(),sq_GetXPos(obj),sq_GetYPos(obj),0,ENUM_DRAWLAYER_BOTTOM); obj.getVar("effect").clear_obj_vector(); obj.getVar("effect").push_obj_vector(pooledObj); break; case 22: local aniPath = "passiveobject/6_thief_bykk/necromancer_bykk/animation/livingdead/attack2start_livingdead.ani"; local ani = sq_CreateAnimation("",aniPath); obj.setCurrentAnimation(ani); break; case 23: local aniPath = "passiveobject/6_thief_bykk/necromancer_bykk/animation/livingdead/attack2loop_livingdead.ani"; local ani = sq_CreateAnimation("",aniPath); obj.setCurrentAnimation(ani); // local currentAni = obj.getCurrentAnimation(); // currentAni.addLayerAnimation(6,sq_CreateAnimation("","passiveobject/6_thief_bykk/necromancer_bykk/animation/livingdead/darkmatter/attack2darkmatterloop_10.ani"),true); local totalDamage = obj.getVar("custom").getInt(0); local lifeTime = obj.getVar("custom").getInt(1); local hitTime = obj.getVar("custom").getInt(2); local sizeRate = obj.getVar("custom").getInt(3); local increaseRate = obj.getVar("custom").getInt(4); local addSizeRate = obj.getVar("custom").getInt(5); local sub = 0; if(obj.getVar().getBool(0)){totalDamage = totalDamage * (100 + increaseRate) / 100; sub = 1;sizeRate = sizeRate + addSizeRate;} obj.setTimeEvent(10, lifeTime, 1, false); createSkillPassive_Theif_bykk(obj,obj,PASSIVEOBJ_NUM_THIEF,50,0,35,obj.getDirection(),2,SKILL_BYKK_LIVINGDEAD,2,totalDamage,lifeTime,hitTime,sizeRate * 80 / 100,sub,1,0,0); createSkillPassive_Theif_bykk(obj,obj,PASSIVEOBJ_NUM_THIEF,100,0,35,obj.getDirection(),2,SKILL_BYKK_LIVINGDEAD,2,totalDamage,lifeTime,hitTime,sizeRate * 100 / 100,sub,0,0,0); if(sub > 0){ createSkillPassive_Theif_bykk(obj,obj,PASSIVEOBJ_NUM_THIEF,150,0,35,obj.getDirection(),2,SKILL_BYKK_LIVINGDEAD,2,totalDamage,lifeTime,hitTime,sizeRate * 120 / 100,sub,0,0,0); createSkillPassive_Theif_bykk(obj,obj,PASSIVEOBJ_NUM_THIEF,200,0,35,obj.getDirection(),2,SKILL_BYKK_LIVINGDEAD,2,totalDamage,lifeTime,hitTime,sizeRate * 140 / 100,sub,0,0,0); } break; case 24: local aniPath = "passiveobject/6_thief_bykk/necromancer_bykk/animation/livingdead/end_livingdead.ani"; local ani = sq_CreateAnimation("",aniPath); obj.setCurrentAnimation(ani); local effect = obj.getVar("effect").get_obj_vector(0); if(effect) effect.setValid(false); break; } break; case 3: switch(state){ case 20: local aniPath = "passiveobject/6_thief_bykk/necromancer_bykk/animation/livingdead/start_livingdead.ani"; local ani = sq_CreateAnimation("",aniPath); obj.setCurrentAnimation(ani); break; case 21: local aniPath = "passiveobject/6_thief_bykk/necromancer_bykk/animation/livingdead/110lvepicweapona/boom_05.ani"; local ani = sq_CreateAnimation("",aniPath); obj.setCurrentAnimation(ani); break; } local pAni = obj.getCurrentAnimation(); pAni.setSpeedRate(obj.getVar("custom").getInt(2).tofloat()); break; } break; case SKILL_BYKK_BLAMEOFDEADEX: switch(subtype){ case 1: switch(state){ case 20: local aniPath = "passiveobject/6_thief_bykk/necromancer_bykk/animation/blameofdeadex/areastart.ani"; local ani = sq_CreateAnimation("",aniPath); obj.setCurrentAnimation(ani); local currentAni = obj.getCurrentAnimation(); currentAni.setSpeedRate(125.0); break; case 21: local aniPath = "passiveobject/6_thief_bykk/necromancer_bykk/animation/blameofdeadex/arealoop.ani"; local ani = sq_CreateAnimation("",aniPath); obj.setCurrentAnimation(ani); obj.setTimeEvent(10, obj.getVar("custom").getInt(1), 1, false); obj.setTimeEvent(0, obj.getVar("custom").getInt(2), -1, true); break; case 22: local aniPath = "passiveobject/6_thief_bykk/necromancer_bykk/animation/blameofdeadex/areaend.ani"; local ani = sq_CreateAnimation("",aniPath); obj.setCurrentAnimation(ani); break; } local sizeRate = obj.getVar("custom").getInt(3).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_HATEFULGHOST: switch(subtype){ case 1: local aniPath = [ "passiveobject/6_thief_bykk/necromancer_bykk/animation/hatefulghost/hatefulbodysmall_00.ani",//20 "passiveobject/6_thief_bykk/necromancer_bykk/animation/hatefulghost/hatefulbodysmallend_01.ani",//21 "passiveobject/6_thief_bykk/necromancer_bykk/animation/hatefulghost/attack1/hatefulbodyattack1bottom_00.ani",//22 "passiveobject/6_thief_bykk/necromancer_bykk/animation/hatefulghost/attack1/hatefulbodyattack1bottomend_01.ani",//23 "passiveobject/6_thief_bykk/necromancer_bykk/animation/hatefulghost/attack2/hatefulbodyattack2abottom_00.ani",//24 "passiveobject/6_thief_bykk/necromancer_bykk/animation/hatefulghost/attack2/hatefulbodyattack2bbottom_00.ani",//25 "passiveobject/6_thief_bykk/necromancer_bykk/animation/hatefulghost/attack2/hatefulbodyattack2bottomend_01.ani",//26 "passiveobject/6_thief_bykk/necromancer_bykk/animation/hatefulghost/attack3/hatefulbodyattack3bottom_01.ani"];//28 local ani = sq_CreateAnimation("", aniPath[state - 20]); obj.setCurrentAnimation(ani); switch(state){ case 20: break; case 22: local totalDamage = obj.getVar("custom").getInt(0); sq_SetCurrentAttackInfo(obj, sq_GetCustomAttackInfo(obj, 24)); sq_SetCurrentAttackBonusRate(sq_GetCurrentAttackInfo(obj), totalDamage); sq_AddDrawOnlyAniFromParent(obj, "passiveobject/6_thief_bykk/necromancer_bykk/animation/hatefulghost/attack1/hatefulbodyattack1effect_00.ani", 0, 1, 1); createSkillPassive_Theif_bykk(obj,obj,PASSIVEOBJ_NUM_THIEF,0,0,0,obj.getDirection(),2,SKILL_BYKK_HATEFULGHOST,3,2,0,0,0,0,0,0,0); break; case 24: case 25: local totalDamage = obj.getVar("custom").getInt(1); sq_SetCurrentAttackInfo(obj, sq_GetCustomAttackInfo(obj, 25)); sq_SetCurrentAttackBonusRate(sq_GetCurrentAttackInfo(obj), totalDamage); local currentAni = obj.getCurrentAnimation(); if(state == 24){ obj.setTimeEvent(22, currentAni.getDelaySum(0, 1), 1, false); sq_AddDrawOnlyAniFromParent(obj, "passiveobject/6_thief_bykk/necromancer_bykk/animation/hatefulghost/attack2/hatefulbodyattack2aeffect_03.ani", 0, 1, 1); createSkillPassive_Theif_bykk(obj,obj,PASSIVEOBJ_NUM_THIEF,0,0,0,obj.getDirection(),2,SKILL_BYKK_HATEFULGHOST,3,0,0,0,0,0,0,0,0); } else{ obj.setTimeEvent(23, currentAni.getDelaySum(0, 2), 1, false); sq_AddDrawOnlyAniFromParent(obj, "passiveobject/6_thief_bykk/necromancer_bykk/animation/hatefulghost/attack2/hatefulbodyattack2beffect_03.ani", 0, 1, 1); createSkillPassive_Theif_bykk(obj,obj,PASSIVEOBJ_NUM_THIEF,0,0,0,obj.getDirection(),2,SKILL_BYKK_HATEFULGHOST,3,1,0,0,0,0,0,0,0); } break; case 27: local totalDamage = obj.getVar("custom").getInt(2); sq_SetCurrentAttackInfo(obj, sq_GetCustomAttackInfo(obj, 26)); sq_SetCurrentAttackBonusRate(sq_GetCurrentAttackInfo(obj), totalDamage); local currentAni = obj.getCurrentAnimation(); // currentAni.addLayerAnimation(6,sq_CreateAnimation("","passiveobject/6_thief_bykk/necromancer_bykk/animation/hatefulghost/attack3/hatefulbodyattack3effect_05.ani"),true); sq_AddDrawOnlyAniFromParent(obj, "passiveobject/6_thief_bykk/necromancer_bykk/animation/hatefulghost/attack3/hatefulbodyattack3hand_00.ani", 0, 0, 0); sq_AddDrawOnlyAniFromParent(obj, "passiveobject/6_thief_bykk/necromancer_bykk/animation/hatefulghost/attack3/hatefulbodyattack3effect_05.ani", 0, 1, 1); obj.setTimeEvent(20, currentAni.getDelaySum(0, 8), 1, false); obj.setTimeEvent(21, currentAni.getDelaySum(0, 1), 1, false); break; case 23: case 26: if(obj.getVar("custom").getInt(6) > 0) obj.getVar("phaseSet").setInt(0, 1000); else obj.getVar("phaseSet").setInt(0, obj.getVar("phaseSet").getInt(0) + 1); local currentAni = obj.getCurrentAnimation(); local delay = currentAni.getDelaySum(false); obj.getVar("move").setInt(0, sq_GetXPos(obj)); obj.getVar("move").setInt(1, sq_GetYPos(obj)); obj.setTimeEvent(11, delay / 100, 50, true); break; } if(state <= 21) break; local sizeRate = obj.getVar("custom").getInt(5).tofloat() / 100.0; local currentAni = obj.getCurrentAnimation(); currentAni.setImageRateFromOriginal(sizeRate, sizeRate); currentAni.setAutoLayerWorkAnimationAddSizeRate(sizeRate); sq_SetAttackBoundingBoxSizeRate(currentAni, sizeRate, sizeRate, sizeRate); break; case 3: switch(state){ case 20: local aniPath = "passiveobject/6_thief_bykk/necromancer_bykk/animation/hatefulghost/attack2/hatefulbodyattack2ahand_00.ani"; local ani = sq_CreateAnimation("",aniPath); obj.setCurrentAnimation(ani); break; case 21: local aniPath = "passiveobject/6_thief_bykk/necromancer_bykk/animation/hatefulghost/attack2/hatefulbodyattack2bhand_00.ani"; local ani = sq_CreateAnimation("",aniPath); obj.setCurrentAnimation(ani); break; case 22: local aniPath = "passiveobject/6_thief_bykk/necromancer_bykk/animation/hatefulghost/attack2/hatefulbodyattack2handend_01.ani"; local ani = sq_CreateAnimation("",aniPath); obj.setCurrentAnimation(ani); break; case 23: local aniPath = "passiveobject/6_thief_bykk/necromancer_bykk/animation/hatefulghost/attack1/hatefulbodyattack1hand_00.ani"; local ani = sq_CreateAnimation("",aniPath); obj.setCurrentAnimation(ani); break; case 24: local aniPath = "passiveobject/6_thief_bykk/necromancer_bykk/animation/hatefulghost/attack1/hatefulbodyattack1handend_00.ani"; local ani = sq_CreateAnimation("",aniPath); obj.setCurrentAnimation(ani); break; } break; } break; case SKILL_BYKK_COCONOFUNDEAD: switch(subtype){ case 1: switch(state){ case 20: local aniPath = "passiveobject/6_thief_bykk/necromancer_bykk/animation/cocoonofundead/cocoonattractionattack.ani"; local ani = sq_CreateAnimation("",aniPath); obj.setCurrentAnimation(ani); local totalDamage = obj.getVar("custom").getInt(0); sq_SetCurrentAttackInfo(obj, sq_GetCustomAttackInfo(obj, 13)); sq_SetCurrentAttackBonusRate(sq_GetCurrentAttackInfo(obj), totalDamage); obj.getVar("tar").clear_obj_vector(); obj.setTimeEvent(10, 440, 1, false); obj.setTimeEvent(11, 520, 1, false); obj.setTimeEvent(14, 800, 1, false); break; case 21: local aniPath = "passiveobject/6_thief_bykk/necromancer_bykk/animation/cocoonofundead/cocoonsmallstart_07.ani"; local ani = sq_CreateAnimation("",aniPath); obj.setCurrentAnimation(ani); local currentAni = obj.getCurrentAnimation(); currentAni.addLayerAnimation(-1,sq_CreateAnimation("","monster/character/thief/2_necromancer_bykk/cocoonofundead/animation/cocoonsmallloop_00.ani"),true); obj.setTimeEvent(13, 520, 1, true); obj.sq_PlaySound("COCOON_UNDEAD_START"); break; case 22: local aniPath = "passiveobject/6_thief_bykk/necromancer_bykk/animation/cocoonofundead/cocoonmediumstart_07.ani"; local ani = sq_CreateAnimation("",aniPath); obj.setCurrentAnimation(ani); local currentAni = obj.getCurrentAnimation(); currentAni.addLayerAnimation(-1,sq_CreateAnimation("","monster/character/thief/2_necromancer_bykk/cocoonofundead/animation/cocoonmediumloop_00.ani"),true); obj.setTimeEvent(13, 520, 1, true); obj.sq_PlaySound("COCOON_UNDEAD_GROW_01"); break; case 23: local aniPath = "passiveobject/6_thief_bykk/necromancer_bykk/animation/cocoonofundead/cocoonlargestart_07.ani"; local ani = sq_CreateAnimation("",aniPath); obj.setCurrentAnimation(ani); local currentAni = obj.getCurrentAnimation(); currentAni.addLayerAnimation(-1,sq_CreateAnimation("","monster/character/thief/2_necromancer_bykk/cocoonofundead/animation/cocoonlargeloop_00.ani"),true); obj.setTimeEvent(13, 520, 1, true); obj.sq_PlaySound("COCOON_UNDEAD_GROW_02"); break; case 24: local aniPath = "passiveobject/6_thief_bykk/necromancer_bykk/animation/cocoonofundead/cocoonlargeloop_00.ani"; local ani = sq_CreateAnimation("",aniPath); obj.setCurrentAnimation(ani); break; case 25: obj.removeAllTimeEvent(); local aniPath = "passiveobject/6_thief_bykk/necromancer_bykk/animation/cocoonofundead/cocoonexplosion_09.ani"; local ani = sq_CreateAnimation("",aniPath); obj.setCurrentAnimation(ani); local totalDamage = obj.getVar("custom").getInt(1); sq_SetCurrentAttackInfo(obj, sq_GetCustomAttackInfo(obj, 14)); sq_SetCurrentAttackBonusRate(sq_GetCurrentAttackInfo(obj), totalDamage); 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){ CNSquirrelAppendage.sq_RemoveAppendage(targetObj, APDPATH_COCONOFUNDEAD_HOLD); } } } break; } break; case 2: switch(state){ case 20: local aniPath = "passiveobject/6_thief_bykk/necromancer_bykk/animation/cocoonofundead/rangestartbottom_00.ani"; local ani = sq_CreateAnimation("",aniPath); obj.setCurrentAnimation(ani); break; case 21: local aniPath = "passiveobject/6_thief_bykk/necromancer_bykk/animation/cocoonofundead/rangeloopbottom_00.ani"; local ani = sq_CreateAnimation("",aniPath); obj.setCurrentAnimation(ani); break; } break; case 3: switch(state){ case 20: local aniPath = "passiveobject/6_thief_bykk/necromancer_bykk/animation/cocoonofundead/cocoonstartbottom_00.ani"; local ani = sq_CreateAnimation("",aniPath); obj.setCurrentAnimation(ani); break; case 21: local aniPath = "passiveobject/6_thief_bykk/necromancer_bykk/animation/cocoonofundead/cocoonloopbottom_00.ani"; local ani = sq_CreateAnimation("",aniPath); obj.setCurrentAnimation(ani); break; } break; } break; } break; case 3: switch(skillIndex){ case SKILL_THBYKK_FLAMEBALL: switch(subtype){ case 1: switch(state){ case 20: local aniPath = "passiveobject/6_thief_bykk/kunoichi_bykk/animation/flameball/flameballstart.ani"; local ani = sq_CreateAnimation("",aniPath); obj.setCurrentAnimation(ani); local totalDamage = obj.getVar("custom").getInt(0); if(obj.getVar("markofFlame").getBool(0)){ local burnDamage = totalDamage * obj.getVar("markofFlameSet").getInt(0) / 100; obj.getVar("markofFlameSet").setInt(3, burnDamage); totalDamage = totalDamage * obj.getVar("markofFlameSet").getInt(1) / 100; } sq_SetCurrentAttackInfo(obj, sq_GetCustomAttackInfo(obj, 127)); sq_SetCurrentAttackBonusRate(sq_GetCurrentAttackInfo(obj), totalDamage); // print("totalDamage1 = "+totalDamage); break; case 21: local aniPath = "passiveobject/6_thief_bykk/kunoichi_bykk/animation/flameball/flameballloop.ani"; local ani = sq_CreateAnimation("",aniPath); obj.setCurrentAnimation(ani); obj.setTimeEvent(1, obj.getVar("custom").getInt(2), -1, true); obj.setTimeEvent(2, obj.getVar("custom").getInt(3), 1, false); break; case 22: obj.removeAllTimeEvent(); local pooledObj = obj.getVar().get_obj_vector(0); if(pooledObj) pooledObj.setValid(false); local aniPath = "passiveobject/6_thief_bykk/kunoichi_bykk/animation/flameball/flameballend.ani"; local ani = sq_CreateAnimation("",aniPath); obj.setCurrentAnimation(ani); local currentAni = obj.getCurrentAnimation(); if(obj.getVar("custom").getInt(6) < 1) currentAni.addLayerAnimation(6,sq_CreateAnimation("","character/thief/effect/animation/3kunoichi_bykk/flameball/end/end_flameball_end_normal.ani"),true); else{ local aniPath = "passiveobject/z_ninja/animation/flameball/swordofkusanagi/end_flameball_end_dodge.ani"; local direction = sq_GetDirection(obj), x = sq_GetDistancePos(sq_GetXPos(obj), direction, 230); local sizeRate = obj.getVar("custom").getInt(4); createOnlyDrawObjectEX_Theif_bykk(obj,aniPath,true,direction,x,sq_GetYPos(obj),70,ENUM_DRAWLAYER_NORMAL,sizeRate,sizeRate) } local totalDamage = obj.getVar("custom").getInt(1); if(obj.getVar("markofFlame").getBool(0)){ local burnDamage = totalDamage * obj.getVar("markofFlameSet").getInt(0) / 100; obj.getVar("markofFlameSet").setInt(3, burnDamage); totalDamage = totalDamage * obj.getVar("markofFlameSet").getInt(1) / 100; } sq_SetCurrentAttackInfo(obj, sq_GetCustomAttackInfo(obj, 75)); sq_SetCurrentAttackBonusRate(sq_GetCurrentAttackInfo(obj), totalDamage); // print("totalDamage2 = "+totalDamage); break; } local currentAni = obj.getCurrentAnimation(); currentAni.setSpeedRate(obj.getVar("custom").getInt(5).tofloat()); local sizeRate = obj.getVar("custom").getInt(4); if(state == 21){ local aniPath = "character/thief/effect/animation/3kunoichi_bykk/flameball/loop/loop_flameball_normal.ani"; if(obj.getVar("custom").getInt(6) > 0) aniPath = "character/thief/effect/animation/3kunoichi_bykk/flameball/swordofkusanagi/loop_02.ani"; local direction = sq_GetDirection(obj), xPos = sq_GetDistancePos(sq_GetXPos(obj), direction, 50); local pooledObj = createOnlyDrawObjectEX_Theif_bykk(obj,aniPath,true,direction,xPos,sq_GetYPos(obj),70,ENUM_DRAWLAYER_NORMAL,sizeRate,sizeRate); local pAni = pooledObj.getCurrentAnimation(); pAni.setSpeedRate(obj.getVar("custom").getInt(5).tofloat()); obj.getVar().clear_obj_vector(); obj.getVar().push_obj_vector(pooledObj); } 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_THBYKK_BIGKUNAI: switch(subtype){ case 1: switch(state){ case 20: local aniPath = "passiveobject/6_thief_bykk/kunoichi_bykk/animation/bigkunai/bigkunai/groundatking_a2_kunai.ani"; local ani = sq_CreateAnimation("",aniPath); obj.setCurrentAnimation(ani); // local totalDamage = obj.getVar("custom").getInt(0); sq_SetCurrentAttackInfo(obj, sq_GetCustomAttackInfo(obj, 65)); sq_SetAddWeaponDamage(sq_GetCurrentAttackInfo(obj), false); // sq_SetCurrentAttackBonusRate(, totalDamage); local speed = 800.0; if(sq_GetDirection(obj) == ENUM_DIRECTION_RIGHT) sq_SetVelocity(obj, 0, speed); else sq_SetVelocity(obj, 0, -speed); break; case 21: local aniPath = "passiveobject/6_thief_bykk/kunoichi_bykk/animation/bigkunai/bigkunai/groundatkloop_d_dust3.ani"; if(obj.getVar("custom").getInt(8) > 0) aniPath = "passiveobject/6_thief_bykk/kunoichi_bykk/animation/bigkunai/bigkunai/swordofkusanagi/groundatkloop_d_dust3.ani"; local ani = sq_CreateAnimation("", aniPath); obj.setCurrentAnimation(ani); local totalDamage = obj.getVar("custom").getInt(0); if(obj.getVar("markofFlame").getBool(0)){ local burnDamage = totalDamage * obj.getVar("markofFlameSet").getInt(0) / 100; obj.getVar("markofFlameSet").setInt(3, burnDamage); totalDamage = totalDamage * obj.getVar("markofFlameSet").getInt(1) / 100; } sq_SetCurrentAttackInfo(obj, sq_GetCustomAttackInfo(obj, 65)); sq_SetCurrentAttackBonusRate(sq_GetCurrentAttackInfo(obj), totalDamage); obj.setTimeEvent(1, obj.getVar("custom").getInt(2), -1, true); obj.setTimeEvent(2, obj.getVar("custom").getInt(3), 1, false); break; } break; case 2: switch(state){ case 20: local aniPath = "passiveobject/6_thief_bykk/kunoichi_bykk/animation/bigkunai/bigkunaijump/airatking_fire.ani"; local ani = sq_CreateAnimation("",aniPath); obj.setCurrentAnimation(ani); // local totalDamage = obj.getVar("custom").getInt(0); sq_SetCurrentAttackInfo(obj, sq_GetCustomAttackInfo(obj, 65)); sq_SetAddWeaponDamage(sq_GetCurrentAttackInfo(obj), false); obj.getVar("custom").setInt(5, sq_GetXPos(obj)); local zpos = sq_GetZPos(obj); obj.getVar("custom").setInt(6, zpos); obj.getVar("custom").setInt(7, zpos / 2); obj.setTimeEvent(3, 1, 30, true); break; case 21: sq_CreateParticle("passiveobject/6_thief_bykk/particle/kunoichi_bykk/bigkunai.ptl", obj, 0, 1, 0, true, 100, 0, 20); local aniPath = "passiveobject/6_thief_bykk/kunoichi_bykk/animation/bigkunai/bigkunaijump/airatkloop_d_back.ani"; if(obj.getVar("custom").getInt(8) > 0) aniPath = "passiveobject/6_thief_bykk/kunoichi_bykk/animation/bigkunai/bigkunaijump/swordofkusanagi/airatkloop_d_back.ani"; local ani = sq_CreateAnimation("", aniPath); obj.setCurrentAnimation(ani); local totalDamage = obj.getVar("custom").getInt(0); if(obj.getVar("markofFlame").getBool(0)){ local burnDamage = totalDamage * obj.getVar("markofFlameSet").getInt(0) / 100; obj.getVar("markofFlameSet").setInt(3, burnDamage); totalDamage = totalDamage * obj.getVar("markofFlameSet").getInt(1) / 100; } sq_SetCurrentAttackInfo(obj, sq_GetCustomAttackInfo(obj, 65)); sq_SetCurrentAttackBonusRate(sq_GetCurrentAttackInfo(obj), totalDamage); obj.setTimeEvent(1, obj.getVar("custom").getInt(2), -1, true); obj.setTimeEvent(2, obj.getVar("custom").getInt(3), 1, false); break; } break; } break; case SKILL_THBYKK_FLAMETORNADO: switch(subtype){ case 1: switch(state){ case 20: local aniPath = "passiveobject/6_thief_bykk/kunoichi_bykk/animation/flametornado/start/projectile_01.ani"; if(obj.getVar("custom").getInt(7) > 0){ aniPath = "passiveobject/6_thief_bykk/kunoichi_bykk/animation/flametornado/blueprojectile/blueprojectile_01.ani"; sq_AddDrawOnlyAniFromParent(obj, "passiveobject/6_thief_bykk/kunoichi_bykk/animation/flametornado/bluestart/blueflametornadostart02_flame01.ani", 0, 0, 0); local totalDamage = obj.getVar("custom").getInt(0); if(obj.getVar("markofFlame").getBool(0)){ local burnDamage = totalDamage * obj.getVar("markofFlameSet").getInt(0) / 100; obj.getVar("markofFlameSet").setInt(3, burnDamage); totalDamage = totalDamage * obj.getVar("markofFlameSet").getInt(1) / 100; } sq_SetCurrentAttackInfo(obj, sq_GetCustomAttackInfo(obj, 77)); sq_SetCurrentAttackBonusRate(sq_GetCurrentAttackInfo(obj), totalDamage); obj.setTimeEvent(1, obj.getVar("custom").getInt(2), -1, true); obj.setTimeEvent(2, obj.getVar("custom").getInt(3), 1, false); } local ani = sq_CreateAnimation("",aniPath); obj.setCurrentAnimation(ani); local currentAni = obj.getCurrentAnimation(); currentAni.setSpeedRate(200.0); local speed = 300.0; if(sq_GetDirection(obj) == ENUM_DIRECTION_RIGHT) sq_SetVelocity(obj, 0, speed); else sq_SetVelocity(obj, 0, -speed); if(sqrChr && sqrChr.getState() != STATE_DIE){ if(CNSquirrelAppendage.sq_IsAppendAppendage(sqrChr, APDPATH_FLAMETORNADO_SUCK)) CNSquirrelAppendage.sq_RemoveAppendage(sqrChr, APDPATH_FLAMETORNADO_SUCK); local appendage = CNSquirrelAppendage.sq_AppendAppendage(sqrChr, obj, -1, false, APDPATH_FLAMETORNADO_SUCK, 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, obj.getVar("custom").getInt(5), 100); } } obj.setTimeEvent(3, 800, 1, false); local count = (obj.getVar("custom").getInt(3) - 800) / 50; obj.setTimeEvent(4, 50, count, true); break; case 21: local aniPath = "passiveobject/6_thief_bykk/kunoichi_bykk/animation/flametornado/projectile/projectile_01.ani"; if(obj.getVar("custom").getInt(7) > 0) aniPath = "passiveobject/6_thief_bykk/kunoichi_bykk/animation/flametornado/blueprojectile/blueprojectile_01.ani"; local ani = sq_CreateAnimation("",aniPath); obj.setCurrentAnimation(ani); local totalDamage = obj.getVar("custom").getInt(0); if(obj.getVar("markofFlame").getBool(0)){ local burnDamage = totalDamage * obj.getVar("markofFlameSet").getInt(0) / 100; obj.getVar("markofFlameSet").setInt(3, burnDamage); totalDamage = totalDamage * obj.getVar("markofFlameSet").getInt(1) / 100; } sq_SetCurrentAttackInfo(obj, sq_GetCustomAttackInfo(obj, 77)); sq_SetCurrentAttackBonusRate(sq_GetCurrentAttackInfo(obj), totalDamage); obj.setTimeEvent(1, obj.getVar("custom").getInt(2), -1, true); obj.setTimeEvent(2, obj.getVar("custom").getInt(3), 1, false); break; } local currentAni = obj.getCurrentAnimation(); local sizeRate = obj.getVar("custom").getInt(4); 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_THBYKK_ILUSIONSHURIKEN: switch(subtype){ case 3: case 4: switch(state){ case 20: local ani = obj.getVar("saveAni").get_ani_vector(0); sq_Rewind(ani); obj.setCurrentAnimation(ani); local currentAni = obj.getCurrentAnimation(); currentAni.setSpeedRate(obj.getVar("custom").getInt(4).tofloat()); obj.setTimeEvent(1, 1000, 1, true); break; case 21: local ani = obj.getVar("saveAni").get_ani_vector(1); sq_Rewind(ani); obj.setCurrentAnimation(ani); local currentAni = obj.getCurrentAnimation(); currentAni.setSpeedRate(obj.getVar("custom").getInt(4).tofloat()); currentAni = obj.getCurrentAnimation(); obj.setTimeEvent(2, currentAni.getDelaySum(0, 0), 1, false); break; case 22: local ani = obj.getVar("saveAni").get_ani_vector(2); sq_Rewind(ani); obj.setCurrentAnimation(ani); local currentAni = obj.getCurrentAnimation(); currentAni.setSpeedRate(obj.getVar("custom").getInt(4).tofloat()); currentAni = obj.getCurrentAnimation(); obj.setTimeEvent(3, currentAni.getDelaySum(0, 2), 1, false); break; } break; } break; case SKILL_THBYKK_FLYINGSWALLOW: switch(subtype){ case 2: switch(state){ case 20: local aniPath = "character/thief/effect/animation/3kunoichi_bykk/flyingswallow/flyingswallowfuuin01_01.ani"; local ani = sq_CreateAnimation("",aniPath); obj.setCurrentAnimation(ani); break; case 21: local aniPath = "character/thief/effect/animation/3kunoichi_bykk/flyingswallow/flyingswallowfuuin02_01.ani"; local ani = sq_CreateAnimation("",aniPath); obj.setCurrentAnimation(ani); obj.setTimeEvent(2, 80, -1, false); break; case 22: local aniPath = "character/thief/effect/animation/3kunoichi_bykk/flyingswallow/flyingswallowfuuin03_01.ani"; local ani = sq_CreateAnimation("",aniPath); obj.setCurrentAnimation(ani); break; case 23: local aniPath = "character/thief/effect/animation/3kunoichi_bykk/flyingswallow/flyingswallowfuuin04_01.ani"; local ani = sq_CreateAnimation("",aniPath); obj.setCurrentAnimation(ani); break; } break; case 4: switch(state){ case 20: local aniPath = "passiveobject/6_thief_bykk/kunoichi_bykk/animation/flyingswallow/swallow_kunai1.ani"; local ani = sq_CreateAnimation("",aniPath); obj.setCurrentAnimation(ani); local sub = obj.getVar("custom").getInt(1); local num = obj.getVar("custom").getInt(2); local baseAngle = -90.0, setAngle = 6.0, setbaseAngle = 20.0; switch(sub){ case 2: setAngle = 6.0;setbaseAngle = 30.0; break; case 3: setAngle = 8.0;setbaseAngle = 0.0; break; case 4: setAngle = 8.0;setbaseAngle = 0.0; break; } obj.sq_SetMoveParticle("particle/kunoichi_bykk/flyingswallow.ptl", 0.0, setbaseAngle + num * setAngle); sq_SetCustomRotate(obj, sq_ToRadian(baseAngle + setbaseAngle + num * setAngle)); local speed = -750 * sq_GetZPos(obj) / 110; sq_SetSpeedToMoveParticle(obj,2,speed); break; case 21: local aniPath = "passiveobject/6_thief_bykk/kunoichi_bykk/animation/flyingswallow/swallow_boom1_normal.ani"; local ani = sq_CreateAnimation("",aniPath); obj.setCurrentAnimation(ani); break; } break; case 7: switch(state){ case 20: local aniPath = "passiveobject/6_thief_bykk/kunoichi_bykk/animation/flyingswallow/swallow_kunai1.ani"; local ani = sq_CreateAnimation("",aniPath); obj.setCurrentAnimation(ani); local num = obj.getVar("custom").getInt(2); local numMax = obj.getVar("custom").getInt(3); local baseAngle = -90.0, setbaseAngle = 30.0; local angle = 60.0 / numMax.tofloat() * num.tofloat(); obj.sq_SetMoveParticle("particle/kunoichi_bykk/flyingswallow.ptl", sq_getRandom(-50, 50).tofloat(), setbaseAngle - angle); sq_SetCustomRotate(obj, sq_ToRadian(baseAngle + setbaseAngle - angle)); local speed = -750 * sq_GetZPos(obj) / 110; sq_SetSpeedToMoveParticle(obj,2,speed); break; case 21: local aniPath = "passiveobject/6_thief_bykk/kunoichi_bykk/animation/flyingswallow/swallow_kunai2.ani"; local ani = sq_CreateAnimation("",aniPath); obj.setCurrentAnimation(ani); break; } break; } break; case SKILL_THBYKK_YAMATAOROCHI: switch(subtype){ case 1: switch(state){ case 20: local aniPath = "passiveobject/6_thief_bykk/kunoichi_bykk/animation/yamataorochi/01_start/yamataorochi_01_start.ani"; local ani = sq_CreateAnimation("",aniPath); obj.setCurrentAnimation(ani); local totalDamage = obj.getVar("custom").getInt(0); sq_SetCurrentAttackInfo(obj, sq_GetCustomAttackInfo(obj, 125)); sq_SetCurrentAttackBonusRate(sq_GetCurrentAttackInfo(obj), totalDamage); sq_SetMyShake(obj, 3, 200); local currentAni = obj.getCurrentAnimation(); obj.setTimeEvent(4, currentAni.getDelaySum(0, 2), 1, false); break; case 21: local aniPath = "passiveobject/6_thief_bykk/kunoichi_bykk/animation/yamataorochi/02_loop/yamataorochi_02_loop.ani"; local ani = sq_CreateAnimation("",aniPath); obj.setCurrentAnimation(ani); local totalDamage = obj.getVar("custom").getInt(1); sq_SetCurrentAttackInfo(obj, sq_GetCustomAttackInfo(obj, 125)); sq_SetCurrentAttackBonusRate(sq_GetCurrentAttackInfo(obj), totalDamage); local hitMax = obj.getVar("custom").getInt(2); obj.setTimeEvent(1, 100, hitMax, true); obj.setTimeEvent(2, 100 * (hitMax + 1), 1, false); break; case 22: local aniPath = "passiveobject/6_thief_bykk/kunoichi_bykk/animation/yamataorochi/03_end/yamataorochi_03_end.ani"; local ani = sq_CreateAnimation("",aniPath); obj.setCurrentAnimation(ani); local currentAni = obj.getCurrentAnimation(); obj.setTimeEvent(5, currentAni.getDelaySum(0, 5), 1, false); obj.setTimeEvent(6, currentAni.getDelaySum(0, 6), 1, false); break; } break; case 2: switch(state){ case 20: local aniPath = "passiveobject/6_thief_bykk/kunoichi_bykk/animation/yamataorochi/04_floor/00_start/floor_start.ani"; local ani = sq_CreateAnimation("",aniPath); obj.setCurrentAnimation(ani); break; case 21: local aniPath = "passiveobject/6_thief_bykk/kunoichi_bykk/animation/yamataorochi/04_floor/01_loop/floor_loop.ani"; local ani = sq_CreateAnimation("",aniPath); obj.setCurrentAnimation(ani); local totalDamage = obj.getVar("custom").getInt(0); sq_SetCurrentAttackInfo(obj, sq_GetCustomAttackInfo(obj, 126)); sq_SetCurrentAttackBonusRate(sq_GetCurrentAttackInfo(obj), totalDamage); local lifeTime = obj.getVar("custom").getInt(1); obj.setTimeEvent(1, 600, -1, true); obj.setTimeEvent(2, lifeTime, 1, false); break; case 22: local aniPath = "passiveobject/6_thief_bykk/kunoichi_bykk/animation/yamataorochi/04_floor/02_end/end_2.ani"; local ani = sq_CreateAnimation("",aniPath); obj.setCurrentAnimation(ani); obj.removeAllTimeEvent(); break; } local currentAni = obj.getCurrentAnimation(); local sizeRate = obj.getVar("custom").getInt(2); sizeRate = sizeRate.tofloat() / 100.0; currentAni.setImageRateFromOriginal(sizeRate, sizeRate); currentAni.setAutoLayerWorkAnimationAddSizeRate(sizeRate); sq_SetAttackBoundingBoxSizeRate(currentAni, sizeRate, sizeRate, sizeRate); break; case 3: switch(state){ case 20: local aniPath = "passiveobject/6_thief_bykk/kunoichi_bykk/animation/yamataorochi/talisman/yamataorochistarttalisman_body.ani"; local ani = sq_CreateAnimation("",aniPath); obj.setCurrentAnimation(ani); sq_SetMyShake(obj, 3, 200); local currentAni = obj.getCurrentAnimation(); obj.setTimeEvent(4, currentAni.getDelaySum(0, 2), 1, false); break; case 21: local aniPath = "passiveobject/6_thief_bykk/kunoichi_bykk/animation/yamataorochi/talisman/yamataorochilooptalisman_body.ani"; local ani = sq_CreateAnimation("",aniPath); obj.setCurrentAnimation(ani); local totalDamage = obj.getVar("custom").getInt(0); local lifeTime = obj.getVar("custom").getInt(1); local sizeRate = obj.getVar("custom").getInt(2); createSkillPassive_Theif_bykk(obj,obj,PASSIVEOBJ_NUM_THIEF, 650, 0, 0,sq_GetDirection(obj),3,SKILL_THBYKK_YAMATAOROCHI,4,totalDamage,lifeTime,sizeRate,0,0,0,0,0); obj.setTimeEvent(2, lifeTime, 1, false); break; case 22: local aniPath = "passiveobject/6_thief_bykk/kunoichi_bykk/animation/yamataorochi/talisman/yamataorochiendtalisman_body.ani"; local ani = sq_CreateAnimation("",aniPath); obj.setCurrentAnimation(ani); local currentAni = obj.getCurrentAnimation(); obj.setTimeEvent(5, currentAni.getDelaySum(0, 5), 1, false); obj.setTimeEvent(6, currentAni.getDelaySum(0, 6), 1, false); break; } break; case 4: switch(state){ case 20: local aniPath = "passiveobject/6_thief_bykk/kunoichi_bykk/animation/yamataorochi/talisman/firelooptalisman_00.ani"; local ani = sq_CreateAnimation("",aniPath); obj.setCurrentAnimation(ani); local totalDamage = obj.getVar("custom").getInt(0); local lifeTime = obj.getVar("custom").getInt(1); sq_SetCurrentAttackInfo(obj, sq_GetCustomAttackInfo(obj, 126)); sq_SetCurrentAttackBonusRate(sq_GetCurrentAttackInfo(obj), totalDamage); obj.setTimeEvent(1, 100, -1, false); obj.setTimeEvent(3, lifeTime, 1, false); local aniPath = "passiveobject/6_thief_bykk/kunoichi_bykk/animation/yamataorochi/talisman/firebottomlooptalisman_00.ani"; local sizeRate = obj.getVar("custom").getInt(2); local pooledObj = createOnlyDrawObjectEX_Theif_bykk(obj,aniPath,true,sq_GetDirection(obj),sq_GetXPos(obj),sq_GetYPos(obj),0,ENUM_DRAWLAYER_BOTTOM,sizeRate,sizeRate); obj.getVar().clear_obj_vector(); obj.getVar().push_obj_vector(pooledObj); break; case 21: local aniPath = "passiveobject/6_thief_bykk/kunoichi_bykk/animation/yamataorochi/talisman/fireendtalisman_10.ani"; local ani = sq_CreateAnimation("",aniPath); obj.setCurrentAnimation(ani); obj.removeAllTimeEvent(); local pooledObj = obj.getVar().get_obj_vector(0); if(pooledObj) pooledObj.setValid(false); local aniPath = "passiveobject/6_thief_bykk/kunoichi_bykk/animation/yamataorochi/talisman/firebottomendtalisman_00.ani"; local sizeRate = obj.getVar("custom").getInt(2); local pooledObj = createOnlyDrawObjectEX_Theif_bykk(obj,aniPath,true,sq_GetDirection(obj),sq_GetXPos(obj),sq_GetYPos(obj),0,ENUM_DRAWLAYER_BOTTOM,sizeRate,sizeRate); break; } local currentAni = obj.getCurrentAnimation(); local sizeRate = obj.getVar("custom").getInt(2); 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_THBYKK_AMATERAS: switch(subtype){ case 1: switch(state){ case 20: local aniPath = "passiveobject/6_thief_bykk/kunoichi_bykk/animation/amateras/bird/amateras_birth_bird_normal.ani"; local ani = sq_CreateAnimation("",aniPath); obj.setCurrentAnimation(ani); local flashScreenObj = sq_flashScreen(obj,120,500,240,150, sq_RGB(0,0,0), GRAPHICEFFECT_NONE, ENUM_DRAWLAYER_BOTTOM); break; case 21: local aniPath = "passiveobject/6_thief_bykk/kunoichi_bykk/animation/amateras/bird/amateras_roof_bird_normal.ani"; local ani = sq_CreateAnimation("",aniPath); obj.setCurrentAnimation(ani); obj.setTimeEvent(2, 5000, 1, false); break; case 22: local aniPath = "passiveobject/6_thief_bykk/kunoichi_bykk/animation/amateras/bird/amateras_finish_dodge2.ani"; local ani = sq_CreateAnimation("",aniPath); obj.setCurrentAnimation(ani); break; } break; case 3: switch(state){ case 20: local aniPath = "passiveobject/6_thief_bykk/kunoichi_bykk/animation/amateras/laser/amateras_lighting_normal.ani"; local ani = sq_CreateAnimation("",aniPath); obj.setCurrentAnimation(ani); break; case 21: local aniPath = "passiveobject/6_thief_bykk/kunoichi_bykk/animation/amateras/laser/amateras_lighting_loop_normal.ani"; local ani = sq_CreateAnimation("",aniPath); obj.setCurrentAnimation(ani); if(sqrChr && sqrChr.getState() != STATE_DIE){ local size = sqrChr.getVar("AmaterasObj").get_obj_vector_size(); if(size > 0){ for(local i = 0; i < size; i++){ local targetObj = sqrChr.getVar("AmaterasObj").get_obj_vector(i); if(targetObj && targetObj.getState() != STATE_DIE) obj.getVar("tar").push_obj_vector(targetObj); } local size2 = obj.getVar("tar").get_obj_vector_size(); if(size2 > 0){ local totalDamage = obj.getVar("custom").getInt(0); sq_SetCurrentAttackInfo(obj, sq_GetCustomAttackInfo(obj, 62)); sq_SetCurrentAttackBonusRate(sq_GetCurrentAttackInfo(obj), totalDamage); for(local i = 0; i < size2; i++){ local targetObj = obj.getVar("tar").get_obj_vector(i); local group = sq_GetGroup(targetObj); local uniqueId = sq_GetUniqueId(targetObj); createSkillPassive_Theif_bykk(obj,obj,PASSIVEOBJ_NUM_THIEF, 0, 0, 0,sq_GetDirection(obj),3,SKILL_THBYKK_AMATERAS,4,group,uniqueId,0,0,0,0,0,0); } obj.setTimeEvent(3, 500, 1, false); obj.setTimeEvent(2, 550, 1, false); } } } obj.setTimeEvent(2, 550, 1, false); break; } break; } break; case SKILL_THBYKK_SWORDOFKUSANAGI: switch(subtype){ case 1: switch(state){ case 20: local aniPath = "passiveobject/6_thief_bykk/kunoichi_bykk/animation/swordofkusanagi/kkstart_04.ani"; local ani = sq_CreateAnimation("",aniPath); obj.setCurrentAnimation(ani); local totalDamage = obj.getVar("custom").getInt(0); sq_SetCurrentAttackInfo(obj, sq_GetCustomAttackInfo(obj, 114)); sq_SetCurrentAttackBonusRate(sq_GetCurrentAttackInfo(obj), totalDamage); local currentAni = obj.getCurrentAnimation(); obj.setTimeEvent(1, currentAni.getDelaySum(0, 1), 1, false); break; case 21: local aniPath = "passiveobject/6_thief_bykk/kunoichi_bykk/animation/swordofkusanagi/kkstay_05.ani"; local ani = sq_CreateAnimation("",aniPath); obj.setCurrentAnimation(ani); local lifeTime = obj.getVar("custom").getInt(2); obj.setTimeEvent(3, lifeTime, 1, false); obj.setTimeEvent(2, 1500, -1, false); break; } break; } break; case SKILL_THBYKK_FIREHIDE: switch(state){ case 20: local aniPath = "passiveobject/6_thief_bykk/kunoichi_bykk/animation/firehide/firehide_start.ani"; local ani = sq_CreateAnimation("",aniPath); obj.setCurrentAnimation(ani); break; case 21: local aniPath = "passiveobject/6_thief_bykk/kunoichi_bykk/animation/firehide/firehide_fire.ani"; local ani = sq_CreateAnimation("",aniPath); obj.setCurrentAnimation(ani); break; case 22: local aniPath = "passiveobject/6_thief_bykk/kunoichi_bykk/animation/firehide/firehide_end.ani"; local ani = sq_CreateAnimation("",aniPath); obj.setCurrentAnimation(ani); break; } break; case SKILL_THBYKK_KURVEJADE: switch(subtype){ case 1: switch(state){ case 20: local aniPath = "passiveobject/6_thief_bykk/kunoichi_bykk/animation/kurvejade/firejewelsstart_01.ani"; local ani = sq_CreateAnimation("",aniPath); obj.setCurrentAnimation(ani); break; case 21: local aniPath = "passiveobject/6_thief_bykk/kunoichi_bykk/animation/kurvejade/firejewels_01.ani"; if(obj.getVar("custom").getInt(1) > 0) aniPath = "passiveobject/6_thief_bykk/kunoichi_bykk/animation/kurvejade/firejewels_fire_02.ani"; local ani = sq_CreateAnimation("",aniPath); obj.setCurrentAnimation(ani); break; case 22: local aniPath = "passiveobject/6_thief_bykk/kunoichi_bykk/animation/kurvejade/firejewelsend_02.ani"; local ani = sq_CreateAnimation("",aniPath); obj.setCurrentAnimation(ani); break; } break; case 2: switch(state){ case 20: local aniPath = "passiveobject/6_thief_bykk/kunoichi_bykk/animation/kurvejade/darkjewelsstart_01.ani"; local ani = sq_CreateAnimation("",aniPath); obj.setCurrentAnimation(ani); break; case 21: local aniPath = "passiveobject/6_thief_bykk/kunoichi_bykk/animation/kurvejade/darkjewels_01.ani"; if(obj.getVar("custom").getInt(1) > 0) aniPath = "passiveobject/6_thief_bykk/kunoichi_bykk/animation/kurvejade/darkjewels_fire_02.ani"; local ani = sq_CreateAnimation("",aniPath); obj.setCurrentAnimation(ani); break; case 22: local aniPath = "passiveobject/6_thief_bykk/kunoichi_bykk/animation/kurvejade/darkjewelsend_02.ani"; local ani = sq_CreateAnimation("",aniPath); obj.setCurrentAnimation(ani); break; } break; case 3: switch(state){ case 20: local aniPath = "passiveobject/6_thief_bykk/kunoichi_bykk/animation/kurvejade/lightjewelsstart_01.ani"; local ani = sq_CreateAnimation("",aniPath); obj.setCurrentAnimation(ani); break; case 21: local aniPath = "passiveobject/6_thief_bykk/kunoichi_bykk/animation/kurvejade/lightjewels_01.ani"; if(obj.getVar("custom").getInt(1) > 0) aniPath = "passiveobject/6_thief_bykk/kunoichi_bykk/animation/kurvejade/lightjewels_fire_02.ani"; local ani = sq_CreateAnimation("",aniPath); obj.setCurrentAnimation(ani); break; case 22: local aniPath = "passiveobject/6_thief_bykk/kunoichi_bykk/animation/kurvejade/lightjewelsend_02.ani"; local ani = sq_CreateAnimation("",aniPath); obj.setCurrentAnimation(ani); break; } break; } break; case SKILL_THBYKK_LEAVETRACE: switch(subtype){ case SKILL_THBYKK_FLAMEBALL: switch(state){ case 20: local aniPath = "passiveobject/6_thief_bykk/kunoichi_bykk/animation/leavetrace/flameball/flameball_start_body01.ani"; local ani = sq_CreateAnimation("",aniPath); obj.setCurrentAnimation(ani); local startFrameIndex = obj.getVar("custom").getInt(1); if(startFrameIndex > 0 && state == obj.getVar("custom").getInt(0)){ local currentAni = obj.getCurrentAnimation(); currentAni.setCurrentFrameWithChildLayer(startFrameIndex); } if(sqrChr.getVar("FlameBall").get_obj_vector_size() < 1){ local speedRate = 150; local ninjutsuPhase = obj.getVar("custom").getInt(2); local lifeTime = sq_GetIntData(sqrChr, SKILL_THBYKK_FLAMEBALL, 2) * 100 / speedRate; local hitTime = sq_GetIntData(sqrChr, SKILL_THBYKK_FLAMEBALL, 0) * 100 / speedRate; local bonusRate = obj.getVar("custom").getInt(4).tofloat() / 100.0; local totalDamage = sqrChr.sq_GetBonusRateWithPassive(SKILL_THBYKK_FLAMEBALL, -1, 0, bonusRate); local totalDamage_exp = sqrChr.sq_GetBonusRateWithPassive(SKILL_THBYKK_FLAMEBALL, -1, 1, bonusRate); local sizeRate = sq_GetIntData(sqrChr, SKILL_THBYKK_FLAMEBALL, 9); if(ninjutsuPhase > 1) sizeRate = sq_GetIntData(sqrChr, SKILL_THBYKK_FLAMEBALL, 8 + ninjutsuPhase); local isBlue = 0; if(CNSquirrelAppendage.sq_IsAppendAppendage(sqrChr, APDPATH_SWORDOFKUSANAGI_BUFF)) isBlue = 1; createSkillPassive_Theif_bykk(obj,obj,PASSIVEOBJ_NUM_THIEF,0,0,0,sq_GetDirection(obj),3,SKILL_THBYKK_FLAMEBALL,1,totalDamage,totalDamage_exp,hitTime,lifeTime,sizeRate,speedRate,isBlue,0); obj.sq_PlaySound("R_TF_FLAMEBALL"); } break; case 21: local aniPath = "passiveobject/6_thief_bykk/kunoichi_bykk/animation/leavetrace/flameball/flameball_loop_body01.ani"; local ani = sq_CreateAnimation("",aniPath); obj.setCurrentAnimation(ani); local startFrameIndex = obj.getVar("custom").getInt(1); if(startFrameIndex > 0 && state == obj.getVar("custom").getInt(0)){ local currentAni = obj.getCurrentAnimation(); currentAni.setCurrentFrameWithChildLayer(startFrameIndex); } local aObj = sqrChr.getVar("FlameBall").get_obj_vector(0); if(aObj){ local colObj = sq_GetCNRDObjectToCollisionObject(aObj); // if(colObj.isExistTimeEvent(2)){ local pAni = colObj.getCurrentAnimation(); local lifeTime = colObj.getVar("custom").getInt(3) - sq_GetCurrentTime(pAni); obj.setTimeEvent(1, lifeTime, 1, false); // } // else obj.setTimeEvent(1, 1000, 1, true); } else obj.setTimeEvent(1, 1000, 1, true); break; case 22: local aniPath = "passiveobject/6_thief_bykk/kunoichi_bykk/animation/leavetrace/flameball/flameball_end_body01.ani"; local ani = sq_CreateAnimation("",aniPath); obj.setCurrentAnimation(ani); local startFrameIndex = obj.getVar("custom").getInt(1); if(startFrameIndex > 0 && state == obj.getVar("custom").getInt(0)){ local currentAni = obj.getCurrentAnimation(); currentAni.setCurrentFrameWithChildLayer(startFrameIndex); } break; } break; case SKILL_THBYKK_BIGKUNAI: switch(state){ case 20: local aniPath = "passiveobject/6_thief_bykk/kunoichi_bykk/animation/leavetrace/bigkunai/bigkunai.ani"; local ani = sq_CreateAnimation("",aniPath); obj.setCurrentAnimation(ani); local startFrameIndex = obj.getVar("custom").getInt(1); if(startFrameIndex > 0 && state == obj.getVar("custom").getInt(0)){ local currentAni = obj.getCurrentAnimation(); currentAni.setCurrentFrameWithChildLayer(startFrameIndex); } break; } break; case SKILL_THBYKK_ILUSIONSHURIKEN: switch(state){ case 20: local aniPath = "passiveobject/6_thief_bykk/kunoichi_bykk/animation/leavetrace/illusionshuriken/illusionshurikenstart.ani"; local ani = sq_CreateAnimation("",aniPath); obj.setCurrentAnimation(ani); break; case 21: local aniPath = "passiveobject/6_thief_bykk/kunoichi_bykk/animation/leavetrace/illusionshuriken/illusionshurikencreate.ani"; local ani = sq_CreateAnimation("",aniPath); obj.setCurrentAnimation(ani); if(obj.getVar("custom").getInt(0) <= 21){ obj.sq_PlaySound("R_TF_GHOSTKUNAI"); local ninjutsuPhase = obj.getVar("custom").getInt(2); local totalDamage = sqrChr.sq_GetBonusRateWithPassive(SKILL_THBYKK_ILUSIONSHURIKEN, -1, 0, 1.0); local skillLevel = sq_GetSkillLevel(sqrChr, SKILL_THBYKK_ILUSIONSHURIKEN); local createMax = sq_GetLevelData(sqrChr, SKILL_THBYKK_ILUSIONSHURIKEN, 3, skillLevel); local reboundCount = sq_GetLevelData(sqrChr, SKILL_THBYKK_ILUSIONSHURIKEN, 4, skillLevel); local bonusRate = sq_GetLevelData(sqrChr, SKILL_THBYKK_ILUSIONSHURIKEN, 6, skillLevel); local bonusRate2 = sq_GetLevelData(sqrChr, SKILL_THBYKK_ILUSIONSHURIKEN, 7, skillLevel); local speedRate = obj.getVar("custom").getInt(3); local offSet = [[50,55],[120,-40],[-47,83],[17,-62]]; local isBlue = 0; if(CNSquirrelAppendage.sq_IsAppendAppendage(obj, APDPATH_SWORDOFKUSANAGI_BUFF)) isBlue = 1; switch(ninjutsuPhase){ case 1: case 2: local create = sq_GetIntData(sqrChr, SKILL_THBYKK_ILUSIONSHURIKEN, 5); totalDamage = totalDamage * bonusRate / 100; for(local i = 0; i < create; i++){ createSkillPassive_Theif_bykk(obj,obj,PASSIVEOBJ_NUM_THIEF,offSet[i][0],offSet[i][1],0,sq_GetDirection(obj),3,SKILL_THBYKK_ILUSIONSHURIKEN,3,totalDamage,reboundCount,createMax,speedRate,isBlue,1,0,0); } break; case 3: case 4: local create = sq_GetIntData(sqrChr, SKILL_THBYKK_ILUSIONSHURIKEN, 7); local totalDamage1 = totalDamage * bonusRate / 100; local totalDamage2 = totalDamage * bonusRate2 / 100; for(local i = 0; i < create; i++){ if(i < 2) createSkillPassive_Theif_bykk(obj,obj,PASSIVEOBJ_NUM_THIEF,offSet[i][0],offSet[i][1],0,sq_GetDirection(obj),3,SKILL_THBYKK_ILUSIONSHURIKEN,3,totalDamage1,reboundCount,createMax,speedRate,isBlue,1,0,0); else createSkillPassive_Theif_bykk(obj,obj,PASSIVEOBJ_NUM_THIEF,offSet[i][0],offSet[i][1],0,sq_GetDirection(obj),3,SKILL_THBYKK_ILUSIONSHURIKEN,3,totalDamage2,reboundCount,createMax,speedRate,isBlue,1,0,0); } break; case 5: case 6: local create = sq_GetIntData(sqrChr, SKILL_THBYKK_ILUSIONSHURIKEN, 9); local totalDamage1 = totalDamage * bonusRate / 100; local totalDamage2 = totalDamage * bonusRate2 / 100; for(local i = 0; i < create; i++){ if(i < 2) createSkillPassive_Theif_bykk(obj,obj,PASSIVEOBJ_NUM_THIEF,offSet[i][0],offSet[i][1],0,sq_GetDirection(obj),3,SKILL_THBYKK_ILUSIONSHURIKEN,3,totalDamage1,reboundCount,createMax,speedRate,isBlue,1,0,0); else createSkillPassive_Theif_bykk(obj,obj,PASSIVEOBJ_NUM_THIEF,offSet[i][0],offSet[i][1],0,sq_GetDirection(obj),3,SKILL_THBYKK_ILUSIONSHURIKEN,3,totalDamage2,reboundCount,createMax,speedRate,isBlue,1,0,0); } break; } } break; case 22: local aniPath = "passiveobject/6_thief_bykk/kunoichi_bykk/animation/leavetrace/illusionshuriken/illusionshuriken.ani"; local ani = sq_CreateAnimation("",aniPath); obj.setCurrentAnimation(ani); break; case 23: local aniPath = "passiveobject/6_thief_bykk/kunoichi_bykk/animation/leavetrace/illusionshuriken/illusionshuriken2.ani"; local ani = sq_CreateAnimation("",aniPath); obj.setCurrentAnimation(ani); break; case 24: local aniPath = "passiveobject/6_thief_bykk/kunoichi_bykk/animation/leavetrace/illusionshuriken/illusionshuriken3.ani"; local ani = sq_CreateAnimation("",aniPath); obj.setCurrentAnimation(ani); break; case 25: local aniPath = "passiveobject/6_thief_bykk/kunoichi_bykk/animation/leavetrace/illusionshuriken/illusionshurikenend.ani"; local ani = sq_CreateAnimation("",aniPath); obj.setCurrentAnimation(ani); break; } local startFrameIndex = obj.getVar("custom").getInt(1); if(startFrameIndex > 0 && state == obj.getVar("custom").getInt(0)){ local currentAni = obj.getCurrentAnimation(); currentAni.setCurrentFrameWithChildLayer(startFrameIndex); } break; case SKILL_THBYKK_FLAMETORNADO: switch(state){ case 20: local aniPath = "passiveobject/6_thief_bykk/kunoichi_bykk/animation/leavetrace/flametornado/flametornado.ani"; local ani = sq_CreateAnimation("",aniPath); obj.setCurrentAnimation(ani); local startFrameIndex = obj.getVar("custom").getInt(1); if(startFrameIndex > 0 && state == obj.getVar("custom").getInt(0)){ local currentAni = obj.getCurrentAnimation(); currentAni.setCurrentFrameWithChildLayer(startFrameIndex); } break; } break; case SKILL_THBYKK_SKYROADS: switch(state){ case 20: local aniPath = "passiveobject/6_thief_bykk/kunoichi_bykk/animation/leavetrace/skyroads/skyroads_cast.ani"; local ani = sq_CreateAnimation("",aniPath); obj.setCurrentAnimation(ani); obj.sq_PlaySound("R_TF_SKYROADS"); obj.sq_PlaySound("SKYROADS_APPEAR"); break; case 21: local aniPath = "passiveobject/6_thief_bykk/kunoichi_bykk/animation/leavetrace/skyroads/skyroads_jump.ani"; local ani = sq_CreateAnimation("",aniPath); obj.setCurrentAnimation(ani); local currentAni = obj.getCurrentAnimation(); currentAni.setSpeedRate(obj.getVar("custom").getInt(3).tofloat()); currentAni = obj.getCurrentAnimation(); obj.setTimeEvent(1, currentAni.getDelaySum(false) / 24, 24, true); break; case 22: local aniPath = "passiveobject/6_thief_bykk/kunoichi_bykk/animation/leavetrace/skyroads/skyroads_throw.ani"; local ani = sq_CreateAnimation("",aniPath); obj.setCurrentAnimation(ani); break; } local startFrameIndex = obj.getVar("custom").getInt(1); if(startFrameIndex > 0 && state == obj.getVar("custom").getInt(0)){ local currentAni = obj.getCurrentAnimation(); currentAni.setCurrentFrameWithChildLayer(startFrameIndex); } break; case SKILL_THBYKK_GASOLINEFIRE: switch(state){ case 20: local aniPath = "passiveobject/6_thief_bykk/kunoichi_bykk/animation/leavetrace/gasolinefire/gasolinefire.ani"; local ani = sq_CreateAnimation("",aniPath); obj.setCurrentAnimation(ani); break; } local startFrameIndex = obj.getVar("custom").getInt(1); if(startFrameIndex > 0 && state == obj.getVar("custom").getInt(0)){ local currentAni = obj.getCurrentAnimation(); currentAni.setCurrentFrameWithChildLayer(startFrameIndex); } break; case SKILL_THBYKK_FLAMEFLOWER: switch(state){ case 20: local aniPath = "passiveobject/6_thief_bykk/kunoichi_bykk/animation/leavetrace/flameflower/flameflowercast.ani"; local ani = sq_CreateAnimation("",aniPath); obj.setCurrentAnimation(ani); obj.sq_PlaySound("R_TF_OPENFIRE"); break; case 21: local aniPath = "passiveobject/6_thief_bykk/kunoichi_bykk/animation/leavetrace/flameflower/flameflowerslasha.ani"; local ani = sq_CreateAnimation("",aniPath); obj.setCurrentAnimation(ani); local totalDamage = obj.getVar("custom").getInt(7); if(obj.getVar("markofFlame").getBool(0)){ local burnDamage = totalDamage * obj.getVar("markofFlameSet").getInt(0) / 100; obj.getVar("markofFlameSet").setInt(3, burnDamage); totalDamage = totalDamage * obj.getVar("markofFlameSet").getInt(1) / 100; } sq_SetCurrentAttackInfo(obj, sq_GetCustomAttackInfo(obj, 128)); sq_SetCurrentAttackBonusRate(sq_GetCurrentAttackInfo(obj), totalDamage); sq_AddDrawOnlyAniFromParent(obj, "passiveobject/6_thief_bykk/kunoichi_bykk/animation/leavetrace/flameflower/flameflower/slasha/fistofhellfire_fire_d.ani", 0, 1, 0); obj.sq_PlaySound("R_OPENFIRE_MOVE"); break; case 22: local aniPath = "passiveobject/6_thief_bykk/kunoichi_bykk/animation/leavetrace/flameflower/flameflowerslashb.ani"; local ani = sq_CreateAnimation("",aniPath); obj.setCurrentAnimation(ani); local totalDamage = obj.getVar("custom").getInt(7); if(obj.getVar("markofFlame").getBool(0)){ local burnDamage = totalDamage * obj.getVar("markofFlameSet").getInt(0) / 100; obj.getVar("markofFlameSet").setInt(3, burnDamage); totalDamage = totalDamage * obj.getVar("markofFlameSet").getInt(1) / 100; } sq_SetCurrentAttackInfo(obj, sq_GetCustomAttackInfo(obj, 128)); sq_SetCurrentAttackBonusRate(sq_GetCurrentAttackInfo(obj), totalDamage); sq_AddDrawOnlyAniFromParent(obj, "passiveobject/6_thief_bykk/kunoichi_bykk/animation/leavetrace/flameflower/flameflower/slashb/fistofhellfire_fire_d.ani", 0, 1, 0); obj.sq_PlaySound("R_OPENFIRE_MOVE"); break; case 23: local aniPath = "passiveobject/6_thief_bykk/kunoichi_bykk/animation/leavetrace/flameflower/flameflowerslashc.ani"; local ani = sq_CreateAnimation("",aniPath); obj.setCurrentAnimation(ani); local totalDamage = obj.getVar("custom").getInt(7); if(obj.getVar("markofFlame").getBool(0)){ local burnDamage = totalDamage * obj.getVar("markofFlameSet").getInt(0) / 100; obj.getVar("markofFlameSet").setInt(3, burnDamage); totalDamage = totalDamage * obj.getVar("markofFlameSet").getInt(1) / 100; } sq_SetCurrentAttackInfo(obj, sq_GetCustomAttackInfo(obj, 128)); sq_SetCurrentAttackBonusRate(sq_GetCurrentAttackInfo(obj), totalDamage); sq_AddDrawOnlyAniFromParent(obj, "passiveobject/6_thief_bykk/kunoichi_bykk/animation/leavetrace/flameflower/flameflower/slashc/fistofhellfire_fire_d.ani", 0, 1, 0); obj.sq_PlaySound("R_OPENFIRE_MOVE"); break; case 24: local aniPath = "passiveobject/6_thief_bykk/kunoichi_bykk/animation/leavetrace/flameflower/flameflowerslashd.ani"; local ani = sq_CreateAnimation("",aniPath); obj.setCurrentAnimation(ani); local totalDamage = obj.getVar("custom").getInt(7); if(obj.getVar("markofFlame").getBool(0)){ local burnDamage = totalDamage * obj.getVar("markofFlameSet").getInt(0) / 100; obj.getVar("markofFlameSet").setInt(3, burnDamage); totalDamage = totalDamage * obj.getVar("markofFlameSet").getInt(1) / 100; } sq_SetCurrentAttackInfo(obj, sq_GetCustomAttackInfo(obj, 128)); sq_SetCurrentAttackBonusRate(sq_GetCurrentAttackInfo(obj), totalDamage); sq_AddDrawOnlyAniFromParent(obj, "passiveobject/6_thief_bykk/kunoichi_bykk/animation/leavetrace/flameflower/flameflower/slashd/fistofhellfire_fire_d.ani", 0, 1, 0); obj.sq_PlaySound("R_OPENFIRE_MOVE"); break; case 25: local aniPath = "passiveobject/6_thief_bykk/kunoichi_bykk/animation/leavetrace/flameflower/flameflowerloopready.ani"; local ani = sq_CreateAnimation("",aniPath); obj.setCurrentAnimation(ani); obj.sq_PlaySound("TF_OPENFIRE_01"); break; case 26: local aniPath = "passiveobject/6_thief_bykk/kunoichi_bykk/animation/leavetrace/flameflower/flameflowerloop.ani"; if(obj.getVar("custom").getInt(13) > 0) aniPath = "passiveobject/6_thief_bykk/kunoichi_bykk/animation/leavetrace/flameflower/flameflowerloopblue.ani"; local ani = sq_CreateAnimation("",aniPath); obj.setCurrentAnimation(ani); local totalDamage = obj.getVar("custom").getInt(8); if(obj.getVar("markofFlame").getBool(0)){ local burnDamage = totalDamage * obj.getVar("markofFlameSet").getInt(0) / 100; obj.getVar("markofFlameSet").setInt(3, burnDamage); totalDamage = totalDamage * obj.getVar("markofFlameSet").getInt(1) / 100; } sq_SetCurrentAttackInfo(obj, sq_GetCustomAttackInfo(obj, 129)); sq_SetCurrentAttackBonusRate(sq_GetCurrentAttackInfo(obj), totalDamage); obj.setTimeEvent(1, obj.getVar("custom").getInt(9), 1, false); obj.setTimeEvent(2, obj.getVar("custom").getInt(10), -1, false); obj.sq_PlaySound("OPENFIRE_LOOP", 2333); break; case 27: local aniPath = "passiveobject/6_thief_bykk/kunoichi_bykk/animation/leavetrace/flameflower/flameflowerlast.ani"; local ani = sq_CreateAnimation("",aniPath); obj.setCurrentAnimation(ani); obj.removeAllTimeEvent(); createSkillPassive_Theif_bykk(obj,obj,PASSIVEOBJ_NUM_THIEF,0, 1, 0,sq_GetDirection(obj),3,SKILL_THBYKK_FLAMEFLOWER,1,obj.getVar("custom").getInt(11),obj.getVar("custom").getInt(12),obj.getVar("custom").getInt(13),0,0,0,0,0); obj.stopSound(2333); obj.sq_PlaySound("OPENFIRE_EXP"); break; } local startFrameIndex = obj.getVar("custom").getInt(1); if(startFrameIndex > 0 && state == obj.getVar("custom").getInt(0)){ local currentAni = obj.getCurrentAnimation(); currentAni.setCurrentFrameWithChildLayer(startFrameIndex); } break; case SKILL_THBYKK_DOOMFIELD: switch(state){ case 20: local aniPath = "passiveobject/6_thief_bykk/kunoichi_bykk/animation/leavetrace/doomfield/doomfiledmotion_start.ani"; local ani = sq_CreateAnimation("",aniPath); obj.setCurrentAnimation(ani); break; case 21: local aniPath = "passiveobject/6_thief_bykk/kunoichi_bykk/animation/leavetrace/doomfield/doomfiledmotion_end.ani"; local ani = sq_CreateAnimation("",aniPath); obj.setCurrentAnimation(ani); if(obj.getVar("DoomFieldSet").getInt(0) > 0){ sq_setCurrentAxisPos(obj, 0, obj.getVar("DoomFieldSet").getInt(0)); } break; } local startFrameIndex = obj.getVar("custom").getInt(1); if(startFrameIndex > 0 && state == obj.getVar("custom").getInt(0)){ local currentAni = obj.getCurrentAnimation(); currentAni.setCurrentFrameWithChildLayer(startFrameIndex); } break; case SKILL_THBYKK_FUUMASHURIKEN: switch(state){ case 20: local aniPath = "passiveobject/6_thief_bykk/kunoichi_bykk/animation/leavetrace/fuumashuriken/funmasuriken01_body_ready.ani"; local ani = sq_CreateAnimation("",aniPath); obj.setCurrentAnimation(ani); break; case 21: local aniPath = "passiveobject/6_thief_bykk/kunoichi_bykk/animation/leavetrace/fuumashuriken/funmasuriken02_body_throw01.ani"; local ani = sq_CreateAnimation("",aniPath); obj.setCurrentAnimation(ani); local currentAni = obj.getCurrentAnimation(); local delay = 850 * obj.getVar("custom").getInt(3) / 100; sq_SetFrameDelayTime(currentAni, 15, delay); break; case 22: local aniPath = "passiveobject/6_thief_bykk/kunoichi_bykk/animation/leavetrace/fuumashuriken/funmasuriken03_body_throw02.ani"; local ani = sq_CreateAnimation("",aniPath); obj.setCurrentAnimation(ani); break; case 23: local aniPath = "passiveobject/6_thief_bykk/kunoichi_bykk/animation/leavetrace/fuumashuriken/funmasurikentalisman_body.ani"; local ani = sq_CreateAnimation("",aniPath); obj.setCurrentAnimation(ani); break; } local startFrameIndex = obj.getVar("custom").getInt(1); if(startFrameIndex > 0 && state == obj.getVar("custom").getInt(0)){ local currentAni = obj.getCurrentAnimation(); currentAni.setCurrentFrameWithChildLayer(startFrameIndex); } break; case SKILL_THBYKK_YAMATAOROCHI: switch(state){ case 20: local aniPath = "passiveobject/6_thief_bykk/kunoichi_bykk/animation/leavetrace/yamataorochi/ymataorochicasting.ani"; local ani = sq_CreateAnimation("",aniPath); obj.setCurrentAnimation(ani); local startFrameIndex = obj.getVar("custom").getInt(1); if(startFrameIndex > 0 && state == obj.getVar("custom").getInt(0)){ local currentAni = obj.getCurrentAnimation(); currentAni.setCurrentFrameWithChildLayer(startFrameIndex); } break; } break; case SKILL_THBYKK_AMATERAS: switch(state){ case 20: local aniPath = "passiveobject/6_thief_bykk/kunoichi_bykk/animation/leavetrace/amateras/amateras.ani"; local ani = sq_CreateAnimation("",aniPath); obj.setCurrentAnimation(ani); local startFrameIndex = obj.getVar("custom").getInt(1); if(startFrameIndex > 0 && state == obj.getVar("custom").getInt(0)){ local currentAni = obj.getCurrentAnimation(); currentAni.setCurrentFrameWithChildLayer(startFrameIndex); } break; } break; } local currentAni = obj.getCurrentAnimation(); currentAni.setSpeedRate(obj.getVar("custom").getInt(3).tofloat()); break; case SKILL_THBYKK_FIREMARK: switch(subtype){ case 2: case 3: switch(state){ case 20: local aniPath = "passiveobject/6_thief_bykk/kunoichi_bykk/animation/firemark/firemarkb/firemark_markbnormal_start.ani"; if(subtype == 2) aniPath = "passiveobject/6_thief_bykk/kunoichi_bykk/animation/firemark/firemarka/firemark_markanormal_start.ani"; local ani = sq_CreateAnimation("",aniPath); obj.setCurrentAnimation(ani); break; case 21: local aniPath = "passiveobject/6_thief_bykk/kunoichi_bykk/animation/firemark/firemarkb/firemark_markbnormal_loop.ani"; if(subtype == 2) aniPath = "passiveobject/6_thief_bykk/kunoichi_bykk/animation/firemark/firemarka/firemark_markanormal_loop.ani"; local ani = sq_CreateAnimation("",aniPath); obj.setCurrentAnimation(ani); local totalDamage = obj.getVar("custom").getInt(1); sq_SetCurrentAttackInfo(obj, sq_GetCustomAttackInfo(obj, 74)); sq_SetCurrentAttackBonusRate(sq_GetCurrentAttackInfo(obj), totalDamage); local hitTime = obj.getVar("custom").getInt(3); local lifeTime = obj.getVar("custom").getInt(4); obj.setTimeEvent(2, hitTime, -1, true); obj.setTimeEvent(3, lifeTime, 1, false); break; case 22: local aniPath = "passiveobject/6_thief_bykk/kunoichi_bykk/animation/firemark/firemarkb/firemark_firebnormal.ani"; if(subtype == 2) aniPath = "passiveobject/6_thief_bykk/kunoichi_bykk/animation/firemark/firemarka/firemark_fireanormal.ani"; local ani = sq_CreateAnimation("",aniPath); obj.setCurrentAnimation(ani); local totalDamage = obj.getVar("custom").getInt(2); sq_SetCurrentAttackInfo(obj, sq_GetCustomAttackInfo(obj, 73)); sq_SetCurrentAttackBonusRate(sq_GetCurrentAttackInfo(obj), totalDamage); if(subtype == 2) sq_AddDrawOnlyAniFromParent(obj, "passiveobject/6_thief_bykk/kunoichi_bykk/animation/firemark/firemarka/firemark_marka_end.ani", 0, 1, 0); else sq_AddDrawOnlyAniFromParent(obj, "passiveobject/6_thief_bykk/kunoichi_bykk/animation/firemark/firemarkb/firemark_markb_end.ani", 0, 1, 0); obj.setTimeEvent(2, 100, 1, false); break; } break; } break; } break; case 4: break; } } function onEndCurrentAni_po_thief_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: break; case 2: switch(skillIndex){ case SKILL_BYKK_SUMMONNICOLAS: sq_SendDestroyPacketPassiveObject(obj); break; case SKILL_BYKK_NICOLASSUMMONZOMBIE: sq_SendDestroyPacketPassiveObject(obj); break; case SKILL_BYKK_NICOLASBLACKWAVE: sq_SendDestroyPacketPassiveObject(obj); break; case SKILL_BYKK_NICOLASBLACKARACHNIA: switch(subtype){ case 1: case 2: case 4: sq_SendDestroyPacketPassiveObject(obj); break; case 3: switch(state){ case 20: obj.addSetStatePacket(21, null, STATE_PRIORITY_AUTO, false, ""); break; } break; } break; case SKILL_BYKK_APPORTBALLACRE: switch(subtype){ case 1: switch(state){ case 22: case 23: case 24: case 25: case 26: case 27: case 28: case 29: case 30: case 31: case 32: case 33: case 34: case 35: case 36: case 37: case 38: obj.addSetStatePacket(21, null, STATE_PRIORITY_AUTO, false, ""); break; } break; case 2: switch(state){ case 21: sq_SendDestroyPacketPassiveObject(obj); break; } break; } break; case SKILL_BYKK_AMBITIONOFBALLACRE: switch(subtype){ case 1: switch(state){ case 20: obj.addSetStatePacket(21, null, STATE_PRIORITY_AUTO, false, ""); break; case 21: sq_SendDestroyPacketPassiveObject(obj); break; } break; case 2: sq_SendDestroyPacketPassiveObject(obj); break; } break; case SKILL_BYKK_GUILLOTINE: sq_SendDestroyPacketPassiveObject(obj); break; case SKILL_BYKK_PHANTOMSTROM: 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: switch(state){ case 20: obj.addSetStatePacket(21, null, STATE_PRIORITY_AUTO, false, ""); break; case 21: if(sqrChr) CNSquirrelAppendage.sq_RemoveAppendage(sqrChr, "appendage/character/ap_common_suck.nut"); sq_SendDestroyPacketPassiveObject(obj); break; } break; case 3: sq_SendDestroyPacketPassiveObject(obj); break; } break; case SKILL_BYKK_EXECUTIONERSLASH: sq_SendDestroyPacketPassiveObject(obj); break; case SKILL_BYKK_BALLACREADVENT: switch(subtype){ case 1: sq_SendDestroyPacketPassiveObject(obj); break; case 2: switch(state){ case 20: obj.addSetStatePacket(21, null, STATE_PRIORITY_AUTO, false, ""); break; case 21: obj.addSetStatePacket(21, null, STATE_PRIORITY_AUTO, false, ""); break; } break; case 3: local background_obj = sqrChr.getVar("Ballacreadvent_Background").get_obj_vector(0); if(background_obj){ local colObj = sq_GetCNRDObjectToCollisionObject(background_obj); colObj.addSetStatePacket(22, null, STATE_PRIORITY_AUTO, false, ""); } local ballacreObj = sqrChr.getVar("ballacreObj").get_obj_vector(0); if(ballacreObj){ local colObj = sq_GetCNRDObjectToCollisionObject(ballacreObj); colObj.addSetStatePacket(21, null, STATE_PRIORITY_IGNORE_FORCE, false, ""); } local effect_obj = sqrChr.getVar("Ballacreadvent_Effect").get_obj_vector(0); if(effect_obj) effect_obj.setValid(false); local flashScreenObj = sqrChr.getVar("flashobj").get_obj_vector(0); local pflashScreen = sq_GetCNRDObjectToFlashScreen(flashScreenObj); if(pflashScreen) pflashScreen.fadeOut(); local size = sqrChr.getVar("Ballacreadvent_Tar").get_obj_vector_size(); // print("size = "+size); if(size > 0){ for(local i = 0; i < size; i++){ local targetObj = sqrChr.getVar("Ballacreadvent_Tar").get_obj_vector(i); if(targetObj) CNSquirrelAppendage.sq_RemoveAppendage(targetObj, APDPATH_BALLACRE_HOLD); } } case 4: case 5: sq_SendDestroyPacketPassiveObject(obj); break; case 6: switch(state){ case 20: obj.addSetStatePacket(21, null, STATE_PRIORITY_AUTO, false, ""); break; case 22: sq_SendDestroyPacketPassiveObject(obj); break; } break; } break; case SKILL_BYKK_DARKSOUL: switch(subtype){ case 1: sq_SendDestroyPacketPassiveObject(obj); break; 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_DARKNAIL: sq_SendDestroyPacketPassiveObject(obj); break; case SKILL_BYKK_DARKLURE: sq_SendDestroyPacketPassiveObject(obj); break; case SKILL_BYKK_BLAMEOFDEAD: sq_SendDestroyPacketPassiveObject(obj); break; case SKILL_BYKK_LIVINGDEAD: switch(subtype){ case 1: 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: obj.addSetStatePacket(23, null, STATE_PRIORITY_AUTO, false, ""); break; case 24: 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; case 4: sq_SendDestroyPacketPassiveObject(obj); break; case 5: sq_SendDestroyPacketPassiveObject(obj); break; } break; case SKILL_BYKK_BLAMEOFDEADEX: 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: if(sqrChr && sqrChr.getState() != STATE_DIE) CNSquirrelAppendage.sq_RemoveAppendage(sqrChr, "appendage/character/ap_common_suck.nut"); sq_SendDestroyPacketPassiveObject(obj); break; } break; case SKILL_BYKK_HATEFULGHOST: switch(subtype){ case 1: switch(state){ case 21: sq_SendDestroyPacketPassiveObject(obj); break; case 22: if(obj.getVar("custom").getInt(6) > 0) obj.addSetStatePacket(sq_getRandom(24, 25), null, STATE_PRIORITY_AUTO, false, ""); else obj.addSetStatePacket(23, null, STATE_PRIORITY_AUTO, false, ""); break; case 23: obj.addSetStatePacket(20, null, STATE_PRIORITY_AUTO, false, ""); break; case 24: case 25: if(obj.getVar("custom").getInt(6) > 0) obj.addSetStatePacket(27, null, STATE_PRIORITY_AUTO, false, ""); else obj.addSetStatePacket(26, null, STATE_PRIORITY_AUTO, false, ""); break; case 26: obj.addSetStatePacket(20, null, STATE_PRIORITY_AUTO, false, ""); break; case 27: sq_SendDestroyPacketPassiveObject(obj); break; } break; case 2: sq_SendDestroyPacketPassiveObject(obj); break; case 3: switch(state){ case 20: case 21: obj.addSetStatePacket(22, null, STATE_PRIORITY_AUTO, false, ""); break; case 22: sq_SendDestroyPacketPassiveObject(obj); break; case 23: obj.addSetStatePacket(24, null, STATE_PRIORITY_AUTO, false, ""); break; case 24: sq_SendDestroyPacketPassiveObject(obj); break; } break; } break; case SKILL_BYKK_COCONOFUNDEAD: switch(subtype){ case 1: switch(state){ case 20: local lifeTime = obj.getVar("custom").getInt(2); obj.setTimeEvent(12, lifeTime, 1, false); createSkillPassive_Theif_bykk(obj,obj,PASSIVEOBJ_NUM_THIEF,0,0,0,obj.getDirection(),2,SKILL_BYKK_COCONOFUNDEAD,2,lifeTime,0,0,0,0,0,0,0); createSkillPassive_Theif_bykk(obj,obj,PASSIVEOBJ_NUM_THIEF,0,0,0,obj.getDirection(),2,SKILL_BYKK_COCONOFUNDEAD,3,lifeTime,0,0,0,0,0,0,0); obj.addSetStatePacket(21, null, STATE_PRIORITY_AUTO, false, ""); break; case 21: obj.addSetStatePacket(22, null, STATE_PRIORITY_AUTO, false, ""); break; case 22: obj.addSetStatePacket(23, null, STATE_PRIORITY_AUTO, false, ""); break; case 23: obj.addSetStatePacket(24, null, STATE_PRIORITY_AUTO, false, ""); break; case 25: 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){ CNSquirrelAppendage.sq_RemoveAppendage(targetObj, APDPATH_COCONOFUNDEAD_HOLD); } } } sq_SendDestroyPacketPassiveObject(obj); break; } break; case 2: case 3: switch(state){ case 20: obj.addSetStatePacket(21, null, STATE_PRIORITY_AUTO, false, ""); break; } break; } break; } break; case 3: switch(skillIndex){ case SKILL_THBYKK_FLAMEBALL: 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_THBYKK_BIGKUNAI: sq_SendDestroyPacketPassiveObject(obj); break; case SKILL_THBYKK_FLAMETORNADO: switch(subtype){ case 1: switch(state){ case 20: obj.addSetStatePacket(21, null, STATE_PRIORITY_AUTO, false, ""); break; } break; case 2: sq_SendDestroyPacketPassiveObject(obj); break; } break; case SKILL_THBYKK_GASOLINEFIRE: switch(subtype){ case 1: local totalDamage_disexp = obj.getVar("custom").getInt(3); local toadSizeRate = obj.getVar("custom").getInt(6); local offSetX = 0 + toadSizeRate>100?75:0; createSkillPassive_Theif_bykk(obj,obj,PASSIVEOBJ_NUM_THIEF, offSetX, 1, 0,sq_GetDirection(obj),3,SKILL_THBYKK_GASOLINEFIRE,5,totalDamage_disexp,0,0,0,0,0,0,0); break; } sq_SendDestroyPacketPassiveObject(obj); break; case SKILL_THBYKK_ILUSIONSHURIKEN: switch(subtype){ case 3: case 4: if(obj.getVar("custom").getInt(3) + 1 > obj.getVar("custom").getInt(2)){ sq_AddDrawOnlyAniFromParent(obj, "character/thief/effect/animation/3kunoichi_bykk/illusionshuriken/end_smoke.ani", 0, 1, 0); sq_SendDestroyPacketPassiveObject(obj); } else{ obj.getVar("custom").setInt(3, obj.getVar("custom").getInt(3) + 1); obj.addSetStatePacket(sq_getRandom(20, 22), null, STATE_PRIORITY_AUTO, false, ""); } break; } break; case SKILL_THBYKK_MIGAWARI: sq_SendDestroyPacketPassiveObject(obj); break; case SKILL_THBYKK_SKYROADS: sq_SendDestroyPacketPassiveObject(obj); break; case SKILL_THBYKK_FLAMEFLOWER: sq_SendDestroyPacketPassiveObject(obj); break; case SKILL_THBYKK_FLYINGSWALLOW: switch(subtype){ case 1: sq_SendDestroyPacketPassiveObject(obj); break; case 2: 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 23: sq_SendDestroyPacketPassiveObject(obj); break; } break; case 3: sq_SendDestroyPacketPassiveObject(obj); break; case 4: switch(state){ case 21: sq_SendDestroyPacketPassiveObject(obj); break; } break; case 5: sq_SendDestroyPacketPassiveObject(obj); break; case 6: sq_SendDestroyPacketPassiveObject(obj); break; case 7: switch(state){ case 21: local totalDamage = obj.getVar("custom").getInt(0); local sizeRate = obj.getVar("custom").getInt(1); createSkillPassive_Theif_bykk(sqrChr,sqrChr,PASSIVEOBJ_NUM_THIEF,0,0,-sq_GetZPos(sqrChr),obj.getDirection(),3,SKILL_THBYKK_FLYINGSWALLOW,6,totalDamage,sizeRate,1,0,0,0,0,0); local aniPath = "passiveobject/6_thief_bykk/kunoichi_bykk/animation/flyingswallow/swallow_boom2_normal.ani"; local pooledObj = sq_AddDrawOnlyAniFromParent(obj, aniPath, 0, 1, 0); local pAni = pooledObj.getCurrentAnimation(); sizeRate = sizeRate.tofloat() / 100.0; pAni.setImageRateFromOriginal(sizeRate, sizeRate); pAni.setAutoLayerWorkAnimationAddSizeRate(sizeRate); if(sqrChr && sqrChr.getState() != STATE_DIE && obj.getVar("custom").getInt(2) == 0){ local size = sqrChr.getVar("FlyingSwallowTar").get_obj_vector_size(); if(size > 0){ for(local i = 0; i < size; i++){ local targetObj = sqrChr.getVar("FlyingSwallowTar").get_obj_vector(i); if(targetObj && CNSquirrelAppendage.sq_IsAppendAppendage(targetObj, APDPATH_FLYINGSWALLOW_HOLD)) CNSquirrelAppendage.sq_RemoveAppendage(targetObj, APDPATH_FLYINGSWALLOW_HOLD); } } } sq_SendDestroyPacketPassiveObject(obj); break; } break; case 8: sq_SendDestroyPacketPassiveObject(obj); break; } break; case SKILL_THBYKK_DOOMFIELD: switch(subtype){ case 1: sq_SendDestroyPacketPassiveObject(obj); break; case 2: sq_SendDestroyPacketPassiveObject(obj); break; case 3: local totalDamage = obj.getVar("custom").getInt(0); local speedRate = obj.getVar("custom").getInt(1); local sizeRate = obj.getVar("custom").getInt(2); createSkillPassive_Theif_bykk(obj,obj,PASSIVEOBJ_NUM_THIEF, 0, 0, 0,sq_GetDirection(obj),3,SKILL_THBYKK_DOOMFIELD,4,totalDamage,speedRate,sizeRate,0,0,0,0,0); sq_SendDestroyPacketPassiveObject(obj); break; case 4: sq_SendDestroyPacketPassiveObject(obj); break; case 5: sq_SendDestroyPacketPassiveObject(obj); break; case 6: sq_SendDestroyPacketPassiveObject(obj); break; case 7: sq_SendDestroyPacketPassiveObject(obj); break; case 8: sq_SendDestroyPacketPassiveObject(obj); break; } break; case SKILL_THBYKK_YAMATAOROCHI: switch(subtype){ case 1: case 2: case 3: switch(state){ case 20: obj.addSetStatePacket(21, null, STATE_PRIORITY_AUTO, false, ""); break; case 22: sq_SendDestroyPacketPassiveObject(obj); break; } break; case 4: switch(state){ case 21: sq_SendDestroyPacketPassiveObject(obj); break; } break; } break; case SKILL_THBYKK_AMATERAS: 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 3: switch(state){ case 20: obj.addSetStatePacket(21, null, STATE_PRIORITY_AUTO, false, ""); break; } break; } break; case SKILL_THBYKK_FUUMASHURIKEN: sq_SendDestroyPacketPassiveObject(obj); break; case SKILL_THBYKK_JADEKAMAITACHI: sq_SendDestroyPacketPassiveObject(obj); break; case SKILL_THBYKK_SWORDOFKUSANAGI: switch(subtype){ case 1: if(state == 20) obj.addSetStatePacket(21, null, STATE_PRIORITY_AUTO, false, ""); break; case 2: sq_SendDestroyPacketPassiveObject(obj); break; case 3: sq_SendDestroyPacketPassiveObject(obj); break; case 5: sq_SendDestroyPacketPassiveObject(obj); break; } break; case SKILL_THBYKK_FIREHIDE: switch(state){ case 20: obj.addSetStatePacket(21, null, STATE_PRIORITY_AUTO, false, ""); break; case 22: sq_SendDestroyPacketPassiveObject(obj); break; } break; case SKILL_THBYKK_KURVEJADE: switch(state){ case 20: obj.addSetStatePacket(21, null, STATE_PRIORITY_AUTO, false, ""); break; case 22: sq_SendDestroyPacketPassiveObject(obj); break; } break; case SKILL_THBYKK_LEAVETRACE: switch(subtype){ case SKILL_THBYKK_FLAMEBALL: switch(state){ case 20: obj.addSetStatePacket(21, null, STATE_PRIORITY_AUTO, false, ""); break; case 22: sq_SendDestroyPacketPassiveObject(obj); break; } break; case SKILL_THBYKK_BIGKUNAI: sq_SendDestroyPacketPassiveObject(obj); break; case SKILL_THBYKK_ILUSIONSHURIKEN: 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: case 23: case 24: // print(obj.getVar("custom").getInt(5)+",,,"+obj.getVar("custom").getInt(6)); if(obj.getVar("custom").getInt(5) + 1 >= obj.getVar("custom").getInt(6)){ obj.addSetStatePacket(25, null, STATE_PRIORITY_AUTO, false, ""); } else{ obj.getVar("custom").setInt(5, obj.getVar("custom").getInt(5) + 1); if(state == 24) obj.addSetStatePacket(22, null, STATE_PRIORITY_AUTO, false, ""); else obj.addSetStatePacket(state + 1, null, STATE_PRIORITY_AUTO, false, ""); } break; case 25: // sq_AddDrawOnlyAniFromParent(obj, "passiveobject/6_thief_bykk/kunoichi_bykk/animation/kunoichitrace/leavetracesfire_04.ani", 0, 1, 0); sq_SendDestroyPacketPassiveObject(obj); break; } break; case SKILL_THBYKK_FLAMETORNADO: sq_SendDestroyPacketPassiveObject(obj); break; case SKILL_THBYKK_SKYROADS: 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; case SKILL_THBYKK_GASOLINEFIRE: sq_SendDestroyPacketPassiveObject(obj); break; case SKILL_THBYKK_FLAMEFLOWER: switch(state){ case 20: obj.addSetStatePacket(21, null, STATE_PRIORITY_AUTO, false, ""); break; case 21: case 22: case 23: case 24: if(obj.getVar("custom").getInt(5) + 1 >= obj.getVar("custom").getInt(6)){ obj.addSetStatePacket(25, null, STATE_PRIORITY_AUTO, false, ""); } else{ obj.getVar("custom").setInt(5, obj.getVar("custom").getInt(5) + 1); if(state == 24) obj.addSetStatePacket(21, null, STATE_PRIORITY_AUTO, false, ""); else obj.addSetStatePacket(state + 1, null, STATE_PRIORITY_AUTO, false, ""); } break; case 25: obj.addSetStatePacket(26, null, STATE_PRIORITY_AUTO, false, ""); break; case 27: sq_SendDestroyPacketPassiveObject(obj); break; } break; case SKILL_THBYKK_DOOMFIELD: switch(state){ case 20: obj.addSetStatePacket(21, null, STATE_PRIORITY_AUTO, false, ""); break; case 21: sq_SendDestroyPacketPassiveObject(obj); break; } break; case SKILL_THBYKK_FUUMASHURIKEN: switch(state){ case 20: if(false) obj.addSetStatePacket(23, null, STATE_PRIORITY_AUTO, false, ""); else 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; case 23: sq_SendDestroyPacketPassiveObject(obj); break; } break; case SKILL_THBYKK_YAMATAOROCHI: sq_SendDestroyPacketPassiveObject(obj); break; case SKILL_THBYKK_AMATERAS: sq_SendDestroyPacketPassiveObject(obj); break; } break; case SKILL_THBYKK_DEITIESREBIRTH: if(subtype == 2){ local totalDamage = obj.getVar("custom").getInt(0); local sizeRate = obj.getVar("custom").getInt(1); local speedRate = obj.getVar("custom").getInt(2); createSkillPassive_Theif_bykk(obj,obj,PASSIVEOBJ_NUM_THIEF, 0, 0, 0,sq_GetDirection(obj),3,SKILL_THBYKK_DEITIESREBIRTH,3,totalDamage,sizeRate,speedRate,0,0,0,0,0); } sq_SendDestroyPacketPassiveObject(obj); break; case SKILL_THBYKK_FIREMARK: switch(subtype){ case 2: case 3: switch(state){ case 20: obj.addSetStatePacket(21, null, STATE_PRIORITY_AUTO, false, ""); break; case 22: local targetObj = obj.getVar("tar").get_obj_vector(0); if(targetObj && targetObj.getState() != STATE_DIE){ local activeObj = sq_GetCNRDObjectToActiveObject(targetObj); activeObj.getVar("firemark").setBool(0, false); } sq_SendDestroyPacketPassiveObject(obj); break; } break; } break; case 255: if(subtype == 2) sq_SendDestroyPacketPassiveObject(obj); break; } break; case 4: break; } }