diff --git a/logic/controller/fight_tawor.go b/logic/controller/fight_tawor.go index 023b31806..f66ea0daa 100644 --- a/logic/controller/fight_tawor.go +++ b/logic/controller/fight_tawor.go @@ -162,7 +162,6 @@ func (h Controller) PetTawor(data *fight.StartTwarInboundInfo, c *player.Player) } } - //todo 特性填装 if len(r.Effect) != 0 { diff --git a/logic/service/fight/boss/NewSeIdx_112.go b/logic/service/fight/boss/NewSeIdx_112.go index fa3d064a2..f782529a4 100644 --- a/logic/service/fight/boss/NewSeIdx_112.go +++ b/logic/service/fight/boss/NewSeIdx_112.go @@ -6,7 +6,7 @@ import ( ) // NewSel112 受到物理时使自身的一种 battle_lv 提升1个等级,可提升n次;(a1: which blv, a2: max_blv_up_times) -// TODO: 实现受到物理时使自身的一种 battle_lv 提升1个等级,可提升n次;(a1: which blv, a2: max_blv_up_times)的核心逻辑 + type NewSel112 struct { NewSel0 count int diff --git a/logic/service/fight/boss/NewSeIdx_113.go b/logic/service/fight/boss/NewSeIdx_113.go index 7c4186431..9ac06917d 100644 --- a/logic/service/fight/boss/NewSeIdx_113.go +++ b/logic/service/fight/boss/NewSeIdx_113.go @@ -1,7 +1,10 @@ package effect import ( + "blazing/logic/service/fight/info" "blazing/logic/service/fight/input" + + "github.com/alpacahq/alpacadecimal" ) // todo "只有当自己处于异常状态时才会受到伤害" @@ -10,6 +13,25 @@ type NewSel113 struct { count int } +func (e *NewSel404) DamageLock(t *info.DamageZone) bool { + //魂印特性有不在场的情况,绑定时候将精灵和特性绑定 + if e.ID().GetCatchTime() != e.Ctx().Our.CurrentPet.Info.CatchTime { + return true + } + if t.Type != info.DamageType.Red { + return true + } + for _, v := range e.Ctx().Our.Effects { + if v.Alive() && input.IS_Stat(v) { + + return true + } + + } + + t.Damage = alpacadecimal.Zero + return true +} func init() { input.InitEffect(input.EffectType.NewSel, 113, &NewSel113{}) } diff --git a/logic/service/fight/boss/NewSeIdx_114.go b/logic/service/fight/boss/NewSeIdx_114.go new file mode 100644 index 000000000..e91dbcb00 --- /dev/null +++ b/logic/service/fight/boss/NewSeIdx_114.go @@ -0,0 +1,39 @@ +package effect + +import ( + "blazing/logic/service/fight/action" + "blazing/logic/service/fight/input" +) + +// 免疫瞬杀 +type NewSel114 struct { + NewSel0 + v *input.Effect +} + +func (e *NewSel114) TurnStart(fattack *action.SelectSkillAction, sattack *action.SelectSkillAction) { + // TODO: 实现若遇到天敌, 则战斗开始时连续害怕 n 回合;(a1: n)的核心逻辑 + if e.ID().GetCatchTime() != e.Ctx().Our.CurrentPet.Info.CatchTime { + return + } + + for _, v := range e.Ctx().Opp.Opp.Effects { + + if v.ID().GetEffectType() == input.EffectType.NewSel && v.ID().Suffix() == 32 { + v.Alive() + e.v = &v + } + + } + +} +func (e *NewSel114) TurnEnd() { + if e.v != nil { + e.Alive(true) + + } + +} +func init() { + input.InitEffect(input.EffectType.NewSel, 114, &NewSel114{}) +} diff --git a/logic/service/fight/boss/NewSeIdx_14.go b/logic/service/fight/boss/NewSeIdx_14.go index d5fddf0d8..9518143fc 100644 --- a/logic/service/fight/boss/NewSeIdx_14.go +++ b/logic/service/fight/boss/NewSeIdx_14.go @@ -9,6 +9,7 @@ import ( // TODO: 实现若遇到天敌, 则战斗开始时连续害怕 n 回合;(a1: n)的核心逻辑 type NewSel14 struct { NewSel0 + conut int } func (e *NewSel14) TurnStart(fattack *action.SelectSkillAction, sattack *action.SelectSkillAction) { @@ -16,6 +17,8 @@ func (e *NewSel14) TurnStart(fattack *action.SelectSkillAction, sattack *action. if e.ID().GetCatchTime() != e.Ctx().Our.CurrentPet.Info.CatchTime { return } + + //xmlres.PetMAP[e.Ctx().Our.CurrentPet.ID].SpAtk } func init() { input.InitEffect(input.EffectType.NewSel, 14, &NewSel14{}) diff --git a/logic/service/fight/effect/effect_13.go b/logic/service/fight/effect/effect_13.go index f54b40892..d5d2df4b1 100644 --- a/logic/service/fight/effect/effect_13.go +++ b/logic/service/fight/effect/effect_13.go @@ -38,6 +38,6 @@ func (e *Effect13) OnSkill() bool { } eff.Duration(e.EffectNode.SideEffectArgs[0] - 1) - e.Ctx().Opp.AddEffect(e.Ctx().Opp, eff) + e.Ctx().Opp.AddEffect(e.Ctx().Our, eff) return true } diff --git a/logic/service/fight/effect/effect_status.go b/logic/service/fight/effect/effect_status.go index e22f49c33..7f0e4b299 100644 --- a/logic/service/fight/effect/effect_status.go +++ b/logic/service/fight/effect/effect_status.go @@ -98,6 +98,14 @@ type ParasiticSeed struct { Status info.EnumPetStatus // 状态类型枚举 } +func (e *ParasiticSeed) SwitchOut(in *input.Input) bool { + + if in == e.Ctx().Our { + e.Alive(false) + } + return true +} + // 技能命中前触发寄生效果 func (e *ParasiticSeed) ActionStartEx(attacker, defender *action.SelectSkillAction) bool { // 过滤特定类型单位(假设1是植物类型,使用枚举替代魔法数字) @@ -179,7 +187,7 @@ func (e *Weakened) DamageDivEx(t *info.DamageZone) bool { // 1. 定义衰弱等级对应的倍率表(索引对应等级,0级无倍率) // 索引0: 0%(未衰弱)、1:25%、2:50%、3:100%、4:250%、5:500% weakenedMultiples := []alpacadecimal.Decimal{ - alpacadecimal.Zero, // 0级 + alpacadecimal.Zero, // 0级 alpacadecimal.NewFromFloat(0.25), // 1级(25%) alpacadecimal.NewFromFloat(0.5), // 2级(50%) alpacadecimal.NewFromFloat(1.0), // 3级(100%) diff --git a/modules/player/model/done.go b/modules/player/model/done.go index cfbd219a9..ea1772074 100644 --- a/modules/player/model/done.go +++ b/modules/player/model/done.go @@ -7,7 +7,7 @@ import ( ) var MilestoneEnum = enum.New[struct { - CollectElfCount EnumMilestone `enum:"3515"` // 收集精灵数量 + // CollectElfCount EnumMilestone `enum:"3515"` // 收集精灵数量 DailyTaskCount EnumMilestone `enum:"3510"` // 日常任务次数 MaxLevelCount EnumMilestone `enum:"3511"` // 满级数量 SingleAttrCount EnumMilestone `enum:"3512"` // 单属性数量