feat(logic): 新增减少最大生命值效果并优化属性同步逻辑

新增了减少最大生命值的效果实现(opTypeMaxHP),并在 EffectPropSyncReverse
结构体中增加了对目标宠物属性的处理逻辑。同时重构了属性同步与反转相关代码,
改进了效果激活
This commit is contained in:
2025-12-19 21:12:45 +08:00
parent eb47c3e1b9
commit 90fdb49b92
3 changed files with 118 additions and 26 deletions

View File

@@ -18,6 +18,7 @@ func (e *EffectNode) Turn_Start(fattack, sattack *action.SelectSkillAction) {
//panic("not implemented") // TODO: Implement
}
func (e *EffectNode) Turn_End() {
// println("效果结算", e.id.Suffix(), e.duration)
if e.duration == 0 { // 保留 (负数表示永久)

View File

@@ -132,3 +132,14 @@ func (e *EffectNode) BoolisFalse(t ...bool) bool {
}
return false
}
func (e *EffectNode) BoolisTrue(t ...bool) bool {
if len(t) > 0 {
if t[0] == true {
return true
}
return false
}
return false
}