fix(fight): 修复技能命中和伤害计算逻辑错误
- 修正 `Effect7` 中敌我双方血量判断逻辑,确保技能命中率和伤害值正确计算 - 调整 `FightC` 中技能攻击流程,统一使用 `Exec` 替代 `ExecCace` 执行效果 - 移除重复的 `AddEffects` 方法,简化效果添加逻辑 - 注释暂未使用的逻辑,避免无效调用影响战斗流程 - 增加战斗超时保护机制,防止协程泄漏 - 优化玩家离线保存逻辑
This commit is contained in:
@@ -180,10 +180,10 @@ func (our *Input) Parseskill(defender *Input, skill *action.SelectSkillAction) {
|
||||
// defender.AddEffect(t)
|
||||
// } else {
|
||||
//t.SetArgs(i, temparg[:args]...) //设置入参
|
||||
//i.AddEffect(t)
|
||||
our.AddEffect(t)
|
||||
// }
|
||||
//这里是临时缓存buff,后面确认命中后修改HIT状态
|
||||
t.Alive() //先让效果保持存活
|
||||
// t.Alive() //先让效果保持存活
|
||||
our.EffectCache = append(our.EffectCache, t)
|
||||
// i.NewEffects = append(i.NewEffects, t)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user