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] }