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

@@ -25,7 +25,7 @@ type Effect21 struct {
}
// 使用技能时不可被继承继承Miss和Hit就行
func (e *Effect21) OnSkill(input.Ctx) bool {
func (e *Effect21) OnSkill() bool {
if !e.Hit() {
return true
}
@@ -43,14 +43,14 @@ func (e *Effect21) OnSkill(input.Ctx) bool {
}
// 被攻击时候反弹
func (e *Effect21) Skill_Use(ctx input.Ctx) bool {
func (e *Effect21) Skill_Use_ex() bool {
//未命中
if !e.Hit() {
return true
}
//不是技能
if ctx.SkillEntity == nil {
if e.Ctx().SkillEntity == nil {
return true
}
//0血不触发
@@ -58,8 +58,10 @@ func (e *Effect21) Skill_Use(ctx input.Ctx) bool {
return true
}
ctx.DamageZone.Type = info.DamageType.Fixed
ctx.DamageZone.Damage = decimal.NewFromInt(int64(ctx.DamageZone.Damage.IntPart())).Div(decimal.NewFromInt(int64(e.SideEffectArgs[0])))
ctx.Input.Damage(ctx)
e.Ctx().Opp.Damage(&info.DamageZone{
Type: info.DamageType.Fixed,
Damage: decimal.NewFromInt(int64(e.Ctx().Opp.DamageZone.Damage.IntPart())).Div(decimal.NewFromInt(int64(e.SideEffectArgs[0]))),
})
return true
}