战斗修改

This commit is contained in:
2025-10-22 00:25:38 +08:00
parent 3270ed8c67
commit 3a43e78aab
4 changed files with 21 additions and 22 deletions

View File

@@ -2,6 +2,7 @@ package input
import (
"blazing/logic/service/fight/info"
"fmt"
"blazing/modules/blazing/model"
@@ -112,12 +113,12 @@ func (c *Input) AddEffect(e *EffectID) {
//TODO 先激活
// 如果已有同 ID 的效果,尝试叠加
eff, ok := c.Effects.Load(e.ID)
if !ok {
// 否则新加入
c.Effects.Store(e.ID, e.Effect)
eff, ok := c.Effects.LoadOrStore(e.ID, e.Effect)
if ok {
return
}
if !eff.Alive() { //如果不存活
c.Effects.Store(e.ID, e.Effect)
return
@@ -131,7 +132,7 @@ func (c *Input) AddEffect(e *EffectID) {
} else {
//这里,说明是延续回合效果
fmt.Println("回合数", value.Duration())
value.Duration(value.Duration())
}
return false