diff --git a/logic/controller/item_use.go b/logic/controller/item_use.go index aa50dd528..4650243c9 100644 --- a/logic/controller/item_use.go +++ b/logic/controller/item_use.go @@ -52,12 +52,8 @@ func (h Controller) UsePetItemOutOfFight(data *item.C2S_USE_PET_ITEM_OUT_OF_FIGH } oldPetCatchTime := currentPet.CatchTime oldPet := c.Service.Pet.PetInfo_One_Unscoped(currentPet.OldCatchTime) - - copier.CopyWithOption(currentPet, oldPet.Data, copier.Option{DeepCopy: true}) - // println("currentPet.CatchTime", currentPet.CatchTime, currentPet.OldCatchTime) + currentPet = &oldPet.Data currentPet.CatchTime = oldPetCatchTime - - currentPet.EffectInfo = oldPet.Data.EffectInfo } else { handler := item.PetItemRegistry.GetHandler(data.ItemID) if handler == nil { diff --git a/logic/service/fight/boss/NewSeIdx_60.go b/logic/service/fight/boss/NewSeIdx_60.go index 5304b863e..ad640bd39 100644 --- a/logic/service/fight/boss/NewSeIdx_60.go +++ b/logic/service/fight/boss/NewSeIdx_60.go @@ -1,7 +1,10 @@ package effect import ( + "blazing/logic/service/fight/info" "blazing/logic/service/fight/input" + + "github.com/alpacahq/alpacadecimal" ) // 60. 受到攻击时n%几率使受到的伤害降低m点(a1: n, a2: m) @@ -10,6 +13,25 @@ type NewSel60 struct { NewSel0 } +func (e *NewSel60) Damage_SUB_ex(t *info.DamageZone) bool { + if e.ID().GetCatchTime() != e.Ctx().Our.CurrentPet.Info.CatchTime { + return true + } + if e.Ctx().SkillEntity == nil { + return true + } + + if t.Type != info.DamageType.Red { + return true + } + success, _, _ := e.Input.Player.Roll(int(e.Args()[0].IntPart()), 100) + if !success { + return true + } + t.Damage = t.Damage.Sub(alpacadecimal.NewFromInt(int64(e.Args()[1].IntPart()))) + + return true +} func init() { input.InitEffect(input.EffectType.NewSel, 60, &NewSel60{}) } diff --git a/logic/service/fight/boss/NewSeIdx_699.go b/logic/service/fight/boss/NewSeIdx_699.go new file mode 100644 index 000000000..92757b157 --- /dev/null +++ b/logic/service/fight/boss/NewSeIdx_699.go @@ -0,0 +1,39 @@ +package effect + +import ( + "blazing/logic/service/fight/info" + "blazing/logic/service/fight/input" + + "github.com/alpacahq/alpacadecimal" +) + +// 60. "20%弹60点固定伤害" StarLevel="0 + +type NewSel699 struct { + NewSel0 +} + +func (e *NewSel699) Skill_Use_ex() bool { + if e.ID().GetCatchTime() != e.Ctx().Our.CurrentPet.Info.CatchTime { + return true + } + if e.Ctx().SkillEntity == nil { + return true + } + + success, _, _ := e.Input.Player.Roll(int(e.Args()[0].IntPart()), 100) + if !success { + return true + } + + e.Ctx().Opp.Damage(e.Ctx().Our, &info.DamageZone{ + + Type: info.DamageType.Fixed, + Damage: alpacadecimal.Min(e.Ctx().Opp.SumDamage, e.Args()[1]), + }) + + return true +} +func init() { + input.InitEffect(input.EffectType.NewSel, 699, &NewSel699{}) +} diff --git a/logic/service/fight/boss/NewSeIdx_700.go b/logic/service/fight/boss/NewSeIdx_700.go new file mode 100644 index 000000000..e33512917 --- /dev/null +++ b/logic/service/fight/boss/NewSeIdx_700.go @@ -0,0 +1,29 @@ +package effect + +import ( + "blazing/logic/service/fight/action" + "blazing/logic/service/fight/input" +) + +// 60.回复造成伤害的6% + +type NewSel700 struct { + NewSel0 +} + +func (e *NewSel700) Skill_Useed() bool { + if e.ID().GetCatchTime() != e.Ctx().Our.CurrentPet.Info.CatchTime { + return true + } + if e.Ctx().SkillEntity == nil { + return true + } + + e.Input.Heal( + e.Ctx().Our, &action.SelectSkillAction{}, e.Ctx().Our.SumDamage.Div(e.Args()[1]), + ) + return true +} +func init() { + input.InitEffect(input.EffectType.NewSel, 700, &NewSel700{}) +} diff --git a/public/config/bossbuff和特性.xml b/public/config/bossbuff和特性.xml index 8fe9b8da6..3ce2f3110 100644 --- a/public/config/bossbuff和特性.xml +++ b/public/config/bossbuff和特性.xml @@ -901,11 +901,11 @@ - - - - - + + + + +