From 5500684e296de2fc4c9042ed7249f006cf80349c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=98=94=E5=BF=B5?= <12574910+72wo@users.noreply.github.com> Date: Thu, 23 Apr 2026 00:40:01 +0800 Subject: [PATCH] 1 --- logic/service/fight/fightc.go | 23 ----------------------- logic/service/fight/input/input.go | 28 ---------------------------- 2 files changed, 51 deletions(-) diff --git a/logic/service/fight/fightc.go b/logic/service/fight/fightc.go index e200ba0e..e0368b2e 100644 --- a/logic/service/fight/fightc.go +++ b/logic/service/fight/fightc.go @@ -102,11 +102,7 @@ func (f *FightC) processSkillAttack(attacker, defender *input.Input, skill *info // 扣减防御方血量 attacker.ExecWithOpponent(defender, func(effect input.Effect) bool { f.setEffectSkillContext(effect, skill, defender) - fmt.Printf("[processSkillAttack] Before OnSkill: outerAttacker=%p outerDefender=%p ctx.Our=%p ctx.Opp=%p effect=%T attacker.Prop=%v defender.Prop=%v\n", - attacker, defender, effect.Ctx().Our, effect.Ctx().Opp, effect, attacker.Prop, defender.Prop) effect.OnSkill() //调用伤害计算 - fmt.Printf("[processSkillAttack] After OnSkill Hook: outerAttacker=%p outerDefender=%p ctx.Our=%p ctx.Opp=%p effect=%T attacker.Prop=%v defender.Prop=%v ctx.Our.Prop=%v ctx.Opp.Prop=%v\n", - attacker, defender, effect.Ctx().Our, effect.Ctx().Opp, effect, attacker.Prop, defender.Prop, effect.Ctx().Our.Prop, effect.Ctx().Opp.Prop) return true }) fmt.Printf("[processSkillAttack] After OnSkill: attacker.Prop=%v, defender.Prop=%v, attacker.SkillID=%d\n", attacker.Prop, defender.Prop, attacker.SkillID) @@ -387,29 +383,10 @@ func (f *FightC) enterturn(firstAttack, secondAttack *action.SelectSkillAction) f.setEffectSkillContext(effect, currentSkill, defender) return effect.ActionStartEx(firstAttack, secondAttack) }) - fmt.Printf("[enterturn] Before ActionStart: round=%d attacker=%p defender=%p attackerSkill=%v attackerStatus(paralysis=%v fear=%v sleep=%v tired=%v petrified=%v) defenderStatus(paralysis=%v fear=%v sleep=%v tired=%v petrified=%v)\n", - i, attacker, defender, currentSkill != nil, - attacker.StatEffect_Exist(info.PetStatus.Paralysis), - attacker.StatEffect_Exist(info.PetStatus.Fear), - attacker.StatEffect_Exist(info.PetStatus.Sleep), - attacker.StatEffect_Exist(info.PetStatus.Tired), - attacker.StatEffect_Exist(info.PetStatus.Petrified), - defender.StatEffect_Exist(info.PetStatus.Paralysis), - defender.StatEffect_Exist(info.PetStatus.Fear), - defender.StatEffect_Exist(info.PetStatus.Sleep), - defender.StatEffect_Exist(info.PetStatus.Tired), - defender.StatEffect_Exist(info.PetStatus.Petrified)) canUseSkill := attacker.ExecWithOpponent(defender, func(effect input.Effect) bool { //这个是能否使用技能 f.setEffectSkillContext(effect, currentSkill, defender) return effect.ActionStart(firstAttack, secondAttack) }) - fmt.Printf("[enterturn] After ActionStart: round=%d attacker=%p defender=%p canUseSkill=%v attackerStatus(paralysis=%v fear=%v sleep=%v tired=%v petrified=%v)\n", - i, attacker, defender, canUseSkill, - attacker.StatEffect_Exist(info.PetStatus.Paralysis), - attacker.StatEffect_Exist(info.PetStatus.Fear), - attacker.StatEffect_Exist(info.PetStatus.Sleep), - attacker.StatEffect_Exist(info.PetStatus.Tired), - attacker.StatEffect_Exist(info.PetStatus.Petrified)) attackerPet := attacker.CurrentPet() defenderPet := defender.CurrentPet() diff --git a/logic/service/fight/input/input.go b/logic/service/fight/input/input.go index 402cb56c..834a2f77 100644 --- a/logic/service/fight/input/input.go +++ b/logic/service/fight/input/input.go @@ -226,13 +226,6 @@ func (our *Input) SetOPP(t *Input) { } func (our *Input) RecoverEffect() { //println("恢复效果",our.UserID) - fmt.Printf("[RecoverEffect] input=%p effects=%d cache=%d lost=%d paralysis=%v fear=%v sleep=%v tired=%v petrified=%v\n", - our, len(our.Effects), len(our.EffectCache), len(our.EffectLost), - our.StatEffect_Exist(info.PetStatus.Paralysis), - our.StatEffect_Exist(info.PetStatus.Fear), - our.StatEffect_Exist(info.PetStatus.Sleep), - our.StatEffect_Exist(info.PetStatus.Tired), - our.StatEffect_Exist(info.PetStatus.Petrified)) //根本没释放技能,这些效果全部失效 for _, e := range our.EffectCache { @@ -249,23 +242,9 @@ func (our *Input) RecoverEffect() { } } - fmt.Printf("[RecoverEffect] done input=%p effects=%d cache=%d lost=%d paralysis=%v fear=%v sleep=%v tired=%v petrified=%v\n", - our, len(our.Effects), len(our.EffectCache), len(our.EffectLost), - our.StatEffect_Exist(info.PetStatus.Paralysis), - our.StatEffect_Exist(info.PetStatus.Fear), - our.StatEffect_Exist(info.PetStatus.Sleep), - our.StatEffect_Exist(info.PetStatus.Tired), - our.StatEffect_Exist(info.PetStatus.Petrified)) } func (our *Input) ReactvieEffect() { - fmt.Printf("[ReactvieEffect] input=%p effects=%d cache=%d lost=%d paralysis=%v fear=%v sleep=%v tired=%v petrified=%v\n", - our, len(our.Effects), len(our.EffectCache), len(our.EffectLost), - our.StatEffect_Exist(info.PetStatus.Paralysis), - our.StatEffect_Exist(info.PetStatus.Fear), - our.StatEffect_Exist(info.PetStatus.Sleep), - our.StatEffect_Exist(info.PetStatus.Tired), - our.StatEffect_Exist(info.PetStatus.Petrified)) //根本没释放技能,这些效果全部失效 for _, e := range our.EffectLost { @@ -282,13 +261,6 @@ func (our *Input) ReactvieEffect() { our.AddEffect(e.GetInput(), e) } - fmt.Printf("[ReactvieEffect] done input=%p effects=%d cache=%d lost=%d paralysis=%v fear=%v sleep=%v tired=%v petrified=%v\n", - our, len(our.Effects), len(our.EffectCache), len(our.EffectLost), - our.StatEffect_Exist(info.PetStatus.Paralysis), - our.StatEffect_Exist(info.PetStatus.Fear), - our.StatEffect_Exist(info.PetStatus.Sleep), - our.StatEffect_Exist(info.PetStatus.Tired), - our.StatEffect_Exist(info.PetStatus.Petrified)) } func (our *Input) GenSataus() { our.Status = [20]int8{}