434 lines
		
	
	
		
			14 KiB
		
	
	
	
		
			Plaintext
		
	
	
	
		
		
			
		
	
	
			434 lines
		
	
	
		
			14 KiB
		
	
	
	
		
			Plaintext
		
	
	
	
|  | 
 | |||
|  | 
 | |||
|  | // state蒂 撮??坚 籀挤戏煎 菟横螃啪 腌栖棻. 陕谦 葬模蝶蒂 撮??栖棻.  | |||
|  | function onSetState_AvengerAttack(obj, state, datas, isResetTimer) | |||
|  | {	 | |||
|  | 	if(!obj) return; | |||
|  | 	if(isAvengerAwakenning(obj) == false) { | |||
|  | 		obj.getVar().clear_vector(); | |||
|  | 
 | |||
|  | 		obj.getVar().push_vector(0); // 0廓樯策蝶 | |||
|  | 		obj.getVar().push_vector(0); // 1廓樯策蝶 | |||
|  | 		obj.getVar().push_vector(0);// 2廓樯策蝶 | |||
|  | 		obj.getVar().push_vector(0);// 3廓樯策蝶 | |||
|  | 		obj.getVar().push_vector(0);// 4廓樯策蝶 | |||
|  | 		 | |||
|  | 		if(obj.getAttackIndex() == 0) | |||
|  | 		{ | |||
|  | 			obj.setAttackXVelocity(100); | |||
|  | 			obj.setAttackXAccel(-300); | |||
|  | 			obj.setAttackXVelocityFast(200); | |||
|  | 			obj.setAttackXAccelFast(-300);	 | |||
|  | 		} | |||
|  | 
 | |||
|  | 		if(obj.getAttackIndex() == 1) { // | |||
|  | 			obj.setAttackXVelocity(50); | |||
|  | 			obj.setAttackXAccel(-300); | |||
|  | 			obj.setAttackXVelocityFast(50); | |||
|  | 			obj.setAttackXAccelFast(-300);	 | |||
|  | 		}		 | |||
|  | 		 | |||
|  | 		if(obj.getAttackIndex() == 2) { // | |||
|  | 			obj.setAttackXVelocity(20); | |||
|  | 			obj.setAttackXAccel(-300); | |||
|  | 			obj.setAttackXVelocityFast(50); | |||
|  | 			obj.setAttackXAccelFast(-30); | |||
|  | 		} | |||
|  | 		if(obj.getAttackIndex() == 3)  | |||
|  | 		{ // | |||
|  | 
 | |||
|  | 		} | |||
|  | 		return; | |||
|  | 	} | |||
|  | 	 | |||
|  | 	obj.sq_stopMove(); | |||
|  | 
 | |||
|  | 	local posX = obj.getXPos(); | |||
|  | 	local posY = obj.getYPos(); | |||
|  | 	local posZ = obj.getZPos();	 | |||
|  | 	local dir = sq_GetDirection(obj); | |||
|  | 
 | |||
|  | 	obj.getVar().clear_vector(); | |||
|  | 	obj.getVar().push_vector(0); | |||
|  | 	 | |||
|  | 	obj.setAttackXVelocity(0); | |||
|  | 	obj.setAttackXAccel(0); | |||
|  | 	obj.setAttackXVelocityFast(0); | |||
|  | 	obj.setAttackXAccelFast(0); | |||
|  | 	 | |||
|  | 	 | |||
|  | } | |||
|  | 
 | |||
|  | 
 | |||
