茶服加密更新
This commit is contained in:
@@ -290,8 +290,8 @@ function onSetState_Dangerousscale(obj, state, datas, isResetTimer)
|
||||
local totalDamage = obj.sq_GetBonusRateWithPassive(SKILL_BYKK_DANGEROUSSCALE, -1, 0, bonusRate);
|
||||
local sizeRate = sq_GetIntData(obj, SKILL_BYKK_DANGEROUSSCALE, 4);
|
||||
sizeRate = sizeRate * sq_GetIntData(obj, SKILL_BYKK_DANGEROUSSCALE, 3) / 100;
|
||||
local isTalisman = 0;
|
||||
if(sq_GetIntData(obj, SKILL_BYKK_DANGEROUSSCALE, 15) > 0){
|
||||
local isTalisman = 0, skill = sq_GetSkill(obj, SKILL_BYKK_DANGEROUSSCALE);
|
||||
if(sq_GetIntData(obj, SKILL_BYKK_DANGEROUSSCALE, 15) > 0 || !skill.isSealFunction()){
|
||||
isTalisman = 1;
|
||||
totalDamage = totalDamage * 110 / 100;
|
||||
sizeRate = sizeRate * 125 / 100;
|
||||
@@ -2076,3 +2076,158 @@ function createSkillPassive_Priest_bykk(obj,passiveObj,objnum,x,y,z,direction,jo
|
||||
sq_SendCreatePassiveObjectPacket(obj, objnum, 0, destX_01 + x, destY_01 + y, z, direction);
|
||||
}
|
||||
|
||||
|
||||
|
||||
//荣誉祝福
|
||||
function checkExecutableSkill_GloriousBlessNew(obj)
|
||||
{
|
||||
if (!obj) return false;
|
||||
if(obj.getVar("canUseSkill").getBool(0)) return false;
|
||||
local isUse = obj.sq_IsUseSkill(260);
|
||||
if (isUse){
|
||||
obj.sq_IntVectClear();
|
||||
obj.sq_IntVectPush(0);
|
||||
obj.sq_AddSetStatePacket(301, STATE_PRIORITY_IGNORE_FORCE, true);
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
function checkCommandEnable_GloriousBlessNew(obj)
|
||||
{
|
||||
if (!obj) return false;
|
||||
if(obj.getVar("canUseSkill").getBool(0)) return false;
|
||||
return true;
|
||||
}
|
||||
|
||||
function onSetState_GloriousBlessNew(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(3);
|
||||
obj.setCurrentAnimation(Ani);
|
||||
break;
|
||||
case 1:
|
||||
local Ani = obj.sq_GetThrowShootAni(3);
|
||||
obj.setCurrentAnimation(Ani);
|
||||
obj.sq_PlaySound("PR_MOONLIGHT");
|
||||
obj.setTimeEvent(1, 500, 1, false);
|
||||
|
||||
local objectManager = obj.getObjectManager();
|
||||
local objectNumber = objectManager.getCollisionObjectNumber();
|
||||
local count = 0;
|
||||
for (local i = 0; i < objectNumber; i++){
|
||||
local object = objectManager.getCollisionObject(i);
|
||||
if(object && !obj.isEnemy(object) && object.isObjectType(OBJECTTYPE_CHARACTER)){
|
||||
local sqrChr = sq_GetCNRDObjectToSQRCharacter(object);
|
||||
if(sq_getJob(sqrChr) == 9 && sq_getGrowType(sqrChr) == 1) count = count + 1;
|
||||
}
|
||||
}
|
||||
print("count = "+count);
|
||||
if(count > 0){
|
||||
obj.getVar("canUseSkill").setBool(0, true);
|
||||
return;
|
||||
}
|
||||
|
||||
if(CNSquirrelAppendage.sq_IsAppendAppendage(obj, APDPATH_BLESSOFCOURAGE)) CNSquirrelAppendage.sq_RemoveAppendage(obj, APDPATH_BLESSOFCOURAGE);
|
||||
if(CNSquirrelAppendage.sq_IsAppendAppendage(obj, APDPATH_ZEALOFFAITHBUFF)) CNSquirrelAppendage.sq_RemoveAppendage(obj, APDPATH_ZEALOFFAITHBUFF);
|
||||
if(CNSquirrelAppendage.sq_IsAppendAppendage(obj, APDPATH_CRUXOFVICTORIA)) CNSquirrelAppendage.sq_RemoveAppendage(obj, APDPATH_CRUXOFVICTORIA);
|
||||
local skillLevel = sq_GetSkillLevel(obj, 260);
|
||||
local range = sq_GetIntData(obj, 260, 0);
|
||||
local buffTime = sq_GetLevelData(obj, 260, 0, skillLevel);
|
||||
local phAttack = sq_GetLevelData(obj, 260, 4, skillLevel);
|
||||
local mgAttack = sq_GetLevelData(obj, 260, 5, skillLevel);
|
||||
local adtAttack = sq_GetLevelData(obj, 260, 3, skillLevel);
|
||||
local phlAttack = sq_GetLevelData(obj, 260, 1, skillLevel);
|
||||
local mglAttack = sq_GetLevelData(obj, 260, 2, skillLevel);
|
||||
local stuckRate = sq_GetLevelData(obj, 260, 6, skillLevel);
|
||||
local skillbonusRate = sq_GetLevelData(obj, 260, 7, skillLevel);
|
||||
//if(skillLevel < 20) sq_SetSkillAttackBonus(obj, skillbonusRate.tofloat() / 1000.0);
|
||||
local now_phDefense = sq_GetPhysicalDefense();
|
||||
now_phDefense = now_phDefense * (100 + sq_GetIntData(obj, 169, 3)) / 100;
|
||||
local now_mgDefense = sq_GetMagicalDefense();
|
||||
now_mgDefense = now_mgDefense * (100 + sq_GetIntData(obj, 169, 4)) / 100;
|
||||
local defenseMax = 0;
|
||||
if(now_phDefense > now_mgDefense) defenseMax = now_phDefense;
|
||||
else defenseMax = now_mgDefense;
|
||||
print("defenseMax = "+defenseMax);
|
||||
local addRate = defenseMax.tofloat() / sq_GetIntData(obj, 260, 3).tofloat();
|
||||
if(addRate > 1){
|
||||
phAttack = phAttack.tofloat() * (1.0 + addRate);
|
||||
mgAttack = mgAttack.tofloat() * (1.0 + addRate);
|
||||
adtAttack = adtAttack.tofloat() * (1.0 + addRate);
|
||||
phlAttack = phlAttack.tofloat() * (1.0 + addRate);
|
||||
mglAttack = mglAttack.tofloat() * (1.0 + addRate);
|
||||
}
|
||||
print("addRate = "+addRate);
|
||||
|
||||
sq_BinaryStartWrite();
|
||||
sq_BinaryWriteDword(skillLevel);
|
||||
sq_BinaryWriteDword(buffTime);
|
||||
sq_BinaryWriteDword(phAttack.tointeger());
|
||||
sq_BinaryWriteDword(mgAttack.tointeger());
|
||||
sq_BinaryWriteDword(adtAttack.tointeger());
|
||||
sq_BinaryWriteDword(phlAttack.tointeger());
|
||||
sq_BinaryWriteDword(mglAttack.tointeger());
|
||||
sq_BinaryWriteDword(stuckRate);
|
||||
sq_SendCreatePassiveObjectPacket(obj, 640001, 0, 0, 0, 0, obj.getDirection());
|
||||
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
function onEndCurrentAni_GloriousBlessNew(obj)
|
||||
{
|
||||
if(!obj) return;
|
||||
local subState = obj.getSkillSubState();
|
||||
switch(subState){
|
||||
case 0:
|
||||
obj.sq_IntVectClear();
|
||||
obj.sq_IntVectPush(1);
|
||||
obj.sq_AddSetStatePacket(301, STATE_PRIORITY_AUTO, true);
|
||||
break;
|
||||
case 1:
|
||||
obj.sq_IntVectClear();
|
||||
obj.sq_AddSetStatePacket(STATE_STAND, STATE_PRIORITY_AUTO, true);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
function onProcCon_GloriousBlessNew(obj)
|
||||
{
|
||||
if(!obj) return;
|
||||
}
|
||||
|
||||
function onKeyFrameFlag_GloriousBlessNew(obj, flagIndex)
|
||||
{
|
||||
if(!obj) return false;
|
||||
return true;
|
||||
}
|
||||
|
||||
function onTimeEvent_GloriousBlessNew(obj, timeEventIndex, timeEventCount)
|
||||
{
|
||||
if(!obj) return false;
|
||||
switch(timeEventIndex){
|
||||
case 1:
|
||||
obj.sq_IntVectClear();
|
||||
obj.sq_AddSetStatePacket(STATE_STAND, STATE_PRIORITY_AUTO, true);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
function onEndState_GloriousBlessNew(obj, new_state)
|
||||
{
|
||||
if(!obj) return;
|
||||
}
|
||||
|
||||
|
||||
function onStartDungeon_PrCrusader_bykk(obj)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user