fix(fight): 修复睡眠,修改战斗伤害叠加逻辑
This commit is contained in:
@@ -28,9 +28,19 @@ func (e *StatusNotSkill) Skill_Hit_Pre(ctx input.Ctx) bool {
|
||||
|
||||
type StatusSleep struct { //睡眠不能出手 ,这个挂载到对面来实现对方攻击后解除睡眠效果
|
||||
StatusNotSkill
|
||||
can bool
|
||||
}
|
||||
|
||||
func (e *StatusSleep) Skill_Hit_Pre(ctx input.Ctx) bool {
|
||||
e.StatusNotSkill.Skill_Hit_Pre(ctx)
|
||||
e.can = true
|
||||
return false
|
||||
|
||||
}
|
||||
func (e *StatusSleep) Skill_Use(ctx input.Ctx) bool {
|
||||
if !e.can {
|
||||
return true
|
||||
}
|
||||
if ctx.SkillEntity == nil {
|
||||
return true
|
||||
}
|
||||
@@ -53,11 +63,9 @@ type DrainHP struct {
|
||||
func (e *DrainHP) Skill_Hit_Pre(input input.Ctx) bool {
|
||||
e.damage = decimal.NewFromUint64(uint64(e.Input.CurrentPet.Info.MaxHp)).
|
||||
Div(decimal.NewFromInt(8))
|
||||
input.DamageZone = &info.DamageZone{
|
||||
input.DamageZone.Type = info.DamageType.True
|
||||
input.DamageZone.Damage = e.damage
|
||||
|
||||
Type: info.DamageType.True, //状态类扣除无法被减伤
|
||||
Damage: e.damage,
|
||||
}
|
||||
e.Input.Damage(input)
|
||||
|
||||
return true
|
||||
|
||||
Reference in New Issue
Block a user