fix(fight): 战斗修改
This commit is contained in:
@@ -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
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user