技能加速
This commit is contained in:
parent
8fc0090b76
commit
54174019ee
@ -348,7 +348,12 @@ local skill = {
|
|||||||
["name_act"]="skill01",
|
["name_act"]="skill01",
|
||||||
["fx_self"]=300008,
|
["fx_self"]=300008,
|
||||||
["fx_target"]=4,
|
["fx_target"]=4,
|
||||||
["fx_target_delay"]=1100
|
["fx_target_delay"]=1100,
|
||||||
|
["bullet_time"]={
|
||||||
|
866,
|
||||||
|
3000,
|
||||||
|
700
|
||||||
|
}
|
||||||
},
|
},
|
||||||
[2200121]={
|
[2200121]={
|
||||||
["energy"]=10,
|
["energy"]=10,
|
||||||
@ -394,7 +399,12 @@ local skill = {
|
|||||||
["name_act"]="skill01",
|
["name_act"]="skill01",
|
||||||
["fx_self"]=300008,
|
["fx_self"]=300008,
|
||||||
["fx_target"]=4,
|
["fx_target"]=4,
|
||||||
["fx_target_delay"]=1100
|
["fx_target_delay"]=1100,
|
||||||
|
["bullet_time"]={
|
||||||
|
866,
|
||||||
|
3000,
|
||||||
|
700
|
||||||
|
}
|
||||||
},
|
},
|
||||||
[2300110]={
|
[2300110]={
|
||||||
["position"]=2,
|
["position"]=2,
|
||||||
@ -1053,7 +1063,7 @@ local skill = {
|
|||||||
["link"]=1,
|
["link"]=1,
|
||||||
["position"]=4,
|
["position"]=4,
|
||||||
["method"]=2,
|
["method"]=2,
|
||||||
["skill_type"]=1,
|
["skill_type"]=4,
|
||||||
["boardrange"]={
|
["boardrange"]={
|
||||||
{
|
{
|
||||||
["type"]=1,
|
["type"]=1,
|
||||||
|
|||||||
@ -59,7 +59,7 @@ local skill_rogue = {
|
|||||||
["universal"]=1,
|
["universal"]=1,
|
||||||
["limit_times"]=3,
|
["limit_times"]=3,
|
||||||
["weight"]=3000,
|
["weight"]=3000,
|
||||||
["qlt"]=3,
|
["qlt"]=2,
|
||||||
["type"]=5,
|
["type"]=5,
|
||||||
["attr"]={
|
["attr"]={
|
||||||
["type"]="atkp_red_add",
|
["type"]="atkp_red_add",
|
||||||
@ -73,7 +73,7 @@ local skill_rogue = {
|
|||||||
["universal"]=1,
|
["universal"]=1,
|
||||||
["limit_times"]=2,
|
["limit_times"]=2,
|
||||||
["weight"]=2000,
|
["weight"]=2000,
|
||||||
["qlt"]=4,
|
["qlt"]=3,
|
||||||
["type"]=5,
|
["type"]=5,
|
||||||
["attr"]={
|
["attr"]={
|
||||||
["type"]="atkp_red_add",
|
["type"]="atkp_red_add",
|
||||||
@ -101,7 +101,7 @@ local skill_rogue = {
|
|||||||
["universal"]=1,
|
["universal"]=1,
|
||||||
["limit_times"]=3,
|
["limit_times"]=3,
|
||||||
["weight"]=3000,
|
["weight"]=3000,
|
||||||
["qlt"]=3,
|
["qlt"]=2,
|
||||||
["type"]=5,
|
["type"]=5,
|
||||||
["attr"]={
|
["attr"]={
|
||||||
["type"]="atkp_yellow_add",
|
["type"]="atkp_yellow_add",
|
||||||
@ -115,7 +115,7 @@ local skill_rogue = {
|
|||||||
["universal"]=1,
|
["universal"]=1,
|
||||||
["limit_times"]=2,
|
["limit_times"]=2,
|
||||||
["weight"]=2000,
|
["weight"]=2000,
|
||||||
["qlt"]=4,
|
["qlt"]=3,
|
||||||
["type"]=5,
|
["type"]=5,
|
||||||
["attr"]={
|
["attr"]={
|
||||||
["type"]="atkp_yellow_add",
|
["type"]="atkp_yellow_add",
|
||||||
@ -143,7 +143,7 @@ local skill_rogue = {
|
|||||||
["universal"]=1,
|
["universal"]=1,
|
||||||
["limit_times"]=3,
|
["limit_times"]=3,
|
||||||
["weight"]=3000,
|
["weight"]=3000,
|
||||||
["qlt"]=3,
|
["qlt"]=2,
|
||||||
["type"]=5,
|
["type"]=5,
|
||||||
["attr"]={
|
["attr"]={
|
||||||
["type"]="atkp_green_add",
|
["type"]="atkp_green_add",
|
||||||
@ -157,7 +157,7 @@ local skill_rogue = {
|
|||||||
["universal"]=1,
|
["universal"]=1,
|
||||||
["limit_times"]=2,
|
["limit_times"]=2,
|
||||||
["weight"]=2000,
|
["weight"]=2000,
|
||||||
["qlt"]=4,
|
["qlt"]=3,
|
||||||
["type"]=5,
|
["type"]=5,
|
||||||
["attr"]={
|
["attr"]={
|
||||||
["type"]="atkp_green_add",
|
["type"]="atkp_green_add",
|
||||||
@ -185,7 +185,7 @@ local skill_rogue = {
|
|||||||
["universal"]=1,
|
["universal"]=1,
|
||||||
["limit_times"]=3,
|
["limit_times"]=3,
|
||||||
["weight"]=3000,
|
["weight"]=3000,
|
||||||
["qlt"]=3,
|
["qlt"]=2,
|
||||||
["type"]=5,
|
["type"]=5,
|
||||||
["attr"]={
|
["attr"]={
|
||||||
["type"]="atkp_blue_add",
|
["type"]="atkp_blue_add",
|
||||||
@ -199,7 +199,7 @@ local skill_rogue = {
|
|||||||
["universal"]=1,
|
["universal"]=1,
|
||||||
["limit_times"]=2,
|
["limit_times"]=2,
|
||||||
["weight"]=2000,
|
["weight"]=2000,
|
||||||
["qlt"]=4,
|
["qlt"]=3,
|
||||||
["type"]=5,
|
["type"]=5,
|
||||||
["attr"]={
|
["attr"]={
|
||||||
["type"]="atkp_blue_add",
|
["type"]="atkp_blue_add",
|
||||||
@ -227,7 +227,7 @@ local skill_rogue = {
|
|||||||
["universal"]=1,
|
["universal"]=1,
|
||||||
["limit_times"]=3,
|
["limit_times"]=3,
|
||||||
["weight"]=3000,
|
["weight"]=3000,
|
||||||
["qlt"]=3,
|
["qlt"]=2,
|
||||||
["type"]=5,
|
["type"]=5,
|
||||||
["attr"]={
|
["attr"]={
|
||||||
["type"]="atkp_purple_add",
|
["type"]="atkp_purple_add",
|
||||||
@ -241,7 +241,7 @@ local skill_rogue = {
|
|||||||
["universal"]=1,
|
["universal"]=1,
|
||||||
["limit_times"]=2,
|
["limit_times"]=2,
|
||||||
["weight"]=2000,
|
["weight"]=2000,
|
||||||
["qlt"]=4,
|
["qlt"]=3,
|
||||||
["type"]=5,
|
["type"]=5,
|
||||||
["attr"]={
|
["attr"]={
|
||||||
["type"]="atkp_purple_add",
|
["type"]="atkp_purple_add",
|
||||||
@ -255,7 +255,7 @@ local skill_rogue = {
|
|||||||
["universal"]=1,
|
["universal"]=1,
|
||||||
["limit_times"]=1,
|
["limit_times"]=1,
|
||||||
["weight"]=1500,
|
["weight"]=1500,
|
||||||
["qlt"]=3,
|
["qlt"]=4,
|
||||||
["type"]=9,
|
["type"]=9,
|
||||||
["effect"]={
|
["effect"]={
|
||||||
{
|
{
|
||||||
@ -345,7 +345,7 @@ local skill_rogue = {
|
|||||||
["universal"]=1,
|
["universal"]=1,
|
||||||
["limit_times"]=3,
|
["limit_times"]=3,
|
||||||
["weight"]=3000,
|
["weight"]=3000,
|
||||||
["qlt"]=2,
|
["qlt"]=3,
|
||||||
["type"]=5,
|
["type"]=5,
|
||||||
["attr"]={
|
["attr"]={
|
||||||
["type"]="cured_add",
|
["type"]="cured_add",
|
||||||
@ -400,7 +400,7 @@ local skill_rogue = {
|
|||||||
[29]={
|
[29]={
|
||||||
["universal"]=1,
|
["universal"]=1,
|
||||||
["weight"]=3000,
|
["weight"]=3000,
|
||||||
["qlt"]=2,
|
["qlt"]=3,
|
||||||
["type"]=9,
|
["type"]=9,
|
||||||
["effect"]={
|
["effect"]={
|
||||||
{
|
{
|
||||||
@ -681,11 +681,11 @@ local skill_rogue = {
|
|||||||
[200102]={
|
[200102]={
|
||||||
["limit_times"]=1,
|
["limit_times"]=1,
|
||||||
["weight"]=3000,
|
["weight"]=3000,
|
||||||
["qlt"]=2,
|
["qlt"]=3,
|
||||||
["type"]=7,
|
["type"]=7,
|
||||||
["parameter"]={
|
["parameter"]={
|
||||||
1,
|
1,
|
||||||
40000
|
30000
|
||||||
},
|
},
|
||||||
["skill_position"]=3,
|
["skill_position"]=3,
|
||||||
["icon"]="64"
|
["icon"]="64"
|
||||||
@ -718,11 +718,11 @@ local skill_rogue = {
|
|||||||
[200201]={
|
[200201]={
|
||||||
["limit_times"]=1,
|
["limit_times"]=1,
|
||||||
["weight"]=3000,
|
["weight"]=3000,
|
||||||
["qlt"]=2,
|
["qlt"]=3,
|
||||||
["type"]=7,
|
["type"]=7,
|
||||||
["parameter"]={
|
["parameter"]={
|
||||||
1,
|
1,
|
||||||
40000
|
30000
|
||||||
},
|
},
|
||||||
["skill_position"]=2,
|
["skill_position"]=2,
|
||||||
["icon"]="65"
|
["icon"]="65"
|
||||||
@ -772,7 +772,7 @@ local skill_rogue = {
|
|||||||
[200301]={
|
[200301]={
|
||||||
["limit_times"]=1,
|
["limit_times"]=1,
|
||||||
["weight"]=1000,
|
["weight"]=1000,
|
||||||
["qlt"]=4,
|
["qlt"]=3,
|
||||||
["type"]=2,
|
["type"]=2,
|
||||||
["skill_position"]=4,
|
["skill_position"]=4,
|
||||||
["boardrange"]={
|
["boardrange"]={
|
||||||
@ -787,7 +787,7 @@ local skill_rogue = {
|
|||||||
["limit_times"]=1,
|
["limit_times"]=1,
|
||||||
["weight"]=3000,
|
["weight"]=3000,
|
||||||
["qlt"]=2,
|
["qlt"]=2,
|
||||||
["type"]=11,
|
["type"]=3,
|
||||||
["skill_position"]=4,
|
["skill_position"]=4,
|
||||||
["effect"]={
|
["effect"]={
|
||||||
{
|
{
|
||||||
@ -825,7 +825,7 @@ local skill_rogue = {
|
|||||||
[200401]={
|
[200401]={
|
||||||
["limit_times"]=1,
|
["limit_times"]=1,
|
||||||
["weight"]=3000,
|
["weight"]=3000,
|
||||||
["qlt"]=2,
|
["qlt"]=3,
|
||||||
["type"]=7,
|
["type"]=7,
|
||||||
["parameter"]={
|
["parameter"]={
|
||||||
1,
|
1,
|
||||||
@ -837,7 +837,7 @@ local skill_rogue = {
|
|||||||
[200402]={
|
[200402]={
|
||||||
["limit_times"]=1,
|
["limit_times"]=1,
|
||||||
["weight"]=1000,
|
["weight"]=1000,
|
||||||
["qlt"]=4,
|
["qlt"]=3,
|
||||||
["type"]=8,
|
["type"]=8,
|
||||||
["parameter"]={
|
["parameter"]={
|
||||||
1,
|
1,
|
||||||
@ -849,7 +849,7 @@ local skill_rogue = {
|
|||||||
[200403]={
|
[200403]={
|
||||||
["limit_times"]=1,
|
["limit_times"]=1,
|
||||||
["weight"]=2000,
|
["weight"]=2000,
|
||||||
["qlt"]=3,
|
["qlt"]=4,
|
||||||
["type"]=1,
|
["type"]=1,
|
||||||
["parameter"]={
|
["parameter"]={
|
||||||
5200121
|
5200121
|
||||||
@ -928,7 +928,7 @@ local skill_rogue = {
|
|||||||
[200601]={
|
[200601]={
|
||||||
["limit_times"]=1,
|
["limit_times"]=1,
|
||||||
["weight"]=3000,
|
["weight"]=3000,
|
||||||
["qlt"]=2,
|
["qlt"]=3,
|
||||||
["type"]=7,
|
["type"]=7,
|
||||||
["parameter"]={
|
["parameter"]={
|
||||||
1,
|
1,
|
||||||
@ -1025,7 +1025,7 @@ local skill_rogue = {
|
|||||||
[200703]={
|
[200703]={
|
||||||
["limit_times"]=1,
|
["limit_times"]=1,
|
||||||
["weight"]=1000,
|
["weight"]=1000,
|
||||||
["qlt"]=3,
|
["qlt"]=4,
|
||||||
["type"]=2,
|
["type"]=2,
|
||||||
["skill_position"]=2,
|
["skill_position"]=2,
|
||||||
["boardrange"]={
|
["boardrange"]={
|
||||||
@ -1070,7 +1070,7 @@ local skill_rogue = {
|
|||||||
[200802]={
|
[200802]={
|
||||||
["limit_times"]=1,
|
["limit_times"]=1,
|
||||||
["weight"]=3000,
|
["weight"]=3000,
|
||||||
["qlt"]=2,
|
["qlt"]=3,
|
||||||
["type"]=7,
|
["type"]=7,
|
||||||
["parameter"]={
|
["parameter"]={
|
||||||
1,
|
1,
|
||||||
|
|||||||
@ -162,7 +162,7 @@ local skill_rogue = {
|
|||||||
["desc"]="元素链接随机消除元素增加<color=#3cff28>2</color>个"
|
["desc"]="元素链接随机消除元素增加<color=#3cff28>2</color>个"
|
||||||
},
|
},
|
||||||
[200302]={
|
[200302]={
|
||||||
["desc"]="被元素链接技能消除的元素造成的伤害提升<color=#3cff28>10%</color>"
|
["desc"]="元素链接使用时本次普攻伤害提升<color=#3cff28>10%</color>"
|
||||||
},
|
},
|
||||||
[200303]={
|
[200303]={
|
||||||
["desc"]="元素链接随机消除元素增加<color=#3cff28>2</color>个"
|
["desc"]="元素链接随机消除元素增加<color=#3cff28>2</color>个"
|
||||||
@ -186,7 +186,7 @@ local skill_rogue = {
|
|||||||
["desc"]="舞步消散上下可多消<color=#3cff28>1</color>格"
|
["desc"]="舞步消散上下可多消<color=#3cff28>1</color>格"
|
||||||
},
|
},
|
||||||
[200502]={
|
[200502]={
|
||||||
["desc"]="跟舞步消散连接线上的元素伤害增加<color=#3cff28>10%</color>"
|
["desc"]="舞步消散使用时本次普攻伤害提升<color=#3cff28>10%</color>"
|
||||||
},
|
},
|
||||||
[200503]={
|
[200503]={
|
||||||
["desc"]="每有1个元素连接舞步消散则本回合格挡增加<color=#3cff28>2%</color>"
|
["desc"]="每有1个元素连接舞步消散则本回合格挡增加<color=#3cff28>2%</color>"
|
||||||
@ -198,7 +198,7 @@ local skill_rogue = {
|
|||||||
["desc"]="快速治愈的<color=#3cff28>恢复量提升</color>"
|
["desc"]="快速治愈的<color=#3cff28>恢复量提升</color>"
|
||||||
},
|
},
|
||||||
[200602]={
|
[200602]={
|
||||||
["desc"]="跟快速治愈连接线上的元素伤害增加<color=#3cff28>10%</color>"
|
["desc"]="快速治愈使用时本次普攻伤害提升<color=#3cff28>10%</color>"
|
||||||
},
|
},
|
||||||
[200603]={
|
[200603]={
|
||||||
["desc"]="连接快速治愈的每一击都将<color=#3cff28>恢复</color>生命值"
|
["desc"]="连接快速治愈的每一击都将<color=#3cff28>恢复</color>生命值"
|
||||||
@ -210,7 +210,7 @@ local skill_rogue = {
|
|||||||
["desc"]="巨剑连斩被连接消除其上下左右<color=#3cff28>4</color>个元素"
|
["desc"]="巨剑连斩被连接消除其上下左右<color=#3cff28>4</color>个元素"
|
||||||
},
|
},
|
||||||
[200702]={
|
[200702]={
|
||||||
["desc"]="跟巨剑连斩连接线上的元素伤害增加<color=#3cff28>10%</color>"
|
["desc"]="巨剑连斩使用时本次普攻伤害提升<color=#3cff28>10%</color>"
|
||||||
},
|
},
|
||||||
[200703]={
|
[200703]={
|
||||||
["desc"]="巨剑连斩被连接消除其斜方向的<color=#3cff28>4</color>个元素"
|
["desc"]="巨剑连斩被连接消除其斜方向的<color=#3cff28>4</color>个元素"
|
||||||
|
|||||||
@ -16,19 +16,14 @@ local tutorial = {
|
|||||||
},
|
},
|
||||||
[10020]={
|
[10020]={
|
||||||
["next_id"]=10030,
|
["next_id"]=10030,
|
||||||
["type"]=4,
|
["delay"]=1.0,
|
||||||
["finish"]=1,
|
|
||||||
["finish_parameter"]=1
|
|
||||||
},
|
|
||||||
[10030]={
|
|
||||||
["next_id"]=10040,
|
|
||||||
["type"]=3,
|
["type"]=3,
|
||||||
["txt"]="tutorial_txt_1",
|
["txt"]="tutorial_txt_1",
|
||||||
["txt_offset"]={
|
["txt_offset"]={
|
||||||
0,
|
0,
|
||||||
110
|
110
|
||||||
},
|
},
|
||||||
["target_name"]="battle_skill_select_ui(Clone)/skill_node/skill_select_cell_1",
|
["target_name"]="battle_ui(Clone)/bg_2/battle_select_skill_comp/skill_node/skill_select_cell_1",
|
||||||
["arrow_direction"]=1,
|
["arrow_direction"]=1,
|
||||||
["arrow_offset"]={
|
["arrow_offset"]={
|
||||||
0,
|
0,
|
||||||
@ -40,8 +35,8 @@ local tutorial = {
|
|||||||
25
|
25
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
[10040]={
|
[10030]={
|
||||||
["next_id"]=10050,
|
["next_id"]=10040,
|
||||||
["type"]=6,
|
["type"]=6,
|
||||||
["finish"]=4,
|
["finish"]=4,
|
||||||
["target_element"]={
|
["target_element"]={
|
||||||
@ -52,13 +47,13 @@ local tutorial = {
|
|||||||
44
|
44
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
[10050]={
|
[10040]={
|
||||||
["next_id"]=10060,
|
["next_id"]=10050,
|
||||||
["type"]=4,
|
["type"]=4,
|
||||||
["finish"]=3
|
["finish"]=3
|
||||||
},
|
},
|
||||||
[10060]={
|
[10050]={
|
||||||
["next_id"]=10070,
|
["next_id"]=10060,
|
||||||
["delay"]=1.0,
|
["delay"]=1.0,
|
||||||
["type"]=6,
|
["type"]=6,
|
||||||
["finish"]=4,
|
["finish"]=4,
|
||||||
@ -70,12 +65,12 @@ local tutorial = {
|
|||||||
34
|
34
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
[10070]={
|
[10060]={
|
||||||
["next_id"]=10080,
|
["next_id"]=10070,
|
||||||
["type"]=4,
|
["type"]=4,
|
||||||
["finish"]=3
|
["finish"]=3
|
||||||
},
|
},
|
||||||
[10080]={
|
[10070]={
|
||||||
["delay"]=1.0,
|
["delay"]=1.0,
|
||||||
["type"]=6,
|
["type"]=6,
|
||||||
["finish"]=4,
|
["finish"]=4,
|
||||||
@ -425,6 +420,6 @@ local tutorial = {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
local config = {
|
local config = {
|
||||||
data=tutorial,count=33
|
data=tutorial,count=32
|
||||||
}
|
}
|
||||||
return config
|
return config
|
||||||
@ -68,6 +68,9 @@ function BattleUnitComp:_initBase()
|
|||||||
self.isMove = false
|
self.isMove = false
|
||||||
self.deadTime = 0
|
self.deadTime = 0
|
||||||
self.attackTime = 0
|
self.attackTime = 0
|
||||||
|
self.skillSlowDownTime = nil -- 开始攻击后,x秒后开始子弹时间
|
||||||
|
self.skillSlowDownDuration = 0 -- 子弹时间持续的时间
|
||||||
|
self.skillSlowDownScale = 1 -- 子弹时间减慢的倍率
|
||||||
self.currAttackDuration = 0
|
self.currAttackDuration = 0
|
||||||
self.currAttackKeyTime = 0
|
self.currAttackKeyTime = 0
|
||||||
self.switchTime = 0
|
self.switchTime = 0
|
||||||
@ -668,6 +671,7 @@ end
|
|||||||
function BattleUnitComp:enterAssistingAttackState()
|
function BattleUnitComp:enterAssistingAttackState()
|
||||||
self.attackOver = false
|
self.attackOver = false
|
||||||
self.attackTime = 0
|
self.attackTime = 0
|
||||||
|
self.skillSlowDownTime = nil
|
||||||
self.isMove = false
|
self.isMove = false
|
||||||
local skill = self.unitEntity:getAssistingSkill()
|
local skill = self.unitEntity:getAssistingSkill()
|
||||||
skill:startUse()
|
skill:startUse()
|
||||||
@ -710,8 +714,17 @@ function BattleUnitComp:enterSkillAttackState()
|
|||||||
local skill
|
local skill
|
||||||
if self.normalSkillCount > 0 then
|
if self.normalSkillCount > 0 then
|
||||||
skill = self.unitEntity:getNormalSkill(true)
|
skill = self.unitEntity:getNormalSkill(true)
|
||||||
|
self.skillSlowDownTime = nil
|
||||||
else
|
else
|
||||||
skill = self.currActiveSkill
|
skill = self.currActiveSkill
|
||||||
|
local slowDownBulletTimeParams = skill:getSlowDownBulletTimeParams()
|
||||||
|
if slowDownBulletTimeParams and #slowDownBulletTimeParams == 3 then
|
||||||
|
self.skillSlowDownTime = slowDownBulletTimeParams[1] / TIME_FACTOR
|
||||||
|
self.skillSlowDownScale = slowDownBulletTimeParams[2] / DEFAULT_FACTOR
|
||||||
|
self.skillSlowDownDuration = slowDownBulletTimeParams[3] / TIME_FACTOR
|
||||||
|
else
|
||||||
|
self.skillSlowDownTime = nil
|
||||||
|
end
|
||||||
end
|
end
|
||||||
skill:startUse()
|
skill:startUse()
|
||||||
if skill:getMoveType() == BattleConst.SKILL_MOVE_TYPE.MOVE then
|
if skill:getMoveType() == BattleConst.SKILL_MOVE_TYPE.MOVE then
|
||||||
@ -727,7 +740,6 @@ function BattleUnitComp:enterSkillAttackState()
|
|||||||
end
|
end
|
||||||
else
|
else
|
||||||
self.isMove = false
|
self.isMove = false
|
||||||
self.attackTime = 0
|
|
||||||
local attackName = skill:getSkillAttackName()
|
local attackName = skill:getSkillAttackName()
|
||||||
if self.normalSkillCount > 0 then
|
if self.normalSkillCount > 0 then
|
||||||
self:attackAndSpeedUp()
|
self:attackAndSpeedUp()
|
||||||
@ -739,6 +751,18 @@ function BattleUnitComp:enterSkillAttackState()
|
|||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
function BattleUnitComp:checkSkillSlowDown(dt)
|
||||||
|
if self.skillSlowDownTime == nil then
|
||||||
|
return
|
||||||
|
end
|
||||||
|
self.skillSlowDownTime = self.skillSlowDownTime - dt
|
||||||
|
if self.skillSlowDownTime >= 0 then
|
||||||
|
return
|
||||||
|
end
|
||||||
|
self.skillSlowDownTime = nil
|
||||||
|
self.battleController:setSkillSlowDown(self.skillSlowDownScale, self.skillSlowDownDuration)
|
||||||
|
end
|
||||||
|
|
||||||
function BattleUnitComp:exitSkillAttackState()
|
function BattleUnitComp:exitSkillAttackState()
|
||||||
end
|
end
|
||||||
|
|
||||||
@ -758,6 +782,7 @@ function BattleUnitComp:updateSkillAttack(dt)
|
|||||||
self.baseObject:setLocalPosition(self.positionX, 0, 0)
|
self.baseObject:setLocalPosition(self.positionX, 0, 0)
|
||||||
return
|
return
|
||||||
end
|
end
|
||||||
|
self:checkSkillSlowDown(dt)
|
||||||
self.attackTime = self.attackTime + dt
|
self.attackTime = self.attackTime + dt
|
||||||
if self.attackTime >= self.currAttackDuration then
|
if self.attackTime >= self.currAttackDuration then
|
||||||
self.attackOver = true
|
self.attackOver = true
|
||||||
@ -878,24 +903,33 @@ end
|
|||||||
function BattleUnitComp:attackAndSpeedUp()
|
function BattleUnitComp:attackAndSpeedUp()
|
||||||
self.attackCount = self.attackCount + 1
|
self.attackCount = self.attackCount + 1
|
||||||
if self.attackCount == 3 then
|
if self.attackCount == 3 then
|
||||||
DataManager.BattleData:addTimeSpeed()
|
self.battleController:addTimeSpeed()
|
||||||
elseif self.attackCount == 5 then
|
elseif self.attackCount == 5 then
|
||||||
DataManager.BattleData:addTimeSpeed()
|
self.battleController:addTimeSpeed()
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
function BattleUnitComp:doNextSkillAttack()
|
function BattleUnitComp:doNextSkillAttack()
|
||||||
self.attackTime = 0
|
self.attackTime = 0
|
||||||
|
local slowDownBulletTimeParams = self.currActiveSkill:getSlowDownBulletTimeParams()
|
||||||
|
if slowDownBulletTimeParams and #slowDownBulletTimeParams == 3 then
|
||||||
|
self.skillSlowDownTime = slowDownBulletTimeParams[1] / TIME_FACTOR
|
||||||
|
self.skillSlowDownScale = slowDownBulletTimeParams[2] / DEFAULT_FACTOR
|
||||||
|
self.skillSlowDownDuration = slowDownBulletTimeParams[3] / TIME_FACTOR
|
||||||
|
else
|
||||||
|
self.skillSlowDownTime = nil
|
||||||
|
end
|
||||||
local attackName = self.currActiveSkill:getSkillAttackName()
|
local attackName = self.currActiveSkill:getSkillAttackName()
|
||||||
self.currAttackDuration = self:getAnimationDuration(attackName)
|
self.currAttackDuration = self:getAnimationDuration(attackName)
|
||||||
self.currAttackKeyTime = self:getAnimationKeyFrameTime(attackName)
|
self.currAttackKeyTime = self:getAnimationKeyFrameTime(attackName)
|
||||||
self:playAnimation(attackName, false, false)
|
self:playAnimation(attackName, false, false)
|
||||||
self:playSkillFx(self.currActiveSkill)
|
self:playSkillFx(self.currActiveSkill)
|
||||||
DataManager.BattleData:resetTimeSpeed()
|
self.battleController:resetTimeSpeed()
|
||||||
end
|
end
|
||||||
|
|
||||||
function BattleUnitComp:doNextNormalAttack()
|
function BattleUnitComp:doNextNormalAttack()
|
||||||
self.attackTime = 0
|
self.attackTime = 0
|
||||||
|
self.skillSlowDownTime = nil
|
||||||
local skill = self.unitEntity:getNormalSkill(true)
|
local skill = self.unitEntity:getNormalSkill(true)
|
||||||
skill:startUse()
|
skill:startUse()
|
||||||
local attackName = skill:getSkillAttackName()
|
local attackName = skill:getSkillAttackName()
|
||||||
@ -910,6 +944,7 @@ function BattleUnitComp:doNextAttack()
|
|||||||
self.attackTime = 0
|
self.attackTime = 0
|
||||||
local attackName = nil
|
local attackName = nil
|
||||||
if self.normalSkillCount > 0 then
|
if self.normalSkillCount > 0 then
|
||||||
|
self.skillSlowDownTime = nil
|
||||||
local skill = self.unitEntity:getNormalSkill(true)
|
local skill = self.unitEntity:getNormalSkill(true)
|
||||||
skill:startUse()
|
skill:startUse()
|
||||||
attackName = skill:getSkillAttackName()
|
attackName = skill:getSkillAttackName()
|
||||||
@ -923,6 +958,14 @@ function BattleUnitComp:doNextAttack()
|
|||||||
self:moveBackToInitPosition()
|
self:moveBackToInitPosition()
|
||||||
end
|
end
|
||||||
elseif self.currActiveSkill then
|
elseif self.currActiveSkill then
|
||||||
|
local slowDownBulletTimeParams = self.currActiveSkill:getSlowDownBulletTimeParams()
|
||||||
|
if slowDownBulletTimeParams and #slowDownBulletTimeParams == 3 then
|
||||||
|
self.skillSlowDownTime = slowDownBulletTimeParams[1] / TIME_FACTOR
|
||||||
|
self.skillSlowDownScale = slowDownBulletTimeParams[2] / DEFAULT_FACTOR
|
||||||
|
self.skillSlowDownDuration = slowDownBulletTimeParams[3] / TIME_FACTOR
|
||||||
|
else
|
||||||
|
self.skillSlowDownTime = nil
|
||||||
|
end
|
||||||
self.currActiveSkill:startUse()
|
self.currActiveSkill:startUse()
|
||||||
attackName = self.currActiveSkill:getSkillAttackName()
|
attackName = self.currActiveSkill:getSkillAttackName()
|
||||||
if attackName then
|
if attackName then
|
||||||
@ -930,7 +973,7 @@ function BattleUnitComp:doNextAttack()
|
|||||||
self.currAttackKeyTime = self:getAnimationKeyFrameTime(attackName)
|
self.currAttackKeyTime = self:getAnimationKeyFrameTime(attackName)
|
||||||
self:playAnimation(attackName, false, false)
|
self:playAnimation(attackName, false, false)
|
||||||
self:playSkillFx(self.currActiveSkill)
|
self:playSkillFx(self.currActiveSkill)
|
||||||
DataManager.BattleData:resetTimeSpeed()
|
self.battleController:resetTimeSpeed()
|
||||||
else
|
else
|
||||||
self:moveBackToInitPosition()
|
self:moveBackToInitPosition()
|
||||||
end
|
end
|
||||||
@ -942,6 +985,7 @@ end
|
|||||||
function BattleUnitComp:enterNormalAttackState()
|
function BattleUnitComp:enterNormalAttackState()
|
||||||
self.attackOver = false
|
self.attackOver = false
|
||||||
self.attackTime = 0
|
self.attackTime = 0
|
||||||
|
self.skillSlowDownTime = nil
|
||||||
local skill = self.unitEntity:getNormalSkill(true)
|
local skill = self.unitEntity:getNormalSkill(true)
|
||||||
skill:startUse()
|
skill:startUse()
|
||||||
if skill:getMoveType() == BattleConst.SKILL_MOVE_TYPE.MOVE then
|
if skill:getMoveType() == BattleConst.SKILL_MOVE_TYPE.MOVE then
|
||||||
@ -957,7 +1001,6 @@ function BattleUnitComp:enterNormalAttackState()
|
|||||||
end
|
end
|
||||||
else
|
else
|
||||||
self.isMove = false
|
self.isMove = false
|
||||||
self.attackTime = 0
|
|
||||||
local attackName = skill:getSkillAttackName()
|
local attackName = skill:getSkillAttackName()
|
||||||
self.currAttackDuration = self:getAnimationDuration(attackName)
|
self.currAttackDuration = self:getAnimationDuration(attackName)
|
||||||
self.currAttackKeyTime = self:getAnimationKeyFrameTime(attackName)
|
self.currAttackKeyTime = self:getAnimationKeyFrameTime(attackName)
|
||||||
|
|||||||
@ -334,6 +334,25 @@ function BattleController:battleStart()
|
|||||||
self:enterNextWave()
|
self:enterNextWave()
|
||||||
end
|
end
|
||||||
|
|
||||||
|
function BattleController:addTimeSpeed()
|
||||||
|
if self.skillSlowDownDuration then
|
||||||
|
return
|
||||||
|
end
|
||||||
|
DataManager.BattleData:addTimeSpeed()
|
||||||
|
end
|
||||||
|
|
||||||
|
function BattleController:resetTimeSpeed()
|
||||||
|
DataManager.BattleData:resetTimeSpeed()
|
||||||
|
if self.skillSlowDownDuration then
|
||||||
|
self.skillSlowDownDuration = nil
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
function BattleController:setSkillSlowDown(timeScale, duration)
|
||||||
|
self.skillSlowDownDuration = duration
|
||||||
|
DataManager.BattleData:setSkillTimeSpeed(timeScale)
|
||||||
|
end
|
||||||
|
|
||||||
function BattleController:setTimeScale(timeScale)
|
function BattleController:setTimeScale(timeScale)
|
||||||
GFunc.setDOTweenTimeScale(GConst.DOTWEEN_IDS.BATTLE, timeScale)
|
GFunc.setDOTweenTimeScale(GConst.DOTWEEN_IDS.BATTLE, timeScale)
|
||||||
BattleScheduler:setTimeScale(timeScale)
|
BattleScheduler:setTimeScale(timeScale)
|
||||||
@ -1954,6 +1973,7 @@ function BattleController:_tick(dt)
|
|||||||
end
|
end
|
||||||
end
|
end
|
||||||
self:checkDelayEffectText(dt)
|
self:checkDelayEffectText(dt)
|
||||||
|
self:checkSkillSlowDown(dt)
|
||||||
self:tick(dt)
|
self:tick(dt)
|
||||||
end
|
end
|
||||||
|
|
||||||
@ -1992,6 +2012,18 @@ function BattleController:endBattleAndExit()
|
|||||||
ModuleManager.BattleManager:exitBattle()
|
ModuleManager.BattleManager:exitBattle()
|
||||||
end
|
end
|
||||||
|
|
||||||
|
function BattleController:checkSkillSlowDown(dt)
|
||||||
|
if self.skillSlowDownDuration == nil then
|
||||||
|
return
|
||||||
|
end
|
||||||
|
self.skillSlowDownDuration = self.skillSlowDownDuration - dt
|
||||||
|
if self.skillSlowDownDuration >= 0 then
|
||||||
|
return
|
||||||
|
end
|
||||||
|
self.skillSlowDownDuration = nil
|
||||||
|
self:resetTimeSpeed()
|
||||||
|
end
|
||||||
|
|
||||||
function BattleController:checkDelayEffectText(dt)
|
function BattleController:checkDelayEffectText(dt)
|
||||||
if self.delayEffectTextCount <= 0 then
|
if self.delayEffectTextCount <= 0 then
|
||||||
return
|
return
|
||||||
|
|||||||
@ -10,6 +10,11 @@ local BATTLE_BOARD_SKILL_ENTITY = require "app/userdata/battle/skill/battle_boar
|
|||||||
|
|
||||||
local ATTR_TYPE = GConst.ATTR_TYPE
|
local ATTR_TYPE = GConst.ATTR_TYPE
|
||||||
local DEFAULT_FACTOR = BattleConst.DEFAULT_FACTOR
|
local DEFAULT_FACTOR = BattleConst.DEFAULT_FACTOR
|
||||||
|
local TIME_SPEED_LEVEL_0 = 0
|
||||||
|
local TIME_SPEED_LEVEL_1 = 1
|
||||||
|
local TIME_SPEED_LEVEL_2 = 2
|
||||||
|
local TIME_SPEED_LEVEL_3 = 3
|
||||||
|
local TIME_SPEED_LEVEL_SKILL = 100
|
||||||
|
|
||||||
function BattleData:init()
|
function BattleData:init()
|
||||||
self:clear()
|
self:clear()
|
||||||
@ -32,36 +37,37 @@ end
|
|||||||
|
|
||||||
function BattleData:pauseBattle()
|
function BattleData:pauseBattle()
|
||||||
self.cacheSpeed = self.data.timeSpeed
|
self.cacheSpeed = self.data.timeSpeed
|
||||||
self:setTimeSpeed(0)
|
self.cacheTimeScale = self.timeScale
|
||||||
|
self:setTimeSpeed(TIME_SPEED_LEVEL_0)
|
||||||
end
|
end
|
||||||
|
|
||||||
function BattleData:resumeBattle()
|
function BattleData:resumeBattle()
|
||||||
if self.cacheSpeed == nil then
|
if self.cacheSpeed == nil then
|
||||||
return
|
return
|
||||||
end
|
end
|
||||||
if self.data.timeSpeed ~= 0 then
|
if self.data.timeSpeed ~= TIME_SPEED_LEVEL_0 then
|
||||||
return
|
return
|
||||||
end
|
end
|
||||||
self:setTimeSpeed(self.cacheSpeed or 1)
|
self:setTimeSpeed(self.cacheSpeed or TIME_SPEED_LEVEL_1, self.cacheTimeScale)
|
||||||
end
|
end
|
||||||
|
|
||||||
function BattleData:resetTimeSpeed()
|
function BattleData:resetTimeSpeed()
|
||||||
if self.cacheSpeed then -- 目前处于暂停状态
|
if self.cacheSpeed then -- 目前处于暂停状态
|
||||||
self.cacheSpeed = 1
|
self.cacheSpeed = TIME_SPEED_LEVEL_1
|
||||||
return
|
return
|
||||||
end
|
end
|
||||||
if self.data.timeSpeed <= 1 then
|
if self.data.timeSpeed <= TIME_SPEED_LEVEL_1 then
|
||||||
return
|
return
|
||||||
end
|
end
|
||||||
self:setTimeSpeed(1)
|
self:setTimeSpeed(TIME_SPEED_LEVEL_1)
|
||||||
end
|
end
|
||||||
|
|
||||||
function BattleData:addTimeSpeed()
|
function BattleData:addTimeSpeed()
|
||||||
if self.data.timeSpeed >= 3 then
|
if self.data.timeSpeed >= TIME_SPEED_LEVEL_3 then
|
||||||
return
|
return
|
||||||
end
|
end
|
||||||
if self.cacheSpeed then -- 目前处于暂停状态
|
if self.cacheSpeed then -- 目前处于暂停状态
|
||||||
if self.cacheSpeed < 3 then
|
if self.cacheSpeed < TIME_SPEED_LEVEL_3 then
|
||||||
self.cacheSpeed = self.cacheSpeed + 1
|
self.cacheSpeed = self.cacheSpeed + 1
|
||||||
end
|
end
|
||||||
return
|
return
|
||||||
@ -70,20 +76,24 @@ function BattleData:addTimeSpeed()
|
|||||||
self:setTimeSpeed(timeSpeed)
|
self:setTimeSpeed(timeSpeed)
|
||||||
end
|
end
|
||||||
|
|
||||||
function BattleData:setTimeSpeed(timeSpeed)
|
function BattleData:setSkillTimeSpeed(timeScale)
|
||||||
|
self:setTimeSpeed(TIME_SPEED_LEVEL_SKILL, timeScale)
|
||||||
|
end
|
||||||
|
|
||||||
|
function BattleData:setTimeSpeed(timeSpeed, timeScale)
|
||||||
if timeSpeed == self.data.timeSpeed then
|
if timeSpeed == self.data.timeSpeed then
|
||||||
return
|
return
|
||||||
end
|
end
|
||||||
if timeSpeed == 0 then
|
if timeSpeed == TIME_SPEED_LEVEL_0 then
|
||||||
self.timeScale = 0
|
self.timeScale = 0
|
||||||
elseif timeSpeed == 1 then
|
elseif timeSpeed == TIME_SPEED_LEVEL_1 then
|
||||||
self.timeScale = BattleConst.TIME_SCALE.LEVEL_1
|
self.timeScale = BattleConst.TIME_SCALE.LEVEL_1
|
||||||
elseif timeSpeed == 2 then
|
elseif timeSpeed == TIME_SPEED_LEVEL_2 then
|
||||||
self.timeScale = BattleConst.TIME_SCALE.LEVEL_2
|
self.timeScale = BattleConst.TIME_SCALE.LEVEL_2
|
||||||
elseif timeSpeed == 3 then
|
elseif timeSpeed == TIME_SPEED_LEVEL_3 then
|
||||||
self.timeScale = BattleConst.TIME_SCALE.LEVEL_3
|
self.timeScale = BattleConst.TIME_SCALE.LEVEL_3
|
||||||
else
|
else
|
||||||
self.timeScale = BattleConst.TIME_SCALE.LEVEL_1
|
self.timeScale = timeScale or BattleConst.TIME_SCALE.LEVEL_1
|
||||||
end
|
end
|
||||||
self.data.timeSpeed = timeSpeed
|
self.data.timeSpeed = timeSpeed
|
||||||
end
|
end
|
||||||
|
|||||||
@ -218,4 +218,9 @@ function BattleSkillEntity:clearRecordData()
|
|||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
-- 子弹时间参数
|
||||||
|
function BattleSkillEntity:getSlowDownBulletTimeParams()
|
||||||
|
return self.skillInfo.bullet_time
|
||||||
|
end
|
||||||
|
|
||||||
return BattleSkillEntity
|
return BattleSkillEntity
|
||||||
Loading…
x
Reference in New Issue
Block a user