【战斗】后端被动和主动技能id格式转换成数字,可能导致战斗不一致

dev_chengFeng
gaoxin 2021-11-19 17:21:01 +08:00
parent 1a623036fa
commit ab9408b485
3 changed files with 11 additions and 3 deletions

View File

@ -25,7 +25,7 @@ function MSkill:Init(owner, group, index, skillData)
--MTrigger.AddSkill(self.skillData, self.skillData.triggerCondition, self)
local effectData = self.skillData.effect
self.id = effectData[1] -- 技能ID
self.id = tonumber(effectData[1]) -- 技能ID
-- 将技能加入触发检测
MTrigger.AddSkill(self.skillData.triggerId, self.skillData.triggerCondition, self)
self.hitTime = effectData[2] -- 效果命中需要的时间

View File

@ -47,7 +47,9 @@ function RoleLogic:Init(uid, data, position)
self.Event:ClearEvent()
self.skill = data.skill
self.skill[1] = tonumber(self.skill[1])
self.superSkill = data.superSkill
self.superSkill[1] = tonumber(self.superSkill[1])
--首次读条时间=速度/20*(等级+10
self.sp = 0
local time = self:GetRoleData(RoleDataName.Speed)/(20*(self:GetRoleData(RoleDataName.Level)+10))
@ -109,9 +111,9 @@ function RoleLogic:Init(uid, data, position)
local coverPass={}
for i = 1, #data.passivity do
local v = data.passivity[i]
local passivityId=v[1]
local passivityId = tonumber(v[1])
local judge=v[2]
local id = v[3]
local id = tonumber(v[3])
local args = {}
for j = 4, #v do
args[j-3] = v[j]

View File

@ -40,6 +40,12 @@ function this.AddMonsterSkill(skill)
if skill.type == BattleSkillType.Monster then
table.insert(this.MonsterSkillList, skill)
end
BattleLogManager.Log(
"Add Monster Skill",
"camp", skill.owner.camp,
"pos", skill.owner.position,
"type", BattleSkillType.Monster
)
return skill
end