Sqr/character/atmage/manaburst/manaburst.nut

91 lines
2.7 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_MANABURST_0 <- 0
SUB_STATE_MANABURST_1 <- 1
SUB_STATE_MANABURST_2 <- 2
SUB_STATE_MANABURST_3 <- 3
SUB_STATE_MANABURST_4 <- 4
function checkExecutableSkill_ManaBurst(obj)
{
if(!obj) return false;
local state = obj.sq_GetState();
// ?卫粽?? 挡?粽蝶鉴桧塭 桧够缣怃 ?翕亵勒击 匏栖棻.
// ManaBurst.skl [executable states] 擎 -1击 撮??镀蝗栖棻.
// 桧匙擎 赅苌蝶鉴缣怃 奢问溘击 堪罹丑捡?棻朝 蝶鉴晦栋 阳侥殓栖棻.
if(state == STATE_STAND || state == STATE_ATTACK || state == STATE_DASH)
{
local b_useskill = obj.sq_IsUseSkill(SKILL_MANABURST);
if (b_useskill)
{
/*
# STATE_THROW
[0] Throw State (0:赅戏晦, 1:湍虽晦, 2:偃樯卫瞪)
* Throw State 0 *
[1] 湍虽朝 颤殓 (ENUM_THROW_TYPE)
[2] 湍虽朝 渠鼻暧 樯策蝶 (蝶鉴 樯策蝶 or 嬴桧蛊 樯策蝶)
[3] 赅戏朝 卫除
[4] 嫦饵 卫除
[5] 湍虽晦 拥栖诡桧暮 颤殓 (0 or 1)
[6] 赅戏晦 楼紫 颤殓
[7] 嫦饵 楼紫 颤殓
[8] 赅戏晦 楼紫 (寰厥戏贼 SPEED_VALUE_DEFAULT)
[9] 嫦饵 楼紫 (寰厥戏贼 SPEED_VALUE_DEFAULT)
[10] 偃樯卫瞪 彰嫔 (寰厥剪釭 -1桧贼 偃樯卫瞪 寰?)
* Throw State 1 *
// Throw State 2缣怃 剩横谘击 唳办缣虏
[1] 偃樯 卫瞪卫 渠鼻 Object Id
* Throw State 2 *
*/
local skillLevel = sq_GetSkillLevel(obj, SKILL_MANABURST);
local castTime = sq_GetCastTime(obj, SKILL_MANABURST, skillLevel);
obj.sq_IntVectClear();
obj.sq_IntVectPush(0); // throwState
obj.sq_IntVectPush(0); // throwType
obj.sq_IntVectPush(SKILL_MANABURST); // throwIndex
obj.sq_IntVectPush(castTime); // throwChargeTime
obj.sq_IntVectPush(500); // throwShootTime
obj.sq_IntVectPush(0); // throwAnimationIndex
obj.sq_IntVectPush(4); // chargeSpeedType
obj.sq_IntVectPush(4); // throwShootSpeedType
obj.sq_IntVectPush(1000); // chargeSpeedValue
obj.sq_IntVectPush(1000); // throwShootSpeedValue
obj.sq_IntVectPush(-1); // personalCastRange
obj.sq_AddSetStatePacket(STATE_THROW, STATE_PRIORITY_USER, true);
//obj.sq_AddSetStatePacket(STATE_ELEMENTAL_CHANGE, STATE_PRIORITY_USER, false);
return true;
}
}
return false;
}
function checkCommandEnable_ManaBurst(obj)
{
if(!obj) return false;
local state = obj.sq_GetState();
if(state == STATE_ATTACK) {
// 念瘫潍缣怃朝 ?姜蝶鉴虏 警蜗桧 陛栋?栖棻. 蒙机濠:姜霞热 [2012.04.20]
return obj.sq_IsCommandEnable(SKILL_MANABURST);
}
if(state == STATE_STAND || state == STATE_ATTACK || state == STATE_DASH)
{
return true;
}
return false;
}