merge
This commit is contained in:
commit
a8261cd641
@ -58,8 +58,8 @@ local chapter = {
|
|||||||
{
|
{
|
||||||
["type"]=1,
|
["type"]=1,
|
||||||
["type_for_nothing"]="Vw==",
|
["type_for_nothing"]="Vw==",
|
||||||
["id"]=4,
|
["id"]=12001,
|
||||||
["id_for_nothing"]="Ug==",
|
["id_for_nothing"]="VwpcA2Q=",
|
||||||
["num"]=3,
|
["num"]=3,
|
||||||
["num_for_nothing"]="VQ=="
|
["num_for_nothing"]="VQ=="
|
||||||
}
|
}
|
||||||
@ -141,8 +141,8 @@ local chapter = {
|
|||||||
{
|
{
|
||||||
["type"]=1,
|
["type"]=1,
|
||||||
["type_for_nothing"]="Vw==",
|
["type_for_nothing"]="Vw==",
|
||||||
["id"]=4,
|
["id"]=22001,
|
||||||
["id_for_nothing"]="Ug==",
|
["id_for_nothing"]="VApcA2Q=",
|
||||||
["num"]=5,
|
["num"]=5,
|
||||||
["num_for_nothing"]="Uw=="
|
["num_for_nothing"]="Uw=="
|
||||||
}
|
}
|
||||||
@ -258,10 +258,10 @@ local chapter = {
|
|||||||
{
|
{
|
||||||
["type"]=1,
|
["type"]=1,
|
||||||
["type_for_nothing"]="Vw==",
|
["type_for_nothing"]="Vw==",
|
||||||
["id"]=4,
|
["id"]=52001,
|
||||||
["id_for_nothing"]="Ug==",
|
["id_for_nothing"]="UwpcA2Q=",
|
||||||
["num"]=10,
|
["num"]=3,
|
||||||
["num_for_nothing"]="Vwg="
|
["num_for_nothing"]="VQ=="
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
["type"]=1,
|
["type"]=1,
|
||||||
|
|||||||
@ -1,33 +1,33 @@
|
|||||||
local chapter = {
|
local chapter = {
|
||||||
[1]={
|
[1]={
|
||||||
["name"]="第1关"
|
["name"]="1.废弃小镇"
|
||||||
},
|
},
|
||||||
[2]={
|
[2]={
|
||||||
["name"]="第2关"
|
["name"]="2.小镇幽径"
|
||||||
},
|
},
|
||||||
[3]={
|
[3]={
|
||||||
["name"]="第3关"
|
["name"]="3.小镇矿山"
|
||||||
},
|
},
|
||||||
[4]={
|
[4]={
|
||||||
["name"]="第4关"
|
["name"]="4.幽深丛林"
|
||||||
},
|
},
|
||||||
[5]={
|
[5]={
|
||||||
["name"]="第5关"
|
["name"]="5.碎石溪岸(西)"
|
||||||
},
|
},
|
||||||
[6]={
|
[6]={
|
||||||
["name"]="第6关"
|
["name"]="6.碎石溪岸(东)"
|
||||||
},
|
},
|
||||||
[7]={
|
[7]={
|
||||||
["name"]="第7关"
|
["name"]="7.城堡外围"
|
||||||
},
|
},
|
||||||
[8]={
|
[8]={
|
||||||
["name"]="第8关"
|
["name"]="8.城堡大门"
|
||||||
},
|
},
|
||||||
[9]={
|
[9]={
|
||||||
["name"]="第9关"
|
["name"]="9.城堡内部"
|
||||||
},
|
},
|
||||||
[10]={
|
[10]={
|
||||||
["name"]="第10关"
|
["name"]="10.城堡深处"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
local config = {
|
local config = {
|
||||||
|
|||||||
@ -1,5 +1,5 @@
|
|||||||
fileFormatVersion: 2
|
fileFormatVersion: 2
|
||||||
guid: 5b5a5d0a581e34e4783076bf305923c8
|
guid: c2def61829e024e499f536c5f7210ed1
|
||||||
ScriptedImporter:
|
ScriptedImporter:
|
||||||
internalIDToNameTable: []
|
internalIDToNameTable: []
|
||||||
externalObjects: {}
|
externalObjects: {}
|
||||||
|
|||||||
@ -1,5 +1,5 @@
|
|||||||
fileFormatVersion: 2
|
fileFormatVersion: 2
|
||||||
guid: 7b1900921f574ae4cb9a7a9ac0e55f5c
|
guid: 770896b6b97988447b9808e171b31e86
|
||||||
ScriptedImporter:
|
ScriptedImporter:
|
||||||
internalIDToNameTable: []
|
internalIDToNameTable: []
|
||||||
externalObjects: {}
|
externalObjects: {}
|
||||||
|
|||||||
@ -37,6 +37,7 @@ BattleConst.ANIMATOR_HASH_NAME_NUMBER_MOVE_L = -526518883
|
|||||||
BattleConst.ANIMATOR_HASH_NAME_NUMBER_MOVE_R = 445827326
|
BattleConst.ANIMATOR_HASH_NAME_NUMBER_MOVE_R = 445827326
|
||||||
BattleConst.ANIMATOR_HASH_NAME_NUMBER_CRIT = -1734531349
|
BattleConst.ANIMATOR_HASH_NAME_NUMBER_CRIT = -1734531349
|
||||||
BattleConst.ANIMATOR_HASH_NAME_NUMBER_BUFF = 1364146828
|
BattleConst.ANIMATOR_HASH_NAME_NUMBER_BUFF = 1364146828
|
||||||
|
BattleConst.UNLOCK_SKILL_ROGUE_TYPE = 6
|
||||||
BattleConst.RECOVER_HP_COUNT = 3
|
BattleConst.RECOVER_HP_COUNT = 3
|
||||||
BattleConst.RECOVER_HP_INTERVAL = 0.2
|
BattleConst.RECOVER_HP_INTERVAL = 0.2
|
||||||
BattleConst.RECOVER_HP_PERCENT = 333
|
BattleConst.RECOVER_HP_PERCENT = 333
|
||||||
|
|||||||
@ -1269,6 +1269,34 @@ function BattleController:getRandomSkillList(getCount)
|
|||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
for elementType, list in pairs(skillPool) do
|
||||||
|
if self.battleData:isUnlockedSkillElementType(elementType) then
|
||||||
|
for _, skillId in ipairs(list) do
|
||||||
|
local skillCfg = cfg[skillId]
|
||||||
|
if skillCfg and (not skillCfg.limit_times or self.battleData:getSkillCount(skillId) < skillCfg.limit_times) then
|
||||||
|
if not map[skillId] then
|
||||||
|
table.insert(newSkillPool, skillId)
|
||||||
|
table.insert(skillWeight, skillCfg.weight)
|
||||||
|
count = count + 1
|
||||||
|
map[skillId] = true
|
||||||
|
end
|
||||||
|
end
|
||||||
|
end
|
||||||
|
else
|
||||||
|
local skillEntity = self.battleData:getSkillEntityByElement(elementType)
|
||||||
|
if skillEntity then
|
||||||
|
local skillId = skillEntity:getUnlockId()
|
||||||
|
if skillId and not map[skillId] then
|
||||||
|
local skillCfg = cfg[skillId]
|
||||||
|
table.insert(newSkillPool, skillId)
|
||||||
|
table.insert(skillWeight, skillCfg.weight)
|
||||||
|
count = count + 1
|
||||||
|
map[skillId] = true
|
||||||
|
end
|
||||||
|
end
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
if count > 0 then
|
if count > 0 then
|
||||||
local index = GFunc.getRandomIndex(skillWeight)
|
local index = GFunc.getRandomIndex(skillWeight)
|
||||||
local skillId = table.remove(newSkillPool, index)
|
local skillId = table.remove(newSkillPool, index)
|
||||||
@ -1298,6 +1326,9 @@ function BattleController:getRandomSkillList(getCount)
|
|||||||
table.remove(skillWeight, index)
|
table.remove(skillWeight, index)
|
||||||
count = count - 1
|
count = count - 1
|
||||||
table.insert(result, skillId)
|
table.insert(result, skillId)
|
||||||
|
if count <= 0 then
|
||||||
|
break
|
||||||
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
result = table.shuffle(result)
|
result = table.shuffle(result)
|
||||||
|
|||||||
@ -99,6 +99,14 @@ local _addAttr = function(skillInfo, battleData, battleController, value)
|
|||||||
battleController:addHeroAttr(skillInfo.attr.type, value)
|
battleController:addHeroAttr(skillInfo.attr.type, value)
|
||||||
end
|
end
|
||||||
|
|
||||||
|
local _unlockSkill = function(skillInfo, battleData, battleController, value)
|
||||||
|
if not skillInfo.skill_position then
|
||||||
|
return
|
||||||
|
end
|
||||||
|
|
||||||
|
battleData:unlockSkillEntity(skillInfo.skill_position)
|
||||||
|
end
|
||||||
|
|
||||||
local _addSkillEffectParams = function(skillInfo, battleData, battleController)
|
local _addSkillEffectParams = function(skillInfo, battleData, battleController)
|
||||||
local elementType = skillInfo.skill_position
|
local elementType = skillInfo.skill_position
|
||||||
if not elementType or not skillInfo.parameter then
|
if not elementType or not skillInfo.parameter then
|
||||||
@ -273,7 +281,7 @@ BattleRogueSkillHandle._effectOn = {
|
|||||||
[3] = _addLinkAtkp, -- 增加链接伤害
|
[3] = _addLinkAtkp, -- 增加链接伤害
|
||||||
[4] = _canLinkAnyElement, -- 可与任何技能连接
|
[4] = _canLinkAnyElement, -- 可与任何技能连接
|
||||||
[5] = _addAttr, -- 纯粹增加属性
|
[5] = _addAttr, -- 纯粹增加属性
|
||||||
-- [6] = _addSkillReleaseCount, -- 技能增加释放次数
|
[6] = _unlockSkill, -- 技能增加释放次数
|
||||||
[7] = _addSkillEffectParams, -- 增加技能效果参数(比如护盾的承伤增加)
|
[7] = _addSkillEffectParams, -- 增加技能效果参数(比如护盾的承伤增加)
|
||||||
[8] = _addSkillRound, -- 增加技能效果持续回合(比如护盾从1回合改为2回合)
|
[8] = _addSkillRound, -- 增加技能效果持续回合(比如护盾从1回合改为2回合)
|
||||||
[9] = _addSkillEffect, -- 获得技能效果
|
[9] = _addSkillEffect, -- 获得技能效果
|
||||||
|
|||||||
@ -90,6 +90,9 @@ end
|
|||||||
|
|
||||||
function HeroManager:getSkillRogueBg(skillId)
|
function HeroManager:getSkillRogueBg(skillId)
|
||||||
local cfg = ConfigManager:getConfig("skill_rogue")[skillId]
|
local cfg = ConfigManager:getConfig("skill_rogue")[skillId]
|
||||||
|
if cfg.type == GConst.BattleConst.UNLOCK_SKILL_ROGUE_TYPE then -- 解锁技能类型
|
||||||
|
return "frame_skill_" .. cfg.skill_position
|
||||||
|
end
|
||||||
return cfg and "frame_" .. cfg.qlt
|
return cfg and "frame_" .. cfg.qlt
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|||||||
@ -91,7 +91,7 @@ function BattleUI:initSkill()
|
|||||||
|
|
||||||
local uiMap = self.root:genAllChildren()
|
local uiMap = self.root:genAllChildren()
|
||||||
for name, elementType in pairs(GConst.BattleConst.ELEMENT_TYPE) do
|
for name, elementType in pairs(GConst.BattleConst.ELEMENT_TYPE) do
|
||||||
local obj = uiMap["battle_ui.bg_2.skill_node_cell_" .. elementType]
|
local obj = uiMap["battle_ui.bg_2.skill_node.skill_node_cell_" .. elementType]
|
||||||
if obj then
|
if obj then
|
||||||
self.skillNodeCells[elementType] = CellManager:addCellComp(obj, SKILL_NODE_CELL)
|
self.skillNodeCells[elementType] = CellManager:addCellComp(obj, SKILL_NODE_CELL)
|
||||||
local skillEntity = DataManager.BattleData:getSkillEntities()[elementType]
|
local skillEntity = DataManager.BattleData:getSkillEntities()[elementType]
|
||||||
|
|||||||
@ -8,6 +8,13 @@ function SkillNodeCell:refresh(skillEntity, elementMap)
|
|||||||
end
|
end
|
||||||
|
|
||||||
local uiMap = self:getUIMap()
|
local uiMap = self:getUIMap()
|
||||||
|
local iconNode = uiMap["skill_node_cell.icon_node"]
|
||||||
|
if not skillEntity:getUnlocked() then
|
||||||
|
iconNode:setVisible(false)
|
||||||
|
return
|
||||||
|
else
|
||||||
|
iconNode:setVisible(true)
|
||||||
|
end
|
||||||
if not self.imgComp then
|
if not self.imgComp then
|
||||||
self.imgComp = uiMap["skill_node_cell.energy_bg"]:getComponent(GConst.TYPEOF_UNITY_CLASS.UI_IMAGE)
|
self.imgComp = uiMap["skill_node_cell.energy_bg"]:getComponent(GConst.TYPEOF_UNITY_CLASS.UI_IMAGE)
|
||||||
end
|
end
|
||||||
|
|||||||
@ -58,14 +58,14 @@ function HeroDetailUI:_display()
|
|||||||
skillBg:addClickListener(function()
|
skillBg:addClickListener(function()
|
||||||
ModuleManager.TipsManager:showDescTips(ModuleManager.HeroManager:getSkillRogueDesc(skillId), skillIcon)
|
ModuleManager.TipsManager:showDescTips(ModuleManager.HeroManager:getSkillRogueDesc(skillId), skillIcon)
|
||||||
end)
|
end)
|
||||||
skillBg:setSprite(GConst.ATLAS_PATH.ICON_SKILL_ROGUE, ModuleManager.HeroManager:getSkillRogueBg(skillId))
|
|
||||||
skillIcon:setSprite(GConst.ATLAS_PATH.ICON_SKILL_ROGUE, ModuleManager.HeroManager:getSkillRogueIcon(skillId))
|
skillIcon:setSprite(GConst.ATLAS_PATH.ICON_SKILL_ROGUE, ModuleManager.HeroManager:getSkillRogueIcon(skillId))
|
||||||
skillBg:setImageGray(i > activeCount)
|
|
||||||
skillBg:setTouchEnable(true)
|
skillBg:setTouchEnable(true)
|
||||||
if i > activeCount then
|
if i > activeCount then
|
||||||
skillLv:setText(I18N:getGlobalText(I18N.GlobalConst.HERO_DESC_1, skillLvs[i] or 0))
|
skillLv:setText(I18N:getGlobalText(I18N.GlobalConst.HERO_DESC_1, skillLvs[i] or 0))
|
||||||
|
skillBg:setSprite(GConst.ATLAS_PATH.ICON_SKILL_ROGUE, "frame_0")
|
||||||
else
|
else
|
||||||
skillLv:setText(GConst.EMPTY_STRING)
|
skillLv:setText(GConst.EMPTY_STRING)
|
||||||
|
skillBg:setSprite(GConst.ATLAS_PATH.ICON_SKILL_ROGUE, ModuleManager.HeroManager:getSkillRogueBg(skillId))
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|||||||
@ -101,9 +101,13 @@ function BattleData:initRogueSkills()
|
|||||||
local cfg = SKILL_CFG[skillId]
|
local cfg = SKILL_CFG[skillId]
|
||||||
self.skillMap[cfg.position] = BATTLE_BOARD_SKILL_ENTITY:create(skillId)
|
self.skillMap[cfg.position] = BATTLE_BOARD_SKILL_ENTITY:create(skillId)
|
||||||
self.skillMap[cfg.position]:addUpSkills(heroEntity:getRogueSkillList())
|
self.skillMap[cfg.position]:addUpSkills(heroEntity:getRogueSkillList())
|
||||||
|
self.skillMap[cfg.position]:setUnlockId(heroEntity:getUnlockRogueId())
|
||||||
for _, id in ipairs(heroEntity:getActiveTogueSkills()) do
|
for _, id in ipairs(heroEntity:getActiveTogueSkills()) do
|
||||||
if not skillmap[id] then
|
if not skillmap[id] then
|
||||||
table.insert(self.skillPool, id)
|
if not self.skillPool[cfg.position] then
|
||||||
|
self.skillPool[cfg.position] = {}
|
||||||
|
end
|
||||||
|
table.insert(self.skillPool[cfg.position], id)
|
||||||
skillmap[id] = true
|
skillmap[id] = true
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
@ -315,15 +319,30 @@ function BattleData:getSkillEntityBySkillId(skillId)
|
|||||||
return self.skillMap[cfg.position]
|
return self.skillMap[cfg.position]
|
||||||
end
|
end
|
||||||
|
|
||||||
|
function BattleData:unlockSkillEntity(elementType)
|
||||||
|
if self.skillMap[elementType] then
|
||||||
|
self.skillMap[elementType]:setUnlock()
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
function BattleData:isUnlockedSkillElementType(elementType)
|
||||||
|
if not self.skillMap[elementType] then
|
||||||
|
return false
|
||||||
|
end
|
||||||
|
return self.skillMap[elementType]:getUnlocked()
|
||||||
|
end
|
||||||
|
|
||||||
function BattleData:addSkillEnergy(elementMap)
|
function BattleData:addSkillEnergy(elementMap)
|
||||||
if not self.skillMap then
|
if not self.skillMap then
|
||||||
return
|
return
|
||||||
end
|
end
|
||||||
|
|
||||||
for elementType, entity in pairs(self.skillMap) do
|
for elementType, entity in pairs(self.skillMap) do
|
||||||
|
if entity:getUnlocked() then
|
||||||
entity:addEnergy(elementMap[elementType] or 0)
|
entity:addEnergy(elementMap[elementType] or 0)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
end
|
||||||
|
|
||||||
function BattleData:addSkillCount(skillId, value)
|
function BattleData:addSkillCount(skillId, value)
|
||||||
if not self.selectSkillMap[skillId] then
|
if not self.selectSkillMap[skillId] then
|
||||||
|
|||||||
@ -27,6 +27,25 @@ function BattleBoardSkillEntity:getSkillId()
|
|||||||
return self.skillId
|
return self.skillId
|
||||||
end
|
end
|
||||||
|
|
||||||
|
function BattleBoardSkillEntity:getUnlocked()
|
||||||
|
return self.unlocked
|
||||||
|
end
|
||||||
|
|
||||||
|
function BattleBoardSkillEntity:setUnlock()
|
||||||
|
if self.unlocked then
|
||||||
|
return
|
||||||
|
end
|
||||||
|
self.unlocked = true
|
||||||
|
end
|
||||||
|
|
||||||
|
function BattleBoardSkillEntity:setUnlockId(unlockId)
|
||||||
|
self.unlockId = unlockId
|
||||||
|
end
|
||||||
|
|
||||||
|
function BattleBoardSkillEntity:getUnlockId()
|
||||||
|
return self.unlockId
|
||||||
|
end
|
||||||
|
|
||||||
function BattleBoardSkillEntity:getNeedEnergy()
|
function BattleBoardSkillEntity:getNeedEnergy()
|
||||||
if not self.config then
|
if not self.config then
|
||||||
return 1
|
return 1
|
||||||
|
|||||||
@ -225,6 +225,10 @@ function HeroEntity:getActiveRogueCount()
|
|||||||
return lvInfo.unlock_skill
|
return lvInfo.unlock_skill
|
||||||
end
|
end
|
||||||
|
|
||||||
|
function HeroEntity:getUnlockRogueId()
|
||||||
|
return self.config.rouge_skill
|
||||||
|
end
|
||||||
|
|
||||||
function HeroEntity:getRogueSkillList()
|
function HeroEntity:getRogueSkillList()
|
||||||
if not self.rogueSkillList then
|
if not self.rogueSkillList then
|
||||||
self.rogueSkillList = {}
|
self.rogueSkillList = {}
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user