rogue技能显示修改

This commit is contained in:
xiekaidong 2023-04-20 15:17:14 +08:00
parent ce3706369e
commit 06bc25c2d2
26 changed files with 391 additions and 306 deletions

View File

@ -6,11 +6,9 @@ local skill_rogue = {
["qlt"]=2,
["type"]=5,
["attr"]={
{
["type"]="atkp_color_add",
["minnum"]=300,
["maxnum"]=500
}
["type"]="atkp_color_add",
["minnum"]=300,
["maxnum"]=500
},
["obj"]=1,
["icon"]="1"
@ -22,11 +20,9 @@ local skill_rogue = {
["qlt"]=3,
["type"]=5,
["attr"]={
{
["type"]="atkp_color_add",
["minnum"]=800,
["maxnum"]=1200
}
["type"]="atkp_color_add",
["minnum"]=800,
["maxnum"]=1200
},
["obj"]=1,
["icon"]="1"
@ -38,11 +34,9 @@ local skill_rogue = {
["qlt"]=4,
["type"]=5,
["attr"]={
{
["type"]="atkp_color_add",
["minnum"]=1300,
["maxnum"]=2000
}
["type"]="atkp_color_add",
["minnum"]=1300,
["maxnum"]=2000
},
["obj"]=1,
["icon"]="1"
@ -54,11 +48,9 @@ local skill_rogue = {
["qlt"]=2,
["type"]=5,
["attr"]={
{
["type"]="atkp_red_add",
["minnum"]=300,
["maxnum"]=500
}
["type"]="atkp_red_add",
["minnum"]=300,
["maxnum"]=500
},
["obj"]=1,
["icon"]="2"
@ -70,11 +62,9 @@ local skill_rogue = {
["qlt"]=2,
["type"]=5,
["attr"]={
{
["type"]="atkp_red_add",
["minnum"]=800,
["maxnum"]=1200
}
["type"]="atkp_red_add",
["minnum"]=800,
["maxnum"]=1200
},
["obj"]=1,
["icon"]="2"
@ -86,11 +76,9 @@ local skill_rogue = {
["qlt"]=3,
["type"]=5,
["attr"]={
{
["type"]="atkp_red_add",
["minnum"]=1300,
["maxnum"]=2000
}
["type"]="atkp_red_add",
["minnum"]=1300,
["maxnum"]=2000
},
["obj"]=1,
["icon"]="2"
@ -102,11 +90,9 @@ local skill_rogue = {
["qlt"]=2,
["type"]=5,
["attr"]={
{
["type"]="atkp_yellow_add",
["minnum"]=300,
["maxnum"]=500
}
["type"]="atkp_yellow_add",
["minnum"]=300,
["maxnum"]=500
},
["obj"]=1,
["icon"]="3"
@ -118,11 +104,9 @@ local skill_rogue = {
["qlt"]=2,
["type"]=5,
["attr"]={
{
["type"]="atkp_yellow_add",
["minnum"]=800,
["maxnum"]=1200
}
["type"]="atkp_yellow_add",
["minnum"]=800,
["maxnum"]=1200
},
["obj"]=1,
["icon"]="3"
@ -134,11 +118,9 @@ local skill_rogue = {
["qlt"]=3,
["type"]=5,
["attr"]={
{
["type"]="atkp_yellow_add",
["minnum"]=1300,
["maxnum"]=2000
}
["type"]="atkp_yellow_add",
["minnum"]=1300,
["maxnum"]=2000
},
["obj"]=1,
["icon"]="3"
@ -150,11 +132,9 @@ local skill_rogue = {
["qlt"]=2,
["type"]=5,
["attr"]={
{
["type"]="atkp_green_add",
["minnum"]=300,
["maxnum"]=500
}
["type"]="atkp_green_add",
["minnum"]=300,
["maxnum"]=500
},
["obj"]=1,
["icon"]="4"
@ -166,11 +146,9 @@ local skill_rogue = {
["qlt"]=2,
["type"]=5,
["attr"]={
{
["type"]="atkp_green_add",
["minnum"]=800,
["maxnum"]=1200
}
["type"]="atkp_green_add",
["minnum"]=800,
["maxnum"]=1200
},
["obj"]=1,
["icon"]="4"
@ -182,11 +160,9 @@ local skill_rogue = {
["qlt"]=3,
["type"]=5,
["attr"]={
{
["type"]="atkp_green_add",
["minnum"]=1300,
["maxnum"]=2000
}
["type"]="atkp_green_add",
["minnum"]=1300,
["maxnum"]=2000
},
["obj"]=1,
["icon"]="4"
@ -198,11 +174,9 @@ local skill_rogue = {
["qlt"]=2,
["type"]=5,
["attr"]={
{
["type"]="atkp_blue_add",
["minnum"]=300,
["maxnum"]=500
}
["type"]="atkp_blue_add",
["minnum"]=300,
["maxnum"]=500
},
["obj"]=1,
["icon"]="5"
@ -214,11 +188,9 @@ local skill_rogue = {
["qlt"]=2,
["type"]=5,
["attr"]={
{
["type"]="atkp_blue_add",
["minnum"]=800,
["maxnum"]=1200
}
["type"]="atkp_blue_add",
["minnum"]=800,
["maxnum"]=1200
},
["obj"]=1,
["icon"]="5"
@ -230,11 +202,9 @@ local skill_rogue = {
["qlt"]=3,
["type"]=5,
["attr"]={
{
["type"]="atkp_blue_add",
["minnum"]=1300,
["maxnum"]=2000
}
["type"]="atkp_blue_add",
["minnum"]=1300,
["maxnum"]=2000
},
["obj"]=1,
["icon"]="5"
@ -246,11 +216,9 @@ local skill_rogue = {
["qlt"]=2,
["type"]=5,
["attr"]={
{
["type"]="atkp_purple_add",
["minnum"]=300,
["maxnum"]=500
}
["type"]="atkp_purple_add",
["minnum"]=300,
["maxnum"]=500
},
["obj"]=1,
["icon"]="6"
@ -262,11 +230,9 @@ local skill_rogue = {
["qlt"]=2,
["type"]=5,
["attr"]={
{
["type"]="atkp_purple_add",
["minnum"]=800,
["maxnum"]=1200
}
["type"]="atkp_purple_add",
["minnum"]=800,
["maxnum"]=1200
},
["obj"]=1,
["icon"]="6"
@ -278,11 +244,9 @@ local skill_rogue = {
["qlt"]=3,
["type"]=5,
["attr"]={
{
["type"]="atkp_purple_add",
["minnum"]=1300,
["maxnum"]=2000
}
["type"]="atkp_purple_add",
["minnum"]=1300,
["maxnum"]=2000
},
["obj"]=1,
["icon"]="6"
@ -311,11 +275,9 @@ local skill_rogue = {
["qlt"]=2,
["type"]=5,
["attr"]={
{
["type"]="exp_time_add",
["minnum"]=500,
["maxnum"]=500
}
["type"]="exp_time_add",
["minnum"]=500,
["maxnum"]=500
},
["obj"]=1,
["icon"]="8"
@ -327,11 +289,9 @@ local skill_rogue = {
["qlt"]=2,
["type"]=5,
["attr"]={
{
["type"]="hpp_add",
["minnum"]=300,
["maxnum"]=500
}
["type"]="hpp_add",
["minnum"]=300,
["maxnum"]=500
},
["obj"]=1,
["icon"]="9"
@ -343,11 +303,9 @@ local skill_rogue = {
["qlt"]=3,
["type"]=5,
["attr"]={
{
["type"]="hpp_add",
["minnum"]=800,
["maxnum"]=1200
}
["type"]="hpp_add",
["minnum"]=800,
["maxnum"]=1200
},
["obj"]=1,
["icon"]="9"
@ -359,11 +317,9 @@ local skill_rogue = {
["qlt"]=4,
["type"]=5,
["attr"]={
{
["type"]="hpp_add",
["minnum"]=1300,
["maxnum"]=2000
}
["type"]="hpp_add",
["minnum"]=1300,
["maxnum"]=2000
},
["obj"]=1,
["icon"]="9"
@ -392,11 +348,9 @@ local skill_rogue = {
["qlt"]=2,
["type"]=5,
["attr"]={
{
["type"]="cured_add",
["minnum"]=100,
["maxnum"]=100
}
["type"]="cured_add",
["minnum"]=100,
["maxnum"]=100
},
["obj"]=1,
["icon"]="11"
@ -408,11 +362,9 @@ local skill_rogue = {
["qlt"]=3,
["type"]=5,
["attr"]={
{
["type"]="block",
["minnum"]=1000,
["maxnum"]=1000
}
["type"]="block",
["minnum"]=1000,
["maxnum"]=1000
},
["obj"]=1,
["icon"]="12"
@ -424,11 +376,9 @@ local skill_rogue = {
["qlt"]=3,
["type"]=5,
["attr"]={
{
["type"]="crit_add",
["minnum"]=1000,
["maxnum"]=1000
}
["type"]="crit_add",
["minnum"]=1000,
["maxnum"]=1000
},
["obj"]=1,
["icon"]="13"
@ -440,11 +390,9 @@ local skill_rogue = {
["qlt"]=3,
["type"]=5,
["attr"]={
{
["type"]="weakness_all_add",
["minnum"]=1000,
["maxnum"]=1000
}
["type"]="weakness_all_add",
["minnum"]=1000,
["maxnum"]=1000
},
["obj"]=1,
["icon"]="14"
@ -455,11 +403,9 @@ local skill_rogue = {
["qlt"]=2,
["type"]=9,
["attr"]={
{
["type"]="healp",
["minnum"]=100,
["maxnum"]=100
}
["type"]="healp",
["minnum"]=100,
["maxnum"]=100
},
["obj"]=1,
["icon"]="30"

View File

@ -0,0 +1,87 @@
local buff = {
[7]={
["desc"]="受到红色元素伤害降低",
["name"]="dec_dmg_red_add"
},
[8]={
["desc"]="受到黄色元素伤害降低",
["name"]="dec_dmg_yellow_add"
},
[9]={
["desc"]="受到绿色元素伤害降低",
["name"]="dec_dmg_green_add"
},
[10]={
["desc"]="受到蓝色元素伤害降低",
["name"]="dec_dmg_blue_add"
},
[11]={
["desc"]="受到紫色元素伤害降低",
["name"]="dec_dmg_purple_add"
},
[12]={
["desc"]="受到所有伤害降低",
["name"]="dec_dmg_all_add"
},
[13]={
["desc"]="受到红色元素伤害增加",
["name"]="weakness_red_add"
},
[14]={
["desc"]="受到黄色元素伤害增加",
["name"]="weakness_yellow_add"
},
[15]={
["desc"]="受到绿色元素伤害增加",
["name"]="weakness_green_add"
},
[16]={
["desc"]="受到蓝色元素伤害增加",
["name"]="weakness_blue_add"
},
[17]={
["desc"]="受到紫色元素伤害增加",
["name"]="weakness_purple_add"
},
[18]={
["desc"]="受到所有伤害伤害增加",
["name"]="weakness_all_add"
},
[33]={
["desc"]="眩晕效果,无法进行攻击",
["name"]="stun"
},
[34]={
["desc"]="护盾可抵挡一定的伤害",
["name"]="shield"
},
[36]={
["desc"]="普攻攻击次数减少",
["name"]="normal_attack_dec"
}
}
local keys = {
name = {
["dec_dmg_red_add"]=buff[7],
["dec_dmg_yellow_add"]=buff[8],
["dec_dmg_green_add"]=buff[9],
["dec_dmg_blue_add"]=buff[10],
["dec_dmg_purple_add"]=buff[11],
["dec_dmg_all_add"]=buff[12],
["weakness_red_add"]=buff[13],
["weakness_yellow_add"]=buff[14],
["weakness_green_add"]=buff[15],
["weakness_blue_add"]=buff[16],
["weakness_purple_add"]=buff[17],
["weakness_all_add"]=buff[18],
["stun"]=buff[33],
["shield"]=buff[34],
["normal_attack_dec"]=buff[36]
}
}
local config = {
data=buff,
keys=keys,
count=15
}
return config

View File

@ -0,0 +1,10 @@
fileFormatVersion: 2
guid: c4a3c7b1f56cb5540acdba3cfd6f5ea7
ScriptedImporter:
internalIDToNameTable: []
externalObjects: {}
serializedVersion: 2
userData:
assetBundleName:
assetBundleVariant:
script: {fileID: 11500000, guid: 3b8b241bab4a4ac9a22fcce9c64f1242, type: 3}

View File

@ -1,27 +1,27 @@
local skill = {
[10]={
[320011]={
["desc"]="长枪突刺将上下2格元素进行消除"
},
[20]={
[220011]={
["desc"]="拔刀斩:使用一次拔刀斩终结技,造成大量伤害"
},
[30]={
[420011]={
["desc"]="元素链接随机额外消除2个元素"
},
[40]={
[520011]={
["desc"]="魔法罩生成一个魔法罩持续1回合可承受最大生命值10%伤害"
},
[50]={
[120011]={
["desc"]="舞步消散将左右2格元素进行消除"
},
[60]={
[330011]={
["desc"]="快速治愈立即恢复20%生命值"
},
[70]={
[230011]={
["desc"]="巨剑连斩每一次攻击的伤害将增加50%"
},
[80]={
["desc"]="霜冻剑舞额外造成1次伤害并给敌人1回合冰霜效果"
[430011]={
["desc"]="霜冻剑舞额外造成1次伤害并给敌人1回合冰霜效果(普攻次数-1"
}
}
local config = {

View File

@ -1,26 +1,26 @@
local skill = {
[10]={
[320011]={
},
[20]={
[220011]={
},
[30]={
[420011]={
},
[40]={
[520011]={
},
[50]={
[120011]={
},
[60]={
[330011]={
},
[70]={
[230011]={
},
[80]={
[430011]={
}
}

View File

@ -1,26 +1,26 @@
local skill = {
[10]={
[320011]={
},
[20]={
[220011]={
},
[30]={
[420011]={
},
[40]={
[520011]={
},
[50]={
[120011]={
},
[60]={
[330011]={
},
[70]={
[230011]={
},
[80]={
[430011]={
}
}

View File

@ -1,26 +1,26 @@
local skill = {
[10]={
[320011]={
},
[20]={
[220011]={
},
[30]={
[420011]={
},
[40]={
[520011]={
},
[50]={
[120011]={
},
[60]={
[330011]={
},
[70]={
[230011]={
},
[80]={
[430011]={
}
}

View File

@ -1,26 +1,26 @@
local skill = {
[10]={
[320011]={
},
[20]={
[220011]={
},
[30]={
[420011]={
},
[40]={
[520011]={
},
[50]={
[120011]={
},
[60]={
[330011]={
},
[70]={
[230011]={
},
[80]={
[430011]={
}
}

View File

@ -1,26 +1,26 @@
local skill = {
[10]={
[320011]={
},
[20]={
[220011]={
},
[30]={
[420011]={
},
[40]={
[520011]={
},
[50]={
[120011]={
},
[60]={
[330011]={
},
[70]={
[230011]={
},
[80]={
[430011]={
}
}

View File

@ -1,26 +1,26 @@
local skill = {
[10]={
[320011]={
},
[20]={
[220011]={
},
[30]={
[420011]={
},
[40]={
[520011]={
},
[50]={
[120011]={
},
[60]={
[330011]={
},
[70]={
[230011]={
},
[80]={
[430011]={
}
}

View File

@ -1,26 +1,26 @@
local skill = {
[10]={
[320011]={
},
[20]={
[220011]={
},
[30]={
[420011]={
},
[40]={
[520011]={
},
[50]={
[120011]={
},
[60]={
[330011]={
},
[70]={
[230011]={
},
[80]={
[430011]={
}
}

View File

@ -1,26 +1,26 @@
local skill = {
[10]={
[320011]={
},
[20]={
[220011]={
},
[30]={
[420011]={
},
[40]={
[520011]={
},
[50]={
[120011]={
},
[60]={
[330011]={
},
[70]={
[230011]={
},
[80]={
[430011]={
}
}

View File

@ -1,26 +1,26 @@
local skill = {
[10]={
[320011]={
},
[20]={
[220011]={
},
[30]={
[420011]={
},
[40]={
[520011]={
},
[50]={
[120011]={
},
[60]={
[330011]={
},
[70]={
[230011]={
},
[80]={
[430011]={
}
}

View File

@ -1,26 +1,26 @@
local skill = {
[10]={
[320011]={
},
[20]={
[220011]={
},
[30]={
[420011]={
},
[40]={
[520011]={
},
[50]={
[120011]={
},
[60]={
[330011]={
},
[70]={
[230011]={
},
[80]={
[430011]={
}
}

View File

@ -1,26 +1,26 @@
local skill = {
[10]={
[320011]={
},
[20]={
[220011]={
},
[30]={
[420011]={
},
[40]={
[520011]={
},
[50]={
[120011]={
},
[60]={
[330011]={
},
[70]={
[230011]={
},
[80]={
[430011]={
}
}

View File

@ -403,46 +403,37 @@ end
-- end
function GFunc.getPerStr(key, str)
if key == GConst.ATTR_TYPE.crit or
key == GConst.ATTR_TYPE.crit_time or
-- key == GConst.ATTR_TYPE.atk_range or
key == GConst.ATTR_TYPE.atkp_1 or
key == GConst.ATTR_TYPE.atkp_2 or
key == GConst.ATTR_TYPE.atkp_3 or
key == GConst.ATTR_TYPE.atkp_4 or
key == GConst.ATTR_TYPE.atkp_5 or
key == GConst.ATTR_TYPE.atkp_6 or
key == GConst.ATTR_TYPE.atkp_7 or
key == GConst.ATTR_TYPE.atkp_8 or
key == GConst.ATTR_TYPE.atkp_9 or
key == GConst.ATTR_TYPE.hpp_1 or
key == GConst.ATTR_TYPE.hpp_2 or
key == GConst.ATTR_TYPE.hpp_3 or
key == GConst.ATTR_TYPE.hpp_4 or
key == GConst.ATTR_TYPE.hpp_5 or
key == GConst.ATTR_TYPE.hpp_6 or
key == GConst.ATTR_TYPE.hpp_7 or
-- key == GConst.ATTR_TYPE.spdp or
key == GConst.ATTR_TYPE.gold_gain or
key == GConst.ATTR_TYPE.dmg_addition_skill or
key == GConst.ATTR_TYPE.dmg_addition_normal or
key == GConst.ATTR_TYPE.pickaxe_recover_spd or
key == GConst.ATTR_TYPE.mineral_gain or
key == GConst.ATTR_TYPE.research_spd or
key == GConst.ATTR_TYPE.dmg_addition or
key == GConst.ATTR_TYPE.dmg_addition_poicon or
-- key == GConst.ATTR_TYPE.atkp_0 or
key == GConst.ATTR_TYPE.airborne_damage or
-- key == GConst.ATTR_TYPE.skill_all_damage or
-- key == GConst.ATTR_TYPE.skill_1_damage or
-- key == GConst.ATTR_TYPE.skill_2_damage or
-- key == GConst.ATTR_TYPE.skill_3_damage or
-- key == GConst.ATTR_TYPE.attack_damage or
key == GConst.ATTR_TYPE.miss or
key == GConst.ATTR_TYPE.dmg_dec_all or
key == GConst.ATTR_TYPE.idle_income
if key == GConst.BattleConst.BUFF_NAME.ATKP_ADD or
key == GConst.BattleConst.BUFF_NAME.ATKP_COLOR_ADD or
key == GConst.BattleConst.BUFF_NAME.ATKP_RED_ADD or
key == GConst.BattleConst.BUFF_NAME.ATKP_YELLOW_ADD or
key == GConst.BattleConst.BUFF_NAME.ATKP_GREEN_ADD or
key == GConst.BattleConst.BUFF_NAME.ATKP_BLUE_ADD or
key == GConst.BattleConst.BUFF_NAME.ATKP_PURPLE_ADD or
key == GConst.BattleConst.BUFF_NAME.DEC_DMG_RED_ADD or
key == GConst.BattleConst.BUFF_NAME.DEC_DMG_YELLOW_ADD or
key == GConst.BattleConst.BUFF_NAME.DEC_DMG_GREEN_ADD or
key == GConst.BattleConst.BUFF_NAME.DEC_DMG_BLUE_ADD or
key == GConst.BattleConst.BUFF_NAME.DEC_DMG_PURPLE_ADD or
key == GConst.BattleConst.BUFF_NAME.DEC_DMG_ALL_ADD or
key == GConst.BattleConst.BUFF_NAME.WEAKNESS_RED_ADD or
key == GConst.BattleConst.BUFF_NAME.WEAKNESS_YELLOW_ADD or
key == GConst.BattleConst.BUFF_NAME.WEAKNESS_GREEN_ADD or
key == GConst.BattleConst.BUFF_NAME.WEAKNESS_BLUE_ADD or
key == GConst.BattleConst.BUFF_NAME.WEAKNESS_PURPLE_ADD or
key == GConst.BattleConst.BUFF_NAME.WEAKNESS_ALL_ADD or
key == GConst.BattleConst.BUFF_NAME.DMG_ADDITION_RED_ADD or
key == GConst.BattleConst.BUFF_NAME.DMG_ADDITION_YELLOW_ADD or
key == GConst.BattleConst.BUFF_NAME.DMG_ADDITION_GREEN_ADD or
key == GConst.BattleConst.BUFF_NAME.DMG_ADDITION_BLUE_ADD or
key == GConst.BattleConst.BUFF_NAME.DMG_ADDITION_PURPLE_ADD or
key == GConst.BattleConst.BUFF_NAME.DMG_ADDITION_ALL_ADD or
key == GConst.BattleConst.BUFF_NAME.HPP_ADD or
key == GConst.BattleConst.BUFF_NAME.CRIT_TIME_ADD or
key == GConst.BattleConst.BUFF_NAME.EXP_TIME_ADD or
key == GConst.BattleConst.BUFF_NAME.CURED_ADD
then
str = str .. "%"
str = str // 100 .. "%"
end
return str
end
@ -599,7 +590,6 @@ end
function GFunc.showItemNotEnough(itemId)
local gemTextInfo = I18N:getConfig("item")[itemId]
Logger.printTable(gemTextInfo)
if gemTextInfo then
GFunc.showToast(I18N:getGlobalText(I18N.GlobalConst.ITEM_NOT_ENOUGH, gemTextInfo.name))
end

View File

@ -258,8 +258,8 @@ BattleConst.GRID_TYPE = {
}
BattleConst.GRID_TYPE_ICON = {
[BattleConst.GRID_TYPE.SNOW_BOX] = "snow_1",
[BattleConst.GRID_TYPE.SOLID_SNOW] = "snow_2",
[BattleConst.GRID_TYPE.SNOW_BOX] = "stone_1",
[BattleConst.GRID_TYPE.SOLID_SNOW] = "stone_2",
[BattleConst.GRID_TYPE.VINES] = "vine",
[BattleConst.GRID_TYPE.ICE] = "ice",
}

View File

@ -37,12 +37,12 @@ function BattleManager:_play(battleType, params)
self.battleController:init(params)
end
function BattleManager:onSelectSkill(skillId)
function BattleManager:onSelectSkill(skillId, value)
if not self.battleController then
return
end
self.battleController:onSelectSkill(skillId)
self.battleController:onSelectSkill(skillId, value)
end
function BattleManager:endBattleAndExit()

View File

@ -1258,9 +1258,9 @@ function BattleController:getRandomSkillList(getCount)
return result
end
function BattleController:onSelectSkill(skillId)
self.battleData:addSkillCount(skillId)
BATTLE_ROGUE_SKILL_HANDLE.takeEffect(skillId, self.battleData, self)
function BattleController:onSelectSkill(skillId, value)
self.battleData:addSkillCount(skillId, value)
BATTLE_ROGUE_SKILL_HANDLE.takeEffect(skillId, self.battleData, self, value)
local skillEntities = self.battleData:getSkillEntities()
for _, entity in pairs(skillEntities) do

View File

@ -88,14 +88,15 @@ local _changeElementType = function(skillInfo, battleData, battleController)
battleController:changeElementType(count, elementType)
end
local _addAttr = function(skillInfo, battleData, battleController)
local _addAttr = function(skillInfo, battleData, battleController, value)
if not skillInfo.attr then
return
end
for _, attrRange in ipairs(skillInfo.attr) do
battleController:addHeroAttr(attrRange.type, math.random(attrRange.minnum, attrRange.maxnum))
if not value then
value = math.random(skillInfo.attr.minnum, skillInfo.attr.maxnum)
end
battleController:addHeroAttr(skillInfo.attr.type, value)
end
local _addSkillEffectParams = function(skillInfo, battleData, battleController)
@ -282,7 +283,7 @@ BattleRogueSkillHandle._effectOn = {
[13] = _addSkillElementCountEffect, -- 技能链接中每一个元素累加的技能效果
}
function BattleRogueSkillHandle.takeEffect(skillId, battleData, battleController)
function BattleRogueSkillHandle.takeEffect(skillId, battleData, battleController, value)
local cfg = SKILL_ROGUE_CFG[skillId]
if not cfg or not cfg.type then
return
@ -290,7 +291,7 @@ function BattleRogueSkillHandle.takeEffect(skillId, battleData, battleController
local func = BattleRogueSkillHandle._effectOn[cfg.type]
if func then
func(cfg, battleData, battleController)
func(cfg, battleData, battleController, value)
end
end

View File

@ -58,9 +58,24 @@ function HeroManager:getSkillIcon(skillId)
return cfg and tostring(cfg.battle_icon)
end
function HeroManager:getSkillRogueDesc(skillId)
local cfg = I18N:getConfig("skill_rogue")[skillId]
return cfg and cfg.desc
function HeroManager:getSkillRogueDesc(skillId, value)
local cfg = ConfigManager:getConfig("skill_rogue")[skillId]
if not cfg then
return GConst.EMPTY_STRING
end
local str
if cfg.attr then
str = GFunc.getPerStr(cfg.attr.type, value)
end
return I18N:getText("skill_rogue", skillId, "desc", str)
end
function HeroManager:showValueRogue(skillId)
if (skillId >= 1 and skillId <= 18) or (skillId >= 21 and skillId <= 23) then
return true
end
return false
end
function HeroManager:getSkillRogueIcon(skillId)

View File

@ -17,8 +17,8 @@ end
function BattlePauseUI:ctor(params)
local map = DataManager.BattleData:getSelectSkillMap()
self.skillList = {}
for skillId, count in pairs(map) do
table.insert(self.skillList, {skillId = skillId, count = count})
for skillId, info in pairs(map) do
table.insert(self.skillList, {skillId = skillId, info = info})
end
end
@ -66,9 +66,17 @@ function BattlePauseUI:_refreshScrollRect()
end)
self.scrollRect:addRefreshCallback(function(index, cell)
local skillId = self.skillList[index].skillId
cell:refresh(skillId, self.skillList[index].count)
local count = self.skillList[index].info.count
local value = self.skillList[index].info.value
local cfg = ConfigManager:getConfig("skill_rogue")[skillId]
local str
if cfg and cfg.attr then
str = GFunc.getPerStr(cfg.attr.type, value)
end
cell:refresh(skillId, count, str)
cell:addClickListener(function()
ModuleManager.TipsManager:showDescTips(ModuleManager.HeroManager:getSkillRogueDesc(skillId), cell:getBaseObject())
ModuleManager.TipsManager:showDescTips(ModuleManager.HeroManager:getSkillRogueDesc(skillId, value), cell:getBaseObject())
end)
end)
self.scrollRect:clearCells()

View File

@ -69,16 +69,16 @@ function BattleSkillSelectUI:refreshRogueSkill()
local skillId = self.skillList[index]
cell:getBaseObject():setActive(skillId ~= nil)
if skillId then
cell:refresh(skillId, function()
self:onClickSkill(skillId)
cell:refresh(skillId, function(value)
self:onClickSkill(skillId, value)
end)
end
end
end
function BattleSkillSelectUI:onClickSkill(skillId)
function BattleSkillSelectUI:onClickSkill(skillId, value)
self:closeUI()
ModuleManager.BattleManager:onSelectSkill(skillId)
ModuleManager.BattleManager:onSelectSkill(skillId, value)
end
return BattleSkillSelectUI

View File

@ -4,18 +4,29 @@ local SELECT_SKILL_CELL = "app/ui/battle/cell/select_skill_cell"
function BattleSelectSkillCell:refresh(skillId, func)
local cfg = ConfigManager:getConfig("skill_rogue")[skillId]
local i18Cfg = I18N:getConfig("skill_rogue")[skillId]
if not cfg or not i18Cfg then
if not cfg then
return
end
local valueStr
if cfg.type == 5 then
self.value = math.random(cfg.attr.minnum, cfg.attr.maxnum)
self.value = self.value // 100 * 100
valueStr = GFunc.getPerStr(cfg.attr.type, self.value)
else
self.value = nil
end
local uiMap = self:getUIMap()
uiMap["skill_select_cell.desc"]:setText(i18Cfg.desc)
self:getBaseObject():addClickListener(func)
uiMap["skill_select_cell.desc"]:setText(ModuleManager.HeroManager:getSkillRogueDesc(skillId, self.value))
self:getBaseObject():addClickListener(function()
func(self.value)
end)
if not self.selectSkillCell then
self.selectSkillCell = CellManager:addCellComp(uiMap["skill_select_cell.skill_select_cell"], SELECT_SKILL_CELL)
end
self.selectSkillCell:refresh(skillId)
self.selectSkillCell:refresh(skillId, nil, valueStr)
uiMap["skill_select_cell.img"]:setSprite(GConst.ATLAS_PATH.BATTLE, ModuleManager.HeroManager:getSkillRogueBattleBg(skillId))
end

View File

@ -1,9 +1,17 @@
local SelectSkillCell = class("SelectSkillCell", BaseCell)
function SelectSkillCell:refresh(skillId, count)
function SelectSkillCell:refresh(skillId, count, value)
if value then
value = "+" .. value
end
if ModuleManager.HeroManager:showValueRogue(skillId) or count == 1 then
count = nil
else
value = nil
end
local uiMap = self:getUIMap()
uiMap["skill_select_cell.icon"]:setSprite(GConst.ATLAS_PATH.ICON_SKILL_ROGUE, ModuleManager.HeroManager:getSkillRogueIcon(skillId))
-- uiMap["skill_select_cell.value"]:setText()
uiMap["skill_select_cell.value"]:setText(value or GConst.EMPTY_STRING)
uiMap["skill_select_cell.count"]:setText(count or GConst.EMPTY_STRING)
self.baseObject:setSprite(GConst.ATLAS_PATH.ICON_SKILL_ROGUE, ModuleManager.HeroManager:getSkillRogueBg(skillId))
end

View File

@ -325,15 +325,24 @@ function BattleData:addSkillEnergy(elementMap)
end
end
function BattleData:addSkillCount(skillId)
function BattleData:addSkillCount(skillId, value)
if not self.selectSkillMap[skillId] then
self.selectSkillMap[skillId] = 0
self.selectSkillMap[skillId] = {
count = 0,
value = 0
}
end
self.selectSkillMap[skillId].count = self.selectSkillMap[skillId].count + 1
if value then
self.selectSkillMap[skillId].value = (self.selectSkillMap[skillId].value) + value
end
self.selectSkillMap[skillId] = self.selectSkillMap[skillId] + 1
end
function BattleData:getSkillCount(skillId)
return self.selectSkillMap[skillId] or 0
if self.selectSkillMap[skillId] then
return self.selectSkillMap[skillId].count
end
return 0
end
function BattleData:getSelectSkillMap()