|  | function onAfterSetState_AvengerAttack(obj, state, datas, isResetTimer) | |||
|  | { | |||
|  | 	if(!obj) return; | |||
|  | 	 | |||
|  | 	if(isAvengerAwakenning(obj) == false) { | |||
|  | 		return; | |||
|  | 	} | |||
|  | 		 | |||
|  | 	print("	onAfterSetState_AvengerAttack obj.getAttackIndex():" + obj.getAttackIndex()); | |||
|  | 	 | |||
|  | 	// Awakening.skl 蝶鉴溯涟 才桧绾 | |||
|  | 	//SL_PERFECT_CHANGE_HP <- 0 // (0) 谏瞪 渗褐羹 HP  | |||
|  | 	//SL_CHANGE_TIME <- 1 // (1) 虽楼卫除  | |||
|  | 	//SL_DEF_INC <- 2 // (2) 寞横溘隶陛(+) | |||
|  | 	//SL_ATK_SPD <- 3 // (3) 奢问楼紫(+) | |||
|  | 	//SL_MOV_SPD <- 4 // (4) 桧翕楼紫(+) | |||
|  | 	//SL_1_HIT_MAGIC_ATK <- 5 // (5) 1颤 葆彻奢问溘(+) | |||
|  | 	//SL_2_HIT_MAGIC_ATK <- 6 // (6) 2颤 葆彻奢问溘(+) | |||
|  | 	//SL_3_HIT_MAGIC_ATK <- 7 // (7) 3颤 葆彻奢问溘(+) | |||
|  | 	//SL_DASH_MAGIC_ATK <- 8 // (8) 渠卫 葆彻奢问溘(+) | |||
|  | 	//SL_JUMP_MAGIC_ATK <- 9 // (9) C(薄?) 葆彻奢问溘(+)		 | |||
|  | 	 | |||
|  | 
 | |||
|  | 	local posX = obj.getXPos(); | |||
|  | 	local posY = obj.getYPos(); | |||
|  | 	local posZ = obj.getZPos();	 | |||
|  | 	local dir = sq_GetDirection(obj); | |||
|  | 	local power = 0; | |||
|  | 
 | |||
|  | 
 | |||
|  | 	if(obj.getAttackIndex() == 0) { // 陕撩 渗褐鼻鹧 晦狱 奢问 葆虽虞桧塭贼..			 | |||
|  | 		local v = 5; | |||
|  | 		local dstX = sq_GetDistancePos(posX, obj.getDirection(), v); | |||
|  | 		 | |||
|  | 		if(obj.isMovablePos(dstX, posY)) { | |||
|  | 			obj.setCurrentPos(dstX, posY, posZ); | |||
|  | 		} | |||
|  | 		 | |||
|  | 		obj.setAttackXVelocity(50); | |||
|  | 		obj.setAttackXAccel(-300); | |||
|  | 		obj.setAttackXVelocityFast(100); | |||
|  | 		obj.setAttackXAccelFast(-300); | |||
|  | 
 | |||
|  | 			//print("	sqr_CreatePooledObject 4_dust_normal.ani"); | |||
|  | 		sqr_CreatePooledObject(obj, "Effect/Animation/Awakening/attack/attack1/4_dust_normal.ani", posX, posY + 1, posZ, dir); | |||
|  | 
 | |||
|  | 	}		 | |||
|  | 	if(obj.getAttackIndex() == 1) { // 陕撩 渗褐鼻鹧 晦狱 奢问 葆虽虞桧塭贼..			 | |||
|  | 		obj.getVar().push_vector(0); | |||
|  | 		 | |||
|  | 		obj.getVar().push_vector(0); | |||
|  | 		obj.getVar().push_vector(0); | |||
|  | 		 | |||
|  | 			//print("	sqr_CreatePooledObject 4_dust_normal_0.ani"); | |||
|  | 			//print("	sqr_CreatePooledObject 4_dust_normal_1.ani"); | |||
|  | 			 | |||
|  | 		sqr_CreatePooledObject(obj, "Effect/Animation/Awakening/attack/attack2/4_dust_normal_0.ani", posX, posY + 1, posZ, dir); | |||
|  | 		sqr_CreatePooledObject(obj, "Effect/Animation/Awakening/attack/attack2/4_dust_normal_1.ani", posX, posY + 1, posZ, dir); | |||
|  | 	}		 | |||
|  | 	if(obj.getAttackIndex() == 2) { // 陕撩 渗褐鼻鹧 晦狱 奢问 葆虽虞桧塭贼.. | |||
|  | 		obj.getVar().push_vector(0); | |||
|  | 		obj.getVar().push_vector(0); | |||
|  | 		obj.getVar().push_vector(0); | |||
|  | 	} | |||
|  | 	if(obj.getAttackIndex() == 3) { // 陕撩 渗褐鼻鹧 晦狱 奢问 葆虽虞桧塭贼.. | |||
|  | 		obj.getVar().push_vector(0);  | |||
|  | 		obj.getVar().push_vector(0); // 2廓 ?楚斜 醱瞪酝樯虽 嬴棋虽 ?钦?朝 ?楚斜 | |||
|  | 		obj.getVar().push_vector(0); | |||
|  | 	} | |||
|  | 	 | |||
|  | 	if(obj.getAttackIndex() == 4) { // 陕撩 渗褐鼻鹧 晦狱 奢问 葆虽虞桧塭贼.. | |||
|  | 		obj.getVar().push_vector(0);  | |||
|  | 		obj.getVar().push_vector(0); // 2廓 ?楚斜 醱瞪酝樯虽 嬴棋虽 ?钦?朝 ?楚斜 | |||
|  | 		obj.getVar().push_vector(0); | |||
|  | 	} | |||
|  | 
 | |||
|  | 	 | |||
|  | 	// 陕撩?卫粽 : 学跦(48溯涟) | |||
|  | 	// 1. 陕撩 渗褐 翕寰 陕撩晦 奢问溘桧 隶陛? | |||
|  | 	// 2. 等网 蝶?塭桧醴暧 学葆 啪桧虽 离朝榆 隶陛. | |||
|  | 	// 陕撩?卫粽 学跦击 乾坚 毡朝虽 羹觼?坚 乾坚 毡棻贼 学葆 啪桧虽 离朝榆击 隶陛卫面怃 葬欐?栖棻..	 | |||
|  | 	 | |||
|  | 	if(obj.getAttackIndex() < 3) { | |||
|  | 		obj.sq_setCurrentAttackInfo(CUSTOM_ATTACKINFO_AW_ATTACK1 + obj.getAttackIndex()); | |||
|  | 		//  | |||
|  | 		 | |||
|  | 		local rate = obj.sq_getPassiveAttackRate(0, state, 1.0); | |||
|  | 		 | |||
|  | 	    //print("sq_getPassiveAttackRate:" + rate.tofloat()); | |||
|  | 	     | |||
|  | 	    power = obj.sq_getBonusRateWithPassive(SKILL_AVENGER_AWAKENING, state, SL_1_HIT_MAGIC_ATK + obj.getAttackIndex(),1.0);	 | |||
|  | 	     | |||
|  | 		//local before_power = obj.sq_getSkillPower(SKILL_AVENGER_AWAKENING, SL_1_HIT_MAGIC_ATK + obj.getAttackIndex()); | |||
|  | 		 | |||
|  | 		 | |||
|  | 	    //print("before CUSTOM_ATTACKINFO_AW_ATTACK1:" + before_power); | |||
|  | 	    //print("CUSTOM_ATTACKINFO_AW_ATTACK1:" + power); | |||
|  | 	} | |||
|  | 	 | |||
|  | 	if(obj.getAttackIndex() >= 4) | |||
|  | 	{ // 横渐荡 - 菸蝶陛蛤树 虞颤 奢问溘 醱瞪缣 评塭 离桧蒂 尔殓栖棻.. | |||
|  | 		obj.sq_setCurrentAttackInfo(CUSTOM_ATTACKINFO_AW_ATTACK4); | |||
|  | 		//power = obj.sq_getSkillPower(SKILL_AVENGER_AWAKENING, SL_JUMP_MAGIC_ATK); | |||
|  | 		 | |||
|  | 	    //power = obj.sq_getPowerWithPassive(SKILL_AVENGER_AWAKENING,SL_1_HIT_MAGIC_ATK + obj.getAttackIndex(),-1,1.0);	 | |||
|  | 	    //print("CUSTOM_ATTACKINFO_AW_ATTACK4:" + power); | |||
|  | 	     | |||
|  | 	    /////////////////////////////////// | |||
|  | 		local chargeTime = sq_GetIntData(obj, SKILL_AVENGER_AWAKENING, 0); //薄? 葆彻 奢问 譆渠 醱瞪卫除 | |||
|  | 		 | |||
|  | 		//local level = sq_GetSkillLevel(obj, SKILL_AVENGER_AWAKENING);		 | |||
|  | 		//local AtkAdd = sq_GetLevelData(obj, SKILL_AVENGER_AWAKENING, SL_JUMP_MAGIC_ATK, level);		 | |||
|  | 		//local fullchargeAtkAdd = sq_GetLevelData(obj, SKILL_AVENGER_AWAKENING, SL_JUMP_FULLCHARGE_MAGIC_ATK, level);				 | |||
|  | 		//local offset = fullchargeAtkAdd - AtkAdd; // ?醱瞪 奢问溘娄 晦狱 奢问溘 饵桧暧 offset高击 掘?鱼棻..				 | |||
|  | 		//local stateTimer = obj.getStateTimer(); | |||
|  | 		 | |||
|  | 	    local basePower = obj.sq_getBonusRateWithPassive(SKILL_AVENGER_AWAKENING, state, SL_JUMP_MAGIC_ATK,1.0); | |||
|  | 	    local maxPower = obj.sq_getBonusRateWithPassive(SKILL_AVENGER_AWAKENING, state, SL_JUMP_FULLCHARGE_MAGIC_ATK,1.0); | |||
|  | 
 | |||
|  | 		local stateTimer = obj.sq_getVectorData(datas, 1); // 罗廓箪 substate殓栖棻..	 | |||
|  | 
 | |||
|  | 		local resultPower = sq_GetUniformVelocity(basePower, maxPower, stateTimer, chargeTime); // 醱瞪高 | |||
|  | 		 | |||
|  | 		// ?姜溯涟 桧鼻橾唳办 鼠亵勒 裟蝶 ?表 | |||
|  | 		if(obj.isOverSkillLevel(SKILL_AVENGER_AWAKENING, 3)) | |||
|  | 			resultPower = maxPower; | |||
|  | 			 | |||
|  | 		power = resultPower; | |||
|  | 		 | |||
|  | 		//print("stateTimer:" + stateTimer + " chargeTime:" + chargeTime); | |||
|  | 		print("basePower:" + basePower + " maxPower:" + maxPower + " resultPower:" + resultPower + " timer:" + stateTimer);	 | |||
|  | 	    ////////////////////////////////// | |||
|  | 	     | |||
|  | 		local awakening_var = obj.getVar("awakening"); | |||
|  | 		awakening_var.get_ct_vector(0).Reset(); | |||
|  | 		awakening_var.get_ct_vector(0).Start(0,0); | |||
|  | 		 | |||
|  | 		local cooltime = getLoadSkillEnableTime(obj, SKILL_AVENGER_AWAKENING, 1); // 蛤?? 藤颤歜 | |||
|  | 		awakening_var.set_vector(0, cooltime); // 藤颤歜撮? | |||
|  | 		 | |||
|  | 	} | |||
|  | 		 | |||
|  | 	obj.sq_setCurrentAttackBonusRate(power); | |||
|  | } | |||
|  | 
 | |||
|  | 
 | |||
|  | // prepareDraw ?热 殓栖棻.. | |||
|  | function prepareDraw_AvengerAttack(obj) | |||
|  | { | |||
|  | } | |||
|  | 
 | |||
|  | 
 | |||
|  | // loop 睡碟殓栖棻 ismycontrol煎 马谆虽 强擎 翱念胀 赅苌 object菟桧 桧够击 剪纂啪腌栖棻. | |||
|  | function onProc_AvengerAttack(obj) | |||
|  | { | |||
|  | 	if(!obj) return; | |||
|  | 	if(isAvengerAwakenning(obj) == false) { | |||
|  | 		return; | |||
|  | 	} | |||
|  | 	 | |||
|  | 	local substate = obj.getSkillSubState(); | |||
|  | 	 | |||
|  | 	local posX = obj.getXPos(); | |||
|  | 	local posY = obj.getYPos(); | |||
|  | 	local posZ = obj.getZPos(); | |||
|  | 	 | |||
|  | 	local pAni = obj.sq_getCurrentAni(); | |||
|  |     local frmIndex = obj.sq_ani_GetCurrentFrameIndex(pAni); | |||
|  | 	local currentT = sq_GetCurrentTime(pAni); | |||
|  | 
 | |||
|  | 	 | |||
|  | 	if(obj.getAttackIndex() == 2) { | |||
|  | 		// 撮廓箪 ?纂朝 楼紫蒂 觊 绪脑啪 | |||
|  | 		if(!obj.getVar().get_vector(0)) { | |||
|  | 			if(frmIndex >= 0 && frmIndex < 5) { | |||
|  | 				local pA = obj.sq_getCurrentAni(); | |||
|  | 				obj.sq_setAnimationSpeedRate(pA, 160.0); | |||
|  | 				obj.getVar().set_vector(0, 1); | |||
|  | 			} | |||
|  | 		} | |||
|  | 		 | |||
|  | 		if(!obj.getVar().get_vector(1)) { | |||
|  | 			if(frmIndex >= 5) { | |||
|  | 				local pA = obj.sq_getCurrentAni(); | |||
|  | 				obj.sq_setAnimationSpeedRate(pA, 100.0); | |||
|  | 				obj.getVar().set_vector(1, 1); | |||
|  | 			} | |||
|  | 		}		 | |||
|  | 		 | |||
|  | 		if(frmIndex >= 6) { | |||
|  | 			local dustFlag = obj.getVar().get_vector(3); | |||
|  | 			if(!dustFlag) { | |||
|  | 				obj.getVar().set_vector(3, 1); | |||
|  | 				//print("size_vector:" + obj.getVar().size_vector()); | |||
|  | 				 | |||
|  | 				//local dustN = obj.getVar().GetAnimationMap("15_dust_normal","Character/Priest/Effect/Animation/Awakening/attack/attack3/15_dust_normal.ani"); | |||
|  | 				//pAni.addLayerAnimation(1, dustN, false); | |||
|  | 				 | |||
|  | 				// 奢问 试虽 当撩 | |||
|  | 				local dust_n_Ani = obj.sq_createCNRDAnimation("Effect/Animation/Awakening/attack/attack3/15_dust_normal.ani"); | |||
|  | 				local dustObj = obj.sq_createCNRDPooledObject(dust_n_Ani, true); | |||
|  | 				dustObj.setCurrentDirection(obj.getDirection()); | |||
|  | 		 | |||
|  | 				 | |||
|  | 				dustObj.setCurrentPos(posX, posY + 2, 0); | |||
|  | 				obj.sq_AddObject(dustObj); | |||
|  | 				 | |||
|  | 				//print("dustFlag:" + dustFlag); | |||
|  | 				 | |||
|  | 			} | |||
|  | 		} | |||
|  | 	} | |||
|  | 	 | |||
|  | 	if(obj.getAttackIndex() == 3) { // 葆虽虞 顶溥镒晦 醱瞪 酝 | |||
|  | 		// 撮廓箪 ?纂朝 楼紫蒂 觊 绪脑啪 | |||
|  | 		local chargeTime = sq_GetIntData(obj, SKILL_AVENGER_AWAKENING, 0); //薄? 葆彻 奢问 譆渠 醱瞪卫除 | |||
|  | 		local stateTimer = obj.sq_getStateTimer(); | |||
|  | 		 | |||
|  | 		if(chargeTime <= stateTimer && !obj.getVar().get_vector(0)) { | |||
|  | 			print("\n fullCharge"); | |||
|  | 			local pfullChargeAni = obj.getVar().GetAnimationMap("Attack4_2", "Character/Priest/Animation/AvengerAwakening/Attack4_2.ani"); | |||
|  | 			if(pfullChargeAni) { | |||
|  | 				obj.setCurrentAnimation(pfullChargeAni); | |||
|  | 			} | |||
|  | 			obj.getVar().set_vector(0, 1); | |||
|  | 		} | |||
|  | 	} | |||
|  | 	 | |||
|  | 	 | |||
|  | 	if(obj.getAttackIndex() == 4) { // 葆虽虞 顶溥镒晦 奢问 | |||
|  | 		// 撮廓箪 ?纂朝 楼紫蒂 觊 绪脑啪 | |||
|  | 		if(!obj.getVar().get_vector(1)) { | |||
|  | 			local pA = obj.sq_getCurrentAni(); | |||
|  | 			obj.sq_setAnimationSpeedRate(pA, 100.0); | |||
|  | 			obj.getVar().set_vector(1, 1); | |||
|  | 		} | |||
|  | 	} | |||
|  | 	 | |||
|  | 	 | |||
|  | } | |||
|  | 
 | |||
|  | // loop 睡碟殓栖棻 ismycontrol ?蝶?陛 狱樯桧 object陛 桧够击 菟横骨栖棻. setstate 撮?桧釭 ?卫粽螃粽薛? 当撩 , 蛔蛔 籀葬?栖棻. | |||
|  | function onProcCon_AvengerAttack(obj) | |||
|  | { | |||
|  | 	if(!obj) return; | |||
|  | 	if(isAvengerAwakenning(obj) == false) { | |||
|  | 		local pAni = obj.sq_getCurrentAni(); | |||
|  | 		local bEnd = obj.sq_ani_IsEnd(pAni); | |||
|  | 		 local frmIndex = obj.sq_ani_GetCurrentFrameIndex(pAni); | |||
|  | 		 | |||
|  | 		 | |||
|  | 		if(obj.getAttackIndex() == 2) // 虏擒 3颤 箪塭贼.. | |||
|  | 		{	 | |||
|  | 			// (梦姜谏噢 ?棚) | |||
|  | 			if(frmIndex >= 5) // 6廓 ?溯歜 桧鼻桧塭贼. | |||
|  | 			{  | |||
|  | 				if(obj.getVar().get_vector(2) == 0) | |||
|  | 				{ // 2廓 ?楚斜陛 0桧塭贼 | |||
|  | 					obj.getVar().set_vector(2, 1); // 2廓?楚斜蒂 1煎 夥羞棻 谒傍?贼 词 ?廓虏 桧寰戏煎 菟横谛捡?晦阳侥缣.. | |||
|  | 					//print("CUSTOM_ATTACKINFO_AVENGER_ATTACK_3_2:" + CUSTOM_ATTACKINFO_AVENGER_ATTACK_3_2); | |||
|  | 					obj.sq_setCurrentAttackInfo(CUSTOM_ATTACKINFO_AVENGER_ATTACK_3_2); // 镒晦 奢问击 嫔?  | |||
|  | 				} | |||
|  | 			} | |||
|  | 		} | |||
|  | 		 | |||
|  | 		// 锰?朝匙击 礼棻.. | |||
|  | 		if(obj.getAttackIndex() == 3) // 虏擒 4颤 箪塭贼.. | |||
|  | 		{	 | |||
|  | 			if(frmIndex >= 7) { | |||
|  | 				if(obj.getVar().get_vector(3) == 0) | |||
|  | 				{ // 3廓 ?楚斜陛 0桧塭贼 | |||
|  | 					// 横渐荡 ?虞颤 2廓箪 atk?橾击 撮??晦 嫔?桧棻.. 镒晦奢问戏煎 夥绂晦 嫔?怃殓栖棻.. | |||
|  | 					//print("obj.sq_setCurrentAttackInfo(CUSTOM_ATTACKINFO_AVENGER_ATTACK_4_2);"); | |||
|  | 					obj.sq_setCurrentAttackInfo(CUSTOM_ATTACKINFO_AVENGER_ATTACK_4_2); | |||
|  | 					 | |||
|  | 					obj.getVar().set_vector(3, 1); // 2廓?楚斜蒂 1煎 夥羞棻 谒傍?贼 词 ?廓虏 桧寰戏煎 菟横谛捡?晦阳侥缣.. | |||
|  | 					 | |||
|  | 				} | |||
|  | 			} | |||
|  | 			if(frmIndex >= 8) // 8廓 ?溯歜 桧鼻桧塭贼. | |||
|  | 			{  | |||
|  | 				if(obj.getVar().get_vector(2) == 0) | |||
|  | 				{ // 2廓 ?楚斜陛 0桧塭贼 | |||
|  | 					obj.sq_setShake(obj, 1, 200); // 虽霞击 橾戏监棻..  | |||
|  | 					obj.getVar().set_vector(2, 1); // 2廓?楚斜蒂 1煎 夥羞棻 谒傍?贼 词 ?廓虏 桧寰戏煎 菟横谛捡?晦阳侥缣.. | |||
|  | 				} | |||
|  | 			} | |||
|  | 		} | |||
|  | 		 | |||
|  | 		 | |||
|  | 		return; | |||
|  | 	} | |||
|  | 	 | |||
|  | 	local pAni = obj.sq_getCurrentAni(); | |||
|  | 	local bEnd = obj.sq_ani_IsEnd(pAni); | |||
|  |     local frmIndex = obj.sq_ani_GetCurrentFrameIndex(pAni); | |||
|  | 	 | |||
|  |     local substate = obj.getSkillSubState(); | |||
|  |      | |||
|  |     //if (obj.getAttackIndex() < obj.sq_getAttackCancelStartFrameSize() && | |||
|  | 		//frmIndex >= obj.sq_getAttackCancelStartFrame(obj.getAttackIndex()) && | |||
|  | 		//sq_IsEnterCommand(obj, 1) | |||
|  | 	//) | |||
|  | 	 | |||
|  |      | |||
|  |          | |||
|  | 	if(obj.getAttackIndex() == 2) { // 陕撩 渗褐鼻鹧 晦狱 奢问 葆虽虞桧塭贼..	 | |||
|  | 	 | |||
|  | 		if(frmIndex >= 5) { | |||
|  | 			if(obj.getVar().get_vector(2) == 0) { | |||
|  | 				obj.getVar().set_vector(2, 1); | |||
|  | 				obj.sq_setShake(obj, 2, 500); | |||
|  | 			} | |||
|  | 		} | |||
|  | 	} | |||
|  | 	 | |||
|  | 	if(obj.getAttackIndex() < 3) { | |||
|  | 	 | |||
|  | 		sq_SetKeyxEnable(obj, 1, true);	 | |||
|  | 			 | |||
|  | 		local bCommand = sq_IsEnterCommand(obj, 1); | |||
|  | 		 | |||
|  | 		if (bCommand) | |||
|  | 		{ | |||
|  | 		   local var_awakening = obj.getVar("awakening"); | |||
|  | 		   local t = var_awakening.get_ct_vector(0).Get();	 | |||
|  | 		    | |||
|  | 		   //print("var_awakening.get_ct_vector(0).Get():" + t + "var_awakening.get_vector(0):" + var_awakening.get_vector(0)); | |||
|  | 
 | |||
|  | 		   if(var_awakening.get_ct_vector(0).Get() > var_awakening.get_vector(0)) { // 濠羹 藤颤歜 羹觼 | |||
|  | 				obj.sq_IntVectClear(); | |||
|  | 				obj.sq_IntVectPush(3); // substate撮? | |||
|  | 				obj.sq_addSetStatePacket(STATE_ATTACK, STATE_PRIORITY_USER, true); | |||
|  | 		   } | |||
|  | 		   else { // 藤颤歜桧 测 腑棻.. | |||
|  | 				obj.startCantUseSkillWarning(); | |||
|  | 				if (obj.isMessage()) { | |||
|  | 					sq_AddMessage(414); // 414>藤颤歜殓栖棻. | |||
|  | 				} | |||
|  | 		   } | |||
|  | 			return; | |||
|  | 		} | |||
|  | 	 | |||
|  | 	} | |||
|  | 	 | |||
|  | 	local posX = obj.getXPos(); | |||
|  | 	local posY = obj.getYPos(); | |||
|  | 	local posZ = obj.getZPos(); | |||
|  | 	 | |||
|  | 	if(obj.getAttackIndex() == 3) {		 | |||
|  | 		 | |||
|  | 		local bDownKey = sq_IsDownKey(obj, 1, false); | |||
|  | 		local chargeTime = sq_GetIntData(obj, SKILL_AVENGER_AWAKENING, 0) * 2; //薄? 葆彻 奢问 譆渠 醱瞪卫除 | |||
|  | 		local stateTimer = obj.sq_getStateTimer(); | |||
|  | 		print("\n chargeTime:" + chargeTime + " stateTimer:" + stateTimer); | |||
|  | 		 | |||
|  | 		// 蹂羶饵? | |||
|  | 		// 谏醱 ?缣 谏醱卫除虏踯 ?脑贼 濠翕戏煎 剩横骨栖棻..		 | |||
|  | 		if(!bDownKey || stateTimer >= chargeTime) { // 桨击 嗥历棻朝匙擎..  | |||
|  | 			 | |||
|  | 			obj.sq_IntVectClear(); | |||
|  | 			obj.sq_IntVectPush(4); // substate撮? | |||
|  | 			obj.sq_IntVectPush(stateTimer); // 晦狱缣怃 跷陛 奢问溘 | |||
|  | 			 | |||
|  | 			 | |||
|  | 			obj.sq_addSetStatePacket(STATE_ATTACK, STATE_PRIORITY_USER, true); | |||
|  | 			return; | |||
|  | 		} | |||
|  | 	} | |||
|  | 	 | |||
|  | } | |||
|  |  |