Rindro-Sqr/user/114.66.51.249/2_atpriest_6.c

2265 lines
110 KiB
C

function setState_po_atpriest_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:
switch(skillIndex){
case SKILL_BYKK_VIOLENTASSAULT:
break;
case SKILL_BYKK_HEAVYSIN:
break;
case SKILL_BYKK_TALISMANOFLIGHTNING:
break;
case SKILL_BYKK_HOLYFLASH:
switch(state){
case 20:
local ani = sq_CreateAnimation("","passiveobject/atpriest_bykk/animation/atholyflash/holyflash_ball01.ani");
obj.setCurrentAnimation(ani);
sq_SetCurrentAttackInfo(obj, sq_GetCustomAttackInfo(obj, 1));
obj.setTimeEvent(0, 20, 30, true);
break;
case 21:
local ani = sq_CreateAnimation("","passiveobject/atpriest_bykk/animation/atholyflash/holyflash_explosion01.ani");
obj.setCurrentAnimation(ani);
obj.removeAllTimeEvent();
local totalDamage = obj.getVar("custom").getInt(10);
local sizeRate = obj.getVar("custom").getInt(11);
sq_SetCurrentAttackInfo(obj, sq_GetCustomAttackInfo(obj, 2));
sq_SetCurrentAttackBonusRate(sq_GetCurrentAttackInfo(obj), totalDamage);
if(sizeRate > 100){
local currentAni = obj.getCurrentAnimation();
sizeRate = sizeRate.tofloat() / 100.0;
currentAni.setImageRateFromOriginal(sizeRate, sizeRate);
currentAni.setAutoLayerWorkAnimationAddSizeRate(sizeRate);
sq_SetAttackBoundingBoxSizeRate(currentAni, sizeRate, sizeRate, sizeRate);
}
break;
}
break;
}
break;
case 1:
switch(skillIndex){
case SKILL_BYKK_SPEAROFVICTORY:
switch(state){
case 20:
local aniPath = "passiveobject/atpriest_bykk/animation/1_atcrusader/animation/atspearofvictory/spear.ani";
if(obj.getVar("custom").getInt(13) > 0) aniPath = "passiveobject/atpriest_bykk/animation/1_atcrusader/animation/atspearofvictory/spearchargeokshot.ani";
local ani = sq_CreateAnimation("", aniPath);
obj.setCurrentAnimation(ani);
sq_SetCurrentAttackInfo(obj, sq_GetCustomAttackInfo(obj, 27));
local power = obj.getVar("custom").getInt(10);
sq_SetCurrentAttackBonusRate(sq_GetCurrentAttackInfo(obj), power);
obj.setTimeEvent(0, 5, 30, true);
break;
case 21:
local aniPath = "passiveobject/atpriest_bykk/animation/1_atcrusader/animation/atspearofvictory/landspear.ani";
if(obj.getVar("custom").getInt(13) > 0) aniPath = "passiveobject/atpriest_bykk/animation/1_atcrusader/animation/atspearofvictory/spearchargeokhit.ani";
local ani = sq_CreateAnimation("", aniPath);
obj.setCurrentAnimation(ani);
sq_AddDrawOnlyAniFromParent(obj, "passiveobject/atpriest_bykk/animation/1_atcrusader/animation/atspearofvictory/landeffect.ani", 0, 0, 0);
obj.setTimeEvent(1, obj.getVar("custom").getInt(12), 1, false);
break;
case 22:
local ani = sq_CreateAnimation("","passiveobject/atpriest_bykk/animation/1_atcrusader/animation/atspearofvictory/boom_normal.ani");
obj.setCurrentAnimation(ani);
sq_SetCurrentAttackInfo(obj, sq_GetCustomAttackInfo(obj, 28));
local power_exp = obj.getVar("custom").getInt(11);
sq_SetCurrentAttackBonusRate(sq_GetCurrentAttackInfo(obj), power_exp);
break;
}
break;
case SKILL_BYKK_HOLYLIGHT:
switch(state){
case 20:
local aniPath = "character/swordman/effect/animation/1_atpriest_bykk/atholylight/barrier/barrierstart.ani";
local ani = sq_CreateAnimation("", aniPath);
obj.setCurrentAnimation(ani);
break;
case 21:
local aniPath = "character/swordman/effect/animation/1_atpriest_bykk/atholylight/barrier/barrierloop.ani";
local ani = sq_CreateAnimation("", aniPath);
obj.setCurrentAnimation(ani);
obj.setTimeEvent(0, obj.getVar("custom").getInt(11) - 1000, 1, false);
break;
case 22:
sq_AddDrawOnlyAniFromParent(obj, "character/swordman/effect/animation/1_atpriest_bykk/atholylight/barrier/barrierend_barrierend.ani", 0, 0, 0);
local ani = sq_CreateAnimation("","passiveobject/atpriest_bykk/animation/1_atcrusader/animation/atholylight/barrierend_explosion.ani");
obj.setCurrentAnimation(ani);
sq_SetCurrentAttackInfo(obj, sq_GetCustomAttackInfo(obj, 22));
local power = obj.getVar("custom").getInt(10);
sq_SetCurrentAttackBonusRate(sq_GetCurrentAttackInfo(obj), power);
break;
}
break;
case SKILL_BYKK_SAINTFLASH:
switch(state){
case 20:
local aniPath = "passiveobject/atpriest_bykk/animation/1_atcrusader/animation/atsaintwall/saintwall_shield_dodge.ani";
local ani = sq_CreateAnimation("", aniPath);
obj.setCurrentAnimation(ani);
sq_SetCurrentAttackInfo(obj, sq_GetCustomAttackInfo(obj, 36));
local power = obj.getVar("custom").getInt(10);
sq_SetCurrentAttackBonusRate(sq_GetCurrentAttackInfo(obj), power);
local pAni = obj.getCurrentAnimation();
local delay = pAni.getDelaySum(false);
obj.getVar("custom").setInt(12, delay);
obj.setTimeEvent(0, delay / 31, 30, true);
break;
case 21:
local ani = sq_CreateAnimation("","passiveobject/atpriest_bykk/animation/1_atcrusader/animation/atsaintwall/saintwall_shieldexpl.ani");
obj.setCurrentAnimation(ani);
sq_SetCurrentAttackInfo(obj, sq_GetCustomAttackInfo(obj, 37));
local power_exp = obj.getVar("custom").getInt(11);
sq_SetCurrentAttackBonusRate(sq_GetCurrentAttackInfo(obj), power_exp);
sq_flashScreen(obj,80,0,0,25, sq_RGB(255,228,196), GRAPHICEFFECT_NONE, ENUM_DRAWLAYER_BOTTOM);
sq_SetShake(obj, 4, 200);
break;
}
local sizeRate = obj.getVar("custom").getInt(13);
if(sizeRate > 100){
local currentAni = obj.getCurrentAnimation();
sizeRate = sizeRate.tofloat() / 100.0;
currentAni.setImageRateFromOriginal(sizeRate, sizeRate);
currentAni.setAutoLayerWorkAnimationAddSizeRate(sizeRate);
sq_SetAttackBoundingBoxSizeRate(currentAni, sizeRate, sizeRate, sizeRate);
}
break;
case SKILL_BYKK_ARIAOFCOURAGE:
local aniPath = ["character/swordman/effect/animation/1_atpriest_bykk/atariaofcourage/floor/floorstart_magicc_01.ani", "character/swordman/effect/animation/1_atpriest_bykk/atariaofcourage/floor/floorloop_magicc_01.ani", "character/swordman/effect/animation/1_atpriest_bykk/atariaofcourage/floor/floorend_magicc_01.ani"];
if(subtype == 2 || subtype == 5) aniPath = ["character/swordman/effect/animation/1_atpriest_bykk/atariaofcourage/floor/lightstart_lineglow.ani", "character/swordman/effect/animation/1_atpriest_bykk/atariaofcourage/floor/lightloop_lineglow.ani", "character/swordman/effect/animation/1_atpriest_bykk/atariaofcourage/floor/lightend_lineglow.ani"];
else if(subtype == 3 || subtype == 6) aniPath = ["character/swordman/effect/animation/1_atpriest_bykk/atariaofcourage/musicpaper/line_red_in.ani"];
else if(subtype == 4) aniPath = ["character/swordman/effect/animation/1_atpriest_bykk/atariaofcourage/floor/floorstart_magicc_01.ani", "character/swordman/effect/animation/1_atpriest_bykk/atariaofcourage/floor/floorloop_magicc_01atk.ani", "character/swordman/effect/animation/1_atpriest_bykk/atariaofcourage/floor/floorend_magicc_01.ani"];
local ani = sq_CreateAnimation("", aniPath[state - 20]);
obj.setCurrentAnimation(ani);
if(subtype == 4 && state == 21){
local power = obj.getVar("custom").getInt(11);
sq_SetCurrentAttackInfo(obj, sq_GetCustomAttackInfo(obj, 38));
sq_SetCurrentAttackBonusRate(sq_GetCurrentAttackInfo(obj), power);
local hitTime = obj.getVar("custom").getInt(12);
local hitMax = obj.getVar("custom").getInt(13);
obj.sq_SetMaxHitCounterPerObject(hitMax);
obj.setTimeEvent(1, hitTime, -1, true);
local lifeTime = obj.getVar("custom").getInt(14);
obj.setTimeEvent(2, lifeTime, 1, false);
}
if(subtype == 5){
local currentAni = obj.getCurrentAnimation();
if(state == 21){
currentAni.addLayerAnimation(10001,sq_CreateAnimation("","character/swordman/effect/animation/1_atpriest_bykk/atariaofcourage/michael/enemysingle01_loop19.ani"),true);
obj.setTimeEvent(2, obj.getVar("custom").getInt(11), 1, false);
}
else if(state == 22){
currentAni.addLayerAnimation(10001,sq_CreateAnimation("","character/swordman/effect/animation/1_atpriest_bykk/atariaofcourage/michael/enemysingle02_end12.ani"),true);
}
}
local sizeRate = obj.getVar("custom").getInt(10);
if(sizeRate > 100){
sizeRate = sizeRate.tofloat() / 100.0;
local currentAni = obj.getCurrentAnimation();
currentAni.setImageRateFromOriginal(sizeRate, sizeRate);
currentAni.setAutoLayerWorkAnimationAddSizeRate(sizeRate);
sq_SetAttackBoundingBoxSizeRate(currentAni, sizeRate, sizeRate, sizeRate);
}
break;
case SKILL_BYKK_ARIAOFREGENERATION:
local aniPath = ["character/swordman/effect/animation/1_atpriest_bykk/atariaofregeneration/floor/floorstart_1.ani", "character/swordman/effect/animation/1_atpriest_bykk/atariaofregeneration/floor/floorloop_1.ani", "character/swordman/effect/animation/1_atpriest_bykk/atariaofregeneration/floor/floorend_1.ani"];
if(subtype == 2 || subtype == 5) aniPath = ["character/swordman/effect/animation/1_atpriest_bykk/atariaofregeneration/floor/lightstart_lineglow_02.ani", "character/swordman/effect/animation/1_atpriest_bykk/atariaofregeneration/floor/lightloop_a1.ani", "character/swordman/effect/animation/1_atpriest_bykk/atariaofregeneration/floor/lightend_1.ani"];
else if(subtype == 3 || subtype == 6) aniPath = ["character/swordman/effect/animation/1_atpriest_bykk/atariaofregeneration/musicpaper/line_red_in.ani"];
local ani = sq_CreateAnimation("", aniPath[state - 20]);
obj.setCurrentAnimation(ani);
if(subtype == 4 && state == 21){
local lifeTime = obj.getVar("custom").getInt(11);
obj.setTimeEvent(2, lifeTime, 1, false);
obj.setTimeEvent(3, 1000, -1, true);
}
if(subtype == 5){
local currentAni = obj.getCurrentAnimation();
switch(state){
case 20: currentAni.addLayerAnimation(10001,sq_CreateAnimation("","character/swordman/effect/animation/1_atpriest_bykk/atariaofregeneration/uriel/urielstart_body.ani"),true); break;
case 21: currentAni.addLayerAnimation(10001,sq_CreateAnimation("","character/swordman/effect/animation/1_atpriest_bykk/atariaofregeneration/uriel/urielloop_body.ani"),true); obj.setTimeEvent(2, obj.getVar("custom").getInt(11), 1, false); break;
case 22: currentAni.addLayerAnimation(10001,sq_CreateAnimation("","character/swordman/effect/animation/1_atpriest_bykk/atariaofregeneration/uriel/urielend_body.ani"),true); break;
}
}
local sizeRate = obj.getVar("custom").getInt(10);
if(sizeRate > 100){
sizeRate = sizeRate.tofloat() / 100.0;
local currentAni = obj.getCurrentAnimation();
currentAni.setImageRateFromOriginal(sizeRate, sizeRate);
currentAni.setAutoLayerWorkAnimationAddSizeRate(sizeRate);
}
break;
case SKILL_BYKK_HOLYCIRCLET:
switch(state){
case 20:
local aniPath = "passiveobject/atpriest_bykk/animation/1_atcrusader/animation/atholycirclet/holycirclet_a_godray.ani";
local ani = sq_CreateAnimation("", aniPath);
obj.setCurrentAnimation(ani);
local currentAni = obj.getCurrentAnimation();
currentAni.addLayerAnimation(-1,sq_CreateAnimation("","passiveobject/atpriest_bykk/animation/1_atcrusader/animation/atholycirclet/holycirclet_a_back_ring03.ani"),true);
sq_SetCurrentAttackInfo(obj, sq_GetCustomAttackInfo(obj, 20));
local power = obj.getVar("custom").getInt(10);
sq_SetCurrentAttackBonusRate(sq_GetCurrentAttackInfo(obj), power);
obj.getVar("target").clear_obj_vector();
break;
case 21:
local aniPath = "passiveobject/atpriest_bykk/animation/1_atcrusader/animation/atholycirclet/holycirclet_b_hit.ani";
local ani = sq_CreateAnimation("", aniPath);
obj.setCurrentAnimation(ani);
local currentAni = obj.getCurrentAnimation();
currentAni.addLayerAnimation(-1,sq_CreateAnimation("","passiveobject/atpriest_bykk/animation/1_atcrusader/animation/atholycirclet/holycirclet_b_back_ring01.ani"),true);
local lifeTime = obj.getVar("custom").getInt(13);
local subTime = obj.getVar("custom").getInt(14);
obj.setTimeEvent(1, subTime, 1, false);//subtime
obj.setTimeEvent(2, lifeTime, 1, false);//lifetime
local size = obj.getVar("target").get_obj_vector_size();
if(size > 0){
for(local i = 0; i < size; i++){
local targetObj = obj.getVar("target").get_obj_vector(i);
if(targetObj){
local AddAppendage = CNSquirrelAppendage.sq_GetAppendage(targetObj,APDPATH_HOLYCIRCLET);
if(AddAppendage){
AddAppendage.sq_SetValidTime(lifeTime + 100);
sq_MoveToAppendageForce(targetObj, obj, obj, 0, -20, sq_GetZPos(targetObj)-70, subTime, true, AddAppendage);
}
}
}
}
break;
case 22:
local aniPath = "passiveobject/atpriest_bykk/animation/1_atcrusader/animation/atholycirclet/holycirclet_c_explosion02.ani";
local ani = sq_CreateAnimation("", aniPath);
obj.setCurrentAnimation(ani);
local currentAni = obj.getCurrentAnimation();
currentAni.addLayerAnimation(-1,sq_CreateAnimation("","passiveobject/atpriest_bykk/animation/1_atcrusader/animation/atholycirclet/holycirclet_c_back_explosion02.ani"),true);
sq_SetCurrentAttackInfo(obj, sq_GetCustomAttackInfo(obj, 21));
local power = obj.getVar("custom").getInt(11);
sq_SetCurrentAttackBonusRate(sq_GetCurrentAttackInfo(obj), power);
break;
}
local sizeRate = obj.getVar("custom").getInt(15);
if(sizeRate > 100){
sizeRate = sizeRate.tofloat() / 100.0;
local currentAni = obj.getCurrentAnimation();
currentAni.setImageRateFromOriginal(sizeRate, sizeRate);
currentAni.setAutoLayerWorkAnimationAddSizeRate(sizeRate);
}
break;
case SKILL_BYKK_GRANDCROSSCRASH:
switch(subtype){
case 2:
switch(state){
case 20:
local aniPath = "passiveobject/atpriest_bykk/animation/1_atcrusader/animation/atgrandcrosscrash/atgrandcrosscrash_crack_ready.ani";
local ani = sq_CreateAnimation("", aniPath);
obj.setCurrentAnimation(ani);
break;
case 21:
local aniPath = "passiveobject/atpriest_bykk/animation/1_atcrusader/animation/atgrandcrosscrash/atgrandcrosscrash_crack_loop.ani";
local ani = sq_CreateAnimation("", aniPath);
obj.setCurrentAnimation(ani);
sq_SetCurrentAttackInfo(obj, sq_GetCustomAttackInfo(obj, 18));
obj.sq_SetMaxHitCounterPerObject(1);
local lifeTime = obj.getVar("custom").getInt(10);
obj.setTimeEvent(1, lifeTime, 1, false);
obj.setTimeEvent(2, 1000, -1, true);
break;
case 22:
local aniPath = "passiveobject/atpriest_bykk/animation/1_atcrusader/animation/atgrandcrosscrash/atgrandcrosscrash_crack_finish.ani";
local ani = sq_CreateAnimation("", aniPath);
obj.setCurrentAnimation(ani);
break;
}
break;
}
break;
case SKILL_BYKK_CRUXOFVICTORIA:
switch(subtype){
case 1:
switch(state){
case 20:
local aniPath = "passiveobject/atpriest_bykk/animation/1_atcrusader/animation/cruxofvictoria/covnewfinishstart_cross_01.ani";
local ani = sq_CreateAnimation("", aniPath);
obj.setCurrentAnimation(ani);
sq_SetCurrentAttackInfo(obj, sq_GetCustomAttackInfo(obj, 35));
local power = obj.getVar("custom").getInt(10);
sq_SetCurrentAttackBonusRate(sq_GetCurrentAttackInfo(obj), power);
obj.setTimeEvent(1, obj.getVar("custom").getInt(12), -1, false);
obj.sq_PlaySound("CRUXVICTORIA_JUMP");
break;
case 21:
local aniPath = "passiveobject/atpriest_bykk/animation/1_atcrusader/animation/cruxofvictoria/covnewfinishloop_cross_01.ani";
local ani = sq_CreateAnimation("", aniPath);
obj.setCurrentAnimation(ani);
break;
case 22:
obj.stopTimeEvent(1);
local aniPath = "passiveobject/atpriest_bykk/animation/1_atcrusader/animation/cruxofvictoria/covnewfinishend_eff_23.ani";
local ani = sq_CreateAnimation("", aniPath);
obj.setCurrentAnimation(ani);
sq_SetCurrentAttackInfo(obj, sq_GetCustomAttackInfo(obj, 34));
local power = obj.getVar("custom").getInt(11);
sq_SetCurrentAttackBonusRate(sq_GetCurrentAttackInfo(obj), power);
obj.sq_PlaySound("CRUXVICTORIA_END");
break;
}
break;
}
break;
case SKILL_BYKK_PROTECTIONOFURIEL:
switch(state){
case 20:
local aniPath = "passiveobject/atpriest_bykk/animation/1_atcrusader/animation/atprotectionofuriel/protection/startfloor_magic.ani";
local ani = sq_CreateAnimation("", aniPath);
obj.setCurrentAnimation(ani);
break;
case 21:
local aniPath = "passiveobject/atpriest_bykk/animation/1_atcrusader/animation/atprotectionofuriel/protection/loopfloor_magic.ani";
local ani = sq_CreateAnimation("", aniPath);
obj.setCurrentAnimation(ani);
sq_SetCurrentAttackInfo(obj, sq_GetCustomAttackInfo(obj, 25));
sq_SetCurrentAttackBonusRate(sq_GetCurrentAttackInfo(obj), obj.getVar("custom").getInt(10) / 10);
obj.setTimeEvent(1, obj.getVar("custom").getInt(11), 1, false);
obj.setTimeEvent(2, obj.getVar("custom").getInt(12), -1, false);
obj.setTimeEvent(3, 1000, -1, false);
break;
case 22:
obj.removeAllTimeEvent();
local aniPath = "passiveobject/atpriest_bykk/animation/1_atcrusader/animation/atprotectionofuriel/protection/endfloor_magic.ani";
local ani = sq_CreateAnimation("", aniPath);
obj.setCurrentAnimation(ani);
break;
}
local sizeRate = obj.getVar("custom").getInt(13);
local currentAni = obj.getCurrentAnimation();
switch(state){
case 20: currentAni.addLayerAnimation(6,sq_CreateAnimation("","passiveobject/atpriest_bykk/animation/1_atcrusader/animation/atprotectionofuriel/protection/startfront_orablock.ani"),true); break;
case 21: currentAni.addLayerAnimation(6,sq_CreateAnimation("","passiveobject/atpriest_bykk/animation/1_atcrusader/animation/atprotectionofuriel/protection/loopfront_orablock_01.ani"),true); break;
case 22: currentAni.addLayerAnimation(6,sq_CreateAnimation("","passiveobject/atpriest_bykk/animation/1_atcrusader/animation/atprotectionofuriel/protection/endfront_twing.ani"),true); break;
}
if(sizeRate > 100){
sizeRate = sizeRate.tofloat() / 100.0;
currentAni.setImageRateFromOriginal(sizeRate, sizeRate);
currentAni.setAutoLayerWorkAnimationAddSizeRate(sizeRate);
sq_SetAttackBoundingBoxSizeRate(currentAni, sizeRate, sizeRate, sizeRate);
}
switch(state){
case 20: currentAni.addLayerAnimation(1,sq_CreateAnimation("","passiveobject/atpriest_bykk/animation/1_atcrusader/animation/atprotectionofuriel/uriel/urielstart_body.ani"),true); break;
case 21: currentAni.addLayerAnimation(1,sq_CreateAnimation("","passiveobject/atpriest_bykk/animation/1_atcrusader/animation/atprotectionofuriel/uriel/urielloop_body.ani"),true); break;
case 22: currentAni.addLayerAnimation(1,sq_CreateAnimation("","passiveobject/atpriest_bykk/animation/1_atcrusader/animation/atprotectionofuriel/uriel/urielend_body.ani"),true); break;
}
break;
case SKILL_BYKK_BLESSOFANGEL:
switch(subtype){
case 1:
switch(state){
case 20:
local ani = sq_CreateAnimation("", "character/swordman/effect/animation/1_atpriest_bykk/atblessofangel/blessofangel_phase2start_wingoutglow.ani");
obj.setCurrentAnimation(ani);
sq_AddDrawOnlyAniFromParent(obj, "character/swordman/effect/animation/1_atpriest_bykk/atblessofangel/blessofangel_phase2starteffect_shock.ani", 0, 0, 0);
break;
case 21:
local ani = sq_CreateAnimation("", "character/swordman/effect/animation/1_atpriest_bykk/atblessofangel/blessofangel_phase2loop_angelbodyloopdodge.ani");
obj.setCurrentAnimation(ani);
local lifeTime = obj.getVar("custom").getInt(11);
obj.setTimeEvent(1, lifeTime, 1, false);
break;
case 22:
local ani = sq_CreateAnimation("", "character/swordman/effect/animation/1_atpriest_bykk/atblessofangel/blessofangel_phase2end_endeffect.ani");
obj.setCurrentAnimation(ani);
break;
}
break;
}
break;
case SKILL_BYKK_MIRACLECHINE:
switch(subtype){
case 1:
switch(state){
case 20:
local aniPath = "character/swordman/effect/animation/1_atpriest_bykk/atmiracleshine/userhealing01_loop06.ani";
local ani = sq_CreateAnimation("", aniPath);
obj.setCurrentAnimation(ani);
obj.setTimeEvent(1, obj.getVar("custom").getInt(10) * obj.getVar("custom").getInt(11), 1, false);
obj.setTimeEvent(2, obj.getVar("custom").getInt(10), obj.getVar("custom").getInt(11), true);
break;
case 21:
local aniPath = "character/swordman/effect/animation/1_atpriest_bykk/atmiracleshine/userhealing02_end02.ani";
local ani = sq_CreateAnimation("", aniPath);
obj.setCurrentAnimation(ani);
break;
}
break;
case 2:
switch(state){
case 20:
local aniPath = "character/swordman/effect/animation/1_atpriest_bykk/atmiracleshine/enemyattack01_loop06.ani";
local ani = sq_CreateAnimation("", aniPath);
obj.setCurrentAnimation(ani);
break;
case 21:
local aniPath = "character/swordman/effect/animation/1_atpriest_bykk/atmiracleshine/enemyattack02_end02.ani";
local ani = sq_CreateAnimation("", aniPath);
obj.setCurrentAnimation(ani);
break;
}
break;
case 10:
switch(state){
case 20:
local aniPath = "passiveobject/atpriest_bykk/animation/1_atcrusader/animation/atmiracleshine/michael_start_01.ani";
local ani = sq_CreateAnimation("", aniPath);
obj.setCurrentAnimation(ani);
local pooledObj = createOnlyDrawObject_ATPriest_bykk(obj,"passiveobject/atpriest_bykk/animation/1_atcrusader/animation/atmiracleshine/miracleshinelightarea.ani",true,obj.getDirection(),sq_GetXPos(obj),sq_GetYPos(obj),0,ENUM_DRAWLAYER_BOTTOM);
local sizeRate = 1.33;
local currentAni = pooledObj.getCurrentAnimation();
currentAni.setImageRateFromOriginal(sizeRate, sizeRate);
currentAni.setAutoLayerWorkAnimationAddSizeRate(sizeRate);
obj.getVar("eff").clear_obj_vector();
obj.getVar("eff").push_obj_vector(pooledObj);
break;
case 21:
local aniPath = "passiveobject/atpriest_bykk/animation/1_atcrusader/animation/atmiracleshine/michael_loop_01.ani";
local ani = sq_CreateAnimation("", aniPath);
obj.setCurrentAnimation(ani);
sq_SetCurrentAttackInfo(obj, sq_GetCustomAttackInfo(obj, 18));
// sq_SetCurrentAttackPower(sq_GetCurrentAttackInfo(obj), obj.getVar("custom").getInt(13));
obj.setTimeEvent(10, 3000, 1, false);
local hitTime = obj.getVar("custom").getInt(10);
local power = obj.getVar("custom").getInt(13);
obj.setTimeEvent(11, hitTime, -1, true);
createSkillPassive_ATPriest_bykk(sqrChr,obj,PASSIVEOBJ_BYKK_ATPRIEST,0,0,0,obj.getDirection(),1,SKILL_BYKK_MIRACLECHINE,11,hitTime,power,3000,0,0,0,0,0);
break;
case 22:
obj.removeAllTimeEvent();
local aniPath = "passiveobject/atpriest_bykk/animation/1_atcrusader/animation/atmiracleshine/michael_end_12.ani";
local ani = sq_CreateAnimation("", aniPath);
obj.setCurrentAnimation(ani);
local effectObj = obj.getVar("eff").get_obj_vector(0);
if(effectObj) effectObj.setValid(false);
break;
}
break;
}
break;
case SKILL_BYKK_CRUXOFSHAPIEL:
switch(subtype){
case 1:
switch(state){
case 20:
local ani = sq_CreateAnimation("", "passiveobject/atpriest_bykk/animation/1_atcrusader/animation/atcruxofshapiel/cross/ready/cruxofshapielcrossreadytop_00.ani");
obj.setCurrentAnimation(ani);
break;
case 21:
local ani = sq_CreateAnimation("", "passiveobject/atpriest_bykk/animation/1_atcrusader/animation/atcruxofshapiel/cross/fire/cruxofshapielcrossfiretop_00.ani");
obj.setCurrentAnimation(ani);
local power_fall = obj.getVar("custom").getInt(10);
local power = obj.getVar("custom").getInt(11);
local power_exp = obj.getVar("custom").getInt(12);
local hitTime = obj.getVar("custom").getInt(13);
createSkillPassive_ATPriest_bykk(obj,obj,PASSIVEOBJ_BYKK_ATPRIEST,0,0,0,obj.getDirection(),1,SKILL_BYKK_CRUXOFSHAPIEL,2,power_fall,power,power_exp,hitTime,0,0,0,0);
break;
case 22:
local ani = sq_CreateAnimation("", "passiveobject/atpriest_bykk/animation/1_atcrusader/animation/atcruxofshapiel/cross/loop/cruxofshapielcrosslooptop_00.ani");
obj.setCurrentAnimation(ani);
local lifeTime = obj.getVar("custom").getInt(14);
obj.setTimeEvent(1, lifeTime, 1, false);
break;
case 23:
local ani = sq_CreateAnimation("", "passiveobject/atpriest_bykk/animation/1_atcrusader/animation/atcruxofshapiel/cross/fire/cruxofshapielcrossfiretop_00.ani");
obj.setCurrentAnimation(ani);
break;
}
break;
case 2:
switch(state){
case 20:
local ani = sq_CreateAnimation("", "passiveobject/atpriest_bykk/animation/1_atcrusader/animation/atcruxofshapiel/cruxofshapielfall.ani");
obj.setCurrentAnimation(ani);
local currentAni = obj.getCurrentAnimation();
currentAni.addLayerAnimation(0,sq_CreateAnimation("","passiveobject/atpriest_bykk/animation/1_atcrusader/animation/atcruxofshapiel/cross/fire/cruxofshapielcrossfire_00.ani"),true);
currentAni.addLayerAnimation(-1,sq_CreateAnimation("","passiveobject/atpriest_bykk/animation/1_atcrusader/animation/atcruxofshapiel/cross/fire/cruxofshapielcrossfireback_00.ani"),true);
currentAni.addLayerAnimation(6,sq_CreateAnimation("","passiveobject/atpriest_bykk/animation/1_atcrusader/animation/atcruxofshapiel/cross/fire/cruxofshapielcrossfirefront_00.ani"),true);
currentAni.addLayerAnimation(-10001,sq_CreateAnimation("","passiveobject/atpriest_bykk/animation/1_atcrusader/animation/atcruxofshapiel/cross/fire/cruxofshapielcrossfirebottom_00.ani"),true);
local power = obj.getVar("custom").getInt(10);
sq_SetCurrentAttackInfo(obj, sq_GetCustomAttackInfo(obj, 40));
sq_SetCurrentAttackBonusRate(sq_GetCurrentAttackInfo(obj), power);
sq_SetMyShake(obj, 25, 200);
break;
case 21:
local ani = sq_CreateAnimation("", "passiveobject/atpriest_bykk/animation/1_atcrusader/animation/atcruxofshapiel/cruxofshapielmultihit.ani");
obj.setCurrentAnimation(ani);
local currentAni = obj.getCurrentAnimation();
currentAni.addLayerAnimation(0, sq_CreateAnimation("","passiveobject/atpriest_bykk/animation/1_atcrusader/animation/atcruxofshapiel/cross/loop/cruxofshapielcrossloop_00.ani"),true);
currentAni.addLayerAnimation(6,sq_CreateAnimation("","passiveobject/atpriest_bykk/animation/1_atcrusader/animation/atcruxofshapiel/cross/loop/cruxofshapielcrossloopfront_00.ani"),true);
currentAni.addLayerAnimation(-10001,sq_CreateAnimation("","passiveobject/atpriest_bykk/animation/1_atcrusader/animation/atcruxofshapiel/cross/loop/cruxofshapielcrossloopbottom_00.ani"),true);
local lifeTime = obj.getVar("custom").getInt(14);
obj.setTimeEvent(2, lifeTime, 1, false);
local power = obj.getVar("custom").getInt(11);
sq_SetCurrentAttackInfo(obj, sq_GetCustomAttackInfo(obj, 41));
sq_SetCurrentAttackBonusRate(sq_GetCurrentAttackInfo(obj), power);
local hitTime = obj.getVar("custom").getInt(13);
obj.setTimeEvent(3, hitTime, 20, true);
break;
case 22:
obj.removeAllTimeEvent();
local ani = sq_CreateAnimation("", "passiveobject/atpriest_bykk/animation/1_atcrusader/animation/atcruxofshapiel/cruxofshapielexplosion.ani");
obj.setCurrentAnimation(ani);
local currentAni = obj.getCurrentAnimation();
currentAni.addLayerAnimation(0,sq_CreateAnimation("","passiveobject/atpriest_bykk/animation/1_atcrusader/animation/atcruxofshapiel/cross/end/cruxofshapielend.ani"),true);
currentAni.addLayerAnimation(-1,sq_CreateAnimation("","passiveobject/atpriest_bykk/animation/1_atcrusader/animation/atcruxofshapiel/cross/end/cruxofshapielendback_00.ani"),true);
currentAni.addLayerAnimation(6,sq_CreateAnimation("","passiveobject/atpriest_bykk/animation/1_atcrusader/animation/atcruxofshapiel/cross/end/cruxofshapielendfront_00.ani"),true);
currentAni.addLayerAnimation(-10001,sq_CreateAnimation("","passiveobject/atpriest_bykk/animation/1_atcrusader/animation/atcruxofshapiel/cross/end/cruxofshapielendbottom_00.ani"),true);
local power = obj.getVar("custom").getInt(12);
sq_SetCurrentAttackInfo(obj, sq_GetCustomAttackInfo(obj, 42));
sq_SetCurrentAttackBonusRate(sq_GetCurrentAttackInfo(obj), power);
break;
}
break;
}
break;
}
break;
case 2:
switch(skillIndex){
case SKILL_BYKK_ESSENCEOFPHLEGE:
switch(subtype){
case 3:
switch(state){
case 20:
local aniPath = "character/swordman/effect/animation/1_atpriest_bykk/atessenceofphlege/incinerationloop_03.ani";
local ani = sq_CreateAnimation("", aniPath);
obj.setCurrentAnimation(ani);
break;
case 21:
local aniPath = "character/swordman/effect/animation/1_atpriest_bykk/atessenceofphlege/incinerationend_01.ani";
local ani = sq_CreateAnimation("", aniPath);
obj.setCurrentAnimation(ani);
break;
}
break;
}
break;
case SKILL_BYKK_JUDGMENTBLOW:
switch(subtype){
case 2:
switch(state){
case 20:
local aniPath = "passiveobject/atpriest_bykk/animation/2_inquistor/animation/atjudgmentblow/fireconfession/startbottom_04.ani";
local ani = sq_CreateAnimation("", aniPath);
obj.setCurrentAnimation(ani);
break;
case 21:
local aniPath = "passiveobject/atpriest_bykk/animation/2_inquistor/animation/atjudgmentblow/fireconfession/loopbottom_03.ani";
local ani = sq_CreateAnimation("", aniPath);
obj.setCurrentAnimation(ani);
break;
case 22:
local aniPath = "passiveobject/atpriest_bykk/animation/2_inquistor/animation/atjudgmentblow/fireconfession/endbottom_02.ani";
local ani = sq_CreateAnimation("", aniPath);
obj.setCurrentAnimation(ani);
break;
}
local sizeRate = obj.getVar("custom").getInt(0);
if(sizeRate > 100){
local currentAni = obj.getCurrentAnimation();
sizeRate = sizeRate.tofloat() / 100.0;
currentAni.setImageRateFromOriginal(sizeRate, sizeRate);
currentAni.setAutoLayerWorkAnimationAddSizeRate(sizeRate);
sq_SetAttackBoundingBoxSizeRate(currentAni, sizeRate, sizeRate, sizeRate);
}
break;
case 3:
switch(state){
case 20:
local aniPath = "passiveobject/atpriest_bykk/animation/2_inquistor/animation/atjudgmentblow/fireconfession/start_03.ani";
local ani = sq_CreateAnimation("", aniPath);
obj.setCurrentAnimation(ani);
break;
case 21:
local aniPath = "passiveobject/atpriest_bykk/animation/2_inquistor/animation/atjudgmentblow/fireconfession/loopfront_01.ani";
local ani = sq_CreateAnimation("", aniPath);
obj.setCurrentAnimation(ani);
break;
case 22:
local aniPath = "passiveobject/atpriest_bykk/animation/2_inquistor/animation/atjudgmentblow/fireconfession/endfront_01.ani";
local ani = sq_CreateAnimation("", aniPath);
obj.setCurrentAnimation(ani);
break;
}
local sizeRate = obj.getVar("custom").getInt(0);
if(sizeRate > 100){
local currentAni = obj.getCurrentAnimation();
sizeRate = sizeRate.tofloat() / 100.0;
currentAni.setImageRateFromOriginal(sizeRate, sizeRate);
currentAni.setAutoLayerWorkAnimationAddSizeRate(sizeRate);
sq_SetAttackBoundingBoxSizeRate(currentAni, sizeRate, sizeRate, sizeRate);
}
break;
}
break;
case SKILL_BYKK_WHEELOFPUNISHMENT:
switch(subtype){
case 1:
switch(state){
case 20:
local aniPath = "passiveobject/atpriest_bykk/animation/2_inquistor/animation/atwheelofpunishment/wheel_start/wheelofpunishment_start_wheel.ani";
local ani = sq_CreateAnimation("", aniPath);
obj.setCurrentAnimation(ani);
break;
case 21:
local aniPath = "passiveobject/atpriest_bykk/animation/2_inquistor/animation/atwheelofpunishment/wheel/wheelloop_wheel.ani";
if(obj.getVar("custom").getInt(3) > 0) aniPath = "passiveobject/atpriest_bykk/animation/2_inquistor/animation/atwheelofpunishment/wheel_yellowfire/wheelloop_wheel.ani";
local ani = sq_CreateAnimation("", aniPath);
obj.setCurrentAnimation(ani);
local hitMax = obj.getVar("custom").getInt(2);
obj.setTimeEvent(1, hitMax * 100 + 300, 1, false);
obj.setTimeEvent(2, 100, -1, true);
obj.sq_PlaySound("WHEEL_PUNISHMENT_ROLL_LOOP", 2333);
break;
case 22:
obj.stopTimeEvent(2);
local aniPath = "passiveobject/atpriest_bykk/animation/2_inquistor/animation/atwheelofpunishment/wheel/explosion/wheelendback_a.ani";
if(obj.getVar("custom").getInt(3) > 0) aniPath = "passiveobject/atpriest_bykk/animation/2_inquistor/animation/atwheelofpunishment/wheel_yellowfire/wheelend_wheel.ani";
local ani = sq_CreateAnimation("", aniPath);
obj.setCurrentAnimation(ani);
sq_SetCurrentAttackInfo(obj, sq_GetCustomAttackInfo(obj, 60));
sq_SetCurrentAttackBonusRate(sq_GetCurrentAttackInfo(obj), obj.getVar("custom").getInt(0));
sq_SetShake(obj, 16, 900);
local direction = sq_GetDirection(obj);
sq_CreateParticle("passiveobject/atpriest_bykk/animation/2_inquistor/animation/atwheelofpunishment/particle/wheelofpunishment.ptl", obj, direction==1?200:-200, 0, 50, true, 30, 0, 1);
if(obj.getVar("custom").getInt(3) > 0){
sq_CreateParticle("passiveobject/atpriest_bykk/animation/2_inquistor/animation/atwheelofpunishment/particle_yellow/wheel_yellow_particle.ptl", obj, 0, 0, 50, true, 30, 0, 1);
local pooledObj = sq_AddDrawOnlyAniFromParent(obj, "passiveobject/atpriest_bykk/animation/2_inquistor/animation/atwheelofpunishment/wheel_yellowfire/explosion/yellowfireexplosion_1.ani", 0, 0, 0);
local pAni = pooledObj.getCurrentAnimation();
local sizeRate = obj.getVar("custom").getInt(1);
sizeRate = sizeRate.tofloat() / 100.0;
pAni.setImageRateFromOriginal(sizeRate, sizeRate);
pAni.setAutoLayerWorkAnimationAddSizeRate(sizeRate);
}
obj.stopSound(2333);
obj.sq_PlaySound("WHEEL_PUNISHMENT_EXP");
break;
}
local sizeRate = obj.getVar("custom").getInt(1);
if(sizeRate > 100){
local currentAni = obj.getCurrentAnimation();
sizeRate = sizeRate.tofloat() / 100.0;
currentAni.setImageRateFromOriginal(sizeRate, sizeRate);
currentAni.setAutoLayerWorkAnimationAddSizeRate(sizeRate);
sq_SetAttackBoundingBoxSizeRate(currentAni, sizeRate, sizeRate, sizeRate);
}
break;
}
break;
case SKILL_BYKK_INFERNO:
switch(subtype){
case 2:
local sub = "a";
if(obj.getVar("custom").getInt(0) == 1) sub = "b";
if(obj.getVar("custom").getInt(0) == 2) sub = "c";
switch(state){
case 20:
local aniPath = "character/swordman/effect/animation/1_atpriest_bykk/atinferno/hold/hold"+sub+"_start_stake.ani";
local ani = sq_CreateAnimation("", aniPath);
obj.setCurrentAnimation(ani);
break;
case 21:
local aniPath = "character/swordman/effect/animation/1_atpriest_bykk/atinferno/hold/hold"+sub+"_loop_stake.ani";
local ani = sq_CreateAnimation("", aniPath);
obj.setCurrentAnimation(ani);
break;
case 22:
local aniPath = "character/swordman/effect/animation/1_atpriest_bykk/atinferno/hold/hold"+sub+"_end_stake.ani";
local ani = sq_CreateAnimation("", aniPath);
obj.setCurrentAnimation(ani);
break;
}
break;
}
break;
}
break;
case 3:
break;
case 4:
switch(skillIndex){
case SKILL_BYKK_HANDAWAKENTOSIN:
switch(state){
case 20:
local randomNum = sq_getRandom(1, 7);
local ani = sq_CreateAnimation("","character/swordman/effect/animation/1_atpriest_bykk/athandawakentosin/sin_0"+randomNum.tostring()+".ani");
obj.setCurrentAnimation(ani);
break;
case 21:
local aniPath = ["character/swordman/effect/animation/1_atpriest_bykk/athandawakentosin/handawakentosin_explosion_a.ani",
"character/swordman/effect/animation/1_atpriest_bykk/athandawakentosin/handawakentosin_explosion_b.ani",
"character/swordman/effect/animation/1_atpriest_bykk/athandawakentosin/handawakentosin_explosion_c.ani"];
local ani = sq_CreateAnimation("",aniPath[sq_getRandom(0, 2)]);
obj.setCurrentAnimation(ani);
local totalDamage = obj.getVar("custom").getInt(10);
sq_SetCurrentAttackInfo(obj, sq_GetCustomAttackInfo(obj, 12));
sq_SetCurrentAttackBonusRate(sq_GetCurrentAttackInfo(obj), totalDamage);
obj.setTimeEvent(0, 100, 1, false);
break;
}
break;
case SKILL_BYKK_GREEDTHELURKER:
switch(state){
case 20:
local ani = sq_CreateAnimation("","passiveobject/atpriest_bykk/animation/4_temptress/animation/atgreedthelurker/start.ani");
obj.setCurrentAnimation(ani);
local currentAni = obj.getCurrentAnimation();
currentAni.addLayerAnimation(10001,sq_CreateAnimation("","passiveobject/atpriest_bykk/animation/4_temptress/animation/atgreedthelurker/start/01greedatk_bg_00.ani"),true);
currentAni.addLayerAnimation(10002,sq_CreateAnimation("","passiveobject/atpriest_bykk/animation/4_temptress/animation/atgreedthelurker/start/02greedatk_h_c05.ani"),true);
obj.setTimeEvent(0, obj.getVar("custom").getInt(13), obj.getVar("custom").getInt(12), false);
break;
case 21:
local ani = sq_CreateAnimation("","passiveobject/atpriest_bykk/animation/4_temptress/animation/atgreedthelurker/loop.ani");
obj.setCurrentAnimation(ani);
local currentAni = obj.getCurrentAnimation();
currentAni.addLayerAnimation(10001,sq_CreateAnimation("","passiveobject/atpriest_bykk/animation/4_temptress/animation/atgreedthelurker/loop/01greedatkholdloop_bg_00.ani"),true);
currentAni.addLayerAnimation(10002,sq_CreateAnimation("","passiveobject/atpriest_bykk/animation/4_temptress/animation/atgreedthelurker/loop/02greedatkholdloop_hc.ani"),true);
break;
case 22:
local ani = sq_CreateAnimation("","passiveobject/atpriest_bykk/animation/4_temptress/animation/atgreedthelurker/enda.ani");
obj.setCurrentAnimation(ani);
local totalDamage = obj.getVar("custom").getInt(10) * 65 / 100;
sq_SetCurrentAttackInfo(obj, sq_GetCustomAttackInfo(obj, 8));
sq_SetCurrentAttackBonusRate(sq_GetCurrentAttackInfo(obj), totalDamage);
local currentAni = obj.getCurrentAnimation();
currentAni.addLayerAnimation(10001,sq_CreateAnimation("","passiveobject/atpriest_bykk/animation/4_temptress/animation/atgreedthelurker/enda/01greedatkfinisha_bg_00.ani"),true);
currentAni.addLayerAnimation(10002,sq_CreateAnimation("","passiveobject/atpriest_bykk/animation/4_temptress/animation/atgreedthelurker/enda/02greedatkfinisha_smoke_05.ani"),true);
obj.setTimeEvent(1, currentAni.getDelaySum(0, 3), 1, false);
break;
case 23:
local ani = sq_CreateAnimation("","passiveobject/atpriest_bykk/animation/4_temptress/animation/atgreedthelurker/endb.ani");
obj.setCurrentAnimation(ani);
local currentAni = obj.getCurrentAnimation();
currentAni.addLayerAnimation(10001,sq_CreateAnimation("","passiveobject/atpriest_bykk/animation/4_temptress/animation/atgreedthelurker/endb/01greedatkfinishb_eff_01.ani"),true);
currentAni.addLayerAnimation(10002,sq_CreateAnimation("","passiveobject/atpriest_bykk/animation/4_temptress/animation/atgreedthelurker/endb/02greedatkfinishb_eff_02.ani"),true);
break;
}
local currentAni = obj.getCurrentAnimation();
local sizeRate = obj.getVar("custom").getInt(11);
if(sizeRate > 100){
sizeRate = sizeRate.tofloat() / 100.0;
currentAni.setImageRateFromOriginal(sizeRate, sizeRate);
currentAni.setAutoLayerWorkAnimationAddSizeRate(sizeRate);
sq_SetAttackBoundingBoxSizeRate(currentAni, sizeRate, sizeRate, sizeRate);
}
break;
case SKILL_BYKK_FLOWEROFPURIFICATION:
switch(subtype){
case 0:
switch(state){
case 20:
local ani = sq_CreateAnimation("","character/swordman/effect/animation/1_atpriest_bykk/atdepravitysevensins/background/delightflower_bg_start_river.ani");
obj.setCurrentAnimation(ani);
break;
case 21:
local ani = sq_CreateAnimation("","character/swordman/effect/animation/1_atpriest_bykk/atdepravitysevensins/background/delightflower_bg_loop_river.ani");
obj.setCurrentAnimation(ani);
break;
case 22:
local ani = sq_CreateAnimation("","character/swordman/effect/animation/1_atpriest_bykk/atdepravitysevensins/background/delightflower_bg_end_black.ani");
obj.setCurrentAnimation(ani);
break;
}
local currentAni = obj.getCurrentAnimation();
currentAni.setImageRateFromOriginal(2.0, 1.2);//增加ani 宽度跟高度率
// currentAni.setAutoLayerWorkAnimationAddSizeRate(sizeRate);//增加ani als附加 ani大小比例
break;
}
break;
case SKILL_BYKK_ENVIOUSKISS:
switch(subtype){
case 0:
switch(state){
case 20:
local ani = sq_CreateAnimation("","passiveobject/atpriest_bykk/animation/4_temptress/animation/atenviouskiss/heartstart_02.ani");
obj.setCurrentAnimation(ani);
local pAni = obj.getCurrentAnimation();
pAni.setSpeedRate(300.0);
break;
case 21:
local ani = sq_CreateAnimation("","passiveobject/atpriest_bykk/animation/4_temptress/animation/atenviouskiss/heartfly_loop.ani");
obj.setCurrentAnimation(ani);
sq_SetCurrentAttackInfo(obj, sq_GetCustomAttackInfo(obj, 13));
// local attackInfo = sq_GetCurrentAttackInfo(obj);
// sq_SetAttackInfoForceHitStunTime(attackInfo, obj.getVar("custom").getInt(10));
obj.sq_SetMoveParticle("particle/enviouskiss.ptl", 0.0, 0.0);
sq_SetSpeedToMoveParticle(obj,0,300);
break;
case 22:
obj.sq_RemoveMoveParticle();
local ani = sq_CreateAnimation("","passiveobject/atpriest_bykk/animation/4_temptress/animation/atenviouskiss/heartend_normal.ani");
obj.setCurrentAnimation(ani);
break;
}
break;
case 1:
switch(state){
case 20:
local ani = sq_CreateAnimation("","character/swordman/effect/animation/1_atpriest_bykk/atenviouskiss/buffstart_01.ani");
obj.setCurrentAnimation(ani);
local currentAni = obj.getCurrentAnimation();
currentAni.addLayerAnimation(-1,sq_CreateAnimation("","character/swordman/effect/animation/1_atpriest_bykk/atenviouskiss/buffstartb_00.ani"),true);
break;
case 21:
local ani = sq_CreateAnimation("","character/swordman/effect/animation/1_atpriest_bykk/atenviouskiss/buffloop_01.ani");
obj.setCurrentAnimation(ani);
break;
case 22:
obj.sq_RemoveMoveParticle();
local ani = sq_CreateAnimation("","character/swordman/effect/animation/1_atpriest_bykk/atenviouskiss/buffend_01.ani");
obj.setCurrentAnimation(ani);
local currentAni = obj.getCurrentAnimation();
currentAni.addLayerAnimation(-1,sq_CreateAnimation("","character/swordman/effect/animation/1_atpriest_bykk/atenviouskiss/buffendb_00.ani"),true);
break;
}
break;
}
break;
}
break;
}
}
function onEndCurrentAni_po_atpriest_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:
switch(skillIndex){
case SKILL_BYKK_VIOLENTASSAULT:
case SKILL_BYKK_HEAVYSIN:
case SKILL_BYKK_TALISMANOFLIGHTNING:
case SKILL_BYKK_HOLYFLASH:
sq_SendDestroyPacketPassiveObject(obj);
break;
}
break;
case 1:
switch(skillIndex){
case SKILL_BYKK_SPEAROFVICTORY:
switch(state){
case 22: sq_SendDestroyPacketPassiveObject(obj); break;
}
break;
case SKILL_BYKK_HOLYLIGHT:
switch(state){
case 20: obj.addSetStatePacket(21, null, STATE_PRIORITY_AUTO, false, ""); break;
case 22: sq_SendDestroyPacketPassiveObject(obj); break;
}
break;
case SKILL_BYKK_LIGHTOFHAPTISM: sq_SendDestroyPacketPassiveObject(obj); break;
case SKILL_BYKK_SAINTFLASH:
switch(state){
case 20: obj.addSetStatePacket(21, null, STATE_PRIORITY_AUTO, false, ""); break;
case 21: sq_SendDestroyPacketPassiveObject(obj); break;
}
break;
case SKILL_BYKK_ARIAOFCOURAGE:
case SKILL_BYKK_ARIAOFREGENERATION:
case SKILL_BYKK_HOLYCIRCLET:
switch(state){
case 20: obj.addSetStatePacket(21, null, STATE_PRIORITY_AUTO, false, ""); break;
case 22: sq_SendDestroyPacketPassiveObject(obj); break;
}
break;
case SKILL_BYKK_THUNDEROFCLEANS: sq_SendDestroyPacketPassiveObject(obj); break;
case SKILL_BYKK_GRANDCROSSCRASH:
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: sq_SendDestroyPacketPassiveObject(obj); break;
}
break;
}
break;
case SKILL_BYKK_CRUXOFVICTORIA:
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: sq_SendDestroyPacketPassiveObject(obj); break;
}
break;
case SKILL_BYKK_PROTECTIONOFURIEL:
switch(state){
case 20: obj.addSetStatePacket(21, null, STATE_PRIORITY_AUTO, false, ""); break;
case 22: sq_SendDestroyPacketPassiveObject(obj); break;
}
break;
case SKILL_BYKK_BLESSOFANGEL:
switch(subtype){
case 1:
switch(state){
case 20: obj.addSetStatePacket(21, null, STATE_PRIORITY_AUTO, false, ""); break;
case 22: sq_SendDestroyPacketPassiveObject(obj); break;
}
break;
case 2: sq_SendDestroyPacketPassiveObject(obj); break;
}
break;
case SKILL_BYKK_MIRACLECHINE:
switch(subtype){
case 1:
if(obj.getVar().getBool(0)){
sqrChr.sq_IntVectClear();
sqrChr.sq_AddSetStatePacket(STATE_STAND, STATE_PRIORITY_AUTO, true);
sq_SendDestroyPacketPassiveObject(obj);
}
if(state == 21) sq_SendDestroyPacketPassiveObject(obj);
break;
case 2:
if(state == 21) sq_SendDestroyPacketPassiveObject(obj);
break;
case 10:
switch(state){
case 20: obj.addSetStatePacket(21, null, STATE_PRIORITY_AUTO, false, ""); break;
case 22: sq_SendDestroyPacketPassiveObject(obj); break;
}
break;
}
break;
case SKILL_BYKK_BRIONAC: sq_SendDestroyPacketPassiveObject(obj); break;
case SKILL_BYKK_CRUXOFSHAPIEL:
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 23: sq_SendDestroyPacketPassiveObject(obj); break;
}
break;
case 2:
switch(state){
case 20: obj.addSetStatePacket(21, null, STATE_PRIORITY_AUTO, false, ""); break;
case 22: sq_SendDestroyPacketPassiveObject(obj); break;
}
break;
}
break;
case SKILL_BYKK_BLESSOFCOURAGE: sq_SendDestroyPacketPassiveObject(obj); break;
case SKILL_BYKK_BLESSOFPROTECTION: sq_SendDestroyPacketPassiveObject(obj); break;
}
break;
case 2:
switch(skillIndex){
case SKILL_BYKK_PATROLBOMB: sq_SendDestroyPacketPassiveObject(obj); break;
case SKILL_BYKK_ESSENCEOFPHLEGE: sq_SendDestroyPacketPassiveObject(obj); break;
case SKILL_BYKK_HOLYFLAME: sq_SendDestroyPacketPassiveObject(obj); break;
case SKILL_BYKK_JUDGMENTBLOW:
switch(subtype){
case 2:
case 3:
switch(state){
case 20: obj.addSetStatePacket(21, null, STATE_PRIORITY_AUTO, false, ""); return; break;
}
break;
}
sq_SendDestroyPacketPassiveObject(obj);
break;
case SKILL_BYKK_FLAMEOFBAPTISM: sq_SendDestroyPacketPassiveObject(obj); break;
case SKILL_BYKK_VORTEXOFHELLFIRE: sq_SendDestroyPacketPassiveObject(obj); break;
case SKILL_BYKK_WHEELOFPUNISHMENT:
switch(subtype){
case 1:
switch(state){
case 20: obj.addSetStatePacket(21, null, STATE_PRIORITY_AUTO, false, ""); return; break;
}
break;
}
sq_SendDestroyPacketPassiveObject(obj);
break;
case SKILL_BYKK_BURNATTHESTAKE: sq_SendDestroyPacketPassiveObject(obj); break;
case SKILL_BYKK_INFERNO:
if(subtype == 2 && state == 20){
obj.addSetStatePacket(21, null, STATE_PRIORITY_AUTO, false, "");
return;
}
sq_SendDestroyPacketPassiveObject(obj);
break;
case SKILL_BYKK_PURIFICATION: sq_SendDestroyPacketPassiveObject(obj); break;
}
break;
case 3:
break;
case 4:
switch(skillIndex){
case SKILL_BYKK_PRIDEACCEL: sq_SendDestroyPacketPassiveObject(obj); break;
case SKILL_BYKK_LUSTHAND: sq_SendDestroyPacketPassiveObject(obj); break;
case SKILL_BYKK_HANDAWAKENTOSIN: sq_SendDestroyPacketPassiveObject(obj); break;
case SKILL_BYKK_GREEDTHELURKER:
switch(state){
case 20:
obj.addSetStatePacket(state + 1, null, STATE_PRIORITY_AUTO, false, "");
break;
case 22:
case 23:
local size = obj.getVar("tar").get_obj_vector_size();
if(size > 0){
for(local i = 0; i < size; i++){
local targetObj = obj.getVar("tar").get_obj_vector(i);
if(targetObj){
local activeObj = sq_GetCNRDObjectToActiveObject(targetObj);
CNSquirrelAppendage.sq_RemoveAppendage(activeObj, GREEDTHELURKER_APDPATH);
}
}
}
sq_SendDestroyPacketPassiveObject(obj);
break;
}
break;
case SKILL_BYKK_FLOWEROFPURIFICATION:
switch(subtype){
case 0:
switch(state){
case 20: obj.addSetStatePacket(21, null, STATE_PRIORITY_AUTO, false, ""); break;
case 22: sq_SendDestroyPacketPassiveObject(obj); break;
}
break;
case 1: sq_SendDestroyPacketPassiveObject(obj); break;
case 2: sq_SendDestroyPacketPassiveObject(obj); break;
}
break;
case SKILL_BYKK_ENVIOUSKISS:
switch(state){
case 20: obj.addSetStatePacket(21, null, STATE_PRIORITY_AUTO, false, ""); break;
case 22: sq_SendDestroyPacketPassiveObject(obj); break;
}
break;
case SKILL_BYKK_SECONDSOUL: sq_SendDestroyPacketPassiveObject(obj); break;
case SKILL_BYKK_GLUTTONYVOMIT: sq_SendDestroyPacketPassiveObject(obj); break;
case SKILL_BYKK_SLOTHBODY: sq_SendDestroyPacketPassiveObject(obj); break;
case SKILL_BYKK_FIRSTPRANA: sq_SendDestroyPacketPassiveObject(obj); break;
}
break;
}
}
function onTimeEvent_po_atpriest_bykk(obj, timeEventIndex, timeEventCount)
{
if(!obj) return;
local sqrChr = sq_GetCNRDObjectToSQRCharacter(obj.getTopCharacter());
local job = obj.getVar("job").getInt(0);
local skillIndex = obj.getVar("skillIndex").getInt(0);
local subtype = obj.getVar("subtype").getInt(0);
local state = obj.getVar("state").getInt(0);
switch(job){
case 0:
switch(skillIndex){
case SKILL_BYKK_HEAVYSIN:
switch(timeEventIndex){
case 0: sq_SetShake(obj,5,240); break;
}
break;
case SKILL_BYKK_HOLYFLASH:
switch(timeEventIndex){
case 0:
local base_X = obj.getVar("custom").getInt(13);
local v = sq_GetUniformVelocity(0, obj.getVar("custom").getInt(12), timeEventCount, 30);
local moveX = sq_GetDistancePos(base_X, obj.getDirection(), v);
sq_setCurrentAxisPos(obj, 0, moveX);
if(timeEventCount >= 30) obj.addSetStatePacket(21, null, STATE_PRIORITY_AUTO, false, "");
break;
}
break;
}
break;
case 1:
switch(skillIndex){
case SKILL_BYKK_SPEAROFVICTORY:
switch(timeEventIndex){
case 0:
local vx = sq_GetUniformVelocity(0, 400, timeEventCount, 30);
local vz = sq_GetUniformVelocity(obj.getVar("move").getInt(11), 0, timeEventCount, 30);
local dstX = sq_GetDistancePos(obj.getVar("move").getInt(10), obj.getDirection(), vx);
sq_setCurrentAxisPos(obj, 0, dstX);
sq_setCurrentAxisPos(obj, 2, vz);
if(timeEventCount >= 30) obj.addSetStatePacket(21, null, STATE_PRIORITY_AUTO, false, "");
break;
case 1: obj.addSetStatePacket(22, null, STATE_PRIORITY_AUTO, false, ""); break;
}
break;
case SKILL_BYKK_HOLYLIGHT:
switch(timeEventIndex){
case 0:
local currentAni = obj.getCurrentAnimation();
currentAni.addLayerAnimation(6,sq_CreateAnimation("","character/swordman/effect/animation/1_atpriest_bykk/atholylight/barrier/barrierloop_omen.ani"),true);
obj.setTimeEvent(1, 1000, 1, false);
break;
case 1: obj.addSetStatePacket(22, null, STATE_PRIORITY_AUTO, false, ""); break;
case 100:
local targetObj = obj.getVar("tar").get_obj_vector(0);
if(!targetObj || targetObj.getState() == STATE_DIE) sq_SendDestroyPacketPassiveObject(obj);
sq_setCurrentAxisPos(obj, 0, sq_GetXPos(targetObj));
sq_setCurrentAxisPos(obj, 1, sq_GetYPos(targetObj));
sq_setCurrentAxisPos(obj, 2, sq_GetZPos(targetObj) + obj.getVar("custom").getInt(12));
break;
}
break;
case SKILL_BYKK_LIGHTOFHAPTISM:
switch(timeEventIndex){
case 0:
local pooledObj = sq_AddDrawOnlyAniFromParent(obj, "passiveobject/atpriest_bykk/animation/1_atcrusader/animation/atlightofhaptism/atlightofhaptism_front.ani", 0, 7, 0);
local pooledObj2 = sq_AddDrawOnlyAniFromParent(obj, "passiveobject/atpriest_bykk/animation/1_atcrusader/animation/atlightofhaptism/atlightofhaptism_back.ani", 0, -1, 0);
local pAni = pooledObj.getCurrentAnimation();
local pAni2 = pooledObj2.getCurrentAnimation();
if(obj.getVar("custom").getInt(10) > 100){
local sizeRate = obj.getVar("custom").getInt(10) / 100.0;
pAni.setImageRateFromOriginal(sizeRate, sizeRate);
pAni2.setImageRateFromOriginal(sizeRate, sizeRate);
}
sq_SetShake(obj, 5, 200);
break;
}
break;
case SKILL_BYKK_SAINTFLASH:
switch(timeEventIndex){
case 0:
local vx = sq_GetUniformVelocity(0, 300, timeEventCount, 20);
local dstX = sq_GetDistancePos(obj.getVar("move").getInt(10), obj.getDirection(), vx);
sq_setCurrentAxisPos(obj, 0, dstX);
local size = obj.getVar("tar").get_obj_vector_size();
if(size > 0){
for(local i = 0; i < size; i++){
local tar = obj.getVar("tar").get_obj_vector(i);
if(tar){
local activeObj = sq_GetCNRDObjectToActiveObject(tar);
if(activeObj.isMovablePos(dstX, sq_GetYPos(activeObj))) sq_setCurrentAxisPos(activeObj, 0, dstX);
}
}
}
if(timeEventCount >= 30) obj.addSetStatePacket(21, null, STATE_PRIORITY_AUTO, false, "");
break;
}
break;
case SKILL_BYKK_ARIAOFCOURAGE:
switch(timeEventIndex){
case 0: sq_SendDestroyPacketPassiveObject(obj); break;
case 1:
obj.resetHitObjectList();
local range = obj.getVar("custom").getInt(15);
local increaseRate = obj.getVar("custom").getInt(16);
local buffTime = obj.getVar("custom").getInt(17);
local power = obj.getVar("custom").getInt(11);
local objectManager = obj.getObjectManager();
local objectNumber = objectManager.getCollisionObjectNumber();
for (local i = 0; i < objectNumber; i++){
local object = objectManager.getCollisionObject(i);
if (object && object.isObjectType(OBJECTTYPE_CHARACTER) && !obj.isEnemy(object) && sq_Abs(sq_GetXPos(object) - sq_GetXPos(obj)) <= range && sq_Abs(sq_GetYPos(object) - sq_GetYPos(obj)) <= range / 2) {
local activeObj = sq_GetCNRDObjectToActiveObject(object);
if(!obj.getVar("Ariaofcourage_Tar").is_obj_vector(activeObj)) obj.getVar("Ariaofcourage_Tar").push_obj_vector(activeObj);
if(CNSquirrelAppendage.sq_IsAppendAppendage(activeObj, APDPATH_ARIAOFCOURAGEBUFF)){
CNSquirrelAppendage.sq_RemoveAppendage(activeObj, APDPATH_ARIAOFCOURAGEBUFF);
}
if(obj.getVar("custom").getInt(30) > 0){
local appendage = CNSquirrelAppendage.sq_AppendAppendage(activeObj, sqrChr, -1, false, "character/demonicswordman/0_common/ap_prayerofheal.nut", true);
local change_appendage = appendage.sq_GetCNChangeHp("changehp");
if (!change_appendage) change_appendage = appendage.sq_AddCNChangeHp("changehp", activeObj, sqrChr, 0, power.tofloat(), 80);
appendage.sq_SetValidTime(100);
}
local AddAppendage = CNSquirrelAppendage.sq_AppendAppendage(activeObj, sqrChr, -1, false, APDPATH_ARIAOFCOURAGEBUFF, true);
AddAppendage.sq_SetValidTime(buffTime);
AddAppendage.setAppendCauseSkill(BUFF_CAUSE_SKILL, sq_getJob(sqrChr), SKILL_BYKK_ARIAOFCOURAGE, sq_GetSkillLevel(sqrChr, SKILL_BYKK_ARIAOFCOURAGE));
CNSquirrelAppendage.sq_Append(AddAppendage, activeObj, sqrChr, true);
AddAppendage.getVar("custom").setInt(16, buffTime);
AddAppendage.getVar("custom").setInt(17, range);
AddAppendage.getVar("bool").setBool(0, true);
if(!CNSquirrelAppendage.sq_IsAppendAppendage(activeObj, APDPATH_BLESSOFCOURAGE)) continue;
local AddAppendage2 = CNSquirrelAppendage.sq_GetAppendage(activeObj, APDPATH_BLESSOFCOURAGE);
local phAttack = AddAppendage2.getVar("custom").getInt(10);
local mgAttack = AddAppendage2.getVar("custom").getInt(11);
local adtAttack = AddAppendage2.getVar("custom").getInt(12);
local phlAttack = AddAppendage2.getVar("custom").getInt(13);
local mglAttack = AddAppendage2.getVar("custom").getInt(14);
local stuckRate = AddAppendage2.getVar("custom").getInt(15);
// print("phAttack = "+phAttack+"; mgAttack ="+mgAttack+"; adtAttack ="+adtAttack+"; phlAttack ="+phlAttack+"; mglAttack ="+mglAttack+"; stuckRate ="+stuckRate);
local change_appendage = AddAppendage.sq_getChangeStatus("AT_AriaofcourageBuff");
if(!change_appendage) change_appendage = AddAppendage.sq_AddChangeStatus("AT_AriaofcourageBuff",activeObj, sqrChr, 0, CHANGE_STATUS_TYPE_PHYSICAL_ATTACK, true, 1000);
if(change_appendage){
change_appendage.clearParameter();
change_appendage.addParameter(CHANGE_STATUS_TYPE_EQUIPMENT_PHYSICAL_ATTACK, false, (phAttack * increaseRate / 100).tofloat());
change_appendage.addParameter(CHANGE_STATUS_TYPE_EQUIPMENT_MAGICAL_ATTACK, false, (mgAttack * increaseRate / 100).tofloat());
change_appendage.addParameter(CHANGE_STATUS_TYPE_ADDITIONAL_PHYSICAL_GENUINE_ATTACK, false, (adtAttack * increaseRate / 100).tofloat());
change_appendage.addParameter(CHANGE_STATUS_TYPE_ADDITIONAL_MAGICAL_GENUINE_ATTACK, false, (adtAttack * increaseRate / 100).tofloat());
change_appendage.addParameter(CHANGE_STATUS_TYPE_PHYSICAL_ATTACK, false, (phlAttack * increaseRate / 100).tofloat());
change_appendage.addParameter(CHANGE_STATUS_TYPE_MAGICAL_ATTACK, false, (mglAttack * increaseRate / 100).tofloat());
change_appendage.addParameter(CHANGE_STATUS_TYPE_STUCK, false, (stuckRate * -0.1 * increaseRate / 100).tofloat());
}
}
}
break;
case 2: obj.addSetStatePacket(22, null, STATE_PRIORITY_AUTO, false, ""); break;
}
break;
case SKILL_BYKK_ARIAOFREGENERATION:
switch(timeEventIndex){
case 0: sq_SendDestroyPacketPassiveObject(obj); break;
case 1: obj.resetHitObjectList(); break;
case 2: obj.addSetStatePacket(22, null, STATE_PRIORITY_AUTO, false, ""); break;
case 3:
local HP_healRate = obj.getVar("custom").getInt(12);
local decreaseMax = obj.getVar("custom").getInt(13);
local range = obj.getVar("custom").getInt(14);
local objectManager = obj.getObjectManager();
local objectNumber = objectManager.getCollisionObjectNumber();
for (local i = 0; i < objectNumber; i++){
local object = objectManager.getCollisionObject(i);
if (object && object.isObjectType(OBJECTTYPE_CHARACTER) && !obj.isEnemy(object) && sq_Abs(sq_GetXPos(object) - sq_GetXPos(obj)) <= range && sq_Abs(sq_GetYPos(object) - sq_GetYPos(obj)) <= range / 2) {
local activeObj = sq_GetCNRDObjectToActiveObject(object);
local hp = activeObj.getHp() * HP_healRate / 100;
local appendage = CNSquirrelAppendage.sq_AppendAppendage(activeObj, sqrChr, -1, false, APDPATH_ARIAOFREGENERATIONBUFF, true);
local change_appendage = appendage.sq_GetCNChangeHp("changehp");
if (!change_appendage) change_appendage = appendage.sq_AddCNChangeHp("changehp", activeObj, sqrChr, 0, hp.tofloat(), 800);
appendage.sq_SetValidTime(500);
local activeStatus = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 15, 16];
local count = 0;
for(local ui = 0; ui < activeStatus.len(); ui++){
if (sq_IsValidActiveStatus(activeObj, activeStatus[ui])){
if(count + 1 < decreaseMax){
sq_ReleaseActiveStatus(activeObj, activeStatus[ui]);
count = count + 1;
}
}
}
}
}
break;
}
break;
case SKILL_BYKK_HOLYCIRCLET:
switch(timeEventIndex){
case 1: obj.setTimeEvent(3, obj.getVar("custom").getInt(12), -1, true); break;
case 2: obj.stopTimeEvent(3); obj.addSetStatePacket(22, null, STATE_PRIORITY_AUTO, false, ""); break;
case 3: obj.resetHitObjectList(); break;
}
break;
case SKILL_BYKK_THUNDEROFCLEANS:
switch(timeEventIndex){
case 1:
obj.resetHitObjectList();
sq_SetShake(obj, 5, 140);
local aniPath = ["passiveobject/atpriest_bykk/animation/1_atcrusader/animation/atthunderofcleans/atthunderofcleans_att_lightning.ani","passiveobject/atpriest_bykk/animation/1_atcrusader/animation/atthunderofcleans/atthunderofcleans_att2_lightning2.ani"];
local aniPath2 = ["passiveobject/atpriest_bykk/animation/1_atcrusader/animation/atthunderofcleans/atthunderofcleans_att_shockwave.ani","passiveobject/atpriest_bykk/animation/1_atcrusader/animation/atthunderofcleans/atthunderofcleans_att2_shockwave2.ani"];
local sub = 1;
local xPos = sq_getRandom(-150, 150), yPos = sq_getRandom(-30,30);
sq_AddDrawOnlyAniFromParent(obj, aniPath[sub], xPos, yPos, 0);
sq_AddDrawOnlyAniFromParent(obj, aniPath2[sub], xPos, yPos, 0);
if(sq_getRandom(1, 100) > 50){
xPos = sq_getRandom(-150, 150);
yPos = sq_getRandom(-30,30);
sq_AddDrawOnlyAniFromParent(obj, aniPath[sub], xPos, yPos, 0);
sq_AddDrawOnlyAniFromParent(obj, aniPath2[sub], xPos, yPos, 0);
}
if(timeEventCount >= obj.getVar("custom").getInt(12)){
obj.setTimeEvent(2, 500, 1, false);
}
break;
case 2:
local power = obj.getVar("custom").getInt(11);
local sizeRate = obj.getVar("custom").getInt(15);
createSkillPassive_ATPriest_bykk(obj,obj,PASSIVEOBJ_BYKK_ATPRIEST,0,0,0,obj.getDirection(),1,SKILL_BYKK_THUNDEROFCLEANS,2,power,sizeRate,0,0,0,0,0,0);
break;
case 3:
sq_flashScreen(obj,0,60,0,127, sq_RGB(0,0,0), GRAPHICEFFECT_NONE, ENUM_DRAWLAYER_CLOSEBACK);
local pooledObj = createOnlyDrawObject_ATPriest_bykk(obj,"passiveobject/atpriest_bykk/animation/1_atcrusader/animation/atthunderofcleans/atthunderofcleans_last_thunder_att_shockwave.ani",true,obj.getDirection(),sq_GetXPos(obj),sq_GetYPos(obj),0,ENUM_DRAWLAYER_NORMAL);
local sizeRate = obj.getVar("custom").getInt(10);
if(sizeRate > 100){
sizeRate = sizeRate.tofloat() / 100;
local pAni = pooledObj.getCurrentAnimation();
pAni.setImageRateFromOriginal(sizeRate, sizeRate);
}
break;
case 4:
sq_flashScreen(obj,0,120,0,178, sq_RGB(255,255,255), GRAPHICEFFECT_NONE, ENUM_DRAWLAYER_COVER);
sq_SetMyShake(obj, 10, 280);
break;
case 5:
sq_flashScreen(obj,0,60,0,127, sq_RGB(0,0,0), GRAPHICEFFECT_NONE, ENUM_DRAWLAYER_CLOSEBACK);
local pooledObj = createOnlyDrawObject_ATPriest_bykk(obj,"passiveobject/atpriest_bykk/animation/1_atcrusader/animation/atthunderofcleans/atthunderofcleans_att_shockwave.ani",true,obj.getDirection(),sq_GetXPos(obj),sq_GetYPos(obj),0,ENUM_DRAWLAYER_NORMAL);
local sizeRate = obj.getVar("custom").getInt(10);
if(sizeRate > 100){
sizeRate = sizeRate.tofloat() / 100;
local pAni = sq_GetCurrentAnimation(pooledObj);//pooledObj.getCurrentAnimation();
pAni.setImageRateFromOriginal(sizeRate, sizeRate);
}
break;
case 6:
sq_flashScreen(obj,0,120,0,178, sq_RGB(255,255,255), GRAPHICEFFECT_NONE, ENUM_DRAWLAYER_COVER);
sq_SetMyShake(obj, 10, 280);
break;
case 7:
local power = obj.getVar("custom").getInt(11);
local sizeRate = 125;
if(obj.getVar("custom").getInt(14) > 50){
sizeRate = 188;
power = power * 150 / 100;
}
createSkillPassive_ATPriest_bykk(obj,obj,PASSIVEOBJ_BYKK_ATPRIEST,0,0,0,obj.getDirection(),1,SKILL_BYKK_THUNDEROFCLEANS,3,power,sizeRate,0,0,0,0,0,0);
break;
}
break;
case SKILL_BYKK_GRANDCROSSCRASH:
switch(timeEventIndex){
case 1: obj.addSetStatePacket(22, null, STATE_PRIORITY_AUTO, false, ""); break;
case 2: obj.resetHitObjectList(); break;
}
break;
case SKILL_BYKK_CRUXOFVICTORIA:
switch(timeEventIndex){
case 1:
obj.resetHitObjectList();
if(timeEventCount >= 30) obj.addSetStatePacket(22, null, STATE_PRIORITY_AUTO, false, "");
break;
case 2:
local targetObj = obj.getVar("tat").get_obj_vector(0);
if(!targetObj || targetObj.getState() == STATE_DIE){
sq_SendDestroyPacketPassiveObject(obj);
break;
}
local vx = sq_GetUniformVelocity(obj.getVar("move").getInt(10), sq_GetXPos(targetObj), timeEventCount, 100);
local vy = sq_GetUniformVelocity(obj.getVar("move").getInt(11), sq_GetYPos(targetObj) + 1, timeEventCount, 100);
local vz = sq_GetUniformVelocity(obj.getVar("move").getInt(12), sq_GetZPos(targetObj) + sq_GetHeightObject(targetObj) / 2, timeEventCount, 100);
sq_setCurrentAxisPos(obj, 0, vx);
sq_setCurrentAxisPos(obj, 1, vy);
sq_setCurrentAxisPos(obj, 2, vz);
if(timeEventCount >= 100){
sq_AddDrawOnlyAniFromParent(obj, "character/swordman/effect/animation/1_atpriest_bykk/atcruxofvictoria/buffeffect/buffstart_eff01.ani", 0, 0, 0);
sq_SendDestroyPacketPassiveObject(obj);
}
break;
case 3: sq_SendDestroyPacketPassiveObject(obj); break;
}
break;
case SKILL_BYKK_PROTECTIONOFURIEL:
switch(timeEventIndex){
case 1: obj.addSetStatePacket(22, null, STATE_PRIORITY_AUTO, false, ""); break;
case 2: obj.resetHitObjectList(); break;
case 3:
local attackSpeed = obj.getVar("custom").getInt(14);
local moveSpeed = obj.getVar("custom").getInt(15);
local castSpeed = obj.getVar("custom").getInt(16);
local damageRate = obj.getVar("custom").getInt(17);
local range = obj.getVar("custom").getInt(18);
local objectManager = obj.getObjectManager();
local objectNumber = objectManager.getCollisionObjectNumber();
for (local i = 0; i < objectNumber; i++){
local object = objectManager.getCollisionObject(i);
if (object && object.isObjectType(OBJECTTYPE_CHARACTER) && !obj.isEnemy(object) && sq_Abs(sq_GetXPos(object) - sq_GetXPos(obj)) <= range && sq_Abs(sq_GetYPos(object) - sq_GetYPos(obj)) <= range / 2) {
local activeObj = sq_GetCNRDObjectToActiveObject(object);
if(CNSquirrelAppendage.sq_IsAppendAppendage(activeObj, APDPATH_PROTECTIONOFURIEL)) CNSquirrelAppendage.sq_RemoveAppendage(activeObj, APDPATH_PROTECTIONOFURIEL);
local AddAppendage = CNSquirrelAppendage.sq_AppendAppendage(activeObj, sqrChr, -1, false, APDPATH_PROTECTIONOFURIEL, true);
AddAppendage.sq_SetValidTime(1000);
AddAppendage.setAppendCauseSkill(BUFF_CAUSE_SKILL, sq_getJob(sqrChr), SKILL_BYKK_PROTECTIONOFURIEL, sq_GetSkillLevel(sqrChr, SKILL_BYKK_PROTECTIONOFURIEL));
CNSquirrelAppendage.sq_Append(AddAppendage, activeObj, sqrChr, true);
AddAppendage.getVar("custom").setInt(10, damageRate);
if(isSameObject(activeObj, sqrChr)) sq_SendMessage(activeObj, 0, 1, 0);
else activeObj.sq_SetSuperArmorUntilTime(sqrChr, 1000);
local change_appendage = AddAppendage.sq_getChangeStatus("AT_Protectionofuriel");
if(!change_appendage) change_appendage = AddAppendage.sq_AddChangeStatus("AT_Protectionofuriel",activeObj, sqrChr, 0, CHANGE_STATUS_TYPE_PHYSICAL_ATTACK, true, 1000);
if(change_appendage){
change_appendage.clearParameter();
change_appendage.addParameter(CHANGE_STATUS_TYPE_ATTACK_SPEED, false, (attackSpeed).tofloat());
change_appendage.addParameter(CHANGE_STATUS_TYPE_MOVE_SPEED, false, (moveSpeed).tofloat());
change_appendage.addParameter(CHANGE_STATUS_TYPE_CAST_SPEED, false, (castSpeed).tofloat());
}
}
}
break;
}
break;
case SKILL_BYKK_BLESSOFANGEL:
switch(timeEventIndex){
case 0:
local targetObj = obj.getVar("tar").get_obj_vector(0);
if(!targetObj || targetObj.getState() == STATE_DIE) sq_SendDestroyPacketPassiveObject(obj);
local loadSlot = sqrChr.sq_GetSkillLoad(SKILL_BYKK_BLESSOFANGEL);
if(!loadSlot && state == 21){
sq_SendDestroyPacketPassiveObject(obj);
break;
}
sq_setCurrentAxisPos(obj, 0, sq_GetXPos(targetObj));
sq_setCurrentAxisPos(obj, 1, sq_GetYPos(targetObj));
sq_setCurrentAxisPos(obj, 2, sq_GetZPos(targetObj) + obj.getVar("custom").getInt(12));
break;
case 1: obj.addSetStatePacket(22, null, STATE_PRIORITY_AUTO, false, ""); break;
}
break;
case SKILL_BYKK_MIRACLECHINE:
switch(timeEventIndex){
case 1: obj.addSetStatePacket(21, null, STATE_PRIORITY_AUTO, false, ""); break;
case 2:
local size = obj.getVar("tar").get_obj_vector_size();
if(size > 0){
local HP_healRate = obj.getVar("custom").getInt(12);
for(local i = 0; i < size; i++){
local targetObj = obj.getVar("tar").get_obj_vector(i);
if(targetObj){
local activeObj = sq_GetCNRDObjectToActiveObject(targetObj);
if(obj.isEnemy(activeObj)) sq_SendHitObjectPacket(sqrChr,activeObj,0,0,sq_GetObjectHeight(targetObj) / 2);
else{
local HP_heal = activeObj.getHp() * HP_healRate / 100;
local appendage = CNSquirrelAppendage.sq_AppendAppendage(targetObj, sqrChr, -1, false, "character/demonicswordman/0_common/ap_prayerofheal.nut", true);
local change_appendage = appendage.sq_GetCNChangeHp("changehp");
if (!change_appendage) change_appendage = appendage.sq_AddCNChangeHp("changehp", targetObj, sqrChr, 0, HP_heal.tofloat(), 80);
appendage.sq_SetValidTime(100);
}
if(size >= 1){
if(i == 0 && obj.getVar("bool").getBool(0) == false){
obj.getVar("bool").setBool(0, true);
local colObj = sq_GetCNRDObjectToCollisionObject(obj);
local group = sq_GetGroup(activeObj);
local uniqueId = sq_GetUniqueId(activeObj);
createSkillPassive_ATPriest_bykk(sqrChr,obj,PASSIVEOBJ_BYKK_ATPRIEST,0,0,sq_GetZPos(obj),obj.getDirection(),1,SKILL_BYKK_MIRACLECHINE,3,obj.getVar("custom").getInt(10),group,uniqueId,obj.getVar("custom").getInt(11),0,0,0,0);
}
else if(obj.getVar("bool").getBool(i) == false){
obj.getVar("bool").setBool(i, true);
local targetObj2 = obj.getVar("tar").get_obj_vector(i - 1);
if(targetObj2){
local activeObj2 = sq_GetCNRDObjectToActiveObject(targetObj2);
local group = sq_GetGroup(activeObj);
local uniqueId = sq_GetUniqueId(activeObj);
local group2 = sq_GetGroup(activeObj2);
local uniqueId2 = sq_GetUniqueId(activeObj2);
createSkillPassive_ATPriest_bykk(sqrChr,activeObj2,PASSIVEOBJ_BYKK_ATPRIEST,0,0,sq_GetHeightObject(activeObj2) / 2,obj.getDirection(),1,SKILL_BYKK_MIRACLECHINE,4,obj.getVar("custom").getInt(10),group,uniqueId,obj.getVar("custom").getInt(11),group2,uniqueId2,0,0);
}
}
}
}
}
}
break;
case 3:
local targetObj = obj.getVar("tar").get_obj_vector(0);
if(!targetObj || targetObj.getState() == STATE_DIE) sq_SendDestroyPacketPassiveObject(obj);
break;
case 4: sq_SendDestroyPacketPassiveObject(obj); break;
case 5:
local activeObj = sq_GetCNRDObjectToActiveObject(obj.getVar("tar").get_obj_vector(0));
if(activeObj) setLightning_atp_Miraclechine_bykk(obj, obj, activeObj);
else sq_SendDestroyPacketPassiveObject(obj);
break;
case 10: obj.addSetStatePacket(22, null, STATE_PRIORITY_AUTO, false, ""); break;
case 11: obj.resetHitObjectList(); break;
}
break;
case SKILL_BYKK_BRIONAC:
switch(timeEventIndex){
case 1:
local v = sq_GetUniformVelocity(0, 100, timeEventCount, 50);
local vz = sq_GetUniformVelocity(obj.getVar("move").getInt(12), 0, timeEventCount, 50);
local dstX = sq_GetDistancePos(obj.getVar("move").getInt(10), obj.getDirection(), v);
sq_setCurrentAxisPos(obj, 0, dstX);
sq_setCurrentAxisPos(obj, 2, vz);
if(timeEventCount >= 50){
sq_AddDrawOnlyAniFromParent(obj,"passiveobject/atpriest_bykk/animation/1_atcrusader/animation/atbrionac/brionaclanceeff_end_eff27c.ani", 0, -1, 0);
sq_SendDestroyPacketPassiveObject(obj);
}
break;
}
break;
case SKILL_BYKK_CRUXOFSHAPIEL:
switch(timeEventIndex){
case 1: obj.addSetStatePacket(23, null, STATE_PRIORITY_AUTO, false, ""); break;
case 2: obj.addSetStatePacket(22, null, STATE_PRIORITY_AUTO, false, ""); break;
case 3: obj.resetHitObjectList(); break;
}
break;
case SKILL_BYKK_BLESSOFCOURAGE:
case SKILL_BYKK_BLESSOFPROTECTION:
switch(timeEventIndex){
case 1: sq_SendDestroyPacketPassiveObject(obj); break;
}
break;
}
break;
case 2:
switch(skillIndex){
case SKILL_BYKK_ESSENCEOFPHLEGE:
switch(timeEventIndex){
case 1: sq_SendDestroyPacketPassiveObject(obj); break;
case 2: obj.addSetStatePacket(21, null, STATE_PRIORITY_AUTO, false, ""); break;
}
break;
case SKILL_BYKK_JUDGMENTBLOW:
case SKILL_BYKK_WHEELOFPUNISHMENT:
switch(timeEventIndex){
case 1: obj.addSetStatePacket(22, null, STATE_PRIORITY_AUTO, false, ""); break;
case 2: obj.resetHitObjectList(); break;
}
break;
case SKILL_BYKK_ERADICATECROSS:
switch(timeEventIndex){
case 1: obj.resetHitObjectList(); break;
}
break;
case SKILL_BYKK_BURNATTHESTAKE:
switch(timeEventIndex){
case 1: obj.setTimeEvent(2, obj.getVar("custom").getInt(0), -1, true); break;
case 2: obj.resetHitObjectList(); break;
}
break;
case 255:
switch(timeEventIndex){
case 1:
obj.getVar("custom").setInt(3, timeEventCount);
local allDamage = obj.getVar("damage").getInt(0);
local count = obj.getVar("custom").getInt(2);
local damage = allDamage / count;
local targetObj = obj.getVar("tar").get_obj_vector(0);
local activeObj = sq_GetCNRDObjectToActiveObject(targetObj);
// print("timeEventCount = "+timeEventCount);
// print("allDamage = "+allDamage+",,damage = "+damage);
if(activeObj && activeObj.getState() != STATE_DIE && activeObj.getHp() > 0){
local group = obj.getVar("custom").getInt(0);
local uniqueId = obj.getVar("custom").getInt(1);
local height = sq_GetHeightObject(activeObj) / 2;
if(height > 75) height = 75;
// createSkillPassive_Theif_bykk(obj,obj,PASSIVEOBJ_NUM_THIEF, 0, 0, height,sq_GetDirection(obj),3,255,2,group,uniqueId,damage,0,0,0,0,0);
createSkillPassive_ATPriest_bykk(obj,obj,PASSIVEOBJ_BYKK_ATPRIEST,0,0,height,sq_GetDirection(obj),2,255,2,group,uniqueId,damage,0,0,0,0,0);
// obj.getVar("damage").setInt(0, allDamage - damage);
if(timeEventCount == 1){
local time = obj.getVar("time").getInt(0);
sq_EffectLayerAppendage(activeObj,sq_RGB(0,0,0),195,0,0,time + 2000);
local apdPath = "character/demonicswordman/2_inquistor/ap_holyflame_debuff.nut";
if(CNSquirrelAppendage.sq_IsAppendAppendage(activeObj, apdPath)) CNSquirrelAppendage.sq_RemoveAppendage(activeObj, apdPath);
local AddAppendage = CNSquirrelAppendage.sq_AppendAppendage(activeObj, obj, -1, false, apdPath, true);
AddAppendage.sq_SetValidTime(time + 1000);
}
if(timeEventCount == count){
obj.getVar("damage").setInt(0, 0);
obj.getVar("damage").setInt(1, 0);
}
}
else{
sq_SendDestroyPacketPassiveObject(obj);
return;
}
if(obj.getVar("damage").getInt(0) != obj.getVar("damage").getInt(1)){
local newDamage = allDamage - damage * obj.getVar("custom").getInt(3);
// print("newDamage = "+newDamage);
if(newDamage < 0) newDamage = 0;
obj.getVar("damage").setInt(0, newDamage);
obj.getVar("damage").setInt(1, newDamage);
obj.stopTimeEvent(1);
obj.setTimeEvent(1, 500, count, false);
}
break;
case 2:
local targetObj = obj.getVar("tar").get_obj_vector(0);
local activeObj = sq_GetCNRDObjectToActiveObject(targetObj);
if(activeObj && activeObj.getState() != STATE_DIE && activeObj.getHp() > 0){
local height = sq_GetObjectHeight(activeObj) / 2;
if(height > 75) height = 75;
sq_SendHitObjectPacket(obj,activeObj,0,0,height);
// obj.sq_PlaySound("BURN_VINE");
}
break;
case 3:
local targetObj = obj.getVar("tar").get_obj_vector(0);
local activeObj = sq_GetCNRDObjectToActiveObject(targetObj);
if(activeObj && activeObj.getState() != STATE_DIE && activeObj.getHp() > 0){
sq_EffectLayerAppendage(activeObj,sq_RGB(255,192,130),66,0,0,300);
local allDamage = obj.getVar("damage").getInt(0);
// print("PoisonDamageExp = "+allDamage);
local group = obj.getVar("custom").getInt(0);
local uniqueId = obj.getVar("custom").getInt(1);
local height = sq_GetHeightObject(activeObj) / 2;
if(height > 75) height = 75;
// createSkillPassive_Theif_bykk(obj,obj,PASSIVEOBJ_NUM_THIEF, 0, 0, height,sq_GetDirection(obj),3,255,2,group,uniqueId,allDamage,0,0,0,0,0);
createSkillPassive_ATPriest_bykk(obj,damager,PASSIVEOBJ_BYKK_ATPRIEST,0,0,height,sq_GetDirection(obj),2,255,2,group,uniqueId,allDamage,0,0,0,0,0);
}
break;
}
break;
}
break;
case 3:
break;
case 4:
switch(skillIndex){
case SKILL_BYKK_HANDAWAKENTOSIN:
switch(timeEventIndex){
case 0:
local targetObj = obj.getVar("tar").get_obj_vector(0);
if(!targetObj || targetObj.getState() == STATE_DIE) break;
sq_SendHitObjectPacket(obj,targetObj,0,0,sq_GetObjectHeight(targetObj) / 2);
break;
}
break;
case SKILL_BYKK_GREEDTHELURKER:
switch(timeEventIndex){
case 0:
obj.resetHitObjectList();
if(timeEventCount >= obj.getVar("custom").getInt(12)) obj.addSetStatePacket(23 - obj.getVar("custom").getInt(14), null, STATE_PRIORITY_AUTO, false, "");
break;
case 1:
local pAni = obj.getCurrentAnimation();
obj.setTimeEvent(2, pAni.getDelaySum(4, 32) / (obj.getVar("custom").getInt(15) + 1), obj.getVar("custom").getInt(15), true);
break;
case 2: obj.resetHitObjectList(); break;
}
break;
case SKILL_BYKK_FLOWEROFPURIFICATION:
switch(timeEventIndex){
case 0:
obj.addSetStatePacket(22, null, STATE_PRIORITY_AUTO, false, "");
break;
case 1:
if(!sqrChr || sqrChr.getState() == STATE_DIE){
sq_SendDestroyPacketPassiveObject(obj);
break;
}
local size = sqrChr.getVar("Flowerofpurification_Tar").get_obj_vector_size();
if(size > 0){
for(local i = 0; i < size; i++){
local targetObj = sqrChr.getVar("Flowerofpurification_Tar").get_obj_vector(i);
if(targetObj) sq_SendHitObjectPacket(obj,targetObj,0,0,sq_GetObjectHeight(targetObj) / 2);
}
}
if(timeEventCount >= obj.getVar("custom").getInt(10)) sq_SendDestroyPacketPassiveObject(obj);
break;
}
break;
case SKILL_BYKK_ENVIOUSKISS:
switch(timeEventIndex){
case 0:
obj.addSetStatePacket(22, null, STATE_PRIORITY_AUTO, false, "");
break;
}
break;
}
break;
}
}
function onAttack_po_atpriest_bykk(obj, damager, boundingBox, isStuck)
{
if(!obj) return;
local sqrChr = sq_GetCNRDObjectToSQRCharacter(obj.getTopCharacter());
local job = obj.getVar("job").getInt(0);
local skillIndex = obj.getVar("skillIndex").getInt(0);
local subtype = obj.getVar("subtype").getInt(0);
local state = obj.getVar("state").getInt(0);
switch(job){
case 0:
switch(skillIndex){
case SKILL_BYKK_HOLYFLASH:
if(state == 20 && damager.isObjectType(OBJECTTYPE_ACTIVE)){
obj.addSetStatePacket(21, null, STATE_PRIORITY_AUTO, false, "");
}
break;
case SKILL_BYKK_HEAVYSIN:
if(isStuck) break;
if(!sqrChr || sqrChr.getState() == STATE_DIE) break;
if(sq_getGrowType(sqrChr) != 4) break;
if(sq_GetLevelData(sqrChr, SKILL_BYKK_HEAVYSIN, 8, sq_GetSkillLevel(sqrChr, SKILL_BYKK_HEAVYSIN)) > 0) break;
local loadSlot = sqrChr.sq_GetSkillLoad(SKILL_BYKK_THESEVENDEADLYSINS);
if(loadSlot){
local loadnumber = loadSlot.getRemainLoadNumber();
if(loadnumber > 0){
local attackInfo = sq_GetCurrentAttackInfo(obj);
local skillLevel = sq_GetSkillLevel(sqrChr, SKILL_BYKK_THESEVENDEADLYSINS);
local stunTime = sq_GetLevelData(sqrChr, SKILL_BYKK_THESEVENDEADLYSINS, 15, skillLevel);
if(loadnumber > 1) stunTime = stunTime + (loadnumber - 1) * sq_GetLevelData(sqrChr, SKILL_BYKK_THESEVENDEADLYSINS, 18, skillLevel);
//sq_SetAttackInfoForceHitStunTime(attackInfo, stunTime);
local holdAppendage = CNSquirrelAppendage.sq_AppendAppendage(damager, sqrChr, -1, false, HEAVYSINHOLD_APDPATH, true);
sq_HoldAndDelayDie(damager, sqrChr, true, true, true, 200, 200, ENUM_DIRECTION_NEUTRAL , holdAppendage);
holdAppendage.sq_SetValidTime(stunTime);
}
}
break;
}
break;
case 1:
switch(skillIndex){
case SKILL_BYKK_SPEAROFVICTORY:
switch(state){
case 20:
if(isStuck) break;
if(!damager.isObjectType(OBJECTTYPE_ACTIVE)) break;
if(CNSquirrelAppendage.sq_IsAppendAppendage(damager, APDPATH_SPEAROFVICTORY)) break;
local AddAppendage = CNSquirrelAppendage.sq_AppendAppendage(damager, obj, -1, false, APDPATH_SPEAROFVICTORY, true);
sq_HoldAndDelayDie(damager, obj, true, true, true, 200, 200, ENUM_DIRECTION_NEUTRAL , AddAppendage);
// if(!obj.getVar("tar").is_obj_vector(damager) && !sq_IsFixture(damager)) obj.getVar("tar").push_obj_vector(damager);
AddAppendage.sq_SetValidTime(obj.getVar("custom").getInt(12) + 300);
break;
}
break;
case SKILL_BYKK_SAINTFLASH:
switch(state){
case 20:
if(isStuck) break;
if(!damager.isObjectType(OBJECTTYPE_ACTIVE)) break;
if(CNSquirrelAppendage.sq_IsAppendAppendage(damager, APDPATH_SAINTWALL)) break;
local AddAppendage = CNSquirrelAppendage.sq_AppendAppendage(damager, obj, -1, false, APDPATH_SAINTWALL, true);
if(!obj.getVar("tar").is_obj_vector(damager) && !sq_IsFixture(damager)){
sq_HoldAndDelayDie(damager, obj, true, true, true, 200, 200, ENUM_DIRECTION_NEUTRAL , AddAppendage);
obj.getVar("tar").push_obj_vector(damager);
}
AddAppendage.sq_SetValidTime(obj.getVar("custom").getInt(12));
break;
}
break;
case SKILL_BYKK_HOLYCIRCLET:
switch(state){
case 20:
if(isStuck) break;
if(!damager.isObjectType(OBJECTTYPE_ACTIVE)) break;
if(CNSquirrelAppendage.sq_IsAppendAppendage(damager, APDPATH_HOLYCIRCLET)) break;
if(!obj.getVar("target").is_obj_vector(damager) && !sq_IsFixture(damager)){
local AddAppendage = CNSquirrelAppendage.sq_AppendAppendage(damager, obj, -1, false, APDPATH_HOLYCIRCLET, true);
sq_HoldAndDelayDie(damager, obj, true, true, true, 200, 200, ENUM_DIRECTION_NEUTRAL , AddAppendage);
obj.getVar("target").push_obj_vector(damager);
}
break;
}
break;
case SKILL_BYKK_GRANDCROSSCRASH:
switch(subtype){
case 2:
if(isStuck) break;
if(!damager.isObjectType(OBJECTTYPE_CHARACTER)) break;
local sqr = sq_GetCNRDObjectToSQRCharacter(damager);
local addTime = obj.getVar("custom").getInt(11);
local apdPath = [APDPATH_BLESSOFCOURAGE, APDPATH_BLESSOFPROTECTION, APDPATH_HOLYLIGHT, APDPATH_EDIFICATION];
local skillIndex = [SKILL_BYKK_BLESSOFCOURAGE, SKILL_BYKK_BLESSOFPROTECTION, SKILL_BYKK_HOLYLIGHT, SKILL_BYKK_EDIFICATION];
for(local i = 0; i < apdPath.len(); i++){
if(!CNSquirrelAppendage.sq_IsAppendAppendage(sqr, apdPath[i])) continue;
local AddAppendage = CNSquirrelAppendage.sq_GetAppendage(sqr, apdPath[i]);
if(AddAppendage){
local useTime = AddAppendage.getTimer().Get();
local validT = AddAppendage.getAppendageInfo().getValidTime();
AddAppendage.sq_SetValidTime(validT + addTime);
AddAppendage.setAppendCauseSkill(BUFF_CAUSE_SKILL, sq_getJob(sqrChr), skillIndex[i], sq_GetSkillLevel(sqrChr, skillIndex[i]));
CNSquirrelAppendage.sq_Append(AddAppendage, sqr, sqrChr, true);
switch(i){
case 0:
local phAttack = AddAppendage.getVar("custom").getInt(10);
local mgAttack = AddAppendage.getVar("custom").getInt(11);
local adtAttack = AddAppendage.getVar("custom").getInt(12);
local phlAttack = AddAppendage.getVar("custom").getInt(13);
local mglAttack = AddAppendage.getVar("custom").getInt(14);
local stuckRate = AddAppendage.getVar("custom").getInt(15);
local change_appendage = AddAppendage.sq_getChangeStatus("AT_Blessofcourage");
if(!change_appendage) change_appendage = AddAppendage.sq_AddChangeStatus("AT_Blessofcourage",sqr, sqrChr, 0, CHANGE_STATUS_TYPE_PHYSICAL_ATTACK, true, 1000);
if(change_appendage){
change_appendage.clearParameter();
change_appendage.addParameter(CHANGE_STATUS_TYPE_EQUIPMENT_PHYSICAL_ATTACK, false, (phAttack).tofloat());
change_appendage.addParameter(CHANGE_STATUS_TYPE_EQUIPMENT_MAGICAL_ATTACK, false, (mgAttack).tofloat());
change_appendage.addParameter(CHANGE_STATUS_TYPE_ADDITIONAL_PHYSICAL_GENUINE_ATTACK, false, (adtAttack).tofloat());
change_appendage.addParameter(CHANGE_STATUS_TYPE_ADDITIONAL_MAGICAL_GENUINE_ATTACK, false, (adtAttack).tofloat());
change_appendage.addParameter(CHANGE_STATUS_TYPE_PHYSICAL_ATTACK, false, (phlAttack).tofloat());
change_appendage.addParameter(CHANGE_STATUS_TYPE_MAGICAL_ATTACK, false, (mglAttack).tofloat());
change_appendage.addParameter(CHANGE_STATUS_TYPE_STUCK, false, (stuckRate * -0.1).tofloat());
}
break;
case 1:
local hpMax = AddAppendage.getVar("custom").getInt(11);
local mpMax = AddAppendage.getVar("custom").getInt(12);
local phDefense = AddAppendage.getVar("custom").getInt(13);
local mgDefense = AddAppendage.getVar("custom").getInt(14);
local phlDefense = AddAppendage.getVar("custom").getInt(15);
local mglDefense = AddAppendage.getVar("custom").getInt(16);
local change_appendage = AddAppendage.sq_getChangeStatus("AT_Blessofprotection");
if(!change_appendage) change_appendage = AddAppendage.sq_AddChangeStatus("AT_Blessofprotection",sqr, sqrChr, 0, CHANGE_STATUS_TYPE_PHYSICAL_ATTACK, true, 1000);
if(change_appendage){
change_appendage.clearParameter();
change_appendage.addParameter(CHANGE_STATUS_TYPE_HP_MAX, false, (hpMax).tofloat());
change_appendage.addParameter(CHANGE_STATUS_TYPE_MP_MAX, false, (mpMax).tofloat());
change_appendage.addParameter(CHANGE_STATUS_TYPE_EQUIPMENT_PHYSICAL_DEFENSE, false, (phDefense).tofloat());
change_appendage.addParameter(CHANGE_STATUS_TYPE_EQUIPMENT_MAGICAL_DEFENSE, false, (mgDefense).tofloat());
change_appendage.addParameter(CHANGE_STATUS_TYPE_MAGICAL_DEFENSE, false, (phlDefense).tofloat());
change_appendage.addParameter(CHANGE_STATUS_TYPE_PHYSICAL_DEFENSE, false, (mglDefense).tofloat());
}
break;
case 2:
local effectObj = sqr.getVar("holyLight_eff").get_obj_vector(0);
if(effectObj){
local colObj = sq_GetCNRDObjectToCollisionObject(effectObj);
if(colObj.isExistTimeEvent(0)){
colObj.stopTimeEvent(0);
colObj.setTimeEvent(0, validT + addTime - useTime, 1, false);
}
}
break;
case 3:
local moveSpeed = AddAppendage.getVar("custom").getInt(10);
local change_appendage = AddAppendage.sq_getChangeStatus("AT_Edification");
if(!change_appendage) change_appendage = AddAppendage.sq_AddChangeStatus("AT_Edification",sqr, sqrChr, 0, CHANGE_STATUS_TYPE_PHYSICAL_ATTACK, true, 1000);
if(change_appendage){
change_appendage.clearParameter();
change_appendage.addParameter(CHANGE_STATUS_TYPE_MOVE_SPEED, false, (moveSpeed).tofloat());
}
break;
case 4:
local phAttack = AddAppendage.getVar("custom").getInt(11);
local mhAttack = AddAppendage.getVar("custom").getInt(12);
local attackSpeed = AddAppendage.getVar("custom").getInt(13);
local moveSpeed = AddAppendage.getVar("custom").getInt(14);
local phDefense = AddAppendage.getVar("custom").getInt(15);
local mgDefense = AddAppendage.getVar("custom").getInt(16);
local change_appendage = AddAppendage.sq_getChangeStatus("AT_Cruxofvictoria");
if(!change_appendage) change_appendage = AddAppendage.sq_AddChangeStatus("AT_Cruxofvictoria", sqr, sqrChr, 0, CHANGE_STATUS_TYPE_PHYSICAL_ATTACK, true, 1000);
if(change_appendage){
change_appendage.clearParameter();
change_appendage.addParameter(CHANGE_STATUS_TYPE_PHYSICAL_ATTACK, false, (phAttack).tofloat());
change_appendage.addParameter(CHANGE_STATUS_TYPE_MAGICAL_ATTACK, false, (mhAttack).tofloat());
change_appendage.addParameter(CHANGE_STATUS_TYPE_ATTACK_SPEED, false, (attackSpeed * 0.1).tofloat());
change_appendage.addParameter(CHANGE_STATUS_TYPE_MOVE_SPEED, false, (moveSpeed * 0.1).tofloat());
change_appendage.addParameter(CHANGE_STATUS_TYPE_EQUIPMENT_PHYSICAL_DEFENSE, false, (phDefense).tofloat());
change_appendage.addParameter(CHANGE_STATUS_TYPE_EQUIPMENT_MAGICAL_DEFENSE, false, (mgDefense).tofloat());
}
break;
}
}
}
break;
}
break;
case SKILL_BYKK_MIRACLECHINE:
switch(subtype){
case 10:
if(!damager.isObjectType(OBJECTTYPE_ACTIVE)) break;
local activeObj = sq_GetCNRDObjectToActiveObject(damager);
local HP_healRate = obj.getVar("custom").getInt(12);
local HP_heal = activeObj.getHp() * HP_healRate / 100;
local appendage = CNSquirrelAppendage.sq_AppendAppendage(activeObj, sqrChr, -1, false, "character/demonicswordman/0_common/ap_prayerofheal.nut", true);
local change_appendage = appendage.sq_GetCNChangeHp("changehp");
if (!change_appendage) change_appendage = appendage.sq_AddCNChangeHp("changehp", activeObj, sqrChr, 0, HP_heal.tofloat(), 80);
appendage.sq_SetValidTime(100);
break;
}
break;
}
break;
case 2:
if(isStuck) break;
switch(skillIndex){
case SKILL_BYKK_PATROLBOMB:
switch(subtype){
case 1:
if(obj.getVar().getBool(0) == false){//damager.isObjectType(OBJECTTYPE_ACTIVE) &&
obj.getVar().setBool(0, true);
local totalDamage = obj.getVar("custom").getInt(0);
local sizeRate = obj.getVar("custom").getInt(1);
local isFire = obj.getVar("custom").getInt(2);
createSkillPassive_ATPriest_bykk(obj,obj,PASSIVEOBJ_BYKK_ATPRIEST,0,0,0,obj.getDirection(),2,SKILL_BYKK_PATROLBOMB,2,totalDamage,sizeRate,isFire,0,0,0,0,0);
sq_SendDestroyPacketPassiveObject(obj);
}
break;
case 2:
case 3:
case 4:
if(obj.getVar("custom").getInt(2) > 0) onAttack_EssenceofPhlege_SetFireBomb(obj, damager, boundingBox);
break;
}
break;
case SKILL_BYKK_ESSENCEOFPHLEGE:
switch(subtype){
case 1:
case 2:
case 4:
if(damager.isObjectType(OBJECTTYPE_ACTIVE)){
local totalDamage = obj.getVar("custom").getInt(0);
local lifeTimeForTarget = obj.getVar("custom").getInt(1);
local lifeTimeForBurning = obj.getVar("custom").getInt(2);
local sizeRate = obj.getVar("custom").getInt(2);
local group = sq_GetGroup(damager);
local uniqueId = sq_GetUniqueId(damager);
local aObj = damager.getVar("EssenceofPhlege").get_obj_vector(0);
if(aObj){
local colObj = sq_GetCNRDObjectToCollisionObject(aObj);
if(colObj.getState() >= 20){
if(subtype == 4) sq_SendDestroyPacketPassiveObject(obj);
break;
}
colObj.setTimeEvent(1, 1000, 1, true);
}
damager.getVar("EssenceofPhlege").clear_obj_vector();
createSkillPassive_ATPriest_bykk(obj,damager,PASSIVEOBJ_BYKK_ATPRIEST,0,1,sq_GetZPos(damager) + sq_GetHeightObject(damager) / 2 - sq_GetZPos(obj),obj.getDirection(),2,SKILL_BYKK_ESSENCEOFPHLEGE,3,totalDamage,lifeTimeForTarget,lifeTimeForBurning,sizeRate,group,uniqueId,0,0);
if(subtype == 1){
sq_AddDrawOnlyAniFromParent(obj, "passiveobject/atpriest_bykk/animation/2_inquistor/animation/atessenceofphlege/phlegeboomair_01.ani", 0, 0, 0);
sq_SendDestroyPacketPassiveObject(obj);
}
else if(subtype == 4) sq_SendDestroyPacketPassiveObject(obj);
}
break;
}
break;
case SKILL_BYKK_JUDGMENTBLOW:
if(obj.getVar("custom").getInt(1) > 0) onAttack_EssenceofPhlege_SetFireBomb(obj, damager, boundingBox);
break;
case SKILL_BYKK_FLAMEOFBAPTISM:
onAttack_EssenceofPhlege_SetFireBomb(obj, damager, boundingBox);
break;
case SKILL_BYKK_VORTEXOFHELLFIRE:
if(obj.getVar("custom").getInt(0) > 0) onAttack_EssenceofPhlege_SetFireBomb(obj, damager, boundingBox);
break;
case SKILL_BYKK_WHEELOFPUNISHMENT:
if(obj.getVar("custom").getInt(3) > 0) onAttack_EssenceofPhlege_SetFireBomb(obj, damager, boundingBox);
break;
case SKILL_BYKK_ERADICATECROSS:
if(damager.isObjectType(OBJECTTYPE_ACTIVE)){
onAttack_EssenceofPhlege_SetFireBomb(obj, damager, boundingBox);
if(!CNSquirrelAppendage.sq_IsAppendAppendage(damager, "character/demonicswordman/2_inquistor/ap_radicatecross_hold.nut")){
local AddAppendage = CNSquirrelAppendage.sq_AppendAppendage(damager, obj, -1, false, "character/demonicswordman/2_inquistor/ap_radicatecross_hold.nut", true);
sq_HoldAndDelayDie(damager, obj, true, true, true, 200, 200, ENUM_DIRECTION_NEUTRAL , AddAppendage);
}
}
break;
case SKILL_BYKK_PURIFICATION: onAttack_EssenceofPhlege_SetFireBomb(obj, damager, boundingBox); break;
}
if(obj.getVar("holyFlameBool").getBool(0)){
local burnDamage = obj.getVar("holyflameDamageSet").getInt(0);
local burnTime = obj.getVar("holyFlameInfoSet").getInt(0);
if(isStuck || !damager.isObjectType(OBJECTTYPE_ACTIVE)) return;
if(!sqrChr || sqrChr.getState() == STATE_DIE) return;
if(damager.getVar("holyflameObj").get_obj_vector_size() > 0){
local holyflameObj = damager.getVar("holyflameObj").get_obj_vector(0);
if(holyflameObj){
local colObj = sq_GetCNRDObjectToCollisionObject(holyflameObj);
// print("add = "+burnDamage);
local baseDamage = colObj.getVar("damage").getInt(0);
colObj.getVar("damage").setInt(0, baseDamage + burnDamage);
}
}
else{
local group = sq_GetGroup(damager);
local uniqueId = sq_GetUniqueId(damager);
createSkillPassive_ATPriest_bykk(obj,damager,PASSIVEOBJ_BYKK_ATPRIEST,0,0,0,sq_GetDirection(obj),2,255,1,group,uniqueId,burnTime,burnDamage,0,0,0,0);
}
}
break;
case 3:
break;
case 4:
switch(skillIndex){
case SKILL_BYKK_LUSTHAND://LUSTHAND_APDPATH
if(!sqrChr || sqrChr.getState() == STATE_DIE) break;
if(damager.isObjectType(OBJECTTYPE_ACTIVE)){
if(!sqrChr.getVar("lusthand_tar").is_obj_vector(damager)) sqrChr.getVar("lusthand_tar").push_obj_vector(damager);
if(!CNSquirrelAppendage.sq_IsAppendAppendage(damager, LUSTHAND_APDPATH)){
local AddAppendage = CNSquirrelAppendage.sq_AppendAppendage(damager, sqrChr, -1, false, LUSTHAND_APDPATH, true);
sq_HoldAndDelayDie(damager, sqrChr, true, true, true, 200, 200, ENUM_DIRECTION_NEUTRAL, AddAppendage);
}
}
break;
case SKILL_BYKK_GREEDTHELURKER:
if(!sqrChr || sqrChr.getState() == STATE_DIE) break;
if(sq_GetLevelData(sqrChr, SKILL_BYKK_GREEDTHELURKER, 6, sq_GetSkillLevel(sqrChr, SKILL_BYKK_GREEDTHELURKER)) > 0) break;
if(damager.isObjectType(OBJECTTYPE_ACTIVE)){
if(!CNSquirrelAppendage.sq_IsAppendAppendage(damager, GREEDTHELURKER_APDPATH)){
obj.getVar("tar").push_obj_vector(damager);
local AddAppendage = CNSquirrelAppendage.sq_AppendAppendage(damager, sqrChr, -1, false, GREEDTHELURKER_APDPATH, true);
sq_HoldAndDelayDie(damager, sqrChr, true, true, true, 200, 200, ENUM_DIRECTION_NEUTRAL, AddAppendage);
}
}
break;
case SKILL_BYKK_ENVIOUSKISS:
if(subtype != 0) break;
if(state != 21 || isStuck) break;
if(damager.isObjectType(OBJECTTYPE_ACTIVE)){
local activeObj = sq_GetCNRDObjectToActiveObject(damager);
sqrChr.getVar("Enviouskiss_Bool").setBool(0, true);
sqrChr.getVar("Enviouskiss_Tar").push_obj_vector(damager);
local AddAppendage = CNSquirrelAppendage.sq_AppendAppendage(sqrChr, sqrChr, SKILL_BYKK_ENVIOUSKISS, false, ENVIOUSKISS_APDPATH, true);
local lifeTime = obj.getVar("custom").getInt(11);
AddAppendage.sq_SetValidTime(lifeTime);
if(obj.getVar("custom").getInt(12) < 1){
local holdAppendage = CNSquirrelAppendage.sq_AppendAppendage(damager, sqrChr, -1, false, ENVIOUSKISSHOLD_APDPATH, true);
sq_HoldAndDelayDie(damager, sqrChr, true, true, true, 200, 200, ENUM_DIRECTION_NEUTRAL , holdAppendage);
local holdTime = obj.getVar("custom").getInt(10);
holdAppendage.sq_SetValidTime(holdTime);
}
local group = sq_GetGroup(damager);
local uniqueId = sq_GetUniqueId(damager);
// if(sqrChr.isMyControlObject())
createSkillPassive_ATPriest_bykk(sqrChr,damager,PASSIVEOBJ_BYKK_ATPRIEST,0,0,sq_GetZPos(damager) + 50,damager.getDirection(),4,SKILL_BYKK_ENVIOUSKISS,1,lifeTime,group,uniqueId,0,0,0,0,0);
obj.addSetStatePacket(22, null, STATE_PRIORITY_AUTO, false, "");
}
break;
}
break;
}
}
function onKeyFrameFlag_po_atpriest_bykk(obj, flagIndex)
{
if(!obj) return;
local sqrChr = sq_GetCNRDObjectToSQRCharacter(obj.getTopCharacter());
local job = obj.getVar("job").getInt(0);
local skillIndex = obj.getVar("skillIndex").getInt(0);
local subtype = obj.getVar("subtype").getInt(0);
local state = obj.getVar("state").getInt(0);
switch(job){
case 0:
switch(skillIndex){
case SKILL_BYKK_HEAVYSIN:
break;
case SKILL_BYKK_HOLYFLASH:
break;
}
break;
case 1:
switch(skillIndex){
case SKILL_BYKK_ARIAOFCOURAGE:
case SKILL_BYKK_ARIAOFREGENERATION:
switch(subtype){
case 3:
local aniPath = "character/swordman/effect/animation/1_atpriest_bykk/atariaofcourage/musicpaper/";
if(skillIndex == SKILL_BYKK_ARIAOFREGENERATION) aniPath = "character/swordman/effect/animation/1_atpriest_bykk/atariaofregeneration/musicpaper/";
local aniPath2 = ["line_1.ani","line_2.ani","line_3.ani","line_4.ani","line_5.ani","line_6.ani","line_7.ani","line_8.ani","line_8_1.ani","line_9.ani"];
local aniPath3 = "";
switch(flagIndex){
case 100: aniPath3 = aniPath + aniPath2[0]; break;
case 102: aniPath3 = aniPath + aniPath2[1]; break;
case 103: aniPath3 = aniPath + aniPath2[2]; break;
case 104: aniPath3 = aniPath + aniPath2[3]; break;
case 107: aniPath3 = aniPath + aniPath2[4]; break;
case 109: aniPath3 = aniPath + aniPath2[5]; break;
case 111: aniPath3 = aniPath + aniPath2[6]; break;
case 113: aniPath3 = aniPath + aniPath2[7]; break;
case 114: aniPath3 = aniPath + aniPath2[8]; break;
}
local pooledObj = sq_AddDrawOnlyAniFromParent(obj, aniPath3, 0, -1, 0);
local currentAni = pooledObj.getCurrentAnimation();
local sizeRate = obj.getVar("custom").getInt(10);
if(sizeRate > 100){
sizeRate = sizeRate.tofloat() / 100.0;
local currentAni = obj.getCurrentAnimation();
currentAni.setImageRateFromOriginal(sizeRate, sizeRate);
}
break;
}
break;
case SKILL_BYKK_CRUXOFSHAPIEL:
switch(subtype){
case 2:
switch(flagIndex){
case 301:
sq_SetMyShake(obj, 25, 200);
break;
}
break;
}
break;
}
break;
case 2:
break;
case 3:
break;
case 4:
switch(skillIndex){
case SKILL_BYKK_HANDAWAKENTOSIN:
break;
case SKILL_BYKK_GREEDTHELURKER:
break;
case SKILL_BYKK_FLOWEROFPURIFICATION:
switch(flagIndex){
case 1000:
local pooledObj = sq_AddDrawOnlyAniFromParent(obj, "passiveobject/atpriest_bykk/animation/4_temptress/animation/atdepravitysevensins/delightflower_flower_flarebg03.ani", 0, 1, 0);
local pAni = pooledObj.getCurrentAnimation();
pAni.setImageRateFromOriginal(1.8, 1.2);
pAni.setAutoLayerWorkAnimationAddSizeRate(1.8);
break;
case 1001:
sq_flashScreen(obj,0,0,240,255, sq_RGB(255,255,255), GRAPHICEFFECT_LINEARDODGE, ENUM_DRAWLAYER_BOTTOM);
sq_SetMyShake(obj,10,320);
break;
case 1002: sq_SetMyShake(obj, 1, 240); break;
}
break;
}
break;
}
return true;
}
function procAppend_po_atpriest_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_PATROLBOMB:
switch(subtype){
case 1:
if(sq_GetZPos(obj) <= 10 && obj.getVar().getBool(0) == false){
obj.getVar().setBool(0, true);
if(sqrChr && sqrChr.getState() != STATE_DIE){
local epObj = sqrChr.getVar("EssenceofPhlegeObj").get_obj_vector(0);
if(epObj){
local colObj = sq_GetCNRDObjectToCollisionObject(epObj);
if(sq_Abs(sq_GetXPos(colObj) - sq_GetXPos(obj)) <= 75 && sq_Abs(sq_GetYPos(colObj) - sq_GetYPos(obj)) <= 40){
local totalDamage = sqrChr.sq_GetBonusRateWithPassive(SKILL_BYKK_ESSENCEOFPHLEGE, -1, 1, 1.0);
local sizeRate = sq_GetIntData(sqrChr, SKILL_BYKK_ESSENCEOFPHLEGE, 13);
createSkillPassive_ATPriest_bykk(obj,colObj,PASSIVEOBJ_BYKK_ATPRIEST,0,0,-sq_GetZPos(obj) + 165,obj.getDirection(),2,SKILL_BYKK_ESSENCEOFPHLEGE,5,totalDamage,sizeRate,0,0,0,0,0,0);
sq_SetMyShake(obj, 2, 100);
colObj.setTimeEvent(1, 1000, 1, true);
sq_SendDestroyPacketPassiveObject(obj);
return;
}
}
}
local totalDamage = obj.getVar("custom").getInt(0);
local sizeRate = obj.getVar("custom").getInt(1);
local isFire = obj.getVar("custom").getInt(2);
createSkillPassive_ATPriest_bykk(obj,obj,PASSIVEOBJ_BYKK_ATPRIEST,0,0,-sq_GetZPos(obj),obj.getDirection(),2,SKILL_BYKK_PATROLBOMB,3,totalDamage,sizeRate,isFire,0,0,0,0,0);
sq_SendDestroyPacketPassiveObject(obj);
}
break;
}
break;
case SKILL_BYKK_ESSENCEOFPHLEGE:
switch(subtype){
case 1:
if(sq_GetZPos(obj) <= 10 && obj.getVar().getBool(0) == false){
obj.getVar().setBool(0, true);
local totalDamage = obj.getVar("custom").getInt(0);
local lifeTimeForTarget = obj.getVar("custom").getInt(1);
local lifeTimeForBurning = obj.getVar("custom").getInt(2);
local lifeTimeForLanding = obj.getVar("custom").getInt(3);
local sizeRate = obj.getVar("custom").getInt(4);
createSkillPassive_ATPriest_bykk(obj,obj,PASSIVEOBJ_BYKK_ATPRIEST,0,0,-sq_GetZPos(obj),obj.getDirection(),2,SKILL_BYKK_ESSENCEOFPHLEGE,4,totalDamage,lifeTimeForTarget,lifeTimeForBurning,lifeTimeForLanding,sizeRate,0,0,0);
sq_AddDrawOnlyAniFromParent(obj, "passiveobject/atpriest_bykk/animation/2_inquistor/animation/atessenceofphlege/phlegeboombottom_01.ani", 0, 0, -sq_GetZPos(obj));
sq_SendDestroyPacketPassiveObject(obj);
}
break;
case 3:
local targetObj = obj.getVar("tar").get_obj_vector(0);
if(!targetObj || targetObj.getState() == STATE_DIE){
sq_SendDestroyPacketPassiveObject(obj);
}
if(CNSquirrelAppendage.sq_IsAppendAppendage(targetObj, "character/demonicswordman/2_inquistor/passiveskill/ap_brandofheresy_debuff.nut")){
local totalDamage = sqrChr.sq_GetBonusRateWithPassive(SKILL_BYKK_ESSENCEOFPHLEGE, -1, 1, 1.0);
local sizeRate = sq_GetIntData(sqrChr, SKILL_BYKK_ESSENCEOFPHLEGE, 13);
createSkillPassive_ATPriest_bykk(obj,obj,PASSIVEOBJ_BYKK_ATPRIEST,0,0,-sq_GetZPos(obj) + 165,obj.getDirection(),2,SKILL_BYKK_ESSENCEOFPHLEGE,5,totalDamage,sizeRate,0,0,0,0,0,0);
onAttack_EssenceofPhlege_SetFireBomb(obj, targetObj, null);
sq_SendDestroyPacketPassiveObject(obj);
}
break;
}
break;
case SKILL_BYKK_VORTEXOFHELLFIRE:
if(sqrChr.getState() != STATE_BYKK_VORTEXOFHELLFIRE) sq_SendDestroyPacketPassiveObject(obj);
break;
case SKILL_BYKK_ERADICATECROSS:
local time = sq_GetObjectTime(obj);
if(time >= obj.getVar("custom").getInt(2) && obj.getVar().getBool(0) == false){
obj.getVar().setBool(0, true);
sq_AddDrawOnlyAniFromParent(obj, "passiveobject/atpriest_bykk/animation/2_inquistor/animation/ateradicatecross/crossend_00.ani", 150, 0, 0);
sq_AddDrawOnlyAniFromParent(obj, "passiveobject/atpriest_bykk/animation/2_inquistor/animation/ateradicatecross/burn_00.ani", 150, 0, 0);
sq_AddDrawOnlyAniFromParent(obj, "passiveobject/atpriest_bykk/animation/2_inquistor/animation/ateradicatecross/crossend_front_00.ani", 150, 1, 0);
sq_AddDrawOnlyAniFromParent(obj, "passiveobject/atpriest_bykk/animation/2_inquistor/animation/ateradicatecross/crossend_bottom_10.ani", 150, 0, 0);
for(local i = 0; i < 6; i++){
local pooledObj = obj.getVar("effect").get_obj_vector(i);
if(pooledObj) pooledObj.setValid(false);
}
sq_SendDestroyPacketPassiveObject(obj);
}
break;
case SKILL_BYKK_INFERNO:
switch(subtype){
case 2:
local targetObj = obj.getVar("tar").get_obj_vector(0);
if(targetObj){
local activeObj = sq_GetCNRDObjectToActiveObject(targetObj);
if(!CNSquirrelAppendage.sq_IsAppendAppendage(activeObj, "character/demonicswordman/2_inquistor/ap_inferno_hold.nut")){
if(state != 22) obj.addSetStatePacket(22, null, STATE_PRIORITY_AUTO, false, "");
}
}
break;
}
break;
case 255:
switch(subtype){
case 1:
if(obj.getVar("damage").getInt(0) != obj.getVar("damage").getInt(1)){
if(!obj.isExistTimeEvent(1)) obj.setTimeEvent(1, 500, obj.getVar("time").getInt(0) / 500, true);
}
break;
}
break;
}
break;
case 3:
break;
case 4:
switch(skillIndex){
case SKILL_BYKK_HANDAWAKENTOSIN:
local targetObj = obj.getVar("tar").get_obj_vector(0);
if(!targetObj || targetObj.getState() == STATE_DIE) sq_SendDestroyPacketPassiveObject(obj);
break;
case SKILL_BYKK_ENVIOUSKISS:
if(subtype != 1) break;
local targetObj = obj.getVar("tar").get_obj_vector(0);
if(!targetObj || targetObj.getState() == STATE_DIE) sq_SendDestroyPacketPassiveObject(obj);
break;
}
break;
}
}
function isFrontObject_apt(obj,object)
{
if((obj.getDirection() == ENUM_DIRECTION_RIGHT && sq_GetXPos(obj) > sq_GetXPos(object)) || (obj.getDirection() == ENUM_DIRECTION_LEFT && sq_GetXPos(obj) < sq_GetXPos(object))) return false;
return true;
}