fix(fight): 战斗修改

This commit is contained in:
1
2025-11-11 05:54:24 +00:00
parent c6e0d84c1d
commit 65758c799e
44 changed files with 656 additions and 731 deletions

View File

@@ -23,19 +23,19 @@ type Effect7 struct {
node.EffectNode
}
func (e *Effect7) Skill_Hit_Pre(ctx input.Ctx) bool {
if ctx.CurrentPet.Info.Hp <= e.Input.CurrentPet.Info.Hp {
ctx.SkillEntity.Accuracy = 0
func (e *Effect7) Skill_Hit_Pre() bool {
if e.Ctx().Our.CurrentPet.Info.Hp <= e.Input.CurrentPet.Info.Hp {
e.Ctx().SkillEntity.Accuracy = 0
}
return true
}
func (e *Effect7) Damage_Floor(ctx input.Ctx) bool {
func (e *Effect7) Damage_Floor() bool {
if !e.Hit() {
return true
}
if ctx.DamageZone.Type == info.DamageType.Red {
ctx.DamageZone.Damage = decimal.NewFromInt(int64(ctx.CurrentPet.Info.Hp - e.Input.CurrentPet.Info.Hp))
if e.Ctx().DamageZone.Type == info.DamageType.Red {
e.Ctx().DamageZone.Damage = decimal.NewFromInt(int64(e.Ctx().Our.CurrentPet.Info.Hp - e.Ctx().Opp.CurrentPet.Info.Hp))
}