fix(game): 修复寒流枪技能中宠物ID错误 - 将寒流枪技能中第二个宠物的ID从505修正为1905 - 移除了未使用的Effect138效果代码(先出手反弹伤害效果) ```
This commit is contained in:
50
logic/service/fight/effect/138.go
Normal file
50
logic/service/fight/effect/138.go
Normal file
@@ -0,0 +1,50 @@
|
||||
package effect
|
||||
|
||||
import (
|
||||
"blazing/logic/service/fight/info"
|
||||
"blazing/logic/service/fight/input"
|
||||
"blazing/logic/service/fight/node"
|
||||
|
||||
"github.com/alpacahq/alpacadecimal"
|
||||
)
|
||||
|
||||
// 138 - 先出手时,n回合自己不会受到对手攻击性技能伤害并反弹对手1/n造成的伤害
|
||||
type Effect138 struct {
|
||||
node.EffectNode
|
||||
can bool
|
||||
}
|
||||
|
||||
func (e *Effect138) SetArgs(t *input.Input, a ...int) {
|
||||
e.EffectNode.SetArgs(t, a...)
|
||||
e.EffectNode.Duration(a[0]) // 持续n回合
|
||||
}
|
||||
func (e *Effect138) OnSkill() bool {
|
||||
if e.IsFirst() { // 先出手
|
||||
e.can = true
|
||||
}
|
||||
return true
|
||||
}
|
||||
func (e *Effect138) DamageLockEx(t *info.DamageZone) bool {
|
||||
if e.can { // 先出手
|
||||
if e.Ctx().SkillEntity != nil && e.Ctx().SkillEntity.Category() != info.Category.STATUS {
|
||||
|
||||
// 反弹1/n造成的伤害
|
||||
damageToBounce := e.Ctx().Opp.SumDamage.Div(e.Args()[1]) // 1/n
|
||||
damageZone := &info.DamageZone{
|
||||
Type: info.DamageType.Fixed,
|
||||
Damage: damageToBounce,
|
||||
}
|
||||
e.Ctx().Opp.Damage(e.Ctx().Our, damageZone)
|
||||
if t.Type == info.DamageType.Fixed {
|
||||
t.Damage = alpacadecimal.Zero
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
return true
|
||||
}
|
||||
func init() {
|
||||
input.InitEffect(input.EffectType.Skill, 138, &Effect138{})
|
||||
|
||||
}
|
||||
@@ -86,35 +86,6 @@ func (e *Effect457) Skill_Use_ex() bool {
|
||||
return true
|
||||
}
|
||||
|
||||
// 138 - 先出手时,n回合自己不会受到对手攻击性技能伤害并反弹对手1/n造成的伤害
|
||||
type Effect138 struct {
|
||||
node.EffectNode
|
||||
}
|
||||
|
||||
func (e *Effect138) Skill_Use_ex() bool {
|
||||
if e.Ctx().Our.Speed > e.Ctx().Opp.Speed { // 先出手
|
||||
if e.Ctx().SkillEntity != nil && e.Ctx().SkillEntity.Category() != info.Category.STATUS {
|
||||
// 本次受到的攻击伤害无效
|
||||
e.Ctx().Our.CancelDamage()
|
||||
|
||||
// 反弹1/n造成的伤害
|
||||
damageToBounce := e.Ctx().Opp.SumDamage.Div(e.Args()[1]) // 1/n
|
||||
damageZone := &info.DamageZone{
|
||||
Type: info.DamageType.Fixed,
|
||||
Damage: damageToBounce,
|
||||
}
|
||||
e.Ctx().Opp.Damage(e.Ctx().Our, damageZone)
|
||||
}
|
||||
}
|
||||
|
||||
return true
|
||||
}
|
||||
|
||||
func (e *Effect138) SetArgs(t *input.Input, a ...int) {
|
||||
e.EffectNode.SetArgs(t, a...)
|
||||
e.EffectNode.Duration(a[0]) // 持续n回合
|
||||
}
|
||||
|
||||
// 197 - n回合内若被对方击败,则对手所有能力加强状态消失
|
||||
type Effect197 struct {
|
||||
node.EffectNode
|
||||
|
||||
Reference in New Issue
Block a user