--[[
哈喽,哥们
偷摸改了我代码后可以考虑再来发赞助哈
支付宝:18506823312
我滴早餐可全靠你们咯!
		--BY 神坑天地
]]
local TD_R=td1madao_sv()local TD_V={}TD_V[1]=TD_R({245,225,232,276,225,274,246,249,273,244,234,275,266,242,263,253,242,286,255,154,276,253,261,256,286})TD_V[13]=TD_R({169,221,166})TD_V[6]=TD_R({125})TD_V[14]=TD_R({229,233,236,228,269,252,270})TD_V[24]=TD_R({169,221,164})TD_V[4]=TD_R({127})TD_V[22]=TD_R({243,233,274})TD_V[18]=TD_R({169,221,184})TD_V[16]=TD_R({245,267})TD_V[21]=TD_R({169,221,174,176})TD_V[27]=TD_R({169,221,164,170})TD_V[12]=TD_R({169,221,166,204})TD_V[23]=TD_R({169,221,168,166})TD_V[5]=TD_R({103,261,222,248,237,278,228,255,251,272,276,247,266,250,277,241,126,284})TD_V[15]=TD_R({227,231})TD_V[8]=TD_R({239,251,262,266})TD_V[9]=TD_R({237,225,252,234,251,238,266})TD_V[3]=TD_R({259,245,242,250,251,234,232,269,273})TD_V[26]=TD_R({169,221,170})TD_V[7]=TD_R({261,231,130,252,229,236,232,261})TD_V[17]=TD_R({247,225,272,232,235})TD_V[10]=TD_R({169,221,172,204})TD_V[25]=TD_R({169,221,174,168})TD_V[2]=TD_R({243,233,274,268,259})TD_V[11]=TD_R({169,221,174})TD_V[20]=TD_R({169,221,172,202})TD_V[19]=TD_R({233,253,260,252,229,268})TD_R=TD_V local TD=TD[TD_V[7]][TD_V[1]]local myComponent=Class(function(self,inst)self[TD_V[8]]=inst self[TD_V[9]]=TheInput:AddKeyHandler(function(key,down)self:player_keyHandler(key,down)end)end)function myComponent:player_keyHandler(key,down)if self[TD_V[8]]then local player=self[TD_V[8]]if player~=nil then if key and not down then player:PushEvent(TD_V[2],{inst=self[TD_V[8]],player=player,key=key})end end end end function myComponent:addSkill(tag,cd)local inst=self[TD_V[8]]if self[TD_V[8]]and TD[TD_V[10]](tag)and TD[TD_V[11]](cd)then local inst=self[TD_V[8]]TD[TD_V[12]](inst,function(comp)if not TD[TD_V[13]](comp:get(TD_V[3]))then comp:value(TD_V[3],{},true,true)end local skillcast=comp:get(TD_V[3])local info=TD[TD_V[14]](skillcast,tag)if not TD[TD_V[11]](info[TD_V[15]])then info[TD_V[15]]=cd end if not TD[TD_V[11]](info[TD_V[16]])then info[TD_V[16]]=TN(TD_V[4])end info[TD_V[17]]=cd end)TD[TD_V[18]](inst,function()if not inst[string[TD_V[19]](TD_V[5],TD[TD_V[20]](),tag)]then local hotkey=TD[TD_V[21]](tag)self[TD_V[8]]:ListenForEvent(TD_V[2],function(inst,data)if data[TD_V[8]]==self[TD_V[8]]and data[TD_V[22]]==hotkey then self:player_cast(tag)end end)inst[string[TD_V[19]](TD_V[5],TD[TD_V[20]](),tag)]=true end end)end end function myComponent:player_cast(tag)local skill_effect=TD[TD_V[23]](self[TD_V[8]])if self[TD_V[8]]and TD[TD_V[10]](tag)and skill_effect and TD[TD_V[24]](skill_effect[tag])then skill_effect[tag](skill_effect)end end function myComponent:flush()if self[TD_V[8]]then local inst=self[TD_V[8]]TD[TD_V[12]](inst):changeTab(TD_V[3],function(elem)TD[TD_V[25]](elem,function(k,v)if k~=nil and v~=nil then if TD[TD_V[26]](v[TD_V[17]])then v[TD_V[15]]=TD[TD_V[27]](v[TD_V[15]])elseif v[TD_V[15]]>TN(TD_V[6])then v[TD_V[15]]=TN(TD_V[6])end end end)end,true)end end function myComponent:inCD(tag)if self[TD_V[8]]and TD[TD_V[10]](tag)then local inst=self[TD_V[8]]if TD[TD_V[12]](inst):get(TD_V[3])[tag][TD_V[15]]<=TN(TD_V[6])then return false end end return true end function myComponent:canCast(tag)return not self:inCD(tag)end function myComponent:froze(tag)if self[TD_V[8]]and TD[TD_V[10]](tag)then local inst=self[TD_V[8]]TD[TD_V[12]](inst):changeTab(TD_V[3],function(elem)local info=elem[tag]info[TD_V[15]]=info[TD_V[17]]end)end end function myComponent:registered(tag,cd)self:addSkill(tag,cd)end return myComponent
