Sqr/character/creatormage/creatorflame/creatorflame.nut

197 lines
4.0 KiB
Plaintext
Raw Blame History

This file contains invisible Unicode characters

This file contains invisible Unicode characters that are indistinguishable to humans but may be processed differently by a computer. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

SUB_STATE_CREATORFLAME_0 <- 0
function checkExecutableSkill_CreatorFlame(obj)
{
if(!obj) return false;
// 伪擎 啗鳝楼撩樯等 ?廓 涡 援脑贼 橾奁奢问戏煎 瞪?腌栖棻.
local type = getCreatorSkillStateSkillIndex(obj);
if (type == CREATOR_TYPE_FLAME)
{
setCreatorSkillStateSkillIndex(obj, -1);
onAllChargeCreatorMageGauge(obj);
return false;
}
local b_useskill = obj.sq_IsUseSkill(SKILL_CREATORFLAME);
if (b_useskill)
{
obj.sq_IntVectClear();
obj.sq_IntVectPush(SUB_STATE_CREATORFLAME_0); // substate撮?
obj.sq_AddSetStatePacket(STATE_CREATORFLAME, STATE_PRIORITY_USER, true);
return true;
}
return false;
}
function checkCommandEnable_CreatorFlame(obj)
{
if(!obj) return false;
local state = obj.sq_GetState();
local skill_level = obj.sq_GetSkillLevel(SKILL_CREATORFLAME);
if(state == STATE_ATTACK)
{
return obj.sq_IsCommandEnable(SKILL_CREATORFLAME); // 念瘫潍缣怃朝 ?姜蝶鉴虏 警蜗桧 陛栋?栖棻. 蒙机濠:姜霞热 [2012.04.20] obj.sq_IsCommandEnable(SKILL_BROKENARROW);
}
return true;
}
function onSetState_CreatorFlame(obj,state,datas,isResetTimer)
{
if(!obj) return;
local substate = obj.sq_GetVectorData(datas, 0);
obj.setSkillSubState(substate);
obj.sq_StopMove();
local posX = obj.getXPos();
local posY = obj.getYPos();
local posZ = obj.getZPos();
obj.getVar().clear_vector();
obj.getVar().push_vector(0);
obj.getVar().push_vector(0);
print(" onSetState_CreatorFlame");
if (substate == SUB_STATE_CREATORFLAME_0)
{
// ?腻楼撩击 当棻坚 宪溥鄹栖棻.
setCreatorSkillStateSkillIndex(obj, CREATOR_TYPE_FLAME);
// 赅苌 觼溯桧搅暧 楼撩 醱瞪击 卫蒙?栖棻.
onAllChargeCreatorMageGauge(obj);
// ?溯歜 楼撩 醱瞪击 酝虽?栖棻.
setChargeCreatorMageGauge(obj, CREATOR_TYPE_FLAME, 0);
obj.sq_PlaySound("R_CR_FIREFORCE");
obj.sq_SetCurrentAnimation(CUSTOM_ANI_FIRE_WALL);
// 议蝶? 楼紫蒂 评塭陛紫烟 扑姜
// 议蝶? 楼紫陛 渗唳肾贼, 缣栖诡桧暮 楼紫紫 渗唳 腌栖棻.
// 议蝶? 啪桧虽紫 ?卫蒂 ?鄹栖棻.
local skillLevel = sq_GetSkillLevel(obj, SKILL_CREATORFLAME);
local castTime = sq_GetCastTime(obj, SKILL_CREATORFLAME, skillLevel);
local animation = sq_GetCurrentAnimation(obj);
local startTime = sq_GetDelaySum(animation);
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, startTime, true);
}
}
function prepareDraw_CreatorFlame(obj)
{
if(!obj) return;
}
function onProc_CreatorFlame(obj)
{
if(!obj) return;
}
function onProcCon_CreatorFlame(obj)
{
if(!obj) return;
}
function onEndCurrentAni_CreatorFlame(obj)
{
if(!obj) return;
if(!obj.isMyControlObject()) {
return;
}
local substate = obj.getSkillSubState();
if (substate == SUB_STATE_CREATORFLAME_0)
{
obj.sq_AddSetStatePacket(STATE_STAND, STATE_PRIORITY_USER, false);
}
}
function onKeyFrameFlag_CreatorFlame(obj,flagIndex)
{
if(!obj) return false;
return true;
}
function onEndState_CreatorFlame(obj,new_state)
{
if(!obj) return;
sq_EndDrawCastGauge(obj);
}
function onAfterSetState_CreatorFlame(obj,state,datas,isResetTimer)
{
if(!obj) return;
}
function onBeforeAttack_CreatorFlame(obj,damager,boundingBox,isStuck)
{
if(!obj) return;
}
function onAttack_CreatorFlame(obj,damager,boundingBox,isStuck)
{
if(!obj) return;
}
function onAfterAttack_CreatorFlame(obj,damager,boundingBox,isStuck)
{
if(!obj) return 0;
return 1;
}
function onBeforeDamage_CreatorFlame(obj,attacker,boundingBox,isStuck)
{
if(!obj) return;
}
function onDamage_CreatorFlame(obj,attacker,boundingBox)
{
if(!obj) return;
}
function onAfterDamage_CreatorFlame(obj,attacker,boundingBox)
{
if(!obj) return;
}