2981 lines
139 KiB
C
2981 lines
139 KiB
C
|
|
|
||
|
|
|
||
|
|
|
||
|
|
function onSetState_Fighter_Throw_bykk(obj, state, datas, isResetTimer)
|
||
|
|
{
|
||
|
|
if(obj.getThrowIndex() == 69 && obj.getThrowState() == 0){
|
||
|
|
obj.sq_IntVectClear();
|
||
|
|
obj.sq_IntVectPush(0);
|
||
|
|
obj.sq_AddSetStatePacket(STATE_FIGHTER_ILLSIONBOMB, STATE_PRIORITY_IGNORE_FORCE, true);
|
||
|
|
}
|
||
|
|
else if(obj.getThrowIndex() == 30 && obj.getThrowState() == 0){
|
||
|
|
obj.sq_IntVectClear();
|
||
|
|
obj.sq_IntVectPush(2);
|
||
|
|
obj.sq_AddSetStatePacket(STATE_FIGHTER_ILLSIONBOMB, STATE_PRIORITY_IGNORE_FORCE, true);
|
||
|
|
}
|
||
|
|
}
|
||
|
|
|
||
|
|
function illusionBomb_bykk(obj)
|
||
|
|
{
|
||
|
|
if(obj.getVar("illusionBomb").getBool(0)){
|
||
|
|
obj.setSkillCommandEnable(SKILL_FIGHTER_ILLSIONBOMB, true);
|
||
|
|
if(obj.sq_IsEnterSkill(SKILL_FIGHTER_ILLSIONBOMB) != -1){
|
||
|
|
obj.getVar("illusionBomb").setBool(0, false);
|
||
|
|
local skill = sq_GetSkill(obj, 69);
|
||
|
|
if(!skill.isSealFunction()){
|
||
|
|
obj.getVar("illusionBomb_boss").clear_obj_vector();
|
||
|
|
obj.getVar("illusionBomb_named").clear_obj_vector();
|
||
|
|
obj.getVar("illusionBomb_normal").clear_obj_vector();
|
||
|
|
obj.getVar("illusionBomb_target").clear_obj_vector();
|
||
|
|
local objectManager = obj.getObjectManager();
|
||
|
|
local objectNumber = objectManager.getCollisionObjectNumber();
|
||
|
|
for (local i = 0; i < objectNumber; i++){
|
||
|
|
local object = objectManager.getCollisionObject(i);
|
||
|
|
if(object.isObjectType(OBJECTTYPE_ACTIVE) && obj.isEnemy(object) && object.isInDamagableState(obj)){
|
||
|
|
local activeObj = sq_GetCNRDObjectToActiveObject(object);
|
||
|
|
if(sq_IsBoss(activeObj)) obj.getVar("illusionBomb_boss").push_obj_vector(activeObj);
|
||
|
|
else if(sq_IsNamed(activeObj)) obj.getVar("illusionBomb_named").push_obj_vector(activeObj);
|
||
|
|
else obj.getVar("illusionBomb_normal").push_obj_vector(activeObj);
|
||
|
|
}
|
||
|
|
}
|
||
|
|
if(obj.getVar("illusionBomb_boss").get_obj_vector_size() > 0){
|
||
|
|
for(local i = 0; i < obj.getVar("illusionBomb_boss").get_obj_vector_size(); i++){
|
||
|
|
local targetObj = obj.getVar("illusionBomb_boss").get_obj_vector(i);
|
||
|
|
if(targetObj) obj.getVar("illusionBomb_target").push_obj_vector(targetObj);
|
||
|
|
}
|
||
|
|
}
|
||
|
|
if(obj.getVar("illusionBomb_named").get_obj_vector_size() > 0){
|
||
|
|
for(local i = 0; i < obj.getVar("illusionBomb_named").get_obj_vector_size(); i++){
|
||
|
|
local targetObj = obj.getVar("illusionBomb_named").get_obj_vector(i);
|
||
|
|
if(targetObj) obj.getVar("illusionBomb_target").push_obj_vector(targetObj);
|
||
|
|
}
|
||
|
|
}
|
||
|
|
if(obj.getVar("illusionBomb_normal").get_obj_vector_size() > 0){
|
||
|
|
for(local i = 0; i < obj.getVar("illusionBomb_normal").get_obj_vector_size(); i++){
|
||
|
|
local targetObj = obj.getVar("illusionBomb_normal").get_obj_vector(i);
|
||
|
|
if(targetObj) obj.getVar("illusionBomb_target").push_obj_vector(targetObj);
|
||
|
|
}
|
||
|
|
}
|
||
|
|
if(obj.getVar("illusionBomb_obj").get_obj_vector_size() > 0){
|
||
|
|
for(local i = 0; i < obj.getVar("illusionBomb_obj").get_obj_vector_size(); i++){
|
||
|
|
local colObj = sq_GetCNRDObjectToCollisionObject(obj.getVar("illusionBomb_obj").get_obj_vector(i));
|
||
|
|
if(!colObj) continue;
|
||
|
|
local targetObj = obj.getVar("illusionBomb_target").get_obj_vector(0);
|
||
|
|
colObj.getVar("move").setInt(20, sq_GetXPos(targetObj));
|
||
|
|
colObj.getVar("move").setInt(21, sq_GetYPos(targetObj));
|
||
|
|
colObj.getVar("move").setInt(10, sq_GetXPos(colObj));
|
||
|
|
colObj.getVar("move").setInt(11, sq_GetYPos(colObj));
|
||
|
|
colObj.removeAllTimeEvent();
|
||
|
|
if((sq_GetXPos(targetObj) > sq_GetXPos(colObj) && colObj.getDirection() == ENUM_DIRECTION_LEFT) || (sq_GetXPos(targetObj) < sq_GetXPos(colObj) && colObj.getDirection() == ENUM_DIRECTION_RIGHT)) sq_SetCurrentDirection(colObj, sq_GetOppositeDirection(sq_GetDirection(colObj)));
|
||
|
|
colObj.addSetStatePacket(22, null, STATE_PRIORITY_AUTO, false, "");
|
||
|
|
}
|
||
|
|
}
|
||
|
|
}
|
||
|
|
else{
|
||
|
|
local totalDamage = 0;
|
||
|
|
local size = obj.getVar("illusionBomb_obj").get_obj_vector_size();
|
||
|
|
if(size > 0){
|
||
|
|
for(local i = 0; i < size; i++){
|
||
|
|
local colObj = sq_GetCNRDObjectToCollisionObject(obj.getVar("illusionBomb_obj").get_obj_vector(i));
|
||
|
|
if(!colObj) continue;
|
||
|
|
// colObj.getVar("move").setInt(20, sq_GetXPos(obj));
|
||
|
|
// colObj.getVar("move").setInt(21, sq_GetYPos(obj) - 1);
|
||
|
|
// colObj.getVar("move").setInt(10, sq_GetXPos(colObj));
|
||
|
|
// colObj.getVar("move").setInt(11, sq_GetYPos(colObj));
|
||
|
|
colObj.removeAllTimeEvent();
|
||
|
|
// if((sq_GetXPos(obj) > sq_GetXPos(colObj) && colObj.getDirection() == ENUM_DIRECTION_LEFT) || (sq_GetXPos(obj) < sq_GetXPos(colObj) && colObj.getDirection() == ENUM_DIRECTION_RIGHT)) sq_SetCurrentDirection(colObj, sq_GetOppositeDirection(sq_GetDirection(colObj)));
|
||
|
|
totalDamage = colObj.getVar("custom").getInt(10);
|
||
|
|
colObj.addSetStatePacket(23, null, STATE_PRIORITY_AUTO, false, "");
|
||
|
|
}
|
||
|
|
sq_BinaryStartWrite();
|
||
|
|
sq_BinaryWriteDword(2);
|
||
|
|
sq_BinaryWriteDword(size * totalDamage);
|
||
|
|
sq_BinaryWriteDword(sq_GetIntData(obj, 69, 0) * 3);
|
||
|
|
sq_SendCreatePassiveObjectPacket(obj, 24150, 0, 0, -1, 70, obj.getDirection());
|
||
|
|
}
|
||
|
|
}
|
||
|
|
}
|
||
|
|
}
|
||
|
|
}
|
||
|
|
|
||
|
|
|
||
|
|
|
||
|
|
function onSetState_IllusionBomb(obj, state, datas, isResetTimer)
|
||
|
|
{
|
||
|
|
if(!obj) return;
|
||
|
|
local subState = obj.sq_GetVectorData(datas, 0);
|
||
|
|
obj.setSkillSubState(subState);
|
||
|
|
obj.sq_StopMove();
|
||
|
|
switch(subState){
|
||
|
|
case 0:
|
||
|
|
local Ani = obj.sq_GetThrowChargeAni(2);
|
||
|
|
obj.setCurrentAnimation(Ani);
|
||
|
|
local skill_level = sq_GetSkillLevel(obj, SKILL_FIGHTER_ILLSIONBOMB);
|
||
|
|
local castTime = sq_GetCastTime(obj, SKILL_FIGHTER_ILLSIONBOMB, skill_level);
|
||
|
|
local animation = sq_GetCurrentAnimation(obj);
|
||
|
|
local startTime = animation.getDelaySum(false);
|
||
|
|
local speedRate = startTime.tofloat() / castTime.tofloat();
|
||
|
|
obj.sq_SetStaticSpeedInfo(SPEED_TYPE_CAST_SPEED, SPEED_TYPE_CAST_SPEED, SPEED_VALUE_DEFAULT, SPEED_VALUE_DEFAULT, speedRate, speedRate);
|
||
|
|
sq_StartDrawCastGauge(obj, castTime, true);
|
||
|
|
obj.setTimeEvent(2, castTime, 1, false);
|
||
|
|
break;
|
||
|
|
case 1:
|
||
|
|
obj.sq_PlaySound("FT_KENSIN");
|
||
|
|
local Ani = obj.sq_GetThrowShootAni(2);
|
||
|
|
obj.setCurrentAnimation(Ani);
|
||
|
|
obj.getVar("illusionBomb").setBool(0, true);
|
||
|
|
local skill_level = sq_GetSkillLevel(obj, SKILL_FIGHTER_ILLSIONBOMB);
|
||
|
|
local createNumber = sq_GetLevelData(obj, 8, 0, sq_GetSkillLevel(obj, 8));
|
||
|
|
local lifeTime = sq_GetLevelData(obj, 8, 1, sq_GetSkillLevel(obj, 8));
|
||
|
|
local powerDamage = obj.sq_GetPowerWithPassive(SKILL_FIGHTER_ILLSIONBOMB, -1, 0, -1, 1.0);
|
||
|
|
local sizeRate = sq_GetIntData(obj, SKILL_FIGHTER_ILLSIONBOMB, 0);
|
||
|
|
local time = sq_GetIntData(obj, SKILL_FIGHTER_ILLSIONBOMB, 1);
|
||
|
|
local range = sq_GetIntData(obj, 8, 0) / 4;
|
||
|
|
local baseangle = sq_getRandom(0,60);
|
||
|
|
for(local i = 0; i < createNumber; i++){
|
||
|
|
local angle = 360 / createNumber * i + baseangle;
|
||
|
|
local x = (sq_Cos(sq_ToRadian(angle.tofloat())) * range.tofloat()).tointeger();
|
||
|
|
local y = (sq_Sin(sq_ToRadian(angle.tofloat())) * (range / 3).tofloat()).tointeger();
|
||
|
|
sq_BinaryStartWrite();
|
||
|
|
sq_BinaryWriteDword(1);
|
||
|
|
sq_BinaryWriteDword(powerDamage);
|
||
|
|
sq_BinaryWriteDword(lifeTime);
|
||
|
|
sq_BinaryWriteDword(sizeRate);
|
||
|
|
sq_SendCreatePassiveObjectPacket(obj, 24150, 0, x, y, 0, obj.getDirection());
|
||
|
|
}
|
||
|
|
obj.setTimeEvent(1, time, 1, false);
|
||
|
|
break;
|
||
|
|
case 2:
|
||
|
|
local Ani = obj.sq_GetThrowChargeAni(2);
|
||
|
|
obj.setCurrentAnimation(Ani);
|
||
|
|
local skill_level = sq_GetSkillLevel(obj, 36);
|
||
|
|
local castTime = sq_GetCastTime(obj, 30, skill_level);
|
||
|
|
local animation = sq_GetCurrentAnimation(obj);
|
||
|
|
local startTime = animation.getDelaySum(false);
|
||
|
|
local speedRate = startTime.tofloat() / castTime.tofloat();
|
||
|
|
obj.sq_SetStaticSpeedInfo(SPEED_TYPE_CAST_SPEED, SPEED_TYPE_CAST_SPEED, SPEED_VALUE_DEFAULT, SPEED_VALUE_DEFAULT, speedRate, speedRate);
|
||
|
|
sq_StartDrawCastGauge(obj, castTime, true);
|
||
|
|
obj.setTimeEvent(3, castTime, 1, false);
|
||
|
|
break;
|
||
|
|
case 3:
|
||
|
|
local Ani = obj.sq_GetThrowShootAni(2);
|
||
|
|
obj.setCurrentAnimation(Ani);
|
||
|
|
obj.setTimeEvent(1, 300, 1, false);
|
||
|
|
local apdPath = "character/fighter/illusionbomb/ap_f_lightenchantweapon.nut";
|
||
|
|
local skillLevel = sq_GetSkillLevel(obj, 30);
|
||
|
|
local buffTime = sq_GetLevelData(obj, 30, 1, skillLevel);
|
||
|
|
local bonusRate = sq_GetLevelData(obj, 30, 0, skillLevel);
|
||
|
|
|
||
|
|
local objectManager = obj.getObjectManager();
|
||
|
|
local objectNumber = objectManager.getCollisionObjectNumber();
|
||
|
|
for (local i = 0; i < objectNumber; i++){
|
||
|
|
local object = objectManager.getCollisionObject(i);
|
||
|
|
if(object.isObjectType(OBJECTTYPE_CHARACTER) && !obj.isEnemy(object)){
|
||
|
|
local sqrObj = sq_GetCNRDObjectToSQRCharacter(object);
|
||
|
|
if(CNSquirrelAppendage.sq_IsAppendAppendage(sqrObj, apdPath)) CNSquirrelAppendage.sq_RemoveAppendage(sqrObj, apdPath);
|
||
|
|
local addAppendage = CNSquirrelAppendage.sq_AppendAppendage(sqrObj, obj, 30, false, apdPath, true);
|
||
|
|
if(buffTime > 0) addAppendage.sq_SetValidTime(buffTime);
|
||
|
|
else addAppendage.sq_SetValidTime(0);
|
||
|
|
addAppendage.setEnableIsBuff(true);
|
||
|
|
addAppendage.setBuffIconImage(2);
|
||
|
|
addAppendage.setAppendCauseSkill(BUFF_CAUSE_SKILL, sq_getJob(obj), 30, sq_GetSkillLevel(obj, 30));
|
||
|
|
CNSquirrelAppendage.sq_Append(addAppendage, sqrObj, obj, true);
|
||
|
|
|
||
|
|
local change_appendage = addAppendage.sq_getChangeStatus("lightenchantweapon");
|
||
|
|
if(!change_appendage) change_appendage = addAppendage.sq_AddChangeStatus("lightenchantweapon",sqrObj, obj, 0, CHANGE_STATUS_TYPE_PHYSICAL_ATTACK, true, 1000);
|
||
|
|
if(change_appendage){
|
||
|
|
change_appendage.clearParameter();
|
||
|
|
change_appendage.addParameter(CHANGE_STATUS_TYPE_EQUIPMENT_PHYSICAL_ATTACK, true, (bonusRate * 0.1).tofloat());
|
||
|
|
change_appendage.addParameter(CHANGE_STATUS_TYPE_EQUIPMENT_MAGICAL_ATTACK, true, (bonusRate * 0.1).tofloat());
|
||
|
|
change_appendage.addParameter(CHANGE_STATUS_TYPE_ADDITIONAL_PHYSICAL_GENUINE_ATTACK, true, (bonusRate * 0.1).tofloat());
|
||
|
|
change_appendage.addParameter(CHANGE_STATUS_TYPE_ADDITIONAL_MAGICAL_GENUINE_ATTACK, true, (bonusRate * 0.1).tofloat());
|
||
|
|
}
|
||
|
|
}
|
||
|
|
}
|
||
|
|
break;
|
||
|
|
}
|
||
|
|
}
|
||
|
|
|
||
|
|
function onEndCurrentAni_IllusionBomb(obj)
|
||
|
|
{
|
||
|
|
if(!obj) return;
|
||
|
|
if(!obj.sq_IsMyControlObject()) return;
|
||
|
|
local substate = obj.getSkillSubState();
|
||
|
|
switch(substate){
|
||
|
|
case 0:
|
||
|
|
obj.sq_IntVectClear();
|
||
|
|
obj.sq_IntVectPush(1);
|
||
|
|
obj.sq_AddSetStatePacket(STATE_FIGHTER_ILLSIONBOMB, STATE_PRIORITY_IGNORE_FORCE, true);
|
||
|
|
break;
|
||
|
|
case 2:
|
||
|
|
obj.sq_IntVectClear();
|
||
|
|
obj.sq_IntVectPush(3);
|
||
|
|
obj.sq_AddSetStatePacket(STATE_FIGHTER_ILLSIONBOMB, STATE_PRIORITY_IGNORE_FORCE, true);
|
||
|
|
break;
|
||
|
|
case 3:
|
||
|
|
obj.sq_IntVectClear();
|
||
|
|
obj.sq_AddSetStatePacket(STATE_STAND, STATE_PRIORITY_USER, false);
|
||
|
|
break;
|
||
|
|
}
|
||
|
|
}
|
||
|
|
|
||
|
|
function onTimeEvent_IllusionBomb(obj, timeEventIndex, timeEventCount)
|
||
|
|
{
|
||
|
|
if(!obj) return true;
|
||
|
|
if(timeEventIndex == 1) obj.sq_AddSetStatePacket(STATE_STAND, STATE_PRIORITY_USER, false);
|
||
|
|
else if(timeEventIndex == 2){
|
||
|
|
obj.sq_IntVectClear();
|
||
|
|
obj.sq_IntVectPush(1);
|
||
|
|
obj.sq_AddSetStatePacket(STATE_FIGHTER_ILLSIONBOMB, STATE_PRIORITY_IGNORE_FORCE, true);
|
||
|
|
}
|
||
|
|
else if(timeEventIndex == 3){
|
||
|
|
obj.sq_IntVectClear();
|
||
|
|
obj.sq_IntVectPush(3);
|
||
|
|
obj.sq_AddSetStatePacket(STATE_FIGHTER_ILLSIONBOMB, STATE_PRIORITY_IGNORE_FORCE, true);
|
||
|
|
}
|
||
|
|
}
|
||
|
|
|
||
|
|
|
||
|
|
|
||
|
|
function setCustomData_po_illusionbomb_bykk(obj,receiveData)
|
||
|
|
{
|
||
|
|
if(!obj) return;
|
||
|
|
local sub = receiveData.readDword();
|
||
|
|
obj.getVar("sub").setInt(10, sub);
|
||
|
|
switch(sub){
|
||
|
|
case 1://body
|
||
|
|
local sqrChr = sq_GetCNRDObjectToSQRCharacter(obj.getTopCharacter());
|
||
|
|
if(sqrChr.getVar("illusionBomb_obj").get_obj_vector_size() > 0){
|
||
|
|
if(!sqrChr.getVar("illusionBomb_obj").is_obj_vector(obj)) sqrChr.getVar("illusionBomb_obj").push_obj_vector(obj);
|
||
|
|
}
|
||
|
|
else{
|
||
|
|
sqrChr.getVar("illusionBomb_obj").clear_obj_vector();
|
||
|
|
sqrChr.getVar("illusionBomb_obj").push_obj_vector(obj);
|
||
|
|
}
|
||
|
|
local powerDamage = receiveData.readDword();
|
||
|
|
local lifeTime = receiveData.readDword();
|
||
|
|
local sizeRate = receiveData.readDword();
|
||
|
|
obj.setTimeEvent(1, lifeTime, 1, false);
|
||
|
|
obj.getVar("custom").setInt(10, powerDamage);
|
||
|
|
obj.getVar("custom").setInt(11, lifeTime);
|
||
|
|
obj.getVar("custom").setInt(12, sizeRate);
|
||
|
|
obj.addSetStatePacket(20, null, STATE_PRIORITY_AUTO, false, "");
|
||
|
|
break;
|
||
|
|
case 2://explosion
|
||
|
|
local powerDamage = receiveData.readDword();
|
||
|
|
local sizeRate = receiveData.readDword();
|
||
|
|
obj.getVar("custom").setInt(12, sizeRate);
|
||
|
|
sq_SetCurrentAttackInfo(obj, sq_GetCustomAttackInfo(obj, 0));
|
||
|
|
sq_SetCurrentAttackPower(sq_GetCurrentAttackInfo(obj), powerDamage);
|
||
|
|
obj.addSetStatePacket(24, null, STATE_PRIORITY_AUTO, false, "");
|
||
|
|
break;
|
||
|
|
}
|
||
|
|
}
|
||
|
|
|
||
|
|
function setState_po_illusionbomb_bykk(obj, state, datas)
|
||
|
|
{
|
||
|
|
if(!obj) return;
|
||
|
|
obj.getVar("state").setInt(10, state);
|
||
|
|
switch(state){
|
||
|
|
case 20:
|
||
|
|
local ani = obj.getCustomAnimation(0);
|
||
|
|
obj.setCurrentAnimation(ani);
|
||
|
|
break;
|
||
|
|
case 21:
|
||
|
|
local ani = obj.getCustomAnimation(1);
|
||
|
|
sq_Rewind(ani);
|
||
|
|
obj.setCurrentAnimation(ani);
|
||
|
|
break;
|
||
|
|
case 22:
|
||
|
|
local ani = obj.getCustomAnimation(2);
|
||
|
|
obj.setCurrentAnimation(ani);
|
||
|
|
obj.setTimeEvent(2, 15, 15, false);
|
||
|
|
break;
|
||
|
|
case 23:
|
||
|
|
sq_setCurrentAxisPos(obj, 2, 70);
|
||
|
|
local ani = obj.getCustomAnimation(3);
|
||
|
|
obj.setCurrentAnimation(ani);
|
||
|
|
break;
|
||
|
|
case 24:
|
||
|
|
local ani = obj.getCustomAnimation(4);
|
||
|
|
obj.setCurrentAnimation(ani);
|
||
|
|
local currentAni = obj.getCurrentAnimation();
|
||
|
|
local sizeRate = obj.getVar("custom").getInt(12).tofloat() / 100.0;
|
||
|
|
sq_SetAttackBoundingBoxSizeRate(currentAni, sizeRate, sizeRate, sizeRate);
|
||
|
|
obj.setTimeEvent(11, 200, 2, true);
|
||
|
|
obj.setTimeEvent(12, 50, 4, true);
|
||
|
|
obj.setTimeEvent(13, 15, 4, true);
|
||
|
|
obj.setTimeEvent(14, 100, 2, true);
|
||
|
|
break;
|
||
|
|
}
|
||
|
|
|
||
|
|
}
|
||
|
|
|
||
|
|
function onEndCurrentAni_po_illusionbomb_bykk(obj)
|
||
|
|
{
|
||
|
|
if(!obj) return;
|
||
|
|
local state = obj.getVar("state").getInt(10);
|
||
|
|
switch(state){
|
||
|
|
case 20: obj.addSetStatePacket(21, null, STATE_PRIORITY_AUTO, false, ""); break;
|
||
|
|
case 21: obj.addSetStatePacket(21, null, STATE_PRIORITY_AUTO, false, ""); break;
|
||
|
|
case 23: sq_SendDestroyPacketPassiveObject(obj); break;
|
||
|
|
case 24: sq_SendDestroyPacketPassiveObject(obj); break;
|
||
|
|
}
|
||
|
|
}
|
||
|
|
|
||
|
|
function onTimeEvent_po_illusionbomb_bykk(obj, timeEventIndex, timeEventCount)
|
||
|
|
{
|
||
|
|
if(!obj) return true;
|
||
|
|
local sizeRate = obj.getVar("custom").getInt(12);
|
||
|
|
sizeRate = sizeRate.tofloat() / 100.0;
|
||
|
|
switch(timeEventIndex){
|
||
|
|
case 1: obj.addSetStatePacket(23, null, STATE_PRIORITY_AUTO, false, ""); break;
|
||
|
|
case 2:
|
||
|
|
//print(obj.getVar("move").getInt(20));
|
||
|
|
//print(obj.getVar("move").getInt(21));
|
||
|
|
if(obj.getVar("move").getInt(20) < 1 || obj.getVar("move").getInt(21) < 1){
|
||
|
|
obj.stopTimeEvent(2);
|
||
|
|
obj.addSetStatePacket(23, null, STATE_PRIORITY_AUTO, false, "");
|
||
|
|
return;
|
||
|
|
}
|
||
|
|
local vx = sq_GetUniformVelocity(obj.getVar("move").getInt(10), obj.getVar("move").getInt(20), timeEventCount, 15);
|
||
|
|
local vy = sq_GetUniformVelocity(obj.getVar("move").getInt(11), obj.getVar("move").getInt(21), timeEventCount, 15);
|
||
|
|
sq_setCurrentAxisPos(obj, 0, vx);
|
||
|
|
sq_setCurrentAxisPos(obj, 1, vy);
|
||
|
|
if(timeEventCount == 15){
|
||
|
|
sq_BinaryStartWrite();
|
||
|
|
sq_BinaryWriteDword(2);
|
||
|
|
sq_BinaryWriteDword(obj.getVar("custom").getInt(10));
|
||
|
|
sq_BinaryWriteDword(obj.getVar("custom").getInt(12));
|
||
|
|
sq_SendCreatePassiveObjectPacket(obj, 24150, 0, 0, 1, 70, obj.getDirection());
|
||
|
|
obj.addSetStatePacket(23, null, STATE_PRIORITY_AUTO, false, "");
|
||
|
|
}
|
||
|
|
break;
|
||
|
|
case 11:
|
||
|
|
local pooledObj = sq_AddDrawOnlyAniFromParent(obj,"passiveobject/common/animation/lightexplosionparticle1.ani", sq_getRandom(-10,10), sq_getRandom(-10,10), sq_getRandom(-10,10));
|
||
|
|
local currentAni = pooledObj.getCurrentAnimation();
|
||
|
|
currentAni.setImageRateFromOriginal(sizeRate, sizeRate);
|
||
|
|
break;
|
||
|
|
case 12:
|
||
|
|
local pooledObj = sq_AddDrawOnlyAniFromParent(obj,"passiveobject/common/animation/lightexplosionparticle2.ani", 0, 2, 0);
|
||
|
|
local currentAni = pooledObj.getCurrentAnimation();
|
||
|
|
currentAni.setImageRateFromOriginal(sizeRate, sizeRate);
|
||
|
|
break;
|
||
|
|
case 13:
|
||
|
|
local pooledObj = sq_AddDrawOnlyAniFromParent(obj,"passiveobject/common/animation/lightexplosionparticle3.ani", 0, 1, 1);
|
||
|
|
local currentAni = pooledObj.getCurrentAnimation();
|
||
|
|
local angle = sq_ToRadian(360.0 * timeEventCount / 16);
|
||
|
|
sq_SetfRotateAngle(currentAni, angle);
|
||
|
|
currentAni.setImageRateFromOriginal(sizeRate * 2.0, sizeRate * 2.0);
|
||
|
|
break;
|
||
|
|
case 14:
|
||
|
|
local pooledObj = sq_AddDrawOnlyAniFromParent(obj,"passiveobject/common/animation/lightexplosionparticle4.ani", sq_getRandom(-30,30), sq_getRandom(-30,30), sq_getRandom(-30,30));
|
||
|
|
local currentAni = pooledObj.getCurrentAnimation();
|
||
|
|
currentAni.setImageRateFromOriginal(sizeRate, sizeRate);
|
||
|
|
break;
|
||
|
|
}
|
||
|
|
}
|
||
|
|
|
||
|
|
function procAppend_po_illusionbomb_bykk(obj)
|
||
|
|
{
|
||
|
|
return;
|
||
|
|
}
|
||
|
|
|
||
|
|
function onAttack_po_illusionbomb_bykk(obj, damager, boundingBox, isStuck)
|
||
|
|
{
|
||
|
|
if(!obj) return;
|
||
|
|
local sub = obj.getVar("sub").getInt(10);
|
||
|
|
local state = obj.getVar("state").getInt(10);
|
||
|
|
if(sub == 1 && state == 21){
|
||
|
|
sq_BinaryStartWrite();
|
||
|
|
sq_BinaryWriteDword(2);
|
||
|
|
sq_BinaryWriteDword(obj.getVar("custom").getInt(10));
|
||
|
|
sq_BinaryWriteDword(obj.getVar("custom").getInt(12));
|
||
|
|
sq_SendCreatePassiveObjectPacket(obj, 24150, 0, 0, 1, 70, obj.getDirection());
|
||
|
|
obj.addSetStatePacket(23, null, STATE_PRIORITY_AUTO, false, "");
|
||
|
|
}
|
||
|
|
}
|
||
|
|
|
||
|
|
|
||
|
|
///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
||
|
|
|
||
|
|
function createOnlyDrawObject_Fighter_bykk(obj,aniPath,isTrue,direction,x,y,z,drawlayer)
|
||
|
|
{
|
||
|
|
local ani = sq_CreateAnimation("",aniPath);
|
||
|
|
local pooledObj = sq_CreatePooledObject(ani,isTrue);
|
||
|
|
sq_SetCurrentDirection(pooledObj, direction);
|
||
|
|
pooledObj.setCurrentPos(x,y,z);
|
||
|
|
pooledObj = sq_SetEnumDrawLayer(pooledObj, drawlayer);
|
||
|
|
sq_AddObject(obj, pooledObj, OBJECTTYPE_DRAWONLY, false);
|
||
|
|
return pooledObj;
|
||
|
|
}
|
||
|
|
|
||
|
|
function createOnlyDrawObjectEX_Fighter_bykk(obj,aniPath,isTrue,direction,x,y,z,drawlayer,sizeRateX,sizeRateY)
|
||
|
|
{
|
||
|
|
local ani = sq_CreateAnimation("",aniPath);
|
||
|
|
local pooledObj = sq_CreatePooledObject(ani,isTrue);
|
||
|
|
sq_SetCurrentDirection(pooledObj, direction);
|
||
|
|
pooledObj.setCurrentPos(x,y,z);
|
||
|
|
local currentAni = pooledObj.getCurrentAnimation();
|
||
|
|
sizeRateX = sizeRateX.tofloat() / 100.0;
|
||
|
|
sizeRateY = sizeRateY.tofloat() / 100.0;
|
||
|
|
currentAni.setImageRateFromOriginal(sizeRateX, sizeRateY);
|
||
|
|
pooledObj = sq_SetEnumDrawLayer(pooledObj, drawlayer);
|
||
|
|
sq_AddObject(obj, pooledObj, OBJECTTYPE_DRAWONLY, false);
|
||
|
|
return pooledObj;
|
||
|
|
}
|
||
|
|
|
||
|
|
function createSkillPassive_Fighter_bykk(obj,passiveObj,objnum,x,y,z,direction,job,skillIndex,subtype,pushv1,pushv2,pushv3,pushv4,pushv5,pushv6,pushv7,pushv8)
|
||
|
|
{
|
||
|
|
if(!obj || !passiveObj || obj.getState() == STATE_DIE) return;
|
||
|
|
local destX_01 = 0;
|
||
|
|
local destY_01 = 0;
|
||
|
|
if(!isSameObject(obj, passiveObj)){
|
||
|
|
destX_01 = passiveObj.getXPos() - obj.getXPos();
|
||
|
|
destY_01 = passiveObj.getYPos() - obj.getYPos();
|
||
|
|
if(direction == ENUM_DIRECTION_LEFT) destX_01 = obj.getXPos() - passiveObj.getXPos();
|
||
|
|
}
|
||
|
|
sq_BinaryStartWrite();
|
||
|
|
sq_BinaryWriteDword(job);
|
||
|
|
sq_BinaryWriteDword(skillIndex);
|
||
|
|
sq_BinaryWriteDword(subtype);
|
||
|
|
sq_BinaryWriteDword(pushv1);
|
||
|
|
sq_BinaryWriteDword(pushv2);
|
||
|
|
sq_BinaryWriteDword(pushv3);
|
||
|
|
sq_BinaryWriteDword(pushv4);
|
||
|
|
sq_BinaryWriteDword(pushv5);
|
||
|
|
sq_BinaryWriteDword(pushv6);
|
||
|
|
sq_BinaryWriteDword(pushv7);
|
||
|
|
sq_BinaryWriteDword(pushv8);
|
||
|
|
sq_SendCreatePassiveObjectPacket(obj, objnum, 0, destX_01 + x, destY_01 + y, z, direction);
|
||
|
|
}
|
||
|
|
|
||
|
|
|
||
|
|
|
||
|
|
//obj
|
||
|
|
|
||
|
|
function setCustomData_po_fighter_bykk(obj, receiveData)
|
||
|
|
{
|
||
|
|
if(!obj) return;
|
||
|
|
local sqrChr = sq_GetCNRDObjectToSQRCharacter(obj.getTopCharacter());
|
||
|
|
if(!sqrChr) return;
|
||
|
|
local job = receiveData.readDword();
|
||
|
|
local skillIndex = receiveData.readDword();
|
||
|
|
local subtype = receiveData.readDword();
|
||
|
|
|
||
|
|
obj.getVar("job").setInt(0, job);
|
||
|
|
obj.getVar("skillIndex").setInt(0, skillIndex);
|
||
|
|
obj.getVar("subtype").setInt(0, subtype);
|
||
|
|
|
||
|
|
switch(job){
|
||
|
|
case 0:
|
||
|
|
break;
|
||
|
|
case 1:
|
||
|
|
switch(skillIndex){
|
||
|
|
case SKILL_BYKK_SKYTHUNDERSTEP:
|
||
|
|
local totalDamage = receiveData.readDword();
|
||
|
|
local ani = sq_CreateAnimation("","passiveobject/1_fighter_bykk/1_nenmaster_bykk/animation/skythunderstep/skythunderstep_end_exp_plism.ani");
|
||
|
|
obj.setCurrentAnimation(ani);
|
||
|
|
sq_SetCurrentAttackInfo(obj, sq_GetCustomAttackInfo(obj, 36));
|
||
|
|
sq_SetCurrentAttackBonusRate(sq_GetCurrentAttackInfo(obj), totalDamage);
|
||
|
|
break;
|
||
|
|
}
|
||
|
|
break;
|
||
|
|
case 2:
|
||
|
|
switch(skillIndex){
|
||
|
|
case SKILL_BYKK_LIGHTNINGSHIFT:
|
||
|
|
switch(subtype){
|
||
|
|
case 1:
|
||
|
|
local subState = receiveData.readDword();
|
||
|
|
local totalDamage = receiveData.readDword();
|
||
|
|
local aniPath = [
|
||
|
|
"passiveobject/1_fighter_bykk/2_striker_bykk/animation/lightningshift/lightningshifthiteffect02a_00.ani",
|
||
|
|
"passiveobject/1_fighter_bykk/2_striker_bykk/animation/lightningshift/lightningshifthiteffect02b_00.ani",
|
||
|
|
"passiveobject/1_fighter_bykk/2_striker_bykk/animation/lightningshift/lightningshifthiteffect02c_00.ani",
|
||
|
|
"passiveobject/1_fighter_bykk/2_striker_bykk/animation/lightningshift/lightningshifthiteffect02d_00.ani",
|
||
|
|
"passiveobject/1_fighter_bykk/2_striker_bykk/animation/lightningshift/lightningshifthiteffect02e_00.ani",
|
||
|
|
"passiveobject/1_fighter_bykk/2_striker_bykk/animation/lightningshift/lightningshifthiteffect02f_00.ani",
|
||
|
|
"passiveobject/1_fighter_bykk/2_striker_bykk/animation/lightningshift/lightningshifthiteffect02g_00.ani",
|
||
|
|
];
|
||
|
|
local ani = sq_CreateAnimation("",aniPath[subState]);
|
||
|
|
obj.setCurrentAnimation(ani);
|
||
|
|
sq_SetCurrentAttackInfo(obj, sq_GetCustomAttackInfo(obj, subState + 37));
|
||
|
|
sq_SetCurrentAttackBonusRate(sq_GetCurrentAttackInfo(obj), totalDamage);
|
||
|
|
sq_SetShake(obj, 12, 200);
|
||
|
|
sq_flashScreen(obj,20,10,80,104, sq_RGB(0,0,0), GRAPHICEFFECT_NONE, ENUM_DRAWLAYER_BOTTOM);
|
||
|
|
break;
|
||
|
|
case 2:
|
||
|
|
local subState = receiveData.readDword();
|
||
|
|
local totalDamage = receiveData.readDword();
|
||
|
|
local ani = sq_CreateAnimation("","passiveobject/1_fighter_bykk/2_striker_bykk/animation/lightningshift/lightningshifthiteffect02h_00.ani");
|
||
|
|
obj.setCurrentAnimation(ani);
|
||
|
|
sq_SetCurrentAttackInfo(obj, sq_GetCustomAttackInfo(obj, 44));
|
||
|
|
sq_SetCurrentAttackBonusRate(sq_GetCurrentAttackInfo(obj), totalDamage);
|
||
|
|
sq_SetShake(obj, 20, 300);
|
||
|
|
sq_flashScreen(obj,20,350,100,204, sq_RGB(255,255,255), GRAPHICEFFECT_NONE, ENUM_DRAWLAYER_BOTTOM);
|
||
|
|
break;
|
||
|
|
}
|
||
|
|
break;
|
||
|
|
}
|
||
|
|
break;
|
||
|
|
case 3:
|
||
|
|
switch(skillIndex){
|
||
|
|
case SKILL_FWBYKK_THROWSAND:
|
||
|
|
switch(subtype){
|
||
|
|
case 1:
|
||
|
|
local totalDamage = receiveData.readDword();
|
||
|
|
local sizeRate = receiveData.readDword();
|
||
|
|
local prob = receiveData.readDword();
|
||
|
|
local time = receiveData.readDword();
|
||
|
|
local level = receiveData.readDword();
|
||
|
|
local decreaseRate = receiveData.readDword();
|
||
|
|
local decreaseRate2 = receiveData.readDword();
|
||
|
|
local bonusRate = sqrChr.sq_GetBonusRateWithPassive(SKILL_FWBYKK_ENCHANTPOISON, -1, 10, 1.0) + 100;
|
||
|
|
local damage = sqrChr.sq_GetBonusRateWithPassive(SKILL_FWBYKK_THROWSAND, -1, 7, bonusRate.tofloat() / 1000.0) + 100;
|
||
|
|
obj.getVar("PoisonDamage").setInt(0, damage);
|
||
|
|
local ani = sq_CreateAnimation("","passiveobject/1_fighter_bykk/3_streetfighter/animation/throwsand.ani");
|
||
|
|
obj.setCurrentAnimation(ani);
|
||
|
|
sq_SetCurrentAttackInfo(obj, sq_GetCustomAttackInfo(obj, 26));
|
||
|
|
sq_SetCurrentAttackBonusRate(sq_GetCurrentAttackInfo(obj), totalDamage);
|
||
|
|
local attackInfo = sq_GetCurrentAttackInfo(obj);
|
||
|
|
prob = (prob.tofloat() / 10.0).tointeger();
|
||
|
|
sq_SetChangeStatusIntoAttackInfo(attackInfo, 0, ACTIVESTATUS_BLIND, prob, level, time);
|
||
|
|
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_FWBYKK_GRABEXPLOSION:
|
||
|
|
switch(subtype){
|
||
|
|
case 1:
|
||
|
|
local totalDamage = receiveData.readDword();
|
||
|
|
local sizeRate = receiveData.readDword();
|
||
|
|
local prob = receiveData.readDword();
|
||
|
|
local time = receiveData.readDword();
|
||
|
|
local level = receiveData.readDword();
|
||
|
|
obj.getVar("custom").setInt(0, sizeRate);
|
||
|
|
local bonusRate = sqrChr.sq_GetBonusRateWithPassive(SKILL_FWBYKK_ENCHANTPOISON, -1, 10, 1.0) + 100;
|
||
|
|
local damage = sqrChr.sq_GetBonusRateWithPassive(SKILL_FWBYKK_GRABEXPLOSION, -1, 12, bonusRate.tofloat() / 1000.0) + 100;
|
||
|
|
obj.getVar("PoisonDamage").setInt(0, damage);
|
||
|
|
local ani = sq_CreateAnimation("","passiveobject/common/animation/fireexplosion.ani");
|
||
|
|
obj.setCurrentAnimation(ani);
|
||
|
|
sq_SetCurrentAttackInfo(obj, sq_GetCustomAttackInfo(obj, 12));
|
||
|
|
sq_SetCurrentAttackBonusRate(sq_GetCurrentAttackInfo(obj), totalDamage);
|
||
|
|
local attackInfo = sq_GetCurrentAttackInfo(obj);
|
||
|
|
sq_SetChangeStatusIntoAttackInfo(attackInfo, 0, ACTIVESTATUS_BURN, prob, level,time);
|
||
|
|
obj.setTimeEvent(1, 200, 2, true);
|
||
|
|
obj.setTimeEvent(2, 50, 2, true);
|
||
|
|
obj.setTimeEvent(3, 15, 4, true);
|
||
|
|
obj.setTimeEvent(4, 100, 1, true);
|
||
|
|
if(sizeRate > 100){
|
||
|
|
local currentAni = obj.getCurrentAnimation();
|
||
|
|
sizeRate = sizeRate.tofloat() / 100.0;
|
||
|
|
sq_SetAttackBoundingBoxSizeRate(currentAni, sizeRate, sizeRate, sizeRate);
|
||
|
|
}
|
||
|
|
obj.sq_PlaySound("B_FIRE_EXPLOSION");
|
||
|
|
sq_SetMyShake(obj, 15, 120);
|
||
|
|
break;
|
||
|
|
case 2:
|
||
|
|
local totalDamage = receiveData.readDword();
|
||
|
|
local sizeRate = receiveData.readDword();
|
||
|
|
local holdTime = receiveData.readDword();
|
||
|
|
local group = receiveData.readDword();
|
||
|
|
local uniqueId = receiveData.readDword();
|
||
|
|
local proc = receiveData.readDword();
|
||
|
|
local time = receiveData.readDword();
|
||
|
|
local level = receiveData.readDword();
|
||
|
|
local targetObj = sq_GetObject(obj, group, uniqueId);
|
||
|
|
if(targetObj && targetObj.getState() != STATE_DIE){
|
||
|
|
obj.getVar("tar").clear_obj_vector();
|
||
|
|
obj.getVar("tar").push_obj_vector(targetObj);
|
||
|
|
obj.getVar("custom").setInt(0, totalDamage);
|
||
|
|
obj.getVar("custom").setInt(1, sizeRate);
|
||
|
|
obj.getVar("custom").setInt(2, proc);
|
||
|
|
obj.getVar("custom").setInt(3, time);
|
||
|
|
obj.getVar("custom").setInt(4, level);
|
||
|
|
local ani = sq_CreateAnimation("","character/fighter/effect/animation/3_streetfighter_bykk/grabexplosion/lv95poisonspirit/poisonspirit_00.ani");
|
||
|
|
obj.setCurrentAnimation(ani);
|
||
|
|
|
||
|
|
local apdPath = "character/fighter/3streetfighter_bykk/ap_grabexplosion_hold.nut";
|
||
|
|
if(!CNSquirrelAppendage.sq_IsAppendAppendage(obj, apdPath)){
|
||
|
|
local AddAppendage = CNSquirrelAppendage.sq_AppendAppendage(targetObj, obj, -1, false, apdPath, true);
|
||
|
|
sq_HoldAndDelayDie(targetObj, obj, true, true, true, 200, 200, ENUM_DIRECTION_NEUTRAL, AddAppendage);
|
||
|
|
AddAppendage.sq_SetValidTime(holdTime + 100);
|
||
|
|
}
|
||
|
|
obj.setTimeEvent(0, holdTime, 1, false);
|
||
|
|
}
|
||
|
|
break;
|
||
|
|
}
|
||
|
|
break;
|
||
|
|
case SKILL_FWBYKK_GRABEXPLOSIONEX:
|
||
|
|
switch(subtype){
|
||
|
|
case 1:
|
||
|
|
local totalDamage = receiveData.readDword();
|
||
|
|
local sizeRate = receiveData.readDword();
|
||
|
|
local prob = receiveData.readDword();
|
||
|
|
local time = receiveData.readDword();
|
||
|
|
local level = receiveData.readDword();
|
||
|
|
obj.getVar("custom").setInt(0, sizeRate);
|
||
|
|
local bonusRate = sqrChr.sq_GetBonusRateWithPassive(SKILL_FWBYKK_ENCHANTPOISON, -1, 10, 1.0) + 100;
|
||
|
|
local damage = sqrChr.sq_GetBonusRateWithPassive(SKILL_FWBYKK_GRABEXPLOSIONEX, -1, 21, bonusRate.tofloat() / 1000.0) + 100;
|
||
|
|
obj.getVar("PoisonDamage").setInt(0, damage);
|
||
|
|
local ani = sq_CreateAnimation("","passiveobject/1_fighter_bykk/3_streetfighter/animation/grabexplosionex/darkexplosion[grap].ani");
|
||
|
|
obj.setCurrentAnimation(ani);
|
||
|
|
sq_SetCurrentAttackInfo(obj, sq_GetCustomAttackInfo(obj, 13));
|
||
|
|
sq_SetCurrentAttackBonusRate(sq_GetCurrentAttackInfo(obj), totalDamage);
|
||
|
|
local attackInfo = sq_GetCurrentAttackInfo(obj);
|
||
|
|
sq_SetChangeStatusIntoAttackInfo(attackInfo, 0, ACTIVESTATUS_SLOW, prob, level, time);
|
||
|
|
obj.setTimeEvent(1, 200, 2, true);
|
||
|
|
obj.setTimeEvent(2, 50, 2, true);
|
||
|
|
obj.setTimeEvent(3, 15, 4, true);
|
||
|
|
obj.setTimeEvent(4, 100, 1, true);
|
||
|
|
if(sizeRate > 100){
|
||
|
|
local currentAni = obj.getCurrentAnimation();
|
||
|
|
sizeRate = sizeRate.tofloat() / 100.0;
|
||
|
|
sq_SetAttackBoundingBoxSizeRate(currentAni, sizeRate, sizeRate, sizeRate);
|
||
|
|
}
|
||
|
|
obj.sq_PlaySound("B_FIRE_EXPLOSION");
|
||
|
|
sq_SetMyShake(obj, 15, 200);
|
||
|
|
break;
|
||
|
|
}
|
||
|
|
break;
|
||
|
|
case SKILL_FWBYKK_HIDDENSTING:
|
||
|
|
switch(subtype){
|
||
|
|
case 1:
|
||
|
|
local totalDamage = receiveData.readDword();
|
||
|
|
local stunTime = receiveData.readDword();
|
||
|
|
local bonusRate = sqrChr.sq_GetBonusRateWithPassive(SKILL_FWBYKK_ENCHANTPOISON, -1, 10, 1.0) + 100;
|
||
|
|
local damage = sqrChr.sq_GetBonusRateWithPassive(SKILL_FWBYKK_HIDDENSTING, -1, 13, bonusRate.tofloat() / 1000.0) + 100;
|
||
|
|
obj.getVar("PoisonDamage").setInt(0, damage);
|
||
|
|
local ani = sq_CreateAnimation("","passiveobject/1_fighter_bykk/3_streetfighter/animation/hiddensting/lv95poisonspirit/hiddenstingfront_01.ani");
|
||
|
|
obj.setCurrentAnimation(ani);
|
||
|
|
sq_SetCurrentAttackInfo(obj, sq_GetCustomAttackInfo(obj, 32));
|
||
|
|
sq_SetCurrentAttackBonusRate(sq_GetCurrentAttackInfo(obj), totalDamage);
|
||
|
|
local attackInfo = sq_GetCurrentAttackInfo(obj);
|
||
|
|
sq_SetAttackInfoForceHitStunTime(attackInfo, stunTime);
|
||
|
|
obj.setTimeEvent(1, 250, 1, false);
|
||
|
|
break;
|
||
|
|
}
|
||
|
|
break;
|
||
|
|
case SKILL_FWBYKK_BLOCKBUSTER:
|
||
|
|
switch(subtype){
|
||
|
|
case 1:
|
||
|
|
local totalDamage = receiveData.readDword();
|
||
|
|
local proc = receiveData.readDword();
|
||
|
|
local time = receiveData.readDword();
|
||
|
|
local level = receiveData.readDword();
|
||
|
|
local sizeRate = receiveData.readDword();
|
||
|
|
local bonusRate = sqrChr.sq_GetBonusRateWithPassive(SKILL_FWBYKK_ENCHANTPOISON, -1, 10, 1.0) + 100;
|
||
|
|
local damage = sqrChr.sq_GetBonusRateWithPassive(SKILL_FWBYKK_BLOCKBUSTER, -1, 9, bonusRate.tofloat() / 1000.0) + 100;
|
||
|
|
obj.getVar("PoisonDamage").setInt(0, damage);
|
||
|
|
local ani = sq_CreateAnimation("","passiveobject/1_fighter_bykk/3_streetfighter/animation/blockbustersub.ani");
|
||
|
|
obj.setCurrentAnimation(ani);
|
||
|
|
sq_SetCurrentAttackInfo(obj, sq_GetCustomAttackInfo(obj, 4));
|
||
|
|
sq_SetCurrentAttackBonusRate(sq_GetCurrentAttackInfo(obj), totalDamage);
|
||
|
|
local attackInfo = sq_GetCurrentAttackInfo(obj);
|
||
|
|
sq_SetChangeStatusIntoAttackInfo(attackInfo, 0, ACTIVESTATUS_STUN, proc, level, time);
|
||
|
|
sq_CreateParticle("passiveobject/1_fighter_bykk/particle/blockbusterpiece.ptl", obj, 0, 0, 0, true, 30, 0, 1);
|
||
|
|
local aniPath = "passiveobject/1_fighter_bykk/3_streetfighter/animation/blockbusterdust.ani"
|
||
|
|
createOnlyDrawObjectEX_Fighter_bykk(obj,aniPath,true,sq_GetDirection(obj),sq_GetXPos(obj),sq_GetYPos(obj),sq_GetZPos(obj),ENUM_DRAWLAYER_NORMAL,sizeRate,sizeRate);
|
||
|
|
if(sizeRate > 100){
|
||
|
|
local currentAni = obj.getCurrentAnimation();
|
||
|
|
sizeRate = sizeRate.tofloat() / 100.0;
|
||
|
|
currentAni.setImageRateFromOriginal(sizeRate, sizeRate);
|
||
|
|
currentAni.setAutoLayerWorkAnimationAddSizeRate(sizeRate);
|
||
|
|
sq_SetAttackBoundingBoxSizeRate(currentAni, sizeRate, sizeRate, sizeRate);
|
||
|
|
}
|
||
|
|
sq_SetMyShake(obj, 3, 100);
|
||
|
|
break;
|
||
|
|
}
|
||
|
|
break;
|
||
|
|
case SKILL_FWBYKK_MOUNT:
|
||
|
|
switch(subtype){
|
||
|
|
case 1:
|
||
|
|
case 2:
|
||
|
|
case 3:
|
||
|
|
local totalDamage = receiveData.readDword();
|
||
|
|
local sizeRate = receiveData.readDword();
|
||
|
|
local subState = receiveData.readDword();
|
||
|
|
local aniPath = ["","passiveobject/character/fighter/animation/mountsub.ani","passiveobject/character/fighter/animation/crazymountsubsmallleft.ani","passiveobject/character/fighter/animation/crazymountsubsmallleft.ani"];
|
||
|
|
local atkSet = [0, 16, 6, 5];
|
||
|
|
local bonusSet = [0, 4, 5, 5];
|
||
|
|
local bonusRate = sqrChr.sq_GetBonusRateWithPassive(SKILL_FWBYKK_ENCHANTPOISON, -1, 10, 1.0) + 100;
|
||
|
|
local damage = sqrChr.sq_GetBonusRateWithPassive(SKILL_FWBYKK_MOUNT, -1, bonusSet[subtype], bonusRate.tofloat() / 1000.0) + 100;
|
||
|
|
obj.getVar("PoisonDamage").setInt(0, damage);
|
||
|
|
local ani = sq_CreateAnimation("",aniPath[subtype]);
|
||
|
|
obj.setCurrentAnimation(ani);
|
||
|
|
sq_SetCurrentAttackInfo(obj, sq_GetCustomAttackInfo(obj, atkSet[subtype]));
|
||
|
|
sq_SetCurrentAttackBonusRate(sq_GetCurrentAttackInfo(obj), totalDamage);
|
||
|
|
if(sizeRate > 100){
|
||
|
|
local currentAni = obj.getCurrentAnimation();
|
||
|
|
sizeRate = sizeRate.tofloat() / 100.0;
|
||
|
|
currentAni.setImageRateFromOriginal(sizeRate, sizeRate);
|
||
|
|
currentAni.setAutoLayerWorkAnimationAddSizeRate(sizeRate);
|
||
|
|
sq_SetAttackBoundingBoxSizeRate(currentAni, sizeRate, sizeRate, sizeRate);
|
||
|
|
}
|
||
|
|
sq_ChangeDrawLayer(obj, ENUM_DRAWLAYER_BOTTOM);
|
||
|
|
if(subState != 4) sq_SetMyShake(obj, 3, 30);
|
||
|
|
else sq_SetMyShake(obj, 5, 150);
|
||
|
|
break;
|
||
|
|
}
|
||
|
|
break;
|
||
|
|
case SKILL_FWBYKK_THROWWEB:
|
||
|
|
switch(subtype){
|
||
|
|
case 1://totalDamage,prob,time,level,holdTime
|
||
|
|
local totalDamage = receiveData.readDword();
|
||
|
|
local prob = receiveData.readDword();
|
||
|
|
local time = receiveData.readDword();
|
||
|
|
local level = receiveData.readDword();
|
||
|
|
local holdTime = receiveData.readDword();
|
||
|
|
obj.getVar("custom").setInt(0, prob);
|
||
|
|
obj.getVar("custom").setInt(1, time);
|
||
|
|
obj.getVar("custom").setInt(2, level);
|
||
|
|
obj.getVar("custom").setInt(3, holdTime);
|
||
|
|
local bonusRate = sqrChr.sq_GetBonusRateWithPassive(SKILL_FWBYKK_ENCHANTPOISON, -1, 10, 1.0) + 100;
|
||
|
|
local damage = sqrChr.sq_GetBonusRateWithPassive(SKILL_FWBYKK_THROWWEB, -1, 10, bonusRate.tofloat() / 1000.0) + 100;
|
||
|
|
obj.getVar("PoisonDamage").setInt(0, damage);
|
||
|
|
local ani = sq_CreateAnimation("", "passiveobject/1_fighter_bykk/3_streetfighter/animation/throwweblongtype/ring_back_normal.ani");
|
||
|
|
obj.setCurrentAnimation(ani);
|
||
|
|
sq_SetCurrentAttackInfo(obj, sq_GetCustomAttackInfo(obj, 28));
|
||
|
|
sq_SetCurrentAttackBonusRate(sq_GetCurrentAttackInfo(obj), totalDamage);
|
||
|
|
break;
|
||
|
|
}
|
||
|
|
break;
|
||
|
|
case SKILL_FWBYKK_GROUNDKICK:
|
||
|
|
switch(subtype){
|
||
|
|
case 1:
|
||
|
|
local totalDamage = receiveData.readDword();
|
||
|
|
local group = receiveData.readDword();
|
||
|
|
local uniqueId = receiveData.readDword();
|
||
|
|
local targetObj = sq_GetObject(obj, group, uniqueId);
|
||
|
|
if(targetObj && targetObj.getState() != STATE_DIE){
|
||
|
|
local bonusRate = sqrChr.sq_GetBonusRateWithPassive(SKILL_FWBYKK_ENCHANTPOISON, -1, 10, 1.0) + 100;
|
||
|
|
local damage = sqrChr.sq_GetBonusRateWithPassive(SKILL_FWBYKK_GROUNDKICK, -1, 8, bonusRate.tofloat() / 1000.0) + 100;
|
||
|
|
obj.getVar("PoisonDamage").setInt(0, damage);
|
||
|
|
sq_SetCurrentAttackInfo(obj, sq_GetCustomAttackInfo(obj, 33));
|
||
|
|
sq_SetCurrentAttackBonusRate(sq_GetCurrentAttackInfo(obj), totalDamage);
|
||
|
|
sq_SendHitObjectPacket(obj,targetObj,0,0,sq_GetObjectHeight(targetObj) / 2);
|
||
|
|
}
|
||
|
|
obj.setTimeEvent(1, 100, 1, false);
|
||
|
|
break;
|
||
|
|
}
|
||
|
|
break;
|
||
|
|
case SKILL_FWBYKK_VENOMMINE:
|
||
|
|
switch(subtype){
|
||
|
|
case 1:
|
||
|
|
local angle = receiveData.readDword();
|
||
|
|
local sub = receiveData.readDword();
|
||
|
|
local increaseRate = receiveData.readDword();
|
||
|
|
obj.getVar("custom").setInt(0, angle);
|
||
|
|
obj.getVar("custom").setInt(1, sub);
|
||
|
|
obj.getVar("custom").setInt(2, increaseRate);
|
||
|
|
obj.addSetStatePacket(20, null, STATE_PRIORITY_AUTO, false, "");
|
||
|
|
break;
|
||
|
|
case 2:
|
||
|
|
local totalDamage = receiveData.readDword();
|
||
|
|
local hitMax = receiveData.readDword();
|
||
|
|
local sizeRate = receiveData.readDword();
|
||
|
|
obj.getVar("custom").setInt(0, totalDamage);
|
||
|
|
obj.getVar("custom").setInt(1, hitMax);
|
||
|
|
obj.getVar("custom").setInt(2, sizeRate);
|
||
|
|
local bonusRate = sqrChr.sq_GetBonusRateWithPassive(SKILL_FWBYKK_ENCHANTPOISON, -1, 10, 1.0) + 100;
|
||
|
|
local damage = sqrChr.sq_GetBonusRateWithPassive(SKILL_FWBYKK_VENOMMINE, -1, 4, bonusRate.tofloat() / 1000.0) + 100;
|
||
|
|
obj.getVar("PoisonDamage").setInt(0, damage);
|
||
|
|
|
||
|
|
obj.setTimeEvent(2, 400, 1, false);
|
||
|
|
break
|
||
|
|
}
|
||
|
|
break;
|
||
|
|
case SKILL_FWBYKK_JUNKSPIN:
|
||
|
|
switch(subtype){
|
||
|
|
case 1:
|
||
|
|
local speedRate = receiveData.readDword();
|
||
|
|
local ani = sq_CreateAnimation("", "character/fighter/effect/animation/3_streetfighter_bykk/junkspin/down3_normal.ani");
|
||
|
|
obj.setCurrentAnimation(ani);
|
||
|
|
local currentAni = obj.getCurrentAnimation();
|
||
|
|
// currentAni.addLayerAnimation(-1,sq_CreateAnimation("","character/fighter/effect/animation/3_streetfighter_bykk/junkspin/ground.ani"),true);
|
||
|
|
currentAni.setSpeedRate(speedRate.tofloat());
|
||
|
|
sq_ChangeDrawLayer(obj, ENUM_DRAWLAYER_BOTTOM);
|
||
|
|
obj.setTimeEvent(1, 50, -1, false);
|
||
|
|
break;
|
||
|
|
case 2:
|
||
|
|
local sizeRate = receiveData.readDword();
|
||
|
|
local baseAniPath = "passiveobject/1_fighter_bykk/3_streetfighter/animation/junkspinobjects/";
|
||
|
|
local aniPath = ["barrel2.ani","wagon.ani","pipeline.ani","Table.ani","Barrel2.ani","Barrel3.ani"];
|
||
|
|
local ani = sq_CreateAnimation("", baseAniPath + aniPath[sq_getRandom(0, aniPath.len() - 1)]);
|
||
|
|
obj.setCurrentAnimation(ani);
|
||
|
|
local currentAni = obj.getCurrentAnimation();
|
||
|
|
sq_ClearAttackBox(currentAni);
|
||
|
|
if(sizeRate > 100){
|
||
|
|
local currentAni = obj.getCurrentAnimation();
|
||
|
|
sizeRate = sizeRate.tofloat() / 100.0;
|
||
|
|
currentAni.setImageRateFromOriginal(sizeRate, sizeRate);
|
||
|
|
}
|
||
|
|
obj.sq_SetMoveParticle("particle/junkspinthrowobject.ptl", 0.0, 0.0);
|
||
|
|
break;
|
||
|
|
case 3:
|
||
|
|
local totalDamage = receiveData.readDword();
|
||
|
|
local sizeRate = receiveData.readDword();
|
||
|
|
local prob = receiveData.readDword();
|
||
|
|
local time = receiveData.readDword();
|
||
|
|
local level = receiveData.readDword();
|
||
|
|
local bonusRate = sqrChr.sq_GetBonusRateWithPassive(SKILL_FWBYKK_ENCHANTPOISON, -1, 10, 1.0) + 100;
|
||
|
|
local damage = sqrChr.sq_GetBonusRateWithPassive(SKILL_FWBYKK_JUNKSPIN, -1, 7, bonusRate.tofloat() / 1000.0) + 100;
|
||
|
|
obj.getVar("PoisonDamage").setInt(0, damage);
|
||
|
|
local ani = sq_CreateAnimation("", "passiveobject/1_fighter_bykk/3_streetfighter/animation/junkspinobjects/dynamite/junkspinfinishfront_05.ani");
|
||
|
|
obj.setCurrentAnimation(ani);
|
||
|
|
local currentAni = obj.getCurrentAnimation();
|
||
|
|
currentAni.addLayerAnimation(-1,sq_CreateAnimation("","passiveobject/1_fighter_bykk/3_streetfighter/animation/junkspinobjects/dynamite/junkspinfinishback_00.ani"),true);
|
||
|
|
sq_SetCurrentAttackInfo(obj, sq_GetCustomAttackInfo(obj, 14));
|
||
|
|
sq_SetCurrentAttackBonusRate(sq_GetCurrentAttackInfo(obj), totalDamage);
|
||
|
|
//sq_SetCurrentAttackeHitStunTime(sq_GetCurrentAttackInfo(obj), 2000);
|
||
|
|
local attackInfo = sq_GetCurrentAttackInfo(obj);
|
||
|
|
sq_SetChangeStatusIntoAttackInfo(attackInfo, 0, ACTIVESTATUS_BURN, prob, level, time);
|
||
|
|
|
||
|
|
obj.sq_PlaySound("R_FT_JUNK_SPIN_FIN");
|
||
|
|
obj.sq_PlaySound("JUNK_SPIN_DYNAMITE");
|
||
|
|
if(sizeRate > 100){
|
||
|
|
local currentAni = obj.getCurrentAnimation();
|
||
|
|
sizeRate = sizeRate.tofloat() / 100.0;
|
||
|
|
currentAni.setImageRateFromOriginal(sizeRate, sizeRate);
|
||
|
|
currentAni.setAutoLayerWorkAnimationAddSizeRate(sizeRate);
|
||
|
|
sq_SetAttackBoundingBoxSizeRate(currentAni, sizeRate, sizeRate, sizeRate);
|
||
|
|
}
|
||
|
|
break;
|
||
|
|
case 4:
|
||
|
|
local totalDamage = receiveData.readDword();
|
||
|
|
local sizeRate = receiveData.readDword();
|
||
|
|
local speedRate = receiveData.readDword();
|
||
|
|
local currentAni = obj.getCurrentAnimation();
|
||
|
|
local bonusRate = sqrChr.sq_GetBonusRateWithPassive(SKILL_FWBYKK_ENCHANTPOISON, -1, 10, 1.0) + 100;
|
||
|
|
local damage = sqrChr.sq_GetBonusRateWithPassive(SKILL_FWBYKK_JUNKSPIN, -1, 6, bonusRate.tofloat() / 1000.0) + 100;
|
||
|
|
obj.getVar("PoisonDamage").setInt(0, damage);
|
||
|
|
sq_AddAttackBox(currentAni, -250, -100, -10, 500, 200, 160);
|
||
|
|
sq_SetCurrentAttackInfo(obj, sq_GetCustomAttackInfo(obj, 15));
|
||
|
|
sq_SetCurrentAttackBonusRate(sq_GetCurrentAttackInfo(obj), totalDamage);
|
||
|
|
sq_SetCurrentAttackeHitStunTime(sq_GetCurrentAttackInfo(obj), 1500);
|
||
|
|
local delay = 20000 / speedRate;
|
||
|
|
obj.setTimeEvent(2, delay, 1, false);
|
||
|
|
if(sizeRate > 100){
|
||
|
|
local currentAni = obj.getCurrentAnimation();
|
||
|
|
sizeRate = sizeRate.tofloat() / 100.0;
|
||
|
|
currentAni.setImageRateFromOriginal(sizeRate, sizeRate);
|
||
|
|
sq_SetAttackBoundingBoxSizeRate(currentAni, sizeRate, sizeRate, sizeRate);
|
||
|
|
}
|
||
|
|
break;
|
||
|
|
}
|
||
|
|
break;
|
||
|
|
case SKILL_FWBYKK_BLOCKBUSTEREX:
|
||
|
|
switch(subtype){
|
||
|
|
case 1:
|
||
|
|
local totalDamage = receiveData.readDword();
|
||
|
|
local bonusRate = sqrChr.sq_GetBonusRateWithPassive(SKILL_FWBYKK_ENCHANTPOISON, -1, 10, 1.0) + 100;
|
||
|
|
local damage = sqrChr.sq_GetBonusRateWithPassive(SKILL_FWBYKK_BLOCKBUSTEREX, -1, 16, bonusRate.tofloat() / 1000.0) + 100;
|
||
|
|
obj.getVar("PoisonDamage").setInt(0, damage);
|
||
|
|
local ani = sq_CreateAnimation("", "passiveobject/character/fighter/animation/blockbusterexsub/blockbusterexdodge.ani");
|
||
|
|
obj.setCurrentAnimation(ani);
|
||
|
|
sq_SetCurrentAttackInfo(obj, sq_GetCustomAttackInfo(obj, 3));
|
||
|
|
sq_SetCurrentAttackBonusRate(sq_GetCurrentAttackInfo(obj), totalDamage);
|
||
|
|
local aniPath = "passiveobject/character/fighter/animation/blockbusterexsub/blockbusterexsubdodge.ani";
|
||
|
|
createOnlyDrawObjectEX_Fighter_bykk(obj,aniPath,true,sq_GetDirection(obj),sq_GetXPos(obj),sq_GetYPos(obj),0,ENUM_DRAWLAYER_BOTTOM,100,100);
|
||
|
|
break;
|
||
|
|
case 2://totalDamage,totalDamage_exp,totalDamage_lastexp,stunTime,sizeRate,sizeRateLastExp
|
||
|
|
local totalDamage = receiveData.readDword();
|
||
|
|
local totalDamage_exp = receiveData.readDword();
|
||
|
|
local totalDamage_lastexp = receiveData.readDword();
|
||
|
|
local stunTime = receiveData.readDword();
|
||
|
|
local sizeRate = receiveData.readDword();
|
||
|
|
local sizeRateLastExp = receiveData.readDword();
|
||
|
|
obj.getVar("custom").setInt(0, totalDamage);
|
||
|
|
obj.getVar("custom").setInt(1, totalDamage_exp);
|
||
|
|
obj.getVar("custom").setInt(2, totalDamage_lastexp);
|
||
|
|
obj.getVar("custom").setInt(3, stunTime);
|
||
|
|
obj.getVar("custom").setInt(4, sizeRate);
|
||
|
|
obj.getVar("custom").setInt(5, sizeRateLastExp);
|
||
|
|
// print("sizeRateLastExp = "+sizeRateLastExp);
|
||
|
|
local ani = sq_CreateAnimation("", "passiveobject/1_fighter_bykk/3_streetfighter/animation/blockbusterexblock/block1.ani");
|
||
|
|
obj.setCurrentAnimation(ani);
|
||
|
|
local currentAni = obj.getCurrentAnimation();
|
||
|
|
currentAni.addLayerAnimation(1,sq_CreateAnimation("","passiveobject/1_fighter_bykk/3_streetfighter/animation/blockbusterexblock/block1glow.ani"),true);
|
||
|
|
currentAni.addLayerAnimation(2,sq_CreateAnimation("","passiveobject/1_fighter_bykk/3_streetfighter/animation/blockbusterexblock/block1spark.ani"),true);
|
||
|
|
sq_SetCurrentAttackInfo(obj, sq_GetCustomAttackInfo(obj, 0));
|
||
|
|
sq_SetCurrentAttackBonusRate(sq_GetCurrentAttackInfo(obj), totalDamage);
|
||
|
|
obj.sq_SetMoveParticle("particle/venommine.ptl", 0.0, 0.0);
|
||
|
|
sq_SetSpeedToMoveParticle(obj,0,0);
|
||
|
|
// obj.setTimeEvent(1, 150, 1, false);
|
||
|
|
obj.setTimeEvent(0, 100, 2, false);
|
||
|
|
break;
|
||
|
|
case 3://totalDamage,totalDamage_exp,stunTime,sizeRate
|
||
|
|
case 4://totalDamage,totalDamage_exp,stunTime,sizeRate
|
||
|
|
local totalDamage = receiveData.readDword();
|
||
|
|
local totalDamage_exp = receiveData.readDword();
|
||
|
|
local stunTime = receiveData.readDword();
|
||
|
|
local sizeRate = receiveData.readDword();
|
||
|
|
local bonusRate = sqrChr.sq_GetBonusRateWithPassive(SKILL_FWBYKK_ENCHANTPOISON, -1, 10, 1.0) + 100;
|
||
|
|
local damage = sqrChr.sq_GetBonusRateWithPassive(SKILL_FWBYKK_BLOCKBUSTEREX, -1, 17, bonusRate.tofloat() / 1000.0) + 100;
|
||
|
|
obj.getVar("PoisonDamage").setInt(0, damage);
|
||
|
|
obj.getVar("custom").setInt(0, totalDamage);
|
||
|
|
obj.getVar("custom").setInt(1, totalDamage_exp);
|
||
|
|
obj.getVar("custom").setInt(2, stunTime);
|
||
|
|
obj.getVar("custom").setInt(3, sizeRate);
|
||
|
|
local ani = sq_CreateAnimation("", "passiveobject/1_fighter_bykk/3_streetfighter/animation/blockbusterexblock/block"+(subtype-1).tostring()+".ani");
|
||
|
|
obj.setCurrentAnimation(ani);
|
||
|
|
local currentAni = obj.getCurrentAnimation();
|
||
|
|
currentAni.addLayerAnimation(1,sq_CreateAnimation("","passiveobject/1_fighter_bykk/3_streetfighter/animation/blockbusterexblock/block"+(subtype-1).tostring()+"glow.ani"),true);
|
||
|
|
currentAni.addLayerAnimation(2,sq_CreateAnimation("","passiveobject/1_fighter_bykk/3_streetfighter/animation/blockbusterexblock/block"+(subtype-1).tostring()+"spark.ani"),true);
|
||
|
|
sq_SetCurrentAttackInfo(obj, sq_GetCustomAttackInfo(obj, 0));
|
||
|
|
sq_SetCurrentAttackBonusRate(sq_GetCurrentAttackInfo(obj), totalDamage);
|
||
|
|
obj.sq_SetMoveParticle("particle/venommine.ptl", 0.0, 0.0);
|
||
|
|
sq_SetSpeedToMoveParticle(obj,0,0);
|
||
|
|
obj.setTimeEvent(2, 50 * (subtype - 2), 2, false);
|
||
|
|
break;
|
||
|
|
case 5:
|
||
|
|
local totalDamage = receiveData.readDword();
|
||
|
|
local stunTime = receiveData.readDword();
|
||
|
|
local sizeRate = receiveData.readDword();
|
||
|
|
local sub = receiveData.readDword();
|
||
|
|
obj.getVar("custom").setInt(0, sizeRate);
|
||
|
|
local ani = sq_CreateAnimation("","passiveobject/common/animation/fireexplosion.ani");
|
||
|
|
obj.setCurrentAnimation(ani);
|
||
|
|
sq_SetCurrentAttackInfo(obj, sq_GetCustomAttackInfo(obj, sub==1?2:1));
|
||
|
|
sq_SetCurrentAttackBonusRate(sq_GetCurrentAttackInfo(obj), totalDamage);
|
||
|
|
local attackInfo = sq_GetCurrentAttackInfo(obj);
|
||
|
|
sq_SetAttackInfoForceHitStunTime(attackInfo, stunTime);
|
||
|
|
if(sub > 0){
|
||
|
|
local bonusRate = sqrChr.sq_GetBonusRateWithPassive(SKILL_FWBYKK_ENCHANTPOISON, -1, 10, 1.0) + 100;
|
||
|
|
local damage = sqrChr.sq_GetBonusRateWithPassive(SKILL_FWBYKK_BLOCKBUSTEREX, -1, 19, bonusRate.tofloat() / 1000.0) + 100;
|
||
|
|
obj.getVar("PoisonDamage").setInt(0, damage);
|
||
|
|
obj.setTimeEvent(3, 200, 4, true);
|
||
|
|
obj.setTimeEvent(4, 50, 4, true);
|
||
|
|
obj.setTimeEvent(5, 15, 8, true);
|
||
|
|
obj.setTimeEvent(6, 100, 2, true);
|
||
|
|
}
|
||
|
|
else{
|
||
|
|
local bonusRate = sqrChr.sq_GetBonusRateWithPassive(SKILL_FWBYKK_ENCHANTPOISON, -1, 10, 1.0) + 100;
|
||
|
|
local damage = sqrChr.sq_GetBonusRateWithPassive(SKILL_FWBYKK_BLOCKBUSTEREX, -1, 18, bonusRate.tofloat() / 1000.0) + 100;
|
||
|
|
obj.getVar("PoisonDamage").setInt(0, damage);
|
||
|
|
obj.setTimeEvent(3, 200, 1, true);
|
||
|
|
obj.setTimeEvent(4, 50, 1, true);
|
||
|
|
obj.setTimeEvent(5, 15, 2, true);
|
||
|
|
obj.setTimeEvent(6, 100, 1, true);
|
||
|
|
}
|
||
|
|
if(sizeRate > 100){
|
||
|
|
local currentAni = obj.getCurrentAnimation();
|
||
|
|
sizeRate = sizeRate.tofloat() / 100.0;
|
||
|
|
sq_SetAttackBoundingBoxSizeRate(currentAni, sizeRate, sizeRate, sizeRate);
|
||
|
|
}
|
||
|
|
obj.sq_PlaySound("B_FIRE_EXPLOSION");
|
||
|
|
if(sub > 0) sq_SetMyShake(obj, 15, 300);
|
||
|
|
else sq_SetMyShake(obj, 15, 120);
|
||
|
|
break;
|
||
|
|
}
|
||
|
|
break;
|
||
|
|
case SKILL_FWBYKK_POISONEXPLOSION:
|
||
|
|
switch(subtype){
|
||
|
|
case 1:
|
||
|
|
local totalDamage = receiveData.readDword();
|
||
|
|
local sizeRate = receiveData.readDword();
|
||
|
|
local bonusRate = sqrChr.sq_GetBonusRateWithPassive(SKILL_FWBYKK_ENCHANTPOISON, -1, 10, 1.0) + 100;
|
||
|
|
local damage = sqrChr.sq_GetBonusRateWithPassive(SKILL_FWBYKK_POISONEXPLOSION, -1, 15, bonusRate.tofloat() / 1000.0) + 100;
|
||
|
|
obj.getVar("PoisonDamage").setInt(0, damage);
|
||
|
|
local ani = sq_CreateAnimation("", "passiveobject/1_fighter_bykk/3_streetfighter/animation/poisonexplosion/explosion_00_shockwave_n.ani");
|
||
|
|
obj.setCurrentAnimation(ani);
|
||
|
|
sq_SetCurrentAttackInfo(obj, sq_GetCustomAttackInfo(obj, 21));
|
||
|
|
sq_SetCurrentAttackBonusRate(sq_GetCurrentAttackInfo(obj), totalDamage);
|
||
|
|
break;
|
||
|
|
case 2://19 20
|
||
|
|
local totalDamage = receiveData.readDword();
|
||
|
|
local sizeRate = receiveData.readDword();
|
||
|
|
local group = receiveData.readDword();
|
||
|
|
local uniqueId = receiveData.readDword();
|
||
|
|
local sub = receiveData.readDword();
|
||
|
|
local targetObj = sq_GetObject(obj, group, uniqueId);
|
||
|
|
if(targetObj && targetObj.getState() != STATE_DIE){
|
||
|
|
obj.getVar("tar").clear_obj_vector();
|
||
|
|
obj.getVar("tar").push_obj_vector(targetObj);
|
||
|
|
sq_moveWithParent(targetObj, obj);
|
||
|
|
local skillLevel = sq_GetSkillLevel(sqrChr, SKILL_FWBYKK_POISONEXPLOSION);
|
||
|
|
local createMax_1st = sq_GetLevelData(sqrChr, SKILL_FWBYKK_POISONEXPLOSION, 2, skillLevel);
|
||
|
|
local createMax_2nd = sq_GetLevelData(sqrChr, SKILL_FWBYKK_POISONEXPLOSION, 3, skillLevel);
|
||
|
|
createMax_2nd = createMax_2nd + createMax_1st + 1;
|
||
|
|
local decreaseRate_1st = sq_GetLevelData(sqrChr, SKILL_FWBYKK_POISONEXPLOSION, 4, skillLevel);
|
||
|
|
local decreaseRate_2nd = sq_GetLevelData(sqrChr, SKILL_FWBYKK_POISONEXPLOSION, 5, skillLevel);
|
||
|
|
local totalDamage_1st = totalDamage * (100 - decreaseRate_1st) / 100;
|
||
|
|
local totalDamage_2nd = totalDamage * (100 - decreaseRate_2nd) / 100;
|
||
|
|
local moveSpeed = sq_GetLevelData(sqrChr, SKILL_FWBYKK_POISONEXPLOSION, 6, skillLevel);
|
||
|
|
local attackSpeed = sq_GetLevelData(sqrChr, SKILL_FWBYKK_POISONEXPLOSION, 7, skillLevel);
|
||
|
|
local prob = sq_GetLevelData(sqrChr, SKILL_FWBYKK_POISONEXPLOSION, 8, skillLevel) * 10;
|
||
|
|
local time = sq_GetLevelData(sqrChr, SKILL_FWBYKK_POISONEXPLOSION, 14, skillLevel);
|
||
|
|
local level = sq_GetSkillLevel(sqrChr, 174) + 5;
|
||
|
|
obj.getVar("custom").setInt(0, totalDamage);
|
||
|
|
obj.getVar("custom").setInt(1, sizeRate);
|
||
|
|
obj.getVar("custom").setInt(2, createMax_1st);
|
||
|
|
obj.getVar("custom").setInt(3, createMax_2nd);
|
||
|
|
obj.getVar("custom").setInt(4, totalDamage_1st);
|
||
|
|
obj.getVar("custom").setInt(5, totalDamage_2nd);
|
||
|
|
obj.getVar("custom").setInt(6, moveSpeed);
|
||
|
|
obj.getVar("custom").setInt(7, attackSpeed);
|
||
|
|
obj.getVar("custom").setInt(8, prob);
|
||
|
|
obj.getVar("custom").setInt(9, time);
|
||
|
|
obj.getVar("custom").setInt(10, level);
|
||
|
|
obj.getVar("custom").setInt(11, sub);
|
||
|
|
local ani = sq_CreateAnimation("", "character/fighter/effect/animation/poisonexplosion/flower_01_d.ani");
|
||
|
|
obj.setCurrentAnimation(ani);
|
||
|
|
local currentAni = obj.getCurrentAnimation();
|
||
|
|
if(sub > 0){
|
||
|
|
currentAni.setSpeedRate(300.0);
|
||
|
|
currentAni = obj.getCurrentAnimation();
|
||
|
|
}
|
||
|
|
local delay = currentAni.getDelaySum(false);
|
||
|
|
local ap = sq_CreateChangeStatus(CHANGE_STATUS_TYPE_MOVE_SPEED, true, -moveSpeed.tofloat(), 0);
|
||
|
|
if(ap) {
|
||
|
|
ap.getAppendageInfo().setValidTime(delay);
|
||
|
|
ap.sq_Append(obj, targetObj);
|
||
|
|
}
|
||
|
|
local ap2 = sq_CreateChangeStatus(CHANGE_STATUS_TYPE_ATTACK_SPEED, true, -attackSpeed.tofloat(), 0);
|
||
|
|
if(ap2) {
|
||
|
|
ap2.getAppendageInfo().setValidTime(delay);
|
||
|
|
ap2.sq_Append(obj, targetObj);
|
||
|
|
}
|
||
|
|
sq_EffectLayerAppendage(targetObj,sq_RGB(0,0,0),delay,0,0,delay);
|
||
|
|
}
|
||
|
|
break;
|
||
|
|
case 3:
|
||
|
|
local totalDamage = receiveData.readDword();
|
||
|
|
local sizeRate = receiveData.readDword();
|
||
|
|
local createMax_1st = receiveData.readDword();
|
||
|
|
local createMax_2nd = receiveData.readDword();
|
||
|
|
local totalDamage_1st = receiveData.readDword();
|
||
|
|
local totalDamage_2nd = receiveData.readDword();
|
||
|
|
local moveSpeed = receiveData.readDword();
|
||
|
|
local attackSpeed = receiveData.readDword();
|
||
|
|
local prob = receiveData.readDword();
|
||
|
|
local time = receiveData.readDword();
|
||
|
|
local level = receiveData.readDword();
|
||
|
|
local sub = receiveData.readDword();
|
||
|
|
obj.getVar("custom").setInt(0, totalDamage);
|
||
|
|
obj.getVar("custom").setInt(1, sizeRate);
|
||
|
|
obj.getVar("custom").setInt(2, createMax_1st);
|
||
|
|
obj.getVar("custom").setInt(3, createMax_2nd);
|
||
|
|
obj.getVar("custom").setInt(4, totalDamage_1st);
|
||
|
|
obj.getVar("custom").setInt(5, totalDamage_2nd);
|
||
|
|
obj.getVar("custom").setInt(6, moveSpeed);
|
||
|
|
obj.getVar("custom").setInt(7, attackSpeed);
|
||
|
|
obj.getVar("custom").setInt(8, prob);
|
||
|
|
obj.getVar("custom").setInt(9, time);
|
||
|
|
obj.getVar("custom").setInt(10, level);
|
||
|
|
obj.getVar("custom").setInt(11, sub);
|
||
|
|
local bonusRate = sqrChr.sq_GetBonusRateWithPassive(SKILL_FWBYKK_ENCHANTPOISON, -1, 10, 1.0) + 100;
|
||
|
|
local damage = sqrChr.sq_GetBonusRateWithPassive(SKILL_FWBYKK_POISONEXPLOSION, -1, 16, bonusRate.tofloat() / 1000.0) + 100;
|
||
|
|
obj.getVar("PoisonDamage").setInt(0, damage);
|
||
|
|
local aniPath = "passiveobject/1_fighter_bykk/3_streetfighter/animation/poisonexplosion/explosion_01_shockwave_d.ani";
|
||
|
|
if(sub > 0) aniPath = "passiveobject/1_fighter_bykk/3_streetfighter/animation/poisonexplosioncustom/explosion_shockwave_n.ani";
|
||
|
|
local ani = sq_CreateAnimation("", aniPath);
|
||
|
|
obj.setCurrentAnimation(ani);
|
||
|
|
sq_SetCurrentAttackInfo(obj, sq_GetCustomAttackInfo(obj, sub>0?20:19));
|
||
|
|
sq_SetCurrentAttackBonusRate(sq_GetCurrentAttackInfo(obj), totalDamage);
|
||
|
|
local attackInfo = sq_GetCurrentAttackInfo(obj);
|
||
|
|
sq_SetChangeStatusIntoAttackInfo(attackInfo, 0, ACTIVESTATUS_BURN, prob, level, time);
|
||
|
|
if(sizeRate > 100){
|
||
|
|
local currentAni = obj.getCurrentAnimation();
|
||
|
|
sizeRate = sizeRate.tofloat() / 100.0;
|
||
|
|
currentAni.setImageRateFromOriginal(sizeRate, sizeRate);
|
||
|
|
currentAni.setAutoLayerWorkAnimationAddSizeRate(sizeRate);
|
||
|
|
sq_SetAttackBoundingBoxSizeRate(currentAni, sizeRate, sizeRate, sizeRate);
|
||
|
|
}
|
||
|
|
if(sub > 0){sq_SetMyShake(obj, 15, 220);sq_flashScreen(obj, 0, 90, 180, 255, sq_RGB(255,255,255), GRAPHICEFFECT_NONE, ENUM_DRAWLAYER_BOTTOM);}
|
||
|
|
else sq_SetMyShake(obj, 10, 220);
|
||
|
|
break;
|
||
|
|
case 4:
|
||
|
|
local totalDamage_1st = receiveData.readDword();
|
||
|
|
local sizeRate = receiveData.readDword();
|
||
|
|
local createMax_2nd = receiveData.readDword();
|
||
|
|
local totalDamage_2nd = receiveData.readDword();
|
||
|
|
local moveSpeed = receiveData.readDword();
|
||
|
|
local attackSpeed = receiveData.readDword();
|
||
|
|
local prob = receiveData.readDword();
|
||
|
|
local time = receiveData.readDword();
|
||
|
|
local level = receiveData.readDword();
|
||
|
|
local group = receiveData.readDword();
|
||
|
|
local uniqueId = receiveData.readDword();
|
||
|
|
local targetObj = sq_GetObject(obj, group, uniqueId);
|
||
|
|
if(targetObj && targetObj.getState() != STATE_DIE){
|
||
|
|
obj.getVar("custom").setInt(0, totalDamage_1st);
|
||
|
|
obj.getVar("custom").setInt(1, sizeRate);
|
||
|
|
obj.getVar("custom").setInt(2, createMax_2nd);
|
||
|
|
obj.getVar("custom").setInt(3, totalDamage_2nd);
|
||
|
|
obj.getVar("custom").setInt(4, moveSpeed);
|
||
|
|
obj.getVar("custom").setInt(5, attackSpeed);
|
||
|
|
obj.getVar("custom").setInt(6, prob);
|
||
|
|
obj.getVar("custom").setInt(7, time);
|
||
|
|
obj.getVar("custom").setInt(8, level);
|
||
|
|
obj.getVar("tar").clear_obj_vector();
|
||
|
|
obj.getVar("tar").push_obj_vector(targetObj);
|
||
|
|
sq_moveWithParent(targetObj, obj);
|
||
|
|
local ani = sq_CreateAnimation("", "character/fighter/effect/animation/poisonexplosion/flower_01_d.ani");
|
||
|
|
obj.setCurrentAnimation(ani);
|
||
|
|
local currentAni = obj.getCurrentAnimation();
|
||
|
|
local delay = currentAni.getDelaySum(false);
|
||
|
|
local ap = sq_CreateChangeStatus(CHANGE_STATUS_TYPE_MOVE_SPEED, true, -moveSpeed.tofloat(), 0);
|
||
|
|
if(ap) {
|
||
|
|
ap.getAppendageInfo().setValidTime(delay);
|
||
|
|
ap.sq_Append(obj, targetObj);
|
||
|
|
}
|
||
|
|
local ap2 = sq_CreateChangeStatus(CHANGE_STATUS_TYPE_ATTACK_SPEED, true, -attackSpeed.tofloat(), 0);
|
||
|
|
if(ap2) {
|
||
|
|
ap2.getAppendageInfo().setValidTime(delay);
|
||
|
|
ap2.sq_Append(obj, targetObj);
|
||
|
|
}
|
||
|
|
}
|
||
|
|
break;
|
||
|
|
case 5:
|
||
|
|
local totalDamage_1st = receiveData.readDword();
|
||
|
|
local sizeRate = receiveData.readDword();
|
||
|
|
local createMax_2nd = receiveData.readDword();
|
||
|
|
local totalDamage_2nd = receiveData.readDword();
|
||
|
|
local moveSpeed = receiveData.readDword();
|
||
|
|
local attackSpeed = receiveData.readDword();
|
||
|
|
local prob = receiveData.readDword();
|
||
|
|
local time = receiveData.readDword();
|
||
|
|
local level = receiveData.readDword();
|
||
|
|
obj.getVar("custom").setInt(0, sizeRate);
|
||
|
|
obj.getVar("custom").setInt(1, createMax_2nd);
|
||
|
|
obj.getVar("custom").setInt(2, totalDamage_2nd);
|
||
|
|
obj.getVar("custom").setInt(3, moveSpeed);
|
||
|
|
obj.getVar("custom").setInt(4, attackSpeed);
|
||
|
|
obj.getVar("custom").setInt(5, prob);
|
||
|
|
obj.getVar("custom").setInt(6, time);
|
||
|
|
obj.getVar("custom").setInt(7, level);
|
||
|
|
local bonusRate = sqrChr.sq_GetBonusRateWithPassive(SKILL_FWBYKK_ENCHANTPOISON, -1, 10, 1.0) + 100;
|
||
|
|
local damage = sqrChr.sq_GetBonusRateWithPassive(SKILL_FWBYKK_POISONEXPLOSION, -1, 16, bonusRate.tofloat() / 1000.0) + 100;
|
||
|
|
obj.getVar("PoisonDamage").setInt(0, damage);
|
||
|
|
local aniPath = "passiveobject/1_fighter_bykk/3_streetfighter/animation/poisonexplosion/explosion_01_shockwave_d.ani";
|
||
|
|
local ani = sq_CreateAnimation("", aniPath);
|
||
|
|
obj.setCurrentAnimation(ani);
|
||
|
|
sq_SetCurrentAttackInfo(obj, sq_GetCustomAttackInfo(obj, 19));
|
||
|
|
sq_SetCurrentAttackBonusRate(sq_GetCurrentAttackInfo(obj), totalDamage_1st);
|
||
|
|
local attackInfo = sq_GetCurrentAttackInfo(obj);
|
||
|
|
sq_SetChangeStatusIntoAttackInfo(attackInfo, 0, ACTIVESTATUS_BURN, prob, level, time);
|
||
|
|
if(sizeRate > 100){
|
||
|
|
local currentAni = obj.getCurrentAnimation();
|
||
|
|
sizeRate = sizeRate.tofloat() / 100.0;
|
||
|
|
currentAni.setImageRateFromOriginal(sizeRate, sizeRate);
|
||
|
|
currentAni.setAutoLayerWorkAnimationAddSizeRate(sizeRate);
|
||
|
|
sq_SetAttackBoundingBoxSizeRate(currentAni, sizeRate, sizeRate, sizeRate);
|
||
|
|
}
|
||
|
|
sq_SetMyShake(obj, 10, 150);
|
||
|
|
break;
|
||
|
|
case 6:
|
||
|
|
local totalDamage_2nd = receiveData.readDword();
|
||
|
|
local sizeRate = receiveData.readDword();
|
||
|
|
local moveSpeed = receiveData.readDword();
|
||
|
|
local attackSpeed = receiveData.readDword();
|
||
|
|
local prob = receiveData.readDword();
|
||
|
|
local time = receiveData.readDword();
|
||
|
|
local level = receiveData.readDword();
|
||
|
|
local group = receiveData.readDword();
|
||
|
|
local uniqueId = receiveData.readDword();
|
||
|
|
local targetObj = sq_GetObject(obj, group, uniqueId);
|
||
|
|
if(targetObj && targetObj.getState() != STATE_DIE){
|
||
|
|
obj.getVar("tar").clear_obj_vector();
|
||
|
|
obj.getVar("tar").push_obj_vector(targetObj);
|
||
|
|
sq_moveWithParent(targetObj, obj);
|
||
|
|
obj.getVar("custom").setInt(0, totalDamage_2nd);
|
||
|
|
obj.getVar("custom").setInt(1, sizeRate);
|
||
|
|
obj.getVar("custom").setInt(2, moveSpeed);
|
||
|
|
obj.getVar("custom").setInt(3, attackSpeed);
|
||
|
|
obj.getVar("custom").setInt(4, prob);
|
||
|
|
obj.getVar("custom").setInt(5, time);
|
||
|
|
obj.getVar("custom").setInt(6, level);
|
||
|
|
local ani = sq_CreateAnimation("", "character/fighter/effect/animation/poisonexplosion/flower_01_d.ani");
|
||
|
|
obj.setCurrentAnimation(ani);
|
||
|
|
local currentAni = obj.getCurrentAnimation();
|
||
|
|
local delay = currentAni.getDelaySum(false);
|
||
|
|
local ap = sq_CreateChangeStatus(CHANGE_STATUS_TYPE_MOVE_SPEED, true, -moveSpeed.tofloat(), 0);
|
||
|
|
if(ap) {
|
||
|
|
ap.getAppendageInfo().setValidTime(delay);
|
||
|
|
ap.sq_Append(obj, targetObj);
|
||
|
|
}
|
||
|
|
local ap2 = sq_CreateChangeStatus(CHANGE_STATUS_TYPE_ATTACK_SPEED, true, -attackSpeed.tofloat(), 0);
|
||
|
|
if(ap2) {
|
||
|
|
ap2.getAppendageInfo().setValidTime(delay);
|
||
|
|
ap2.sq_Append(obj, targetObj);
|
||
|
|
}
|
||
|
|
}
|
||
|
|
break;
|
||
|
|
case 7:
|
||
|
|
local totalDamage_2nd = receiveData.readDword();
|
||
|
|
local sizeRate = receiveData.readDword();
|
||
|
|
local moveSpeed = receiveData.readDword();
|
||
|
|
local attackSpeed = receiveData.readDword();
|
||
|
|
local prob = receiveData.readDword();
|
||
|
|
local time = receiveData.readDword();
|
||
|
|
local level = receiveData.readDword();
|
||
|
|
local bonusRate = sqrChr.sq_GetBonusRateWithPassive(SKILL_FWBYKK_ENCHANTPOISON, -1, 10, 1.0) + 100;
|
||
|
|
local damage = sqrChr.sq_GetBonusRateWithPassive(SKILL_FWBYKK_POISONEXPLOSION, -1, 16, bonusRate.tofloat() / 1000.0) + 100;
|
||
|
|
obj.getVar("PoisonDamage").setInt(0, damage);
|
||
|
|
local aniPath = "passiveobject/1_fighter_bykk/3_streetfighter/animation/poisonexplosion/explosion_01_shockwave_d.ani";
|
||
|
|
local ani = sq_CreateAnimation("", aniPath);
|
||
|
|
obj.setCurrentAnimation(ani);
|
||
|
|
sq_SetCurrentAttackInfo(obj, sq_GetCustomAttackInfo(obj, 19));
|
||
|
|
sq_SetCurrentAttackBonusRate(sq_GetCurrentAttackInfo(obj), totalDamage_2nd);
|
||
|
|
local attackInfo = sq_GetCurrentAttackInfo(obj);
|
||
|
|
sq_SetChangeStatusIntoAttackInfo(attackInfo, 0, ACTIVESTATUS_BURN, prob, level, time);
|
||
|
|
if(sizeRate > 100){
|
||
|
|
local currentAni = obj.getCurrentAnimation();
|
||
|
|
sizeRate = sizeRate.tofloat() / 100.0;
|
||
|
|
currentAni.setImageRateFromOriginal(sizeRate, sizeRate);
|
||
|
|
currentAni.setAutoLayerWorkAnimationAddSizeRate(sizeRate);
|
||
|
|
sq_SetAttackBoundingBoxSizeRate(currentAni, sizeRate, sizeRate, sizeRate);
|
||
|
|
}
|
||
|
|
sq_SetMyShake(obj, 10, 150);
|
||
|
|
break;
|
||
|
|
}
|
||
|
|
break;
|
||
|
|
case SKILL_FWBYKK_DRAGONMINE:
|
||
|
|
switch(subtype){
|
||
|
|
case 1:
|
||
|
|
local totalDamage = receiveData.readDword();
|
||
|
|
local sizeRate = receiveData.readDword();
|
||
|
|
local lifeTime = receiveData.readDword();
|
||
|
|
local hitTime = receiveData.readDword();
|
||
|
|
local damage = receiveData.readDword();
|
||
|
|
local moveSpeed = receiveData.readDword();
|
||
|
|
obj.getVar("custom").setInt(0, lifeTime);
|
||
|
|
obj.getVar("custom").setInt(1, hitTime);
|
||
|
|
obj.getVar("custom").setInt(2, damage);
|
||
|
|
obj.getVar("custom").setInt(3, moveSpeed);
|
||
|
|
obj.getVar("custom").setInt(4, sizeRate);
|
||
|
|
local bonusRate = sqrChr.sq_GetBonusRateWithPassive(SKILL_FWBYKK_ENCHANTPOISON, -1, 10, 1.0) + 100;
|
||
|
|
local damage = sqrChr.sq_GetBonusRateWithPassive(SKILL_FWBYKK_DRAGONMINE, -1, 12, bonusRate.tofloat() / 1000.0) + 100;
|
||
|
|
obj.getVar("PoisonDamage").setInt(0, damage);
|
||
|
|
local ani = sq_CreateAnimation("", "passiveobject/1_fighter_bykk/3_streetfighter/animation/dragonmine/explosion/boom_dragonmine_boom4.ani");
|
||
|
|
obj.setCurrentAnimation(ani);
|
||
|
|
sq_SetCurrentAttackInfo(obj, sq_GetCustomAttackInfo(obj, 8));
|
||
|
|
sq_SetCurrentAttackBonusRate(sq_GetCurrentAttackInfo(obj), totalDamage);
|
||
|
|
local pAttack = sq_GetCurrentAttackInfo(obj)
|
||
|
|
sq_SetCurrentAttacknUpForce(pAttack, 200);
|
||
|
|
if(sizeRate > 100){
|
||
|
|
local currentAni = obj.getCurrentAnimation();
|
||
|
|
sizeRate = sizeRate.tofloat() / 100.0;
|
||
|
|
currentAni.setImageRateFromOriginal(sizeRate, sizeRate);
|
||
|
|
currentAni.setAutoLayerWorkAnimationAddSizeRate(sizeRate);
|
||
|
|
sq_SetAttackBoundingBoxSizeRate(currentAni, sizeRate, sizeRate, sizeRate);
|
||
|
|
}
|
||
|
|
local currentAni = obj.getCurrentAnimation();
|
||
|
|
local delay = currentAni.getDelaySum(0, 13);
|
||
|
|
local delay2 = currentAni.getDelaySum(0, 12);
|
||
|
|
obj.setTimeEvent(1, delay / 6, 5, false);
|
||
|
|
obj.setTimeEvent(2, delay2, 1, false);
|
||
|
|
sq_flashScreen(obj,0,delay2 / 2,delay2 / 2,85,sq_RGB(255,50,128), GRAPHICEFFECT_NONE, ENUM_DRAWLAYER_NORMAL);
|
||
|
|
break;
|
||
|
|
case 2:
|
||
|
|
local lifeTime = receiveData.readDword();
|
||
|
|
local hitTime = receiveData.readDword();
|
||
|
|
local damage = receiveData.readDword();
|
||
|
|
local moveSpeed = receiveData.readDword();
|
||
|
|
local sizeRate = receiveData.readDword();
|
||
|
|
obj.getVar("custom").setInt(0, lifeTime);
|
||
|
|
obj.getVar("custom").setInt(1, hitTime);
|
||
|
|
obj.getVar("custom").setInt(2, damage);
|
||
|
|
obj.getVar("custom").setInt(3, moveSpeed);
|
||
|
|
obj.getVar("custom").setInt(4, sizeRate);
|
||
|
|
sq_ChangeDrawLayer(obj, ENUM_DRAWLAYER_BOTTOM);
|
||
|
|
obj.addSetStatePacket(20, null, STATE_PRIORITY_AUTO, false, "");
|
||
|
|
break;
|
||
|
|
case 3:
|
||
|
|
sqrChr.getVar("DragonMineBox").clear_obj_vector();
|
||
|
|
sqrChr.getVar("DragonMineBox").push_obj_vector(obj);
|
||
|
|
local delay = receiveData.readDword();
|
||
|
|
local offsetX = receiveData.readDword();
|
||
|
|
obj.getVar("custom").setInt(0, delay);
|
||
|
|
obj.getVar("custom").setInt(1, offsetX);
|
||
|
|
obj.addSetStatePacket(20, null, STATE_PRIORITY_AUTO, false, "");
|
||
|
|
break;
|
||
|
|
case 4:
|
||
|
|
local totalDamage = receiveData.readDword();
|
||
|
|
local sizeRate = receiveData.readDword();
|
||
|
|
local lifeTime = receiveData.readDword();
|
||
|
|
local hitTime = receiveData.readDword();
|
||
|
|
local damage = receiveData.readDword();
|
||
|
|
local moveSpeed = receiveData.readDword();
|
||
|
|
obj.getVar("custom").setInt(0, lifeTime);
|
||
|
|
obj.getVar("custom").setInt(1, hitTime);
|
||
|
|
obj.getVar("custom").setInt(2, damage);
|
||
|
|
obj.getVar("custom").setInt(3, moveSpeed);
|
||
|
|
obj.getVar("custom").setInt(4, sizeRate);
|
||
|
|
local bonusRate = sqrChr.sq_GetBonusRateWithPassive(SKILL_FWBYKK_ENCHANTPOISON, -1, 10, 1.0) + 100;
|
||
|
|
local damage = sqrChr.sq_GetBonusRateWithPassive(SKILL_FWBYKK_DRAGONMINE, -1, 12, bonusRate.tofloat() / 1000.0) + 100;
|
||
|
|
obj.getVar("PoisonDamage").setInt(0, damage);
|
||
|
|
local ani = sq_CreateAnimation("", "passiveobject/1_fighter_bykk/3_streetfighter/animation/dragonmine/tal/dragonmineboomtal_17.ani");
|
||
|
|
obj.setCurrentAnimation(ani);
|
||
|
|
sq_SetCurrentAttackInfo(obj, sq_GetCustomAttackInfo(obj, 9));
|
||
|
|
sq_SetCurrentAttackBonusRate(sq_GetCurrentAttackInfo(obj), totalDamage);
|
||
|
|
local pAttack = sq_GetCurrentAttackInfo(obj)
|
||
|
|
sq_SetCurrentAttacknUpForce(pAttack, 200);
|
||
|
|
if(sizeRate > 100){
|
||
|
|
local currentAni = obj.getCurrentAnimation();
|
||
|
|
sizeRate = sizeRate.tofloat() / 100.0;
|
||
|
|
currentAni.setImageRateFromOriginal(sizeRate, sizeRate);
|
||
|
|
currentAni.setAutoLayerWorkAnimationAddSizeRate(sizeRate);
|
||
|
|
sq_SetAttackBoundingBoxSizeRate(currentAni, sizeRate, sizeRate, sizeRate);
|
||
|
|
}
|
||
|
|
local currentAni = obj.getCurrentAnimation();
|
||
|
|
local delay = currentAni.getDelaySum(0, 8);
|
||
|
|
sq_SetMyShake(obj, 18, delay);
|
||
|
|
local delay2 = currentAni.getDelaySum(0, 11);
|
||
|
|
obj.setTimeEvent(2, delay2, 1, false);
|
||
|
|
sq_flashScreen(obj,0,delay2 / 2,delay2 / 2,85,sq_RGB(255,50,128), GRAPHICEFFECT_NONE, ENUM_DRAWLAYER_NORMAL);
|
||
|
|
break;
|
||
|
|
}
|
||
|
|
break;
|
||
|
|
case SKILL_FWBYKK_PAINSKILLER:
|
||
|
|
switch(subtype){
|
||
|
|
case 1:
|
||
|
|
case 2:
|
||
|
|
local totalDamage = receiveData.readDword();
|
||
|
|
local hitMax = receiveData.readDword();
|
||
|
|
local speedRate = receiveData.readDword();
|
||
|
|
local prob = receiveData.readDword();
|
||
|
|
local time = receiveData.readDword();
|
||
|
|
local level = receiveData.readDword();
|
||
|
|
obj.getVar("custom").setInt(0, hitMax);
|
||
|
|
obj.getVar("custom").setInt(1, prob);
|
||
|
|
obj.getVar("custom").setInt(2, time);
|
||
|
|
obj.getVar("custom").setInt(3, level);
|
||
|
|
local bonusRate = sqrChr.sq_GetBonusRateWithPassive(SKILL_FWBYKK_ENCHANTPOISON, -1, 10, 1.0) + 100;
|
||
|
|
local damage = sqrChr.sq_GetBonusRateWithPassive(SKILL_FWBYKK_PAINSKILLER, -1, 16, bonusRate.tofloat() / 1000.0) + 100;
|
||
|
|
obj.getVar("PoisonDamage").setInt(0, damage);
|
||
|
|
if(subtype == 1){
|
||
|
|
local ani = sq_CreateAnimation("", "passiveobject/1_fighter_bykk/3_streetfighter/animation/painkiller/painkillerattackbfront_00.ani");
|
||
|
|
obj.setCurrentAnimation(ani);
|
||
|
|
sq_SetCurrentAttackInfo(obj, sq_GetCustomAttackInfo(obj, 18));
|
||
|
|
sq_SetCurrentAttackBonusRate(sq_GetCurrentAttackInfo(obj), totalDamage);
|
||
|
|
local attackInfo = sq_GetCurrentAttackInfo(obj);
|
||
|
|
sq_SetChangeStatusIntoAttackInfo(attackInfo, 0, ACTIVESTATUS_BURN, prob, level,time);
|
||
|
|
local currentAni = obj.getCurrentAnimation();
|
||
|
|
currentAni.setSpeedRate(speedRate.tofloat());
|
||
|
|
currentAni = obj.getCurrentAnimation();
|
||
|
|
obj.setTimeEvent(1, currentAni.getDelaySum(0, 6), 1, false);
|
||
|
|
}
|
||
|
|
else{
|
||
|
|
local ani = sq_CreateAnimation("", "passiveobject/1_fighter_bykk/3_streetfighter/animation/painkiller/painkillerattackafront_00.ani");
|
||
|
|
obj.setCurrentAnimation(ani);
|
||
|
|
sq_SetCurrentAttackInfo(obj, sq_GetCustomAttackInfo(obj, 17));
|
||
|
|
sq_SetCurrentAttackBonusRate(sq_GetCurrentAttackInfo(obj), totalDamage);
|
||
|
|
local attackInfo = sq_GetCurrentAttackInfo(obj);
|
||
|
|
sq_SetChangeStatusIntoAttackInfo(attackInfo, 0, ACTIVESTATUS_BURN, prob, level,time);
|
||
|
|
local currentAni = obj.getCurrentAnimation();
|
||
|
|
currentAni.setSpeedRate(speedRate.tofloat());
|
||
|
|
currentAni = obj.getCurrentAnimation();
|
||
|
|
obj.setTimeEvent(3, currentAni.getDelaySum(0, 8), 1, false);
|
||
|
|
}
|
||
|
|
break;
|
||
|
|
}
|
||
|
|
break;
|
||
|
|
case SKILL_FWBYKK_POISONMIST:
|
||
|
|
switch(subtype){
|
||
|
|
case 1:
|
||
|
|
local angle = receiveData.readDword();
|
||
|
|
local sub = receiveData.readDword();
|
||
|
|
local xPos = receiveData.readDword();
|
||
|
|
local yPos = receiveData.readDword();
|
||
|
|
obj.getVar("custom").setInt(0, angle);
|
||
|
|
obj.getVar("custom").setInt(1, sub);
|
||
|
|
obj.getVar("custom").setInt(2, xPos);
|
||
|
|
obj.getVar("custom").setInt(3, yPos);
|
||
|
|
obj.addSetStatePacket(20, null, STATE_PRIORITY_AUTO, false, "");
|
||
|
|
break;
|
||
|
|
case 2:
|
||
|
|
sqrChr.getVar("PoisonMistObj").push_obj_vector(obj);
|
||
|
|
local sub = receiveData.readDword();
|
||
|
|
obj.getVar("custom").setInt(0, sub);
|
||
|
|
local ani = sq_CreateAnimation("", "passiveobject/1_fighter_bykk/3_streetfighter/animation/poisonmist/bottom.ani");
|
||
|
|
obj.setCurrentAnimation(ani);
|
||
|
|
sq_ChangeDrawLayer(obj, ENUM_DRAWLAYER_BOTTOM);
|
||
|
|
local skillLevel = sq_GetSkillLevel(sqrChr, SKILL_FWBYKK_POISONMIST);
|
||
|
|
local lifeTime = sq_GetLevelData(sqrChr, SKILL_FWBYKK_POISONMIST, 1, skillLevel);
|
||
|
|
local range = sq_GetLevelData(sqrChr, SKILL_FWBYKK_POISONMIST, 5, skillLevel) / 2;
|
||
|
|
local sizeRate = range.tofloat() / 225.0;
|
||
|
|
local currentAni = obj.getCurrentAnimation();
|
||
|
|
obj.getVar("custom").setInt(1, range);
|
||
|
|
if(sub > 1){
|
||
|
|
currentAni.setImageRateFromOriginal(-sizeRate, sizeRate);
|
||
|
|
sq_AddAttackBox(currentAni, -range, -range / 2, -10, range * 2, range, 160);
|
||
|
|
sq_SetCurrentAttackInfo(obj, sq_GetCustomAttackInfo(obj, 35));
|
||
|
|
local attackInfo = sq_GetCurrentAttackInfo(obj);
|
||
|
|
sq_SetAddWeaponDamage(attackInfo, false);
|
||
|
|
sq_SetCurrentAttackeDamageAct(attackInfo, 0);
|
||
|
|
local flashScreenObj = sqrChr.getVar("PoisonMistFlash").get_obj_vector(0);
|
||
|
|
local pflashScreen = sq_GetCNRDObjectToFlashScreen(flashScreenObj);
|
||
|
|
if(pflashScreen) pflashScreen.fadeOut();
|
||
|
|
local flashScreenObj = sq_flashScreen(sqrChr, 800, lifeTime - 1000, 200, 66, sq_RGB(190,83,255), GRAPHICEFFECT_NONE, ENUM_DRAWLAYER_BOTTOM);
|
||
|
|
sqrChr.getVar("PoisonMistFlash").clear_obj_vector();
|
||
|
|
sqrChr.getVar("PoisonMistFlash").push_obj_vector(flashScreenObj);
|
||
|
|
local hitTime = sq_GetIntData(sqrChr, SKILL_FWBYKK_POISONMIST, 4);
|
||
|
|
local hitTime_poison = sqrChr.sq_GetBonusRateWithPassive(SKILL_FWBYKK_POISONMIST, -1, 3, 1.0) + 100;
|
||
|
|
local damage = sqrChr.sq_GetBonusRateWithPassive(SKILL_FWBYKK_POISONMIST, -1, 4, 1.0);
|
||
|
|
obj.getVar("custom").setInt(10, damage);
|
||
|
|
obj.getVar("custom").setInt(11, hitTime_poison);
|
||
|
|
obj.getVar("custom").setInt(2, hitTime);
|
||
|
|
obj.setTimeEvent(4, hitTime, -1, false);
|
||
|
|
obj.setTimeEvent(5, hitTime * 2, 1, false);
|
||
|
|
obj.setTimeEvent(7, hitTime_poison, -1, true);
|
||
|
|
}
|
||
|
|
else{
|
||
|
|
currentAni.setImageRateFromOriginal(sizeRate, sizeRate);
|
||
|
|
}
|
||
|
|
obj.setTimeEvent(1, lifeTime, 1, false);
|
||
|
|
obj.setTimeEvent(2, 100, -1, true);
|
||
|
|
obj.setTimeEvent(3, lifeTime - 1500, 1, false);
|
||
|
|
break;
|
||
|
|
case 3:
|
||
|
|
local aniPath = "passiveobject/1_fighter_bykk/3_streetfighter/animation/poisonmist/smallsmoke.ani";
|
||
|
|
if(sq_getRandom(1, 100) > 50){
|
||
|
|
obj.addSetStatePacket(20, null, STATE_PRIORITY_AUTO, false, "");
|
||
|
|
break;
|
||
|
|
}
|
||
|
|
local ani = sq_CreateAnimation("", aniPath);
|
||
|
|
obj.setCurrentAnimation(ani);
|
||
|
|
break;
|
||
|
|
case 4:
|
||
|
|
local totalDamage = receiveData.readDword();
|
||
|
|
local hitMax = receiveData.readDword();
|
||
|
|
local range = receiveData.readDword();
|
||
|
|
obj.getVar("custom").setInt(1, range);
|
||
|
|
local bonusRate = sqrChr.sq_GetBonusRateWithPassive(SKILL_FWBYKK_ENCHANTPOISON, -1, 10, 1.0) + 100;
|
||
|
|
local damage = sqrChr.sq_GetBonusRateWithPassive(SKILL_FWBYKK_POISONMIST, -1, 10, bonusRate.tofloat() / 1000.0) + 100;
|
||
|
|
obj.getVar("PoisonDamage").setInt(0, damage);
|
||
|
|
local currentAni = obj.getCurrentAnimation();
|
||
|
|
sq_AddAttackBox(currentAni, -range, -range / 2, -10, range * 2, range, 160);
|
||
|
|
sq_SetCurrentAttackInfo(obj, sq_GetCustomAttackInfo(obj, 23));
|
||
|
|
sq_SetCurrentAttackBonusRate(sq_GetCurrentAttackInfo(obj), totalDamage);
|
||
|
|
obj.setTimeEvent(6, 50, 17, true);
|
||
|
|
obj.setTimeEvent(7, 1850 / (hitMax + 2), hitMax - 1, false);
|
||
|
|
break;
|
||
|
|
case 5:
|
||
|
|
local sizeRate = receiveData.readDword();
|
||
|
|
local aniPath = "passiveobject/1_fighter_bykk/3_streetfighter/animation/poisonmist/explosion.ani";
|
||
|
|
local ani = sq_CreateAnimation("", aniPath);
|
||
|
|
obj.setCurrentAnimation(ani);
|
||
|
|
local currentAni = obj.getCurrentAnimation();
|
||
|
|
currentAni.addLayerAnimation(-1,sq_CreateAnimation("","passiveobject/1_fighter_bykk/3_streetfighter/animation/poisonmist/explosionlayer.ani"),true);
|
||
|
|
sq_ClearAttackBox(currentAni);
|
||
|
|
sizeRate = sizeRate.tofloat() / 100.0;
|
||
|
|
currentAni.setImageRateFromOriginal(sizeRate, sizeRate);
|
||
|
|
currentAni.setAutoLayerWorkAnimationAddSizeRate(sizeRate);
|
||
|
|
break;
|
||
|
|
}
|
||
|
|
break;
|
||
|
|
case 255:
|
||
|
|
switch(subtype){
|
||
|
|
case 1:
|
||
|
|
local group = receiveData.readDword();
|
||
|
|
local uniqueId = receiveData.readDword();
|
||
|
|
local time = receiveData.readDword();
|
||
|
|
local damage = receiveData.readDword();
|
||
|
|
local targetObj = sq_GetObject(obj, group, uniqueId);
|
||
|
|
if(targetObj && targetObj.getState() != STATE_DIE){
|
||
|
|
local activeObj = sq_GetCNRDObjectToActiveObject(targetObj);
|
||
|
|
activeObj.getVar("SFPoison").clear_obj_vector();
|
||
|
|
activeObj.getVar("SFPoison").push_obj_vector(obj);
|
||
|
|
obj.getVar("tar").clear_obj_vector();
|
||
|
|
obj.getVar("tar").push_obj_vector(activeObj);
|
||
|
|
sq_moveWithParent(activeObj, obj);
|
||
|
|
obj.getVar("custom").setInt(0, group);
|
||
|
|
obj.getVar("custom").setInt(1, uniqueId);
|
||
|
|
local count = time / 500;
|
||
|
|
obj.getVar("custom").setInt(2, count);
|
||
|
|
obj.getVar("time").setInt(0, time);
|
||
|
|
obj.getVar("damage").setInt(0, damage);
|
||
|
|
obj.getVar("damage").setInt(1, damage);
|
||
|
|
if(damage > 0){
|
||
|
|
obj.setTimeEvent(1, 500, count, false);
|
||
|
|
// print("test");
|
||
|
|
}
|
||
|
|
}
|
||
|
|
break;
|
||
|
|
case 2:
|
||
|
|
local group = receiveData.readDword();
|
||
|
|
local uniqueId = receiveData.readDword();
|
||
|
|
local totalDamage = receiveData.readDword();
|
||
|
|
local targetObj = sq_GetObject(obj, group, uniqueId);
|
||
|
|
if(targetObj && targetObj.getState() != STATE_DIE){
|
||
|
|
obj.getVar("tar").clear_obj_vector();
|
||
|
|
obj.getVar("tar").push_obj_vector(targetObj);
|
||
|
|
sq_moveWithParent(targetObj, obj);
|
||
|
|
local ani = sq_CreateAnimation("","common/commoneffect/animation/decreaseeffect/reactionpoison_00.ani");
|
||
|
|
obj.setCurrentAnimation(ani);
|
||
|
|
sq_SetCurrentAttackInfo(obj, sq_GetCustomAttackInfo(obj, 34));
|
||
|
|
sq_SetCurrentAttackBonusRate(sq_GetCurrentAttackInfo(obj), totalDamage);
|
||
|
|
obj.setTimeEvent(2, 250, 1, false);
|
||
|
|
}
|
||
|
|
break;//
|
||
|
|
}
|
||
|
|
break;
|
||
|
|
}
|
||
|
|
break;
|
||
|
|
case 4:
|
||
|
|
switch(skillIndex){
|
||
|
|
case SKILL_BYKK_SHININGWINGSFLAP:
|
||
|
|
switch(subtype){
|
||
|
|
case 1:
|
||
|
|
local totalDamage = receiveData.readDword();
|
||
|
|
print("totalDamage = "+totalDamage);
|
||
|
|
local ani = sq_CreateAnimation("","passiveobject/1_fighter_bykk/4_grappler_bykk/animation/shiningwingsflap/grabcannonsub.ani");
|
||
|
|
obj.setCurrentAnimation(ani);
|
||
|
|
sq_SetCurrentAttackInfo(obj, sq_GetCustomAttackInfo(obj, 46));
|
||
|
|
sq_SetCurrentAttackBonusRate(sq_GetCurrentAttackInfo(obj), totalDamage);
|
||
|
|
local attackInfo = sq_GetCurrentAttackInfo(obj);
|
||
|
|
sq_SetAddWeaponDamage(attackInfo, true);
|
||
|
|
sq_SetMyShake(obj, 7, 250);
|
||
|
|
break;
|
||
|
|
case 2:
|
||
|
|
local totalDamage = receiveData.readDword();
|
||
|
|
local totalDamage2 = receiveData.readDword();
|
||
|
|
local sub = receiveData.readDword();
|
||
|
|
local sub2 = receiveData.readDword();
|
||
|
|
print("totalDamage2 = "+totalDamage);
|
||
|
|
obj.getVar("custom").setInt(0, totalDamage);
|
||
|
|
obj.getVar("custom").setInt(1, totalDamage2);
|
||
|
|
obj.getVar("custom").setInt(2, sub);
|
||
|
|
obj.getVar("custom").setInt(3, sub2);
|
||
|
|
local aniPath = "passiveobject/1_fighter_bykk/4_grappler_bykk/animation/shiningwingsflap/shiningwingsflapattack01_body.ani";
|
||
|
|
if(sub2 > 0) aniPath = "passiveobject/1_fighter_bykk/4_grappler_bykk/animation/shiningwingsflap/shiningwingsflapattack02_body.ani";
|
||
|
|
local ani = sq_CreateAnimation("", aniPath);
|
||
|
|
obj.setCurrentAnimation(ani);
|
||
|
|
sq_SetCurrentDirection(obj, sq_GetOppositeDirection(sq_GetDirection(obj)));
|
||
|
|
obj.sq_PlaySound("R_FT_SHINING_WINGS_FLAP_LEXY");
|
||
|
|
break;
|
||
|
|
case 21:
|
||
|
|
local totalDamage = receiveData.readDword();
|
||
|
|
local ani = sq_CreateAnimation("","passiveobject/1_fighter_bykk/4_grappler_bykk/animation/shiningwingsflap/shiningwingsflapattackeffect01_00.ani");
|
||
|
|
obj.setCurrentAnimation(ani);
|
||
|
|
sq_SetCurrentAttackInfo(obj, sq_GetCustomAttackInfo(obj, 47));
|
||
|
|
sq_SetCurrentAttackBonusRate(sq_GetCurrentAttackInfo(obj), totalDamage);
|
||
|
|
local attackInfo = sq_GetCurrentAttackInfo(obj);
|
||
|
|
sq_SetAddWeaponDamage(attackInfo, true);
|
||
|
|
sq_SetMyShake(obj, 10, 300);
|
||
|
|
break;
|
||
|
|
case 3:
|
||
|
|
local totalDamage = receiveData.readDword();
|
||
|
|
local sub = receiveData.readDword();
|
||
|
|
print("totalDamage3 = "+totalDamage);
|
||
|
|
obj.getVar("custom").setInt(0, totalDamage);
|
||
|
|
obj.getVar("custom").setInt(1, sub);
|
||
|
|
local aniPath = "passiveobject/1_fighter_bykk/4_grappler_bykk/animation/shiningwingsflap/shiningwingsflapattack03bnew_body.ani";
|
||
|
|
if(sub > 0){
|
||
|
|
aniPath = "passiveobject/1_fighter_bykk/4_grappler_bykk/animation/shiningwingsflap/shiningwingsflapattack03anew_body.ani";
|
||
|
|
obj.sq_PlaySound("R_FT_SHINING_WINGS_FLAP_LUCY_02");
|
||
|
|
}
|
||
|
|
local ani = sq_CreateAnimation("", aniPath);
|
||
|
|
obj.setCurrentAnimation(ani);
|
||
|
|
break;
|
||
|
|
case 31:
|
||
|
|
local totalDamage = receiveData.readDword();
|
||
|
|
local ani = sq_CreateAnimation("","passiveobject/1_fighter_bykk/4_grappler_bykk/animation/shiningwingsflap/shiningwingsflapattack03bnew2_00.ani");
|
||
|
|
obj.setCurrentAnimation(ani);
|
||
|
|
sq_SetCurrentAttackInfo(obj, sq_GetCustomAttackInfo(obj, 48));
|
||
|
|
sq_SetCurrentAttackBonusRate(sq_GetCurrentAttackInfo(obj), totalDamage);
|
||
|
|
local attackInfo = sq_GetCurrentAttackInfo(obj);
|
||
|
|
sq_SetAddWeaponDamage(attackInfo, true);
|
||
|
|
sq_SetMyShake(obj, 20, 500);
|
||
|
|
break;
|
||
|
|
case 32:
|
||
|
|
local totalDamage = receiveData.readDword();
|
||
|
|
local ani = sq_CreateAnimation("","passiveobject/1_fighter_bykk/4_grappler_bykk/animation/shiningwingsflap/shiningwingsflapattackeffect03floor_00.ani");
|
||
|
|
obj.setCurrentAnimation(ani);
|
||
|
|
sq_SetCurrentAttackInfo(obj, sq_GetCustomAttackInfo(obj, 49));
|
||
|
|
sq_SetCurrentAttackBonusRate(sq_GetCurrentAttackInfo(obj), totalDamage);
|
||
|
|
local attackInfo = sq_GetCurrentAttackInfo(obj);
|
||
|
|
sq_SetAddWeaponDamage(attackInfo, true);
|
||
|
|
sq_SetMyShake(obj, 20, 500);
|
||
|
|
break;
|
||
|
|
case 10:
|
||
|
|
local totalDamage = receiveData.readDword();
|
||
|
|
print("totalDamage = "+totalDamage);
|
||
|
|
local ani = sq_CreateAnimation("","passiveobject/1_fighter_bykk/4_grappler_bykk/animation/shiningwingsflap/shiningwingsflapattackeffect05floor_00.ani");
|
||
|
|
obj.setCurrentAnimation(ani);
|
||
|
|
sq_SetCurrentAttackInfo(obj, sq_GetCustomAttackInfo(obj, 45));
|
||
|
|
sq_SetCurrentAttackBonusRate(sq_GetCurrentAttackInfo(obj), totalDamage);
|
||
|
|
local attackInfo = sq_GetCurrentAttackInfo(obj);
|
||
|
|
sq_SetAddWeaponDamage(attackInfo, true);
|
||
|
|
break;
|
||
|
|
}
|
||
|
|
break;
|
||
|
|
}
|
||
|
|
break;
|
||
|
|
}
|
||
|
|
}
|
||
|
|
|
||
|
|
function setState_po_fighter_bykk(obj, state, datas)
|
||
|
|
{
|
||
|
|
if(!obj) return;
|
||
|
|
local sqrChr = sq_GetCNRDObjectToSQRCharacter(obj.getTopCharacter());
|
||
|
|
local job = obj.getVar("job").getInt(0);
|
||
|
|
local skillIndex = obj.getVar("skillIndex").getInt(0);
|
||
|
|
local subtype = obj.getVar("subtype").getInt(0);
|
||
|
|
obj.getVar("state").setInt(0, state);
|
||
|
|
|
||
|
|
switch(job){
|
||
|
|
case 0:
|
||
|
|
break;
|
||
|
|
case 1:
|
||
|
|
switch(skillIndex){
|
||
|
|
case SKILL_BYKK_SKYTHUNDERSTEP: sq_SendDestroyPacketPassiveObject(obj); break;
|
||
|
|
}
|
||
|
|
break;
|
||
|
|
case 2:
|
||
|
|
break;
|
||
|
|
case 3:
|
||
|
|
switch(skillIndex){
|
||
|
|
case SKILL_FWBYKK_VENOMMINE:
|
||
|
|
switch(subtype){
|
||
|
|
case 1:
|
||
|
|
switch(state){
|
||
|
|
case 20:
|
||
|
|
local ani = sq_CreateAnimation("", "passiveobject/1_fighter_bykk/3_streetfighter/animation/venommine/minea_00.ani");
|
||
|
|
obj.setCurrentAnimation(ani);
|
||
|
|
local angle = obj.getVar("custom").getInt(0);
|
||
|
|
// print("angle = "+angle);
|
||
|
|
obj.sq_SetMoveParticle("particle/venommine.ptl", angle.tofloat(), 0.0);
|
||
|
|
local speed = 500 * (100 + obj.getVar("custom").getInt(2)) / 100;
|
||
|
|
sq_SetSpeedToMoveParticle(obj,0,speed);
|
||
|
|
break;
|
||
|
|
case 21:
|
||
|
|
obj.sq_RemoveMoveParticle();
|
||
|
|
local ani = sq_CreateAnimation("", "passiveobject/1_fighter_bykk/3_streetfighter/animation/venommine/mineb_00.ani");
|
||
|
|
obj.setCurrentAnimation(ani);
|
||
|
|
local currentAni = obj.getCurrentAnimation();
|
||
|
|
currentAni.addLayerAnimation(-2,sq_CreateAnimation("","passiveobject/1_fighter_bykk/3_streetfighter/animation/venommine/mineb_bottom.ani"),true);
|
||
|
|
currentAni.addLayerAnimation(-1,sq_CreateAnimation("","passiveobject/1_fighter_bykk/3_streetfighter/animation/venommine/mineb_back.ani"),true);
|
||
|
|
currentAni.addLayerAnimation(1,sq_CreateAnimation("","passiveobject/1_fighter_bykk/3_streetfighter/animation/venommine/mineb_front.ani"),true);
|
||
|
|
local sub = obj.getVar("custom").getInt(1);
|
||
|
|
// if(sub < 3) obj.setTimeEvent(1, 500 + 50 * sub, 1, false);
|
||
|
|
// else
|
||
|
|
obj.setTimeEvent(1, 250 + 50 * (5 - sub), 1, false);
|
||
|
|
break;
|
||
|
|
case 22:
|
||
|
|
local ani = sq_CreateAnimation("", "passiveobject/1_fighter_bykk/3_streetfighter/animation/venommine/explosionb_00.ani");
|
||
|
|
obj.setCurrentAnimation(ani);
|
||
|
|
local aniPath = "passiveobject/1_fighter_bykk/3_streetfighter/animation/venommine/explosionc_bottom_00.ani";
|
||
|
|
local aniPath2 = "passiveobject/1_fighter_bykk/3_streetfighter/animation/venommine/explosiona_00.ani";
|
||
|
|
local direction = sq_GetDirection(obj), x = sq_GetXPos(obj), y = sq_GetYPos(obj);
|
||
|
|
createOnlyDrawObject_Fighter_bykk(obj,aniPath,true,direction,x,y,0,ENUM_DRAWLAYER_BOTTOM);
|
||
|
|
createOnlyDrawObject_Fighter_bykk(obj,aniPath2,true,direction,x,y + 1,0,ENUM_DRAWLAYER_NORMAL);
|
||
|
|
local sub = obj.getVar("custom").getInt(1);
|
||
|
|
local angle = [10,20,30,-10,-20,-30];
|
||
|
|
sq_SetCustomRotate(obj, sq_ToRadian(angle[sub].tofloat()));
|
||
|
|
sq_SetMyShake(obj, 10, 200);
|
||
|
|
local sizeRate = 100 + obj.getVar("custom").getInt(2);
|
||
|
|
if(sizeRate > 100){
|
||
|
|
local currentAni = obj.getCurrentAnimation();
|
||
|
|
sizeRate = sizeRate.tofloat() / 100.0;
|
||
|
|
currentAni.setImageRateFromOriginal(sizeRate, sizeRate);
|
||
|
|
currentAni.setAutoLayerWorkAnimationAddSizeRate(sizeRate);
|
||
|
|
}
|
||
|
|
break;
|
||
|
|
}
|
||
|
|
break;
|
||
|
|
}
|
||
|
|
break;
|
||
|
|
case SKILL_FWBYKK_BLOCKBUSTEREX:
|
||
|
|
switch(subtype){
|
||
|
|
case 2:
|
||
|
|
switch(state){
|
||
|
|
case 20:
|
||
|
|
break;
|
||
|
|
case 21:
|
||
|
|
local ani = sq_CreateAnimation("", "passiveobject/1_fighter_bykk/3_streetfighter/animation/venommine/minea_00.ani");
|
||
|
|
obj.setCurrentAnimation(ani);
|
||
|
|
break;
|
||
|
|
}
|
||
|
|
break;
|
||
|
|
case 3:
|
||
|
|
switch(state){
|
||
|
|
case 20:
|
||
|
|
local ani = sq_CreateAnimation("", "passiveobject/1_fighter_bykk/3_streetfighter/animation/blockbusterexblock/block2.ani");
|
||
|
|
obj.setCurrentAnimation(ani);
|
||
|
|
local currentAni = obj.getCurrentAnimation();
|
||
|
|
currentAni.addLayerAnimation(1,sq_CreateAnimation("","passiveobject/1_fighter_bykk/3_streetfighter/animation/blockbusterexblock/block2glow.ani"),true);
|
||
|
|
currentAni.addLayerAnimation(2,sq_CreateAnimation("","passiveobject/1_fighter_bykk/3_streetfighter/animation/blockbusterexblock/block2spark.ani"),true);
|
||
|
|
break;
|
||
|
|
case 21:
|
||
|
|
local ani = sq_CreateAnimation("", "passiveobject/1_fighter_bykk/3_streetfighter/animation/venommine/minea_00.ani");
|
||
|
|
obj.setCurrentAnimation(ani);
|
||
|
|
break;
|
||
|
|
}
|
||
|
|
break;
|
||
|
|
case 4:
|
||
|
|
switch(state){
|
||
|
|
case 20:
|
||
|
|
local ani = sq_CreateAnimation("", "passiveobject/1_fighter_bykk/3_streetfighter/animation/blockbusterexblock/block3.ani");
|
||
|
|
obj.setCurrentAnimation(ani);
|
||
|
|
local currentAni = obj.getCurrentAnimation();
|
||
|
|
currentAni.addLayerAnimation(1,sq_CreateAnimation("","passiveobject/1_fighter_bykk/3_streetfighter/animation/blockbusterexblock/block3glow.ani"),true);
|
||
|
|
currentAni.addLayerAnimation(2,sq_CreateAnimation("","passiveobject/1_fighter_bykk/3_streetfighter/animation/blockbusterexblock/block3spark.ani"),true);
|
||
|
|
break;
|
||
|
|
case 21:
|
||
|
|
local ani = sq_CreateAnimation("", "passiveobject/1_fighter_bykk/3_streetfighter/animation/venommine/minea_00.ani");
|
||
|
|
obj.setCurrentAnimation(ani);
|
||
|
|
break;
|
||
|
|
}
|
||
|
|
break;
|
||
|
|
}
|
||
|
|
break;
|
||
|
|
case SKILL_FWBYKK_DRAGONMINE:
|
||
|
|
switch(subtype){
|
||
|
|
case 2:
|
||
|
|
switch(state){
|
||
|
|
case 20:
|
||
|
|
local ani = sq_CreateAnimation("", "passiveobject/1_fighter_bykk/3_streetfighter/animation/dragonmine/poisonloop_dragonmine_bottom.ani");
|
||
|
|
obj.setCurrentAnimation(ani);
|
||
|
|
sq_SetCurrentAttackInfo(obj, sq_GetCustomAttackInfo(obj, 10));
|
||
|
|
sq_SetCurrentAttackBonusRate(sq_GetCurrentAttackInfo(obj), obj.getVar("custom").getInt(2));
|
||
|
|
obj.setTimeEvent(1, obj.getVar("custom").getInt(1), -1, false);
|
||
|
|
local flashScreenObj = sqrChr.getVar("DragonMineFlash").get_obj_vector(0);
|
||
|
|
local pflashScreen = sq_GetCNRDObjectToFlashScreen(flashScreenObj);
|
||
|
|
if(pflashScreen) pflashScreen.fadeOut();
|
||
|
|
local flashScreenObj = sq_flashScreen(obj,0,99990,0,66,sq_RGB(255,50,128), GRAPHICEFFECT_NONE, ENUM_DRAWLAYER_BOTTOM);
|
||
|
|
obj.getVar("Flash").clear_obj_vector();
|
||
|
|
obj.getVar("Flash").push_obj_vector(flashScreenObj);
|
||
|
|
break;
|
||
|
|
case 21:
|
||
|
|
local flashScreenObj = obj.getVar("Flash").get_obj_vector(0);
|
||
|
|
local pflashScreen = sq_GetCNRDObjectToFlashScreen(flashScreenObj);
|
||
|
|
if(pflashScreen) pflashScreen.fadeOut();
|
||
|
|
obj.removeAllTimeEvent();
|
||
|
|
local ani = sq_CreateAnimation("", "passiveobject/1_fighter_bykk/3_streetfighter/animation/dragonmine/poisonend_dragonmine_bottom.ani");
|
||
|
|
obj.setCurrentAnimation(ani);
|
||
|
|
local currentAni = obj.getCurrentAnimation();
|
||
|
|
local delay = currentAni.getDelaySum(false);
|
||
|
|
sq_flashScreen(obj,0,0,delay,66,sq_RGB(255,50,128), GRAPHICEFFECT_NONE, ENUM_DRAWLAYER_BOTTOM);
|
||
|
|
break;
|
||
|
|
}
|
||
|
|
local sizeRate = obj.getVar("custom").getInt(4);
|
||
|
|
if(sizeRate > 100){
|
||
|
|
local currentAni = obj.getCurrentAnimation();
|
||
|
|
sizeRate = sizeRate.tofloat() / 100.0;
|
||
|
|
currentAni.setImageRateFromOriginal(sizeRate, sizeRate);
|
||
|
|
currentAni.setAutoLayerWorkAnimationAddSizeRate(sizeRate);
|
||
|
|
sq_SetAttackBoundingBoxSizeRate(currentAni, sizeRate, sizeRate, sizeRate);
|
||
|
|
}
|
||
|
|
break;
|
||
|
|
case 3:
|
||
|
|
// print("state = "+state);
|
||
|
|
switch(state){
|
||
|
|
case 20:
|
||
|
|
local ani = sq_CreateAnimation("", "passiveobject/1_fighter_bykk/3_streetfighter/animation/dragonmine/tal/flyingbox_a.ani");
|
||
|
|
obj.setCurrentAnimation(ani);
|
||
|
|
local currentAni = obj.getCurrentAnimation();
|
||
|
|
local fullTime = currentAni.getDelaySum(false);
|
||
|
|
local delay = obj.getVar("custom").getInt(0);
|
||
|
|
if(fullTime <= delay) delay = fullTime;
|
||
|
|
obj.getVar("custom").setInt(2, sq_GetXPos(obj));
|
||
|
|
obj.getVar("custom").setInt(3, sq_GetZPos(obj));
|
||
|
|
obj.setTimeEvent(3, delay / 40, 40, true);
|
||
|
|
break;
|
||
|
|
case 21:
|
||
|
|
local ani = sq_CreateAnimation("", "passiveobject/1_fighter_bykk/3_streetfighter/animation/dragonmine/tal/flyingbox_b.ani");
|
||
|
|
obj.setCurrentAnimation(ani);
|
||
|
|
break;
|
||
|
|
case 22:
|
||
|
|
local ani = sq_CreateAnimation("", "passiveobject/1_fighter_bykk/3_streetfighter/animation/dragonmine/tal/box.ani");
|
||
|
|
obj.setCurrentAnimation(ani);
|
||
|
|
break;
|
||
|
|
case 23:
|
||
|
|
obj.removeAllTimeEvent();
|
||
|
|
local ani = sq_CreateAnimation("", "passiveobject/1_fighter_bykk/3_streetfighter/animation/dragonmine/tal/brokenbox.ani");
|
||
|
|
obj.setCurrentAnimation(ani);
|
||
|
|
break;
|
||
|
|
}
|
||
|
|
break;
|
||
|
|
}
|
||
|
|
break;
|
||
|
|
case SKILL_FWBYKK_POISONMIST:
|
||
|
|
switch(subtype){
|
||
|
|
case 1:
|
||
|
|
switch(state){
|
||
|
|
case 20:
|
||
|
|
local ani = sq_CreateAnimation("", "character/fighter/effect/animation/3_streetfighter_bykk/poisonmist/throwair.ani");
|
||
|
|
obj.setCurrentAnimation(ani);
|
||
|
|
local angle = obj.getVar("custom").getInt(0);
|
||
|
|
local newAngel = -angle;
|
||
|
|
// if(angle > 180) newAngel = newAngel - 180;// && angle < 270
|
||
|
|
sq_SetCustomRotate(obj, sq_ToRadian(newAngel.tofloat()));
|
||
|
|
obj.sq_SetMoveParticle("particle/poisonmistarea.ptl", angle.tofloat(), 0.0);
|
||
|
|
sq_SetSpeedToMoveParticle(obj,0,sq_getRandom(1200, 2500));
|
||
|
|
sq_SetSpeedToMoveParticle(obj,2,-1500);
|
||
|
|
break;
|
||
|
|
case 21:
|
||
|
|
obj.sq_RemoveMoveParticle();
|
||
|
|
local ani = sq_CreateAnimation("", "character/fighter/effect/animation/poisonmist/throwland.ani");
|
||
|
|
obj.setCurrentAnimation(ani);
|
||
|
|
sq_SetCustomRotate(obj, sq_ToRadian(0.0));
|
||
|
|
break;
|
||
|
|
}
|
||
|
|
break;
|
||
|
|
case 3:
|
||
|
|
switch(state){
|
||
|
|
case 20:
|
||
|
|
local ani = sq_CreateAnimation("", "passiveobject/1_fighter_bykk/3_streetfighter/animation/poisonmist/bigsmokebottom.ani");
|
||
|
|
obj.setCurrentAnimation(ani);
|
||
|
|
break;
|
||
|
|
case 21:
|
||
|
|
local aniPath = "passiveobject/1_fighter_bykk/3_streetfighter/animation/poisonmist/bigsmokeair1.ani";
|
||
|
|
if(sq_getRandom(1, 100) > 50) aniPath = "passiveobject/1_fighter_bykk/3_streetfighter/animation/poisonmist/bigsmokeair2.ani";
|
||
|
|
local ani = sq_CreateAnimation("", aniPath);
|
||
|
|
obj.setCurrentAnimation(ani);
|
||
|
|
break;
|
||
|
|
}
|
||
|
|
break;
|
||
|
|
}
|
||
|
|
break;
|
||
|
|
}
|
||
|
|
break;
|
||
|
|
case 4:
|
||
|
|
break;
|
||
|
|
}
|
||
|
|
}
|
||
|
|
|
||
|
|
function onEndCurrentAni_po_fighter_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_LIGHTNINGSHIFT: sq_SendDestroyPacketPassiveObject(obj); break;
|
||
|
|
}
|
||
|
|
break;
|
||
|
|
case 3:
|
||
|
|
switch(skillIndex){
|
||
|
|
case SKILL_FWBYKK_THROWSAND: sq_SendDestroyPacketPassiveObject(obj); break;
|
||
|
|
case SKILL_FWBYKK_GRABEXPLOSION: sq_SendDestroyPacketPassiveObject(obj); break;
|
||
|
|
case SKILL_FWBYKK_HIDDENSTING: sq_SendDestroyPacketPassiveObject(obj); break;
|
||
|
|
case SKILL_FWBYKK_BLOCKBUSTER: sq_SendDestroyPacketPassiveObject(obj); break;
|
||
|
|
case SKILL_FWBYKK_MOUNT: sq_SendDestroyPacketPassiveObject(obj); break;
|
||
|
|
case SKILL_FWBYKK_THROWWEB: sq_SendDestroyPacketPassiveObject(obj); break;
|
||
|
|
case SKILL_FWBYKK_GROUNDKICK: sq_SendDestroyPacketPassiveObject(obj); break;
|
||
|
|
case SKILL_FWBYKK_VENOMMINE: sq_SendDestroyPacketPassiveObject(obj); break;
|
||
|
|
case SKILL_FWBYKK_JUNKSPIN: sq_SendDestroyPacketPassiveObject(obj); break;
|
||
|
|
case SKILL_FWBYKK_GRABEXPLOSIONEX: sq_SendDestroyPacketPassiveObject(obj); break;
|
||
|
|
case SKILL_FWBYKK_BLOCKBUSTEREX: sq_SendDestroyPacketPassiveObject(obj); break;
|
||
|
|
case SKILL_FWBYKK_POISONEXPLOSION:
|
||
|
|
switch(subtype){
|
||
|
|
case 1: sq_SendDestroyPacketPassiveObject(obj); break;
|
||
|
|
case 2:
|
||
|
|
// local targetObj = obj.getVar("tar").get_obj_vector(0);
|
||
|
|
// if(targetObj && targetObj.getState() != STATE_DIE){
|
||
|
|
local totalDamage = obj.getVar("custom").getInt(0);
|
||
|
|
local sizeRate = obj.getVar("custom").getInt(1);
|
||
|
|
local createMax_1st = obj.getVar("custom").getInt(2);
|
||
|
|
local createMax_2nd = obj.getVar("custom").getInt(3);
|
||
|
|
local decreaseRate_1st = obj.getVar("custom").getInt(4);
|
||
|
|
local decreaseRate_2nd = obj.getVar("custom").getInt(5);
|
||
|
|
local moveSpeed = obj.getVar("custom").getInt(6);
|
||
|
|
local attackSpeed = obj.getVar("custom").getInt(7);
|
||
|
|
local prob = obj.getVar("custom").getInt(8);
|
||
|
|
local time = obj.getVar("custom").getInt(9);
|
||
|
|
local level = obj.getVar("custom").getInt(10);
|
||
|
|
local sub = obj.getVar("custom").getInt(11);
|
||
|
|
sq_BinaryStartWrite();
|
||
|
|
sq_BinaryWriteDword(3);
|
||
|
|
sq_BinaryWriteDword(SKILL_FWBYKK_POISONEXPLOSION);
|
||
|
|
sq_BinaryWriteDword(3);
|
||
|
|
sq_BinaryWriteDword(totalDamage);
|
||
|
|
sq_BinaryWriteDword(sizeRate);
|
||
|
|
sq_BinaryWriteDword(createMax_1st);
|
||
|
|
sq_BinaryWriteDword(createMax_2nd);
|
||
|
|
sq_BinaryWriteDword(decreaseRate_1st);
|
||
|
|
sq_BinaryWriteDword(decreaseRate_2nd);
|
||
|
|
sq_BinaryWriteDword(moveSpeed);
|
||
|
|
sq_BinaryWriteDword(attackSpeed);
|
||
|
|
sq_BinaryWriteDword(prob);
|
||
|
|
sq_BinaryWriteDword(time);
|
||
|
|
sq_BinaryWriteDword(level);
|
||
|
|
sq_BinaryWriteDword(sub);
|
||
|
|
sq_SendCreatePassiveObjectPacket(obj, PASSIVEOBJNUM_FWBYKK, 0, 0, 0, 0, obj.getDirection());
|
||
|
|
// }
|
||
|
|
sq_SendDestroyPacketPassiveObject(obj);
|
||
|
|
break;
|
||
|
|
case 3: sq_SendDestroyPacketPassiveObject(obj); break;
|
||
|
|
case 4:
|
||
|
|
local targetObj = obj.getVar("tar").get_obj_vector(0);
|
||
|
|
if(targetObj && targetObj.getState() != STATE_DIE){
|
||
|
|
local totalDamage_1st = obj.getVar("custom").getInt(0);
|
||
|
|
local sizeRate = obj.getVar("custom").getInt(1);
|
||
|
|
local createMax_2nd = obj.getVar("custom").getInt(2);
|
||
|
|
local totalDamage_2nd = obj.getVar("custom").getInt(3);
|
||
|
|
local moveSpeed = obj.getVar("custom").getInt(4);
|
||
|
|
local attackSpeed = obj.getVar("custom").getInt(5);
|
||
|
|
local prob = obj.getVar("custom").getInt(6);
|
||
|
|
local time = obj.getVar("custom").getInt(7);
|
||
|
|
local level = obj.getVar("custom").getInt(8);
|
||
|
|
sq_BinaryStartWrite();
|
||
|
|
sq_BinaryWriteDword(3);
|
||
|
|
sq_BinaryWriteDword(SKILL_FWBYKK_POISONEXPLOSION);
|
||
|
|
sq_BinaryWriteDword(5);
|
||
|
|
sq_BinaryWriteDword(totalDamage_1st);
|
||
|
|
sq_BinaryWriteDword(sizeRate);
|
||
|
|
sq_BinaryWriteDword(createMax_2nd);
|
||
|
|
sq_BinaryWriteDword(totalDamage_2nd);
|
||
|
|
sq_BinaryWriteDword(moveSpeed);
|
||
|
|
sq_BinaryWriteDword(attackSpeed);
|
||
|
|
sq_BinaryWriteDword(prob);
|
||
|
|
sq_BinaryWriteDword(time);
|
||
|
|
sq_BinaryWriteDword(level);
|
||
|
|
sq_SendCreatePassiveObjectPacket(obj, PASSIVEOBJNUM_FWBYKK, 0, 0, 0, 0, obj.getDirection());
|
||
|
|
}
|
||
|
|
sq_SendDestroyPacketPassiveObject(obj);
|
||
|
|
break;
|
||
|
|
case 5: sq_SendDestroyPacketPassiveObject(obj); break;
|
||
|
|
case 6:
|
||
|
|
local targetObj = obj.getVar("tar").get_obj_vector(0);
|
||
|
|
if(targetObj && targetObj.getState() != STATE_DIE){
|
||
|
|
local totalDamage_2nd = obj.getVar("custom").getInt(0);
|
||
|
|
local sizeRate = obj.getVar("custom").getInt(1);
|
||
|
|
local moveSpeed = obj.getVar("custom").getInt(2);
|
||
|
|
local attackSpeed = obj.getVar("custom").getInt(3);
|
||
|
|
local prob = obj.getVar("custom").getInt(4);
|
||
|
|
local time = obj.getVar("custom").getInt(5);
|
||
|
|
local level = obj.getVar("custom").getInt(6);
|
||
|
|
sq_BinaryStartWrite();
|
||
|
|
sq_BinaryWriteDword(3);
|
||
|
|
sq_BinaryWriteDword(SKILL_FWBYKK_POISONEXPLOSION);
|
||
|
|
sq_BinaryWriteDword(7);
|
||
|
|
sq_BinaryWriteDword(totalDamage_2nd);
|
||
|
|
sq_BinaryWriteDword(sizeRate);
|
||
|
|
sq_BinaryWriteDword(moveSpeed);
|
||
|
|
sq_BinaryWriteDword(attackSpeed);
|
||
|
|
sq_BinaryWriteDword(prob);
|
||
|
|
sq_BinaryWriteDword(time);
|
||
|
|
sq_BinaryWriteDword(level);
|
||
|
|
sq_SendCreatePassiveObjectPacket(obj, PASSIVEOBJNUM_FWBYKK, 0, 0, 0, 0, obj.getDirection());
|
||
|
|
}
|
||
|
|
sq_SendDestroyPacketPassiveObject(obj);
|
||
|
|
break;
|
||
|
|
case 7: sq_SendDestroyPacketPassiveObject(obj); break;
|
||
|
|
}
|
||
|
|
break;
|
||
|
|
case SKILL_FWBYKK_DRAGONMINE:
|
||
|
|
switch(subtype){
|
||
|
|
case 2:
|
||
|
|
//
|
||
|
|
break;
|
||
|
|
case 3:
|
||
|
|
switch(state){
|
||
|
|
case 20:
|
||
|
|
return;
|
||
|
|
break;
|
||
|
|
case 21:
|
||
|
|
case 22:
|
||
|
|
obj.addSetStatePacket(state + 1, null, STATE_PRIORITY_AUTO, false, "");
|
||
|
|
return;
|
||
|
|
break;
|
||
|
|
}
|
||
|
|
break;
|
||
|
|
}
|
||
|
|
sq_SendDestroyPacketPassiveObject(obj);
|
||
|
|
break;
|
||
|
|
case SKILL_FWBYKK_PAINSKILLER: sq_SendDestroyPacketPassiveObject(obj); break;
|
||
|
|
case SKILL_FWBYKK_POISONMIST:
|
||
|
|
if(subtype == 1 && state == 21){
|
||
|
|
if(obj.getVar("custom").getInt(1) == 0){
|
||
|
|
if(sqrChr && sqrChr.getState() != STATE_DIE){
|
||
|
|
local xPos = obj.getVar("custom").getInt(2);
|
||
|
|
local yPos = obj.getVar("custom").getInt(3);
|
||
|
|
sq_BinaryStartWrite();
|
||
|
|
sq_BinaryWriteDword(3);
|
||
|
|
sq_BinaryWriteDword(SKILL_FWBYKK_POISONMIST);
|
||
|
|
sq_BinaryWriteDword(2);
|
||
|
|
sq_BinaryWriteDword(1);
|
||
|
|
sq_SendCreatePassiveObjectPacketPos(sqrChr, PASSIVEOBJNUM_FWBYKK, 0, xPos, yPos, 0);
|
||
|
|
sq_BinaryStartWrite();
|
||
|
|
sq_BinaryWriteDword(3);
|
||
|
|
sq_BinaryWriteDword(SKILL_FWBYKK_POISONMIST);
|
||
|
|
sq_BinaryWriteDword(2);
|
||
|
|
sq_BinaryWriteDword(2);
|
||
|
|
sq_SendCreatePassiveObjectPacketPos(sqrChr, PASSIVEOBJNUM_FWBYKK, 0, xPos, yPos, 0);
|
||
|
|
}
|
||
|
|
}
|
||
|
|
}
|
||
|
|
else if(subtype == 2 || subtype == 4) break;
|
||
|
|
else if(subtype == 3 && state == 20){
|
||
|
|
obj.addSetStatePacket(21, null, STATE_PRIORITY_AUTO, false, "");
|
||
|
|
break;
|
||
|
|
}
|
||
|
|
sq_SendDestroyPacketPassiveObject(obj);
|
||
|
|
break;
|
||
|
|
case 255:
|
||
|
|
if(subtype == 2) sq_SendDestroyPacketPassiveObject(obj);
|
||
|
|
break;
|
||
|
|
}
|
||
|
|
break;
|
||
|
|
case 4:
|
||
|
|
switch(skillIndex){
|
||
|
|
case SKILL_BYKK_SHININGWINGSFLAP: sq_SendDestroyPacketPassiveObject(obj); break;
|
||
|
|
}
|
||
|
|
break;
|
||
|
|
}
|
||
|
|
}
|
||
|
|
|
||
|
|
function onTimeEvent_po_fighter_bykk(obj, timeEventIndex, timeEventCount)
|
||
|
|
{
|
||
|
|
if(!obj) return;
|
||
|
|
|
||
|
|
local sqrChr = sq_GetCNRDObjectToSQRCharacter(obj.getTopCharacter());
|
||
|
|
local job = obj.getVar("job").getInt(0);
|
||
|
|
local skillIndex = obj.getVar("skillIndex").getInt(0);
|
||
|
|
local subtype = obj.getVar("subtype").getInt(0);
|
||
|
|
local state = obj.getVar("state").getInt(0);
|
||
|
|
|
||
|
|
switch(job){
|
||
|
|
case 0:
|
||
|
|
break;
|
||
|
|
case 1:
|
||
|
|
break;
|
||
|
|
case 2:
|
||
|
|
break;
|
||
|
|
case 3:
|
||
|
|
switch(skillIndex){
|
||
|
|
case SKILL_FWBYKK_GRABEXPLOSION:
|
||
|
|
switch(timeEventIndex){
|
||
|
|
case 0:
|
||
|
|
local targetObj = obj.getVar("tar").get_obj_vector(0);
|
||
|
|
if(targetObj && targetObj.getState() != STATE_DIE){
|
||
|
|
local totalDamage = obj.getVar("custom").getInt(0);
|
||
|
|
local sizeRate = obj.getVar("custom").getInt(1);
|
||
|
|
local proc = obj.getVar("custom").getInt(2);
|
||
|
|
local time = obj.getVar("custom").getInt(3);
|
||
|
|
local level = obj.getVar("custom").getInt(4);
|
||
|
|
createSkillPassive_Fighter_bykk(obj,obj,PASSIVEOBJNUM_FWBYKK,0,0,0,sq_GetDirection(obj),3,SKILL_FWBYKK_GRABEXPLOSION,1,totalDamage,sizeRate,proc,time,level,0,0,0);
|
||
|
|
}
|
||
|
|
sq_SendDestroyPacketPassiveObject(obj);
|
||
|
|
break;
|
||
|
|
case 1:
|
||
|
|
case 2:
|
||
|
|
case 3:
|
||
|
|
case 4:
|
||
|
|
local sizeRate = obj.getVar("custom").getInt(0);
|
||
|
|
sizeRate = sizeRate.tofloat() / 100.0;
|
||
|
|
switch(timeEventIndex){
|
||
|
|
case 1:
|
||
|
|
local pooledObj = sq_AddDrawOnlyAniFromParent(obj,"passiveobject/common/animation/fireexplosionparticle1.ani", sq_getRandom(-10,10), sq_getRandom(-10,10), sq_getRandom(-10,10));
|
||
|
|
local currentAni = pooledObj.getCurrentAnimation();
|
||
|
|
currentAni.setImageRateFromOriginal(sizeRate, sizeRate);
|
||
|
|
break;
|
||
|
|
case 2:
|
||
|
|
local pooledObj = sq_AddDrawOnlyAniFromParent(obj,"passiveobject/common/animation/fireexplosionparticle2.ani", 0, 2, 0);
|
||
|
|
local currentAni = pooledObj.getCurrentAnimation();
|
||
|
|
currentAni.setImageRateFromOriginal(sizeRate, sizeRate);
|
||
|
|
break;
|
||
|
|
case 3:
|
||
|
|
local pooledObj = sq_AddDrawOnlyAniFromParent(obj,"passiveobject/common/animation/fireexplosionparticle3.ani", 0, 1, 1);
|
||
|
|
local currentAni = pooledObj.getCurrentAnimation();
|
||
|
|
local angle = sq_ToRadian(360.0 * timeEventCount / 16);
|
||
|
|
sq_SetfRotateAngle(currentAni, angle);
|
||
|
|
currentAni.setImageRateFromOriginal(sizeRate * 2.0, sizeRate * 2.0);
|
||
|
|
break;
|
||
|
|
case 4:
|
||
|
|
local pooledObj = sq_AddDrawOnlyAniFromParent(obj,"passiveobject/common/animation/fireexplosionparticle4.ani", sq_getRandom(-30,30), sq_getRandom(-30,30), sq_getRandom(-30,30));
|
||
|
|
local currentAni = pooledObj.getCurrentAnimation();
|
||
|
|
currentAni.setImageRateFromOriginal(sizeRate, sizeRate);
|
||
|
|
break;
|
||
|
|
}
|
||
|
|
break;
|
||
|
|
}
|
||
|
|
break;
|
||
|
|
case SKILL_FWBYKK_HIDDENSTING:
|
||
|
|
switch(timeEventIndex){
|
||
|
|
case 1:
|
||
|
|
local aniPath = "passiveobject/1_fighter_bykk/3_streetfighter/animation/hiddensting/lv95poisonspirit/hiddenstingbottom_00.ani";
|
||
|
|
createOnlyDrawObject_Fighter_bykk(obj,aniPath,true,sq_GetDirection(obj),sq_GetDistancePos(sq_GetXPos(obj), sq_GetDirection(obj), 0),sq_GetYPos(obj),0,ENUM_DRAWLAYER_BOTTOM);
|
||
|
|
sq_SetMyShake(obj, 5, 80);
|
||
|
|
break;
|
||
|
|
}
|
||
|
|
break;
|
||
|
|
case SKILL_FWBYKK_GROUNDKICK:
|
||
|
|
switch(timeEventIndex){
|
||
|
|
case 1: sq_SendDestroyPacketPassiveObject(obj); break;
|
||
|
|
}
|
||
|
|
break;
|
||
|
|
case SKILL_FWBYKK_VENOMMINE:
|
||
|
|
switch(timeEventIndex){
|
||
|
|
case 1: obj.addSetStatePacket(22, null, STATE_PRIORITY_AUTO, false, ""); break;
|
||
|
|
case 2:
|
||
|
|
local totalDamage = obj.getVar("custom").getInt(0);
|
||
|
|
local hitMax = obj.getVar("custom").getInt(1);
|
||
|
|
local sizeRate = obj.getVar("custom").getInt(2);
|
||
|
|
local ani = sq_CreateAnimation("", "passiveobject/1_fighter_bykk/3_streetfighter/animation/venommine/explosion_dummy.ani");
|
||
|
|
obj.setCurrentAnimation(ani);
|
||
|
|
sq_SetCurrentAttackInfo(obj, sq_GetCustomAttackInfo(obj, 30));
|
||
|
|
sq_SetCurrentAttackBonusRate(sq_GetCurrentAttackInfo(obj), totalDamage);
|
||
|
|
local currentAni = obj.getCurrentAnimation();
|
||
|
|
local delaySum = currentAni.getDelaySum(false);
|
||
|
|
obj.setTimeEvent(3, delaySum / (hitMax + 1), hitMax, true);
|
||
|
|
if(sizeRate > 100){
|
||
|
|
sizeRate = sizeRate.tofloat() / 100.0;
|
||
|
|
sq_SetAttackBoundingBoxSizeRate(currentAni, sizeRate, sizeRate, sizeRate);
|
||
|
|
}
|
||
|
|
break;
|
||
|
|
case 3:
|
||
|
|
obj.resetHitObjectList();
|
||
|
|
obj.sq_PlaySound("R_VM_MINE_EXP");
|
||
|
|
break;
|
||
|
|
}
|
||
|
|
break;
|
||
|
|
case SKILL_FWBYKK_JUNKSPIN:
|
||
|
|
switch(timeEventIndex){
|
||
|
|
case 1:
|
||
|
|
if(sqrChr.getState() != STATE_FWBYKK_JUNKSPIN) sq_SendDestroyPacketPassiveObject(obj);
|
||
|
|
break;
|
||
|
|
case 2:
|
||
|
|
sq_SetMyShake(obj, 6, 80);
|
||
|
|
sq_SendDestroyPacketPassiveObject(obj);
|
||
|
|
break;
|
||
|
|
}
|
||
|
|
break;
|
||
|
|
case SKILL_FWBYKK_GRABEXPLOSIONEX:
|
||
|
|
switch(timeEventIndex){
|
||
|
|
case 1:
|
||
|
|
case 2:
|
||
|
|
case 3:
|
||
|
|
case 4:
|
||
|
|
local sizeRate = obj.getVar("custom").getInt(0);
|
||
|
|
sizeRate = sizeRate.tofloat() / 100.0;
|
||
|
|
switch(timeEventIndex){
|
||
|
|
case 1:
|
||
|
|
local pooledObj = sq_AddDrawOnlyAniFromParent(obj,"passiveobject/common/animation/darkexplosionparticle1.ani", sq_getRandom(-10,10), sq_getRandom(-10,10), sq_getRandom(-10,10));
|
||
|
|
local currentAni = pooledObj.getCurrentAnimation();
|
||
|
|
currentAni.setImageRateFromOriginal(sizeRate, sizeRate);
|
||
|
|
break;
|
||
|
|
case 2:
|
||
|
|
local pooledObj = sq_AddDrawOnlyAniFromParent(obj,"passiveobject/common/animation/darkexplosionparticle2.ani", 0, 2, 0);
|
||
|
|
local currentAni = pooledObj.getCurrentAnimation();
|
||
|
|
currentAni.setImageRateFromOriginal(sizeRate, sizeRate);
|
||
|
|
break;
|
||
|
|
case 3:
|
||
|
|
local pooledObj = sq_AddDrawOnlyAniFromParent(obj,"passiveobject/common/animation/darkexplosionparticle3.ani", 0, 1, 1);
|
||
|
|
local currentAni = pooledObj.getCurrentAnimation();
|
||
|
|
local angle = sq_ToRadian(360.0 * timeEventCount / 16);
|
||
|
|
sq_SetfRotateAngle(currentAni, angle);
|
||
|
|
currentAni.setImageRateFromOriginal(sizeRate * 2.0, sizeRate * 2.0);
|
||
|
|
break;
|
||
|
|
case 4:
|
||
|
|
local pooledObj = sq_AddDrawOnlyAniFromParent(obj,"passiveobject/common/animation/darkexplosionparticle4.ani", sq_getRandom(-30,30), sq_getRandom(-30,30), sq_getRandom(-30,30));
|
||
|
|
local currentAni = pooledObj.getCurrentAnimation();
|
||
|
|
currentAni.setImageRateFromOriginal(sizeRate, sizeRate);
|
||
|
|
break;
|
||
|
|
}
|
||
|
|
break;
|
||
|
|
}
|
||
|
|
break;
|
||
|
|
case SKILL_FWBYKK_BLOCKBUSTEREX:
|
||
|
|
switch(timeEventIndex){
|
||
|
|
case 0:
|
||
|
|
local totalDamage = obj.getVar("custom").getInt(1);
|
||
|
|
local stunTime = obj.getVar("custom").getInt(2);
|
||
|
|
local sizeRate = obj.getVar("custom").getInt(4);
|
||
|
|
createSkillPassive_Fighter_bykk(obj,obj,PASSIVEOBJNUM_FWBYKK,0,0,0,sq_GetDirection(obj),3,SKILL_FWBYKK_BLOCKBUSTEREX,5,totalDamage,stunTime,sizeRate,0,0,0,0,0);
|
||
|
|
break;
|
||
|
|
case 1:
|
||
|
|
local totalDamage = obj.getVar("custom").getInt(2);
|
||
|
|
local stunTime = obj.getVar("custom").getInt(3);
|
||
|
|
local sizeRate = obj.getVar("custom").getInt(5);
|
||
|
|
createSkillPassive_Fighter_bykk(obj,obj,PASSIVEOBJNUM_FWBYKK,0,0,0,sq_GetDirection(obj),3,SKILL_FWBYKK_BLOCKBUSTEREX,5,totalDamage,stunTime,sizeRate,0,0,0,0,0);
|
||
|
|
sq_SendDestroyPacketPassiveObject(obj);
|
||
|
|
break;
|
||
|
|
case 2:
|
||
|
|
local totalDamage = obj.getVar("custom").getInt(1);
|
||
|
|
local stunTime = obj.getVar("custom").getInt(2);
|
||
|
|
local sizeRate = obj.getVar("custom").getInt(3);
|
||
|
|
createSkillPassive_Fighter_bykk(obj,obj,PASSIVEOBJNUM_FWBYKK,0,0,0,sq_GetDirection(obj),3,SKILL_FWBYKK_BLOCKBUSTEREX,5,totalDamage,stunTime,sizeRate,0,0,0,0,0);
|
||
|
|
sq_SendDestroyPacketPassiveObject(obj);
|
||
|
|
break;
|
||
|
|
case 3:
|
||
|
|
case 4:
|
||
|
|
case 5:
|
||
|
|
case 6:
|
||
|
|
local sizeRate = obj.getVar("custom").getInt(0);
|
||
|
|
sizeRate = sizeRate.tofloat() / 100.0;
|
||
|
|
switch(timeEventIndex){
|
||
|
|
case 3:
|
||
|
|
local pooledObj = sq_AddDrawOnlyAniFromParent(obj,"passiveobject/common/animation/fireexplosionparticle1.ani", sq_getRandom(-10,10), sq_getRandom(-10,10), sq_getRandom(-10,10));
|
||
|
|
local currentAni = pooledObj.getCurrentAnimation();
|
||
|
|
currentAni.setImageRateFromOriginal(sizeRate, sizeRate);
|
||
|
|
break;
|
||
|
|
case 4:
|
||
|
|
local pooledObj = sq_AddDrawOnlyAniFromParent(obj,"passiveobject/common/animation/fireexplosionparticle2.ani", 0, 2, 0);
|
||
|
|
local currentAni = pooledObj.getCurrentAnimation();
|
||
|
|
currentAni.setImageRateFromOriginal(sizeRate, sizeRate);
|
||
|
|
break;
|
||
|
|
case 5:
|
||
|
|
local pooledObj = sq_AddDrawOnlyAniFromParent(obj,"passiveobject/common/animation/fireexplosionparticle3.ani", 0, 1, 1);
|
||
|
|
local currentAni = pooledObj.getCurrentAnimation();
|
||
|
|
local angle = sq_ToRadian(360.0 * timeEventCount / 16);
|
||
|
|
sq_SetfRotateAngle(currentAni, angle);
|
||
|
|
currentAni.setImageRateFromOriginal(sizeRate * 2.0, sizeRate * 2.0);
|
||
|
|
break;
|
||
|
|
case 6:
|
||
|
|
local pooledObj = sq_AddDrawOnlyAniFromParent(obj,"passiveobject/common/animation/fireexplosionparticle4.ani", sq_getRandom(-30,30), sq_getRandom(-30,30), sq_getRandom(-30,30));
|
||
|
|
local currentAni = pooledObj.getCurrentAnimation();
|
||
|
|
currentAni.setImageRateFromOriginal(sizeRate, sizeRate);
|
||
|
|
break;
|
||
|
|
}
|
||
|
|
break;
|
||
|
|
}
|
||
|
|
break;
|
||
|
|
case SKILL_FWBYKK_DRAGONMINE:
|
||
|
|
switch(timeEventIndex){
|
||
|
|
case 1:
|
||
|
|
obj.resetHitObjectList();
|
||
|
|
if(subtype == 1) sq_SetMyShake(obj, 10, 150);
|
||
|
|
break;
|
||
|
|
case 2:
|
||
|
|
local lifeTime = obj.getVar("custom").getInt(0);
|
||
|
|
local hitTime = obj.getVar("custom").getInt(1);
|
||
|
|
local damage = obj.getVar("custom").getInt(2);
|
||
|
|
local moveSpeed = obj.getVar("custom").getInt(3);
|
||
|
|
local sizeRate = obj.getVar("custom").getInt(4);
|
||
|
|
createSkillPassive_Fighter_bykk(obj,obj,PASSIVEOBJNUM_FWBYKK,0,0,0,sq_GetDirection(obj),3,SKILL_FWBYKK_DRAGONMINE,2,lifeTime,hitTime,damage,moveSpeed,sizeRate,0,0,0);
|
||
|
|
break;
|
||
|
|
case 3:
|
||
|
|
local vx = sq_GetAccel(obj.getVar("custom").getInt(2), obj.getVar("custom").getInt(1), timeEventCount, 40, false);
|
||
|
|
local vz = sq_GetAccel(obj.getVar("custom").getInt(3), 0, timeEventCount, 40, false);
|
||
|
|
// local dstX = sq_GetDistancePos(obj.getVar("custom").getInt(2), obj.getDirection(), v);
|
||
|
|
sq_setCurrentAxisPos(obj, 0, vx);
|
||
|
|
sq_setCurrentAxisPos(obj, 2, vz);
|
||
|
|
if(timeEventCount >= 40) obj.addSetStatePacket(21, null, STATE_PRIORITY_AUTO, false, "");
|
||
|
|
break;
|
||
|
|
}
|
||
|
|
break;
|
||
|
|
case SKILL_FWBYKK_PAINSKILLER:
|
||
|
|
switch(timeEventIndex){
|
||
|
|
case 1:
|
||
|
|
local currentAni = obj.getCurrentAnimation();
|
||
|
|
local delay = currentAni.getDelaySum(7, 22);
|
||
|
|
local hitMax = obj.getVar("custom").getInt(0);
|
||
|
|
obj.setTimeEvent(2, delay / hitMax, hitMax - 1, false);
|
||
|
|
break;
|
||
|
|
case 2: obj.resetHitObjectList(); break;
|
||
|
|
case 3:
|
||
|
|
local currentAni = obj.getCurrentAnimation();
|
||
|
|
local delay = currentAni.getDelaySum(9, 25);
|
||
|
|
local hitMax = obj.getVar("custom").getInt(0);
|
||
|
|
obj.setTimeEvent(2, delay / hitMax, hitMax - 1, false);
|
||
|
|
break;
|
||
|
|
}
|
||
|
|
break;
|
||
|
|
case SKILL_FWBYKK_POISONMIST:
|
||
|
|
switch(timeEventIndex){
|
||
|
|
case 1:
|
||
|
|
if(sqrChr.getVar("PoisonMistBool").getBool(0) && subtype == 2) sqrChr.getVar("PoisonMistBool").setBool(0, false);
|
||
|
|
sq_SendDestroyPacketPassiveObject(obj);
|
||
|
|
break;
|
||
|
|
case 2:
|
||
|
|
local sub = obj.getVar("custom").getInt(0);
|
||
|
|
local range = obj.getVar("custom").getInt(1);
|
||
|
|
switch(sub){
|
||
|
|
case 1:
|
||
|
|
createSkillPassive_Fighter_bykk(obj,obj,PASSIVEOBJNUM_FWBYKK,sq_getRandom(-range, 0),sq_getRandom(-range / 5, range / 5),0,sq_GetDirection(obj),3,SKILL_FWBYKK_POISONMIST,3,0,0,0,0,0,0,0,0);
|
||
|
|
break;
|
||
|
|
case 2:
|
||
|
|
createSkillPassive_Fighter_bykk(obj,obj,PASSIVEOBJNUM_FWBYKK,sq_getRandom(0, range),sq_getRandom(-range / 5, range / 5),0,sq_GetDirection(obj),3,SKILL_FWBYKK_POISONMIST,3,0,0,0,0,0,0,0,0);
|
||
|
|
break;
|
||
|
|
}
|
||
|
|
break;
|
||
|
|
case 3: obj.stopTimeEvent(2); break;
|
||
|
|
case 4:
|
||
|
|
local range = obj.getVar("custom").getInt(1);
|
||
|
|
if(!sqrChr || sqrChr.getState() == STATE_DIE) break;
|
||
|
|
if(sq_Abs(sq_GetXPos(sqrChr) - sq_GetXPos(obj)) <= range && sq_Abs(sq_GetYPos(sqrChr) - sq_GetYPos(obj)) <= range / 2){
|
||
|
|
if(!CNSquirrelAppendage.sq_IsAppendAppendage(sqrChr, APDPATH_POISONMIST_BUFF)){
|
||
|
|
local AddAppendage = CNSquirrelAppendage.sq_AppendAppendage(sqrChr, obj, -1, false, APDPATH_POISONMIST_BUFF, true);
|
||
|
|
AddAppendage.getVar("custom").setInt(0, sq_GetXPos(obj));
|
||
|
|
AddAppendage.getVar("custom").setInt(1, sq_GetYPos(obj));
|
||
|
|
AddAppendage.getVar("custom").setInt(2, range);
|
||
|
|
}
|
||
|
|
}
|
||
|
|
break;
|
||
|
|
case 5: sqrChr.getVar("PoisonMistBool").setBool(0, true); break;
|
||
|
|
case 6:
|
||
|
|
local range = obj.getVar("custom").getInt(1);
|
||
|
|
switch(timeEventCount){
|
||
|
|
case 1:
|
||
|
|
case 2:
|
||
|
|
case 3:
|
||
|
|
local sizeRate = 180;
|
||
|
|
if(timeEventCount == 1) createSkillPassive_Fighter_bykk(obj,obj,PASSIVEOBJNUM_FWBYKK,-50,1,100,sq_GetDirection(obj),3,SKILL_FWBYKK_POISONMIST,5,sizeRate,0,0,0,0,0,0,0);
|
||
|
|
else if(timeEventCount == 2) createSkillPassive_Fighter_bykk(obj,obj,PASSIVEOBJNUM_FWBYKK,50,0,80,sq_GetDirection(obj),3,SKILL_FWBYKK_POISONMIST,5,sizeRate,0,0,0,0,0,0,0);
|
||
|
|
else if(timeEventCount == 3) createSkillPassive_Fighter_bykk(obj,obj,PASSIVEOBJNUM_FWBYKK,0,1,50,sq_GetDirection(obj),3,SKILL_FWBYKK_POISONMIST,5,sizeRate,0,0,0,0,0,0,0);
|
||
|
|
break;
|
||
|
|
case 4:
|
||
|
|
case 5:
|
||
|
|
case 6:
|
||
|
|
case 7:
|
||
|
|
range = range / 5 * 2;
|
||
|
|
local sizeRate = 150;
|
||
|
|
if(timeEventCount == 4) createSkillPassive_Fighter_bykk(obj,obj,PASSIVEOBJNUM_FWBYKK,-range,1,sq_getRandom(80,60),sq_GetDirection(obj),3,SKILL_FWBYKK_POISONMIST,5,sizeRate,0,0,0,0,0,0,0);
|
||
|
|
else if(timeEventCount == 5) createSkillPassive_Fighter_bykk(obj,obj,PASSIVEOBJNUM_FWBYKK,range,2,sq_getRandom(80,60),sq_GetDirection(obj),3,SKILL_FWBYKK_POISONMIST,5,sizeRate,0,0,0,0,0,0,0);
|
||
|
|
else if(timeEventCount == 6) createSkillPassive_Fighter_bykk(obj,obj,PASSIVEOBJNUM_FWBYKK,-range,-1,sq_getRandom(70,50),sq_GetDirection(obj),3,SKILL_FWBYKK_POISONMIST,5,sizeRate,0,0,0,0,0,0,0);
|
||
|
|
else if(timeEventCount == 7) createSkillPassive_Fighter_bykk(obj,obj,PASSIVEOBJNUM_FWBYKK,range,0,sq_getRandom(70,50),sq_GetDirection(obj),3,SKILL_FWBYKK_POISONMIST,5,sizeRate,0,0,0,0,0,0,0);
|
||
|
|
break;
|
||
|
|
case 8:
|
||
|
|
case 9:
|
||
|
|
case 10:
|
||
|
|
case 11:
|
||
|
|
range = range / 5 * 3;
|
||
|
|
local sizeRate = 140;
|
||
|
|
if(timeEventCount == 8) createSkillPassive_Fighter_bykk(obj,obj,PASSIVEOBJNUM_FWBYKK,-range,1,sq_getRandom(100,80),sq_GetDirection(obj),3,SKILL_FWBYKK_POISONMIST,5,sizeRate,0,0,0,0,0,0,0);
|
||
|
|
else if(timeEventCount == 9) createSkillPassive_Fighter_bykk(obj,obj,PASSIVEOBJNUM_FWBYKK,range,2,sq_getRandom(100,80),sq_GetDirection(obj),3,SKILL_FWBYKK_POISONMIST,5,sizeRate,0,0,0,0,0,0,0);
|
||
|
|
else if(timeEventCount == 10) createSkillPassive_Fighter_bykk(obj,obj,PASSIVEOBJNUM_FWBYKK,-range,-1,sq_getRandom(80,60),sq_GetDirection(obj),3,SKILL_FWBYKK_POISONMIST,5,sizeRate,0,0,0,0,0,0,0);
|
||
|
|
else if(timeEventCount == 11) createSkillPassive_Fighter_bykk(obj,obj,PASSIVEOBJNUM_FWBYKK,range,0,sq_getRandom(80,60),sq_GetDirection(obj),3,SKILL_FWBYKK_POISONMIST,5,sizeRate,0,0,0,0,0,0,0);
|
||
|
|
break;
|
||
|
|
case 12:
|
||
|
|
case 13:
|
||
|
|
case 14:
|
||
|
|
case 15:
|
||
|
|
range = range / 5 * 4;
|
||
|
|
local sizeRate = 110;
|
||
|
|
if(timeEventCount == 12) createSkillPassive_Fighter_bykk(obj,obj,PASSIVEOBJNUM_FWBYKK,-range,1,sq_getRandom(80,60),sq_GetDirection(obj),3,SKILL_FWBYKK_POISONMIST,5,sizeRate,0,0,0,0,0,0,0);
|
||
|
|
else if(timeEventCount == 13) createSkillPassive_Fighter_bykk(obj,obj,PASSIVEOBJNUM_FWBYKK,range,2,sq_getRandom(80,60),sq_GetDirection(obj),3,SKILL_FWBYKK_POISONMIST,5,sizeRate,0,0,0,0,0,0,0);
|
||
|
|
else if(timeEventCount == 14) createSkillPassive_Fighter_bykk(obj,obj,PASSIVEOBJNUM_FWBYKK,-range,-1,sq_getRandom(70,40),sq_GetDirection(obj),3,SKILL_FWBYKK_POISONMIST,5,sizeRate,0,0,0,0,0,0,0);
|
||
|
|
else if(timeEventCount == 15) createSkillPassive_Fighter_bykk(obj,obj,PASSIVEOBJNUM_FWBYKK,range,0,sq_getRandom(70,40),sq_GetDirection(obj),3,SKILL_FWBYKK_POISONMIST,5,sizeRate,0,0,0,0,0,0,0);
|
||
|
|
break;
|
||
|
|
case 16:
|
||
|
|
case 17:
|
||
|
|
local sizeRate = 90;
|
||
|
|
if(timeEventCount == 16) createSkillPassive_Fighter_bykk(obj,obj,PASSIVEOBJNUM_FWBYKK,-range,1,sq_getRandom(70,50),sq_GetDirection(obj),3,SKILL_FWBYKK_POISONMIST,5,sizeRate,0,0,0,0,0,0,0);
|
||
|
|
else if(timeEventCount == 17) createSkillPassive_Fighter_bykk(obj,obj,PASSIVEOBJNUM_FWBYKK,range,2,sq_getRandom(70,50),sq_GetDirection(obj),3,SKILL_FWBYKK_POISONMIST,5,sizeRate,0,0,0,0,0,0,0);
|
||
|
|
break;
|
||
|
|
}
|
||
|
|
sq_SetMyShake(obj, 8, 50);
|
||
|
|
if(timeEventCount >= 17){
|
||
|
|
obj.setTimeEvent(1, 1000, 1, false);
|
||
|
|
}
|
||
|
|
break;
|
||
|
|
case 7: 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);
|
||
|
|
if(count == 0){
|
||
|
|
sq_SendDestroyPacketPassiveObject(obj);
|
||
|
|
return true;
|
||
|
|
}
|
||
|
|
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_Fighter_bykk(obj,obj,PASSIVEOBJNUM_FWBYKK,0,0,height,sq_GetDirection(obj),3,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(128,0,255),127,0,0,time + 2000);
|
||
|
|
}
|
||
|
|
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, obj.getVar("time").getInt(0) / 500, 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("CONDITION_POSION");
|
||
|
|
obj.sq_PlaySound("CONDITION_POSION_DROP");
|
||
|
|
}
|
||
|
|
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(128,0,255),127,0,0,300);
|
||
|
|
local allDamage = obj.getVar("damage").getInt(2);
|
||
|
|
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_Fighter_bykk(obj,obj,PASSIVEOBJNUM_FWBYKK,0,0,height,sq_GetDirection(obj),3,255,2,group,uniqueId,allDamage,0,0,0,0,0);
|
||
|
|
}
|
||
|
|
break;
|
||
|
|
}
|
||
|
|
break;
|
||
|
|
}
|
||
|
|
break;
|
||
|
|
case 4:
|
||
|
|
break;
|
||
|
|
}
|
||
|
|
}
|
||
|
|
|
||
|
|
function onAttack_po_fighter_bykk(obj, damager, boundingBox, isStuck)
|
||
|
|
{
|
||
|
|
if(!obj) return;
|
||
|
|
|
||
|
|
local sqrChr = sq_GetCNRDObjectToSQRCharacter(obj.getTopCharacter());
|
||
|
|
local job = obj.getVar("job").getInt(0);
|
||
|
|
local skillIndex = obj.getVar("skillIndex").getInt(0);
|
||
|
|
local subtype = obj.getVar("subtype").getInt(0);
|
||
|
|
local state = obj.getVar("state").getInt(0);
|
||
|
|
|
||
|
|
switch(job){
|
||
|
|
case 0:
|
||
|
|
break;
|
||
|
|
case 1:
|
||
|
|
break;
|
||
|
|
case 2:
|
||
|
|
break;
|
||
|
|
case 3:
|
||
|
|
switch(skillIndex){
|
||
|
|
case SKILL_FWBYKK_THROWWEB:
|
||
|
|
local prob = obj.getVar("custom").getInt(0);
|
||
|
|
local time = obj.getVar("custom").getInt(1);
|
||
|
|
local level = obj.getVar("custom").getInt(2);
|
||
|
|
local holdTime = obj.getVar("custom").getInt(3);
|
||
|
|
sq_sendSetActiveStatusPacket(damager, obj, ACTIVESTATUS_HOLD, prob.tofloat(), level.tointeger(), false, time.tointeger());
|
||
|
|
if(!CNSquirrelAppendage.sq_IsAppendAppendage(obj, "character/fighter/3streetfighter_bykk/ap_web_hold.nut")){
|
||
|
|
local AddAppendage = CNSquirrelAppendage.sq_AppendAppendage(damager, obj, -1, false, "character/fighter/3streetfighter_bykk/ap_web_hold.nut", true);
|
||
|
|
if(AddAppendage) sq_HoldAndDelayDie(damager, obj, true, true, false, 200, 200, ENUM_DIRECTION_NEUTRAL, AddAppendage);
|
||
|
|
if(AddAppendage) AddAppendage.sq_SetValidTime(holdTime);
|
||
|
|
}
|
||
|
|
break;
|
||
|
|
case SKILL_FWBYKK_POISONEXPLOSION:
|
||
|
|
switch(subtype){
|
||
|
|
case 3:
|
||
|
|
if(isStuck || !damager.isObjectType(OBJECTTYPE_ACTIVE)) break;
|
||
|
|
if(sqrChr.getState() == STATE_DIE) break;
|
||
|
|
if(sqrChr.getVar("poisonExplosionTar").is_obj_vector(damager)) break;
|
||
|
|
if(obj.getVar("custom").getInt(11) > 0) break;
|
||
|
|
local sizeRate = obj.getVar("custom").getInt(1);
|
||
|
|
local createMax_1st = obj.getVar("custom").getInt(2);
|
||
|
|
local createMax_2nd = obj.getVar("custom").getInt(3);
|
||
|
|
local totalDamage_1st = obj.getVar("custom").getInt(4);
|
||
|
|
local totalDamage_2nd = obj.getVar("custom").getInt(5);
|
||
|
|
local moveSpeed = obj.getVar("custom").getInt(6);
|
||
|
|
local attackSpeed = obj.getVar("custom").getInt(7);
|
||
|
|
local prob = obj.getVar("custom").getInt(8);
|
||
|
|
local time = obj.getVar("custom").getInt(9);
|
||
|
|
local level = obj.getVar("custom").getInt(10);
|
||
|
|
if(createMax_1st > 0){
|
||
|
|
sqrChr.getVar("poisonExplosionTar").push_obj_vector(damager);
|
||
|
|
obj.getVar("custom").setInt(2, obj.getVar("custom").getInt(2) - 1);
|
||
|
|
sq_BinaryStartWrite();
|
||
|
|
sq_BinaryWriteDword(3);
|
||
|
|
sq_BinaryWriteDword(SKILL_FWBYKK_POISONEXPLOSION);
|
||
|
|
sq_BinaryWriteDword(4);
|
||
|
|
sq_BinaryWriteDword(totalDamage_1st);
|
||
|
|
sq_BinaryWriteDword(sizeRate);
|
||
|
|
sq_BinaryWriteDword(createMax_2nd);
|
||
|
|
sq_BinaryWriteDword(totalDamage_2nd);
|
||
|
|
sq_BinaryWriteDword(moveSpeed);
|
||
|
|
sq_BinaryWriteDword(attackSpeed);
|
||
|
|
sq_BinaryWriteDword(prob);
|
||
|
|
sq_BinaryWriteDword(time);
|
||
|
|
sq_BinaryWriteDword(level);
|
||
|
|
sq_BinaryWriteDword(sq_GetGroup(damager));
|
||
|
|
sq_BinaryWriteDword(sq_GetUniqueId(damager));
|
||
|
|
sq_SendCreatePassiveObjectPacketPos(obj, PASSIVEOBJNUM_FWBYKK, 0, sq_GetXPos(damager), sq_GetYPos(damager), sq_GetObjectHeight(damager) / 2);
|
||
|
|
}
|
||
|
|
break;
|
||
|
|
case 5:
|
||
|
|
if(isStuck || !damager.isObjectType(OBJECTTYPE_ACTIVE)) break;
|
||
|
|
if(sqrChr.getState() == STATE_DIE) break;
|
||
|
|
if(sqrChr.getVar("poisonExplosionTar").is_obj_vector(damager)) break;
|
||
|
|
local sizeRate = obj.getVar("custom").getInt(0);
|
||
|
|
local createMax_2nd = obj.getVar("custom").getInt(1);
|
||
|
|
local totalDamage_2nd = obj.getVar("custom").getInt(2);
|
||
|
|
local moveSpeed = obj.getVar("custom").getInt(3);
|
||
|
|
local attackSpeed = obj.getVar("custom").getInt(4);
|
||
|
|
local prob = obj.getVar("custom").getInt(5);
|
||
|
|
local time = obj.getVar("custom").getInt(6);
|
||
|
|
local level = obj.getVar("custom").getInt(7);
|
||
|
|
if(sqrChr.getVar("poisonExplosionTar").get_obj_vector_size() < createMax_2nd){
|
||
|
|
sqrChr.getVar("poisonExplosionTar").push_obj_vector(damager);
|
||
|
|
// print("test");
|
||
|
|
// obj.getVar("custom").setInt(1, createMax_2nd - 1);
|
||
|
|
sq_BinaryStartWrite();
|
||
|
|
sq_BinaryWriteDword(3);
|
||
|
|
sq_BinaryWriteDword(SKILL_FWBYKK_POISONEXPLOSION);
|
||
|
|
sq_BinaryWriteDword(6);
|
||
|
|
sq_BinaryWriteDword(totalDamage_2nd);
|
||
|
|
sq_BinaryWriteDword(sizeRate);
|
||
|
|
sq_BinaryWriteDword(moveSpeed);
|
||
|
|
sq_BinaryWriteDword(attackSpeed);
|
||
|
|
sq_BinaryWriteDword(prob);
|
||
|
|
sq_BinaryWriteDword(time);
|
||
|
|
sq_BinaryWriteDword(level);
|
||
|
|
sq_BinaryWriteDword(sq_GetGroup(damager));
|
||
|
|
sq_BinaryWriteDword(sq_GetUniqueId(damager));
|
||
|
|
sq_SendCreatePassiveObjectPacketPos(obj, PASSIVEOBJNUM_FWBYKK, 0, sq_GetXPos(damager), sq_GetYPos(damager), sq_GetObjectHeight(damager) / 2);
|
||
|
|
}
|
||
|
|
break;
|
||
|
|
}
|
||
|
|
break;
|
||
|
|
case SKILL_FWBYKK_DRAGONMINE:
|
||
|
|
if(isStuck || !damager.isObjectType(OBJECTTYPE_ACTIVE)) break;
|
||
|
|
if(subtype == 2){
|
||
|
|
local moveSpeed = obj.getVar("custom").getInt(3);
|
||
|
|
local ap = sq_CreateChangeStatus(CHANGE_STATUS_TYPE_MOVE_SPEED, true, -moveSpeed.tofloat(), 0);
|
||
|
|
if(ap){
|
||
|
|
ap.getAppendageInfo().setValidTime(obj.getVar("custom").getInt(1));
|
||
|
|
ap.sq_Append(damager, obj);
|
||
|
|
}
|
||
|
|
}
|
||
|
|
break;
|
||
|
|
case SKILL_FWBYKK_PAINSKILLER:
|
||
|
|
if(isStuck || !damager.isObjectType(OBJECTTYPE_ACTIVE)) break;
|
||
|
|
local prob = obj.getVar("custom").getInt(1);
|
||
|
|
local time = obj.getVar("custom").getInt(2);
|
||
|
|
local level = obj.getVar("custom").getInt(3);
|
||
|
|
sq_sendSetActiveStatusPacket(damager, obj, ACTIVESTATUS_BLEEDING, prob.tofloat(), level, false, time);
|
||
|
|
break;
|
||
|
|
case SKILL_FWBYKK_POISONMIST:
|
||
|
|
switch(subtype){
|
||
|
|
case 2:
|
||
|
|
if(isStuck || !damager.isObjectType(OBJECTTYPE_ACTIVE)) break;
|
||
|
|
local damage = obj.getVar("custom").getInt(10);
|
||
|
|
local time = obj.getVar("custom").getInt(11);
|
||
|
|
local group = sq_GetGroup(damager);
|
||
|
|
local uniqueId = sq_GetUniqueId(damager);
|
||
|
|
local height = sq_GetHeightObject(damager) / 2;
|
||
|
|
if(height > 75) height = 75;
|
||
|
|
sq_EffectLayerAppendage(damager,sq_RGB(128,0,255),127,0,0,time + 1500);
|
||
|
|
createSkillPassive_Fighter_bykk(obj,damager,PASSIVEOBJNUM_FWBYKK,0,0,height,sq_GetDirection(obj),3,255,2,group,uniqueId,damage,0,0,0,0,0);
|
||
|
|
if(!CNSquirrelAppendage.sq_IsAppendAppendage(damager, APDPATH_POISONMIST_DEBUFF)){
|
||
|
|
local AddAppendage = CNSquirrelAppendage.sq_AppendAppendage(damager, sqrChr, -1, false, APDPATH_POISONMIST_DEBUFF, true);
|
||
|
|
AddAppendage.sq_SetValidTime(obj.getVar("custom").getInt(2));
|
||
|
|
}
|
||
|
|
break;
|
||
|
|
}
|
||
|
|
break;
|
||
|
|
}
|
||
|
|
|
||
|
|
if(skillIndex == 255) return;
|
||
|
|
if(isStuck || !damager.isObjectType(OBJECTTYPE_ACTIVE)) return;
|
||
|
|
if(!sqrChr || sqrChr.getState() == STATE_DIE) return;
|
||
|
|
if(!CNSquirrelAppendage.sq_IsAppendAppendage(sqrChr, APDPATH_ENCHANTPOISON)) return;
|
||
|
|
local damage = obj.getVar("PoisonDamage").getInt(0);
|
||
|
|
if(damage == 0) return;
|
||
|
|
if(damager.getVar("SFPoison").get_obj_vector_size() > 0){
|
||
|
|
local poisonObj = damager.getVar("SFPoison").get_obj_vector(0);
|
||
|
|
if(poisonObj){
|
||
|
|
local colObj = sq_GetCNRDObjectToCollisionObject(poisonObj);
|
||
|
|
if(skillIndex == SKILL_FWBYKK_GRABEXPLOSION || skillIndex == SKILL_FWBYKK_GRABEXPLOSIONEX){
|
||
|
|
local baseDamage = colObj.getVar("damage").getInt(0);
|
||
|
|
colObj.getVar("damage").setInt(0, 0);
|
||
|
|
colObj.getVar("damage").setInt(1, 0);
|
||
|
|
colObj.getVar("damage").setInt(2, baseDamage + damage);
|
||
|
|
if(colObj.isExistTimeEvent(1)) colObj.stopTimeEvent(1);
|
||
|
|
colObj.setTimeEvent(3, 500, 1, true);
|
||
|
|
}
|
||
|
|
else{
|
||
|
|
print("add = "+damage);
|
||
|
|
local baseDamage = colObj.getVar("damage").getInt(0);
|
||
|
|
colObj.getVar("damage").setInt(0, baseDamage + damage);
|
||
|
|
}
|
||
|
|
}
|
||
|
|
}
|
||
|
|
break;
|
||
|
|
case 4:
|
||
|
|
break;
|
||
|
|
}
|
||
|
|
}
|
||
|
|
|
||
|
|
function onKeyFrameFlag_po_fighter_bykk(obj, flagIndex)
|
||
|
|
{
|
||
|
|
if(!obj) return;
|
||
|
|
|
||
|
|
local sqrChr = sq_GetCNRDObjectToSQRCharacter(obj.getTopCharacter());
|
||
|
|
local job = obj.getVar("job").getInt(0);
|
||
|
|
local skillIndex = obj.getVar("skillIndex").getInt(0);
|
||
|
|
local subtype = obj.getVar("subtype").getInt(0);
|
||
|
|
local state = obj.getVar("state").getInt(0);
|
||
|
|
|
||
|
|
switch(job){
|
||
|
|
case 0:
|
||
|
|
break;
|
||
|
|
case 1:
|
||
|
|
break;
|
||
|
|
case 2:
|
||
|
|
break;
|
||
|
|
case 3:
|
||
|
|
switch(skillIndex){
|
||
|
|
case SKILL_FWBYKK_JUNKSPIN:
|
||
|
|
switch(flagIndex){
|
||
|
|
case 101:
|
||
|
|
obj.sq_PlaySound("JUNK_SPIN_DYNAMITE_EXP");
|
||
|
|
local currentAni = obj.getCurrentAnimation();
|
||
|
|
local delay = currentAni.getDelaySum(6, 13);
|
||
|
|
sq_SetMyShake(obj, 12, delay);
|
||
|
|
break;
|
||
|
|
}
|
||
|
|
break;
|
||
|
|
}
|
||
|
|
break;
|
||
|
|
case 4:
|
||
|
|
switch(skillIndex){
|
||
|
|
case SKILL_BYKK_SHININGWINGSFLAP:
|
||
|
|
switch(subtype){
|
||
|
|
case 2:
|
||
|
|
local sub = obj.getVar("custom").getInt(3);
|
||
|
|
if(sub > 0){
|
||
|
|
switch(flagIndex){
|
||
|
|
case 4:
|
||
|
|
local totalDamage = obj.getVar("custom").getInt(1);
|
||
|
|
local sub = obj.getVar("custom").getInt(2);
|
||
|
|
switch(sub){
|
||
|
|
case 0:
|
||
|
|
createSkillPassive_Fighter_bykk(obj,obj,PASSIVEOBJNUM_FWBYKK,0,0,0,sq_GetDirection(obj),4,SKILL_BYKK_SHININGWINGSFLAP,3,totalDamage,0,0,0,0,0,0,0);
|
||
|
|
break;
|
||
|
|
case 1:
|
||
|
|
createSkillPassive_Fighter_bykk(obj,obj,PASSIVEOBJNUM_FWBYKK,0,0,0,sq_GetDirection(obj),4,SKILL_BYKK_SHININGWINGSFLAP,3,totalDamage,1,0,0,0,0,0,0);
|
||
|
|
break;
|
||
|
|
case 2:
|
||
|
|
createSkillPassive_Fighter_bykk(obj,obj,PASSIVEOBJNUM_FWBYKK,0,0,0,sq_GetDirection(obj),4,SKILL_BYKK_SHININGWINGSFLAP,3,totalDamage,2,0,0,0,0,0,0);
|
||
|
|
break;
|
||
|
|
}
|
||
|
|
local totalDamage = obj.getVar("custom").getInt(0);
|
||
|
|
createSkillPassive_Fighter_bykk(obj,obj,PASSIVEOBJNUM_FWBYKK,0,0,78,sq_GetDirection(obj),4,SKILL_BYKK_SHININGWINGSFLAP,21,totalDamage,0,0,0,0,0,0,0);
|
||
|
|
break;
|
||
|
|
}
|
||
|
|
}
|
||
|
|
else{
|
||
|
|
switch(flagIndex){
|
||
|
|
case 5: obj.sq_PlaySound("SHINING_WINGS_FLAP_GRAB"); break;
|
||
|
|
case 7:
|
||
|
|
local totalDamage = obj.getVar("custom").getInt(1);
|
||
|
|
local sub = obj.getVar("custom").getInt(2);
|
||
|
|
switch(sub){
|
||
|
|
case 0:
|
||
|
|
createSkillPassive_Fighter_bykk(obj,obj,PASSIVEOBJNUM_FWBYKK,0,0,0,sq_GetDirection(obj),4,SKILL_BYKK_SHININGWINGSFLAP,3,totalDamage,0,0,0,0,0,0,0);
|
||
|
|
break;
|
||
|
|
case 1:
|
||
|
|
createSkillPassive_Fighter_bykk(obj,obj,PASSIVEOBJNUM_FWBYKK,0,0,0,sq_GetDirection(obj),4,SKILL_BYKK_SHININGWINGSFLAP,3,totalDamage,1,0,0,0,0,0,0);
|
||
|
|
break;
|
||
|
|
case 2:
|
||
|
|
createSkillPassive_Fighter_bykk(obj,obj,PASSIVEOBJNUM_FWBYKK,0,0,0,sq_GetDirection(obj),4,SKILL_BYKK_SHININGWINGSFLAP,3,totalDamage,2,0,0,0,0,0,0);
|
||
|
|
break;
|
||
|
|
}
|
||
|
|
break;
|
||
|
|
case 8:
|
||
|
|
local totalDamage = obj.getVar("custom").getInt(0);
|
||
|
|
createSkillPassive_Fighter_bykk(obj,obj,PASSIVEOBJNUM_FWBYKK,-1,0,100,sq_GetDirection(obj),4,SKILL_BYKK_SHININGWINGSFLAP,21,totalDamage,0,0,0,0,0,0,0);
|
||
|
|
break;
|
||
|
|
}
|
||
|
|
}
|
||
|
|
break;
|
||
|
|
case 3:
|
||
|
|
local sub = obj.getVar("custom").getInt(1);
|
||
|
|
switch(sub){
|
||
|
|
case 0:
|
||
|
|
switch(flagIndex){
|
||
|
|
case 13:
|
||
|
|
local totalDamage = obj.getVar("custom").getInt(0);
|
||
|
|
createSkillPassive_Fighter_bykk(obj,obj,PASSIVEOBJNUM_FWBYKK,3,0,102,sq_GetDirection(obj),4,SKILL_BYKK_SHININGWINGSFLAP,31,totalDamage,0,0,0,0,0,0,0);
|
||
|
|
print("test");
|
||
|
|
break;
|
||
|
|
}
|
||
|
|
break;
|
||
|
|
case 1:
|
||
|
|
switch(flagIndex){
|
||
|
|
case 7:
|
||
|
|
local currentAni = obj.getCurrentAnimation();
|
||
|
|
local delay = currentAni.getDelaySum(7, 10);
|
||
|
|
local size = sqrChr.getVar("shiningWingsFlapTarget").get_obj_vector_size();
|
||
|
|
if(size > 0){
|
||
|
|
for(local i = 0; i < size; i++){
|
||
|
|
local targetObj = sqrChr.getVar("shiningWingsFlapTarget").get_obj_vector(i);
|
||
|
|
if(targetObj){
|
||
|
|
local addAppendage = CNSquirrelAppendage.sq_GetAppendage(targetObj, "character/fighter/4_grappler_bykk/ap_shiningwingsflap_hold.nut");
|
||
|
|
sq_MoveToAppendageForce(targetObj, obj, obj, -35, -1, 176, delay, true, addAppendage);
|
||
|
|
sq_SetCurrentDirection(targetObj, sq_GetOppositeDirection(sq_GetDirection(targetObj)));
|
||
|
|
}
|
||
|
|
}
|
||
|
|
}
|
||
|
|
break;
|
||
|
|
case 11:
|
||
|
|
sq_AddDrawOnlyAniFromParent(obj, "passiveobject/1_fighter_bykk/4_grappler_bykk/animation/shiningwingsflap/shiningwingsflapattackeffect06spin_00.ani", 0, 10, 0);
|
||
|
|
sq_SetMyShake(obj, 8, 100);
|
||
|
|
break;
|
||
|
|
case 12:
|
||
|
|
local size = sqrChr.getVar("shiningWingsFlapTarget").get_obj_vector_size();
|
||
|
|
if(size > 0){
|
||
|
|
for(local i = 0; i < size; i++){
|
||
|
|
local targetObj = sqrChr.getVar("shiningWingsFlapTarget").get_obj_vector(i);
|
||
|
|
if(targetObj){
|
||
|
|
local addAppendage = CNSquirrelAppendage.sq_GetAppendage(targetObj, "character/fighter/4_grappler_bykk/ap_shiningwingsflap_hold.nut");
|
||
|
|
sq_MoveToAppendageForce(targetObj, obj, obj, 35, -1, 228, 60, true, addAppendage);
|
||
|
|
sq_SetCurrentDirection(targetObj, sq_GetOppositeDirection(sq_GetDirection(targetObj)));
|
||
|
|
}
|
||
|
|
}
|
||
|
|
}
|
||
|
|
break;
|
||
|
|
case 13:
|
||
|
|
local size = sqrChr.getVar("shiningWingsFlapTarget").get_obj_vector_size();
|
||
|
|
if(size > 0){
|
||
|
|
for(local i = 0; i < size; i++){
|
||
|
|
local targetObj = sqrChr.getVar("shiningWingsFlapTarget").get_obj_vector(i);
|
||
|
|
if(targetObj){
|
||
|
|
local addAppendage = CNSquirrelAppendage.sq_GetAppendage(targetObj, "character/fighter/4_grappler_bykk/ap_shiningwingsflap_hold.nut");
|
||
|
|
sq_MoveToAppendageForce(targetObj, obj, obj, 0, -1, 239, 60, true, addAppendage);
|
||
|
|
}
|
||
|
|
}
|
||
|
|
}
|
||
|
|
break;
|
||
|
|
case 14:
|
||
|
|
local size = sqrChr.getVar("shiningWingsFlapTarget").get_obj_vector_size();
|
||
|
|
if(size > 0){
|
||
|
|
for(local i = 0; i < size; i++){
|
||
|
|
local targetObj = sqrChr.getVar("shiningWingsFlapTarget").get_obj_vector(i);
|
||
|
|
if(targetObj){
|
||
|
|
local addAppendage = CNSquirrelAppendage.sq_GetAppendage(targetObj, "character/fighter/4_grappler_bykk/ap_shiningwingsflap_hold.nut");
|
||
|
|
sq_MoveToAppendageForce(targetObj, obj, obj, -35, -1, 245, 60, true, addAppendage);
|
||
|
|
sq_SetCurrentDirection(targetObj, sq_GetOppositeDirection(sq_GetDirection(targetObj)));
|
||
|
|
}
|
||
|
|
}
|
||
|
|
}
|
||
|
|
break;
|
||
|
|
case 15:
|
||
|
|
local size = sqrChr.getVar("shiningWingsFlapTarget").get_obj_vector_size();
|
||
|
|
if(size > 0){
|
||
|
|
for(local i = 0; i < size; i++){
|
||
|
|
local targetObj = sqrChr.getVar("shiningWingsFlapTarget").get_obj_vector(i);
|
||
|
|
if(targetObj){
|
||
|
|
local addAppendage = CNSquirrelAppendage.sq_GetAppendage(targetObj, "character/fighter/4_grappler_bykk/ap_shiningwingsflap_hold.nut");
|
||
|
|
sq_MoveToAppendageForce(targetObj, obj, obj, 0, 1, 248, 60, true, addAppendage);
|
||
|
|
}
|
||
|
|
}
|
||
|
|
}
|
||
|
|
break;
|
||
|
|
case 16:
|
||
|
|
local size = sqrChr.getVar("shiningWingsFlapTarget").get_obj_vector_size();
|
||
|
|
if(size > 0){
|
||
|
|
for(local i = 0; i < size; i++){
|
||
|
|
local targetObj = sqrChr.getVar("shiningWingsFlapTarget").get_obj_vector(i);
|
||
|
|
if(targetObj){
|
||
|
|
local addAppendage = CNSquirrelAppendage.sq_GetAppendage(targetObj, "character/fighter/4_grappler_bykk/ap_shiningwingsflap_hold.nut");
|
||
|
|
sq_MoveToAppendageForce(targetObj, obj, obj, 35, -1, 249, 60, true, addAppendage);
|
||
|
|
sq_SetCurrentDirection(targetObj, sq_GetOppositeDirection(sq_GetDirection(targetObj)));
|
||
|
|
}
|
||
|
|
}
|
||
|
|
}
|
||
|
|
break;
|
||
|
|
case 17:
|
||
|
|
local size = sqrChr.getVar("shiningWingsFlapTarget").get_obj_vector_size();
|
||
|
|
if(size > 0){
|
||
|
|
for(local i = 0; i < size; i++){
|
||
|
|
local targetObj = sqrChr.getVar("shiningWingsFlapTarget").get_obj_vector(i);
|
||
|
|
if(targetObj){
|
||
|
|
local addAppendage = CNSquirrelAppendage.sq_GetAppendage(targetObj, "character/fighter/4_grappler_bykk/ap_shiningwingsflap_hold.nut");
|
||
|
|
sq_MoveToAppendageForce(targetObj, obj, obj, 0, -1, 248, 60, true, addAppendage);
|
||
|
|
}
|
||
|
|
}
|
||
|
|
}
|
||
|
|
break;
|
||
|
|
case 18:
|
||
|
|
local size = sqrChr.getVar("shiningWingsFlapTarget").get_obj_vector_size();
|
||
|
|
if(size > 0){
|
||
|
|
for(local i = 0; i < size; i++){
|
||
|
|
local targetObj = sqrChr.getVar("shiningWingsFlapTarget").get_obj_vector(i);
|
||
|
|
if(targetObj){
|
||
|
|
local addAppendage = CNSquirrelAppendage.sq_GetAppendage(targetObj, "character/fighter/4_grappler_bykk/ap_shiningwingsflap_hold.nut");
|
||
|
|
sq_MoveToAppendageForce(targetObj, obj, obj, -35, -1, 238, 60, true, addAppendage);
|
||
|
|
sq_SetCurrentDirection(targetObj, sq_GetOppositeDirection(sq_GetDirection(targetObj)));
|
||
|
|
}
|
||
|
|
}
|
||
|
|
}
|
||
|
|
break;
|
||
|
|
case 19:
|
||
|
|
local size = sqrChr.getVar("shiningWingsFlapTarget").get_obj_vector_size();
|
||
|
|
if(size > 0){
|
||
|
|
for(local i = 0; i < size; i++){
|
||
|
|
local targetObj = sqrChr.getVar("shiningWingsFlapTarget").get_obj_vector(i);
|
||
|
|
if(targetObj){
|
||
|
|
local addAppendage = CNSquirrelAppendage.sq_GetAppendage(targetObj, "character/fighter/4_grappler_bykk/ap_shiningwingsflap_hold.nut");
|
||
|
|
sq_MoveToAppendageForce(targetObj, obj, obj, 0, 1, 226, 60, true, addAppendage);
|
||
|
|
}
|
||
|
|
}
|
||
|
|
}
|
||
|
|
break;
|
||
|
|
case 20:
|
||
|
|
local currentAni = obj.getCurrentAnimation();
|
||
|
|
local delay = currentAni.getDelaySum(20, 22);
|
||
|
|
local size = sqrChr.getVar("shiningWingsFlapTarget").get_obj_vector_size();
|
||
|
|
if(size > 0){
|
||
|
|
for(local i = 0; i < size; i++){
|
||
|
|
local targetObj = sqrChr.getVar("shiningWingsFlapTarget").get_obj_vector(i);
|
||
|
|
if(targetObj){
|
||
|
|
local addAppendage = CNSquirrelAppendage.sq_GetAppendage(targetObj, "character/fighter/4_grappler_bykk/ap_shiningwingsflap_hold.nut");
|
||
|
|
sq_MoveToAppendageForce(targetObj, obj, obj, 0, -1, 38, delay, true, addAppendage);
|
||
|
|
sq_SetCurrentDirection(targetObj, sq_GetOppositeDirection(sq_GetDirection(targetObj)));
|
||
|
|
}
|
||
|
|
}
|
||
|
|
}
|
||
|
|
break;
|
||
|
|
case 22:
|
||
|
|
local totalDamage = obj.getVar("custom").getInt(0);
|
||
|
|
createSkillPassive_Fighter_bykk(obj,obj,PASSIVEOBJNUM_FWBYKK,5,0,3,sq_GetDirection(obj),4,SKILL_BYKK_SHININGWINGSFLAP,32,totalDamage,0,0,0,0,0,0,0);
|
||
|
|
local size = sqrChr.getVar("shiningWingsFlapTarget").get_obj_vector_size();
|
||
|
|
if(size > 0){
|
||
|
|
for(local i = 0; i < size; i++){
|
||
|
|
local targetObj = sqrChr.getVar("shiningWingsFlapTarget").get_obj_vector(i);
|
||
|
|
if(targetObj){
|
||
|
|
local addAppendage = CNSquirrelAppendage.sq_GetAppendage(targetObj, "character/fighter/4_grappler_bykk/ap_shiningwingsflap_hold.nut");
|
||
|
|
sq_MoveToAppendageForce(targetObj, obj, obj, 0, -1, 0, 60, true, addAppendage);
|
||
|
|
sq_SetCurrentDirection(targetObj, sq_GetOppositeDirection(sq_GetDirection(targetObj)));
|
||
|
|
}
|
||
|
|
}
|
||
|
|
}
|
||
|
|
break;
|
||
|
|
case 23:
|
||
|
|
obj.sq_PlaySound("R_FT_SHINING_WINGS_FLAP_LUCY_02");
|
||
|
|
sq_AddDrawOnlyAniFromParent(obj, "passiveobject/1_fighter_bykk/4_grappler_bykk/animation/shiningwingsflap/shiningwingsflapattackeffect03a_07.ani", 0, 1, 0);
|
||
|
|
sq_AddDrawOnlyAniFromParent(obj, "passiveobject/1_fighter_bykk/4_grappler_bykk/animation/shiningwingsflap/shiningwingsflapattackeffect03b_02.ani", 0, -2, 0);
|
||
|
|
break;
|
||
|
|
case 32:
|
||
|
|
print(111111111111111);
|
||
|
|
local size = sqrChr.getVar("shiningWingsFlapTargetFixture").get_obj_vector_size();
|
||
|
|
if(size > 0){
|
||
|
|
for(local i = 0; i < size; i++){
|
||
|
|
local targetObj = sqrChr.getVar("shiningWingsFlapTargetFixture").get_obj_vector(i);
|
||
|
|
if(targetObj) CNSquirrelAppendage.sq_RemoveAppendage(targetObj, "character/fighter/4_grappler_bykk/ap_shiningwingsflap_hold.nut");
|
||
|
|
}
|
||
|
|
}
|
||
|
|
size = sqrChr.getVar("shiningWingsFlapTarget").get_obj_vector_size();
|
||
|
|
if(size > 0){
|
||
|
|
for(local i = 0; i < size; i++){
|
||
|
|
local targetObj = sqrChr.getVar("shiningWingsFlapTarget").get_obj_vector(i);
|
||
|
|
if(targetObj) CNSquirrelAppendage.sq_RemoveAppendage(targetObj, "character/fighter/4_grappler_bykk/ap_shiningwingsflap_hold.nut");
|
||
|
|
}
|
||
|
|
}
|
||
|
|
break;
|
||
|
|
}
|
||
|
|
break;
|
||
|
|
}
|
||
|
|
break;
|
||
|
|
}
|
||
|
|
break;
|
||
|
|
}
|
||
|
|
break;
|
||
|
|
}
|
||
|
|
return true;
|
||
|
|
}
|
||
|
|
|
||
|
|
function procAppend_po_fighter_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:
|
||
|
|
break;
|
||
|
|
case 3:
|
||
|
|
switch(skillIndex){
|
||
|
|
case SKILL_FWBYKK_VENOMMINE:
|
||
|
|
case SKILL_FWBYKK_POISONMIST:
|
||
|
|
switch(subtype){
|
||
|
|
case 1:
|
||
|
|
switch(state){
|
||
|
|
case 20:
|
||
|
|
if(sq_GetZPos(obj) <= 0) obj.addSetStatePacket(21, null, STATE_PRIORITY_AUTO, false, "");
|
||
|
|
break;
|
||
|
|
}
|
||
|
|
break;
|
||
|
|
}
|
||
|
|
break;
|
||
|
|
case SKILL_FWBYKK_BLOCKBUSTEREX:
|
||
|
|
switch(subtype){
|
||
|
|
case 2:
|
||
|
|
if(sq_GetZPos(obj) <= 0 && obj.getVar().getBool(0) == false){
|
||
|
|
obj.getVar().setBool(0, true);
|
||
|
|
obj.setTimeEvent(1, 200, 1, false);
|
||
|
|
}
|
||
|
|
break;
|
||
|
|
}
|
||
|
|
break;
|
||
|
|
case SKILL_FWBYKK_DRAGONMINE:
|
||
|
|
switch(subtype){
|
||
|
|
case 2:
|
||
|
|
switch(state){
|
||
|
|
case 20:
|
||
|
|
if(sq_GetObjectTime(obj) >= obj.getVar("custom").getInt(0)){
|
||
|
|
obj.addSetStatePacket(21, null, STATE_PRIORITY_AUTO, false, "");
|
||
|
|
return;
|
||
|
|
}
|
||
|
|
break;
|
||
|
|
}
|
||
|
|
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 4:
|
||
|
|
break;
|
||
|
|
}
|
||
|
|
}
|
||
|
|
|
||
|
|
|