From ae616ac8485a8487afad22fc71d7ce12fcbe7f43 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=98=94=E5=BF=B5?= <1@72wo.cn> Date: Thu, 18 Dec 2025 00:32:47 +0800 Subject: [PATCH] =?UTF-8?q?feat(boss):=20=E5=AE=9E=E7=8E=B0=20boss=20?= =?UTF-8?q?=E7=89=B9=E6=AE=8A=E6=8A=80=E8=83=BD=E9=80=BB=E8=BE=91=E5=A2=9E?= =?UTF-8?q?=E5=BC=BA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - 新增 NewSeIdx_12 技能:受到特殊攻击时提升指定 battle_lv 等级,可配置最大触发次数 - 新增 NewSeIdx_16 技能:根据 HP 减少量动态提升指定 battle_lv 等级,每损失 1/8 最大 HP 提升一级 - 新增 NewSeIdx_26 技能:预留 Turn_Start 接口以支持回合开始时的逻辑处理 - 在 EffectNode 中增加命中日志输出,便于调试效果触发情况 --- logic/service/fight/boss/NewSeIdx_12.go | 5 +++++ logic/service/fight/boss/NewSeIdx_16.go | 29 +++++++++++++++++++++++++ logic/service/fight/boss/NewSeIdx_26.go | 4 ++++ logic/service/fight/node/node.go | 2 ++ 4 files changed, 40 insertions(+) diff --git a/logic/service/fight/boss/NewSeIdx_12.go b/logic/service/fight/boss/NewSeIdx_12.go index e85d933f5..373089544 100644 --- a/logic/service/fight/boss/NewSeIdx_12.go +++ b/logic/service/fight/boss/NewSeIdx_12.go @@ -9,6 +9,7 @@ import ( // TODO: 实现受到特殊攻击时使自身的一种 battle_lv 提升1个等级,可提升n次;(a1: which blv, a2: max_blv_up_times)的核心逻辑 type NewSel12 struct { NewSel0 + count int } func (e *NewSel12) Damage_DIV_ex(t *info.DamageZone) bool { @@ -25,6 +26,9 @@ func (e *NewSel12) Damage_DIV_ex(t *info.DamageZone) bool { if skill.Category() != info.Category.SPECIAL { return true } + if e.count >= int(e.Args()[2].IntPart()) { + return true + } // 3. 概率判定(Args()[1]为触发概率) success, _, _ := e.Input.Player.Roll(int(e.Args()[1].IntPart()), 100) if !success { @@ -32,6 +36,7 @@ func (e *NewSel12) Damage_DIV_ex(t *info.DamageZone) bool { } e.Ctx().Our.SetProp(e.Ctx().Our, int8(e.Args()[0].IntPart()), 1, info.AbilityOpType.ADD) + e.count++ return true } func init() { diff --git a/logic/service/fight/boss/NewSeIdx_16.go b/logic/service/fight/boss/NewSeIdx_16.go index 86b8fa1c1..efeec3f85 100644 --- a/logic/service/fight/boss/NewSeIdx_16.go +++ b/logic/service/fight/boss/NewSeIdx_16.go @@ -1,15 +1,44 @@ package effect import ( + "blazing/logic/service/fight/action" + "blazing/logic/service/fight/info" "blazing/logic/service/fight/input" + + "github.com/alpacahq/alpacadecimal" ) // 16. hp 与 battle_lv 的某一种绑定, 自身体力每减少1/8, 则该battle_lv上升1个等级, 最高到12;(a1: which blv) // TODO: 实现hp 与 battle_lv 的某一种绑定, 自身体力每减少1/8, 则该battle_lv上升1个等级, 最高到12;(a1: which blv)的核心逻辑 type NewSel16 struct { NewSel0 + curhp alpacadecimal.Decimal } +func (e *NewSel16) Turn_Start(fattack *action.SelectSkillAction, sattack *action.SelectSkillAction) { + + // fmt.Println(e.ID().GetCatchTime(), e.Ctx().Our.CurrentPet.Info.CatchTime) + if e.ID().GetCatchTime() != e.Ctx().Our.CurrentPet.Info.CatchTime { + return + } + maxHP := e.Ctx().Our.CurrentPet.GetMaxHP() + if e.curhp.IntPart() == 0 { + e.curhp = maxHP + + } + + //如果当前被扣除的血量少于当前血,说明我方回血 + if e.curhp.Cmp(e.Ctx().Our.CurrentPet.GetHP()) == -1 { + e.curhp = e.Ctx().Our.CurrentPet.GetHP() + return + } + if e.curhp.Sub(e.Ctx().Our.CurrentPet.GetHP()).Cmp(maxHP.Div(alpacadecimal.NewFromInt(8))) == 1 { + e.curhp = e.Ctx().Our.CurrentPet.GetHP() + e.Ctx().Our.SetProp(e.Ctx().Our, int8(e.Args()[0].IntPart()), 1, info.AbilityOpType.ADD) + } + + return +} func init() { input.InitEffect(input.EffectType.NewSel, 16, &NewSel16{}) } diff --git a/logic/service/fight/boss/NewSeIdx_26.go b/logic/service/fight/boss/NewSeIdx_26.go index 398e3f70c..1d86ff041 100644 --- a/logic/service/fight/boss/NewSeIdx_26.go +++ b/logic/service/fight/boss/NewSeIdx_26.go @@ -1,6 +1,7 @@ package effect import ( + "blazing/logic/service/fight/action" "blazing/logic/service/fight/input" ) @@ -10,6 +11,9 @@ type NewSel26 struct { NewSel0 } +func (e *NewSel26) Turn_Start(fattack *action.SelectSkillAction, sattack *action.SelectSkillAction) { + +} func init() { input.InitEffect(input.EffectType.NewSel, 26, &NewSel26{}) } diff --git a/logic/service/fight/node/node.go b/logic/service/fight/node/node.go index b9c6cb58e..bc858d695 100644 --- a/logic/service/fight/node/node.go +++ b/logic/service/fight/node/node.go @@ -68,7 +68,9 @@ func (e *EffectNode) ID(t ...input.EffectIDCombiner) input.EffectIDCombiner { } func (e *EffectNode) Hit(t ...bool) bool { + if len(t) > 0 { + println("效果命中", e.id.GetEffectType(), e.id.Suffix(), t[0]) e.hit = t[0] }