[战斗]=====灵兽技能修改提交
parent
c131aa96b4
commit
5575ba2245
|
|
@ -254,8 +254,8 @@ function this.PlayerSkillAdapter(MSkillId)
|
|||
skill[index].triggerCondition[k] = v
|
||||
end
|
||||
end
|
||||
skill[index].maxCount = 999--monsterSkill.WarEffectCount[index] or 999
|
||||
skill[index].maxRoundCount = 1--monsterSkill.TurnEffectCount[index] or 999
|
||||
skill[index].maxCount = monsterSkill.WarEffectCount[index] or 999
|
||||
skill[index].maxRoundCount = monsterSkill.TurnEffectCount[index] or 999
|
||||
end
|
||||
return skill
|
||||
end
|
||||
|
|
@ -284,7 +284,7 @@ function this.PokemonUnitAdapter(pokemonUnit,camp,_teamDamage)
|
|||
end
|
||||
else
|
||||
for i = 1, #skills do
|
||||
role.skill[i] = this.MonsterSkillAdapter(tonumber(skills[i]))
|
||||
role.skill[i]= this.MonsterSkillAdapter(tonumber(skills[i]))
|
||||
end
|
||||
end
|
||||
|
||||
|
|
|
|||
|
|
@ -16,9 +16,9 @@ end
|
|||
function Monster:Init(data)
|
||||
self.type = BattleUnitType.Monster
|
||||
self.camp = data.camp
|
||||
if data.position==10 then
|
||||
self.type = BattleUnitType.Player
|
||||
end
|
||||
-- if data.position==10 then
|
||||
-- self.type = BattleUnitType.Player
|
||||
-- end
|
||||
self.position = data.position
|
||||
self.star = data.star
|
||||
self.uid= data.id
|
||||
|
|
@ -30,13 +30,13 @@ function Monster:Init(data)
|
|||
self.exileTargets={}--已经被放逐过的目标
|
||||
-- self.skillGroup = MSkillManager.CreateMSkillGroup(self, data.skill)
|
||||
|
||||
self.skillList=data.skill
|
||||
-- self.skillList=data.skill
|
||||
self.skillGroupList = {}
|
||||
--for i = 1, #data.skill do
|
||||
for i = 1, #data.skill do
|
||||
-- LogError("---------------------"..data.skill[i].skillData.effect[1])
|
||||
--LogError("monster skill id=="..data.skill[i])
|
||||
MSkillManager.CreateMSkillGroup(self, data.skill)
|
||||
--end
|
||||
self.skillGroupList[i] = MSkillManager.CreateMSkillGroup(self, i, data.skill[i])
|
||||
end
|
||||
end
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -8,8 +8,9 @@ function MSkillGroup:New()
|
|||
end
|
||||
|
||||
-- 初始化数据
|
||||
function MSkillGroup:Init(monster, groupData)
|
||||
function MSkillGroup:Init(monster, groupIndex, groupData)
|
||||
self.owner = monster
|
||||
self.groupIndex = groupIndex
|
||||
self.skillGroupData = groupData
|
||||
-- 创建技能
|
||||
self.skillList = {}
|
||||
|
|
|
|||
|
|
@ -12,31 +12,38 @@ function this.Init()
|
|||
end
|
||||
|
||||
-- 创建一个技能组
|
||||
function this.CreateMSkillGroup(monster, skillGroupData)
|
||||
local index = monster:GetCamp() * 6 + monster:GetPosition()
|
||||
function this.CreateMSkillGroup(monster, groupIndex, skillGroupData)
|
||||
local position = monster:GetCamp() * 6 + monster:GetPosition()
|
||||
if not this.MSkillGroupList then
|
||||
this.MSkillGroupList = {}
|
||||
end
|
||||
if not this.MSkillGroupList[index] then
|
||||
this.MSkillGroupList[index] = MSkillGroup:New()
|
||||
if not this.MSkillGroupList[position] then
|
||||
this.MSkillGroupList[position] = MSkillGroup:New()
|
||||
end
|
||||
this.MSkillGroupList[index]:Init(monster, skillGroupData)
|
||||
this.MSkillGroupList[position]:Init(monster, groupIndex, skillGroupData)
|
||||
return this.MSkillGroupList[position]
|
||||
end
|
||||
|
||||
-- 创建一个技能
|
||||
function this.CreateMSkill(monster, group, index, skilldata)
|
||||
local owner = group:GetOwner()
|
||||
local m_index = owner:GetCamp() * 6 + owner:GetPosition()
|
||||
local groupIndex = group.groupIndex
|
||||
local position = owner:GetCamp() * 6 + owner:GetPosition()
|
||||
if not this.MSkillList then
|
||||
this.MSkillList = {}
|
||||
end
|
||||
if not this.MSkillList[m_index] then
|
||||
this.MSkillList[m_index] = {}
|
||||
if not this.MSkillList[position] then
|
||||
this.MSkillList[position] = {}
|
||||
end
|
||||
if not this.MSkillList[m_index][index] then
|
||||
this.MSkillList[m_index][index] = MSkill:New()
|
||||
if not this.MSkillList[position][groupIndex] then
|
||||
this.MSkillList[position][groupIndex] = {}
|
||||
end
|
||||
this.MSkillList[m_index][index]:Init(monster, group, index, skilldata[1])
|
||||
if not this.MSkillList[position][groupIndex][index] then
|
||||
this.MSkillList[position][groupIndex][index] = MSkill:New()
|
||||
end
|
||||
this.MSkillList[position][groupIndex][index]:Init(monster, group, index, skilldata)
|
||||
|
||||
return this.MSkillList[position][groupIndex][index]
|
||||
end
|
||||
|
||||
return MSkillManager
|
||||
Loading…
Reference in New Issue