fix(task): 修复任务奖励与宠物
This commit is contained in:
@@ -5,7 +5,6 @@ import (
|
||||
"blazing/logic/service/fight/input"
|
||||
"blazing/logic/service/fight/node"
|
||||
|
||||
"github.com/brunoga/deep"
|
||||
"github.com/shopspring/decimal"
|
||||
)
|
||||
|
||||
@@ -28,9 +27,16 @@ func (e *Effect29) OnSkill(ctx input.Ctx) bool {
|
||||
if !e.Hit() {
|
||||
return true
|
||||
}
|
||||
eff := deep.MustCopy(ctx)
|
||||
eff.DamageZone.Type = info.DamageType.Fixed
|
||||
ctx.DamageZone.Damage = decimal.NewFromInt(int64(e.SideEffectArgs[0]))
|
||||
eff := input.Ctx{
|
||||
Input: e.Input,
|
||||
|
||||
SelectSkillAction: nil,
|
||||
DamageZone: &info.DamageZone{
|
||||
Type: info.DamageType.Fixed,
|
||||
Damage: decimal.NewFromInt(int64(e.SideEffectArgs[0])),
|
||||
},
|
||||
}
|
||||
|
||||
ctx.Input.Damage(eff)
|
||||
return true
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user