refactor: 统一效果接口方法名为Skill_Use
All checks were successful
ci/woodpecker/push/my-first-workflow Pipeline was successful

This commit is contained in:
xinian
2026-03-08 20:07:59 +08:00
committed by cnb
parent d8beb39e9a
commit 0cff02158b
16 changed files with 17 additions and 17 deletions

View File

@@ -14,7 +14,7 @@ type Effect194 struct {
node.EffectNode node.EffectNode
} }
func (e *Effect194) SkillUseed() bool { func (e *Effect194) Skill_Use() bool {
damageDone := e.Ctx().Our.SumDamage damageDone := e.Ctx().Our.SumDamage
var healAmount alpacadecimal.Decimal var healAmount alpacadecimal.Decimal

View File

@@ -13,7 +13,7 @@ type Effect422 struct {
node.EffectNode node.EffectNode
} }
func (e *Effect422) SkillUseed() bool { func (e *Effect422) Skill_Use() bool {
damageDone := e.Ctx().Our.SumDamage damageDone := e.Ctx().Our.SumDamage
percent := e.Args()[0].Div(alpacadecimal.NewFromInt(100)) // X% percent := e.Args()[0].Div(alpacadecimal.NewFromInt(100)) // X%

View File

@@ -11,7 +11,7 @@ type Effect427 struct {
node.EffectNode node.EffectNode
} }
func (e *Effect427) SkillUseed() bool { func (e *Effect427) Skill_Use() bool {
if e.Ctx().SkillEntity == nil { if e.Ctx().SkillEntity == nil {
return true return true
} }

View File

@@ -11,7 +11,7 @@ type Effect473 struct {
node.EffectNode node.EffectNode
} }
func (e *Effect473) SkillUseed() bool { func (e *Effect473) Skill_Use() bool {
damageThreshold := int(e.Args()[0].IntPart()) damageThreshold := int(e.Args()[0].IntPart())
damageDone := e.Ctx().Our.SumDamage damageDone := e.Ctx().Our.SumDamage

View File

@@ -15,7 +15,7 @@ type Effect503 struct {
damageThreshold int damageThreshold int
} }
func (e *Effect503) SkillUseed() bool { func (e *Effect503) Skill_Use() bool {
damageDone := e.Ctx().Our.SumDamage damageDone := e.Ctx().Our.SumDamage
e.damageThreshold = int(e.Args()[0].IntPart()) e.damageThreshold = int(e.Args()[0].IntPart())

View File

@@ -846,7 +846,7 @@ type Effect197 struct {
node.EffectNode node.EffectNode
} }
func (e *Effect197) SkillUseed() bool { func (e *Effect197) Skill_Use() bool {
if e.Ctx().Our.CurrentPet.Info.Hp <= 0 { // 被击败 if e.Ctx().Our.CurrentPet.Info.Hp <= 0 { // 被击败
// 清除对手的所有能力加强状态 // 清除对手的所有能力加强状态
e.Ctx().Opp.RemoveAllPositiveBuffs() e.Ctx().Opp.RemoveAllPositiveBuffs()
@@ -1022,7 +1022,7 @@ type Effect199 struct {
node.EffectNode node.EffectNode
} }
func (e *Effect199) SkillUseed() bool { func (e *Effect199) Skill_Use() bool {
if e.Ctx().Our.CurrentPet.Info.Hp <= 0 { // 被击败 if e.Ctx().Our.CurrentPet.Info.Hp <= 0 { // 被击败
// 设置下一个出场精灵的增益效果 // 设置下一个出场精灵的增益效果
effectType := int(e.Args()[0].IntPart()) // xx类型 effectType := int(e.Args()[0].IntPart()) // xx类型

View File

@@ -24,7 +24,7 @@ func init() {
} }
// 命中之后 // 命中之后
func (e *Effect1) OnSkill() bool { func (e *Effect1) Skill_Use() bool {
e.Input.Heal( e.Input.Heal(
e.Ctx().Our, &action.SelectSkillAction{}, e.Ctx().Our.SumDamage.Div(alpacadecimal.NewFromInt(2)), e.Ctx().Our, &action.SelectSkillAction{}, e.Ctx().Our.SumDamage.Div(alpacadecimal.NewFromInt(2)),

View File

@@ -22,7 +22,7 @@ type Effect107 struct {
} }
// 我方使用效果 // 我方使用效果
func (e *Effect107) SkillUseed() bool { func (e *Effect107) Skill_Use() bool {
d := e.Ctx().Our.SumDamage.Cmp(alpacadecimal.NewFromInt(int64(e.SideEffectArgs[0]))) d := e.Ctx().Our.SumDamage.Cmp(alpacadecimal.NewFromInt(int64(e.SideEffectArgs[0])))
//说明伤害小于N //说明伤害小于N

View File

@@ -32,7 +32,7 @@ func (e *Effect116) SetArgs(t *input.Input, a ...int) {
e.EffectNode.Duration(e.EffectNode.SideEffectArgs[0]) e.EffectNode.Duration(e.EffectNode.SideEffectArgs[0])
} }
func (e *Effect116) SkillUseed() bool { func (e *Effect116) Skill_Use() bool {
if e.Input.FightC.IsFirst(e.Input.Player) { if e.Input.FightC.IsFirst(e.Input.Player) {
e.Ctx().Our.Heal(e.Ctx().Our, &action.SelectSkillAction{}, e.Ctx().Our.SumDamage.Div(alpacadecimal.NewFromInt(5))) e.Ctx().Our.Heal(e.Ctx().Our, &action.SelectSkillAction{}, e.Ctx().Our.SumDamage.Div(alpacadecimal.NewFromInt(5)))

View File

@@ -11,7 +11,7 @@ type Effect153 struct {
node.EffectNode node.EffectNode
} }
func (e *Effect153) SkillUseed() bool { func (e *Effect153) Skill_Use() bool {
damageDone := e.Ctx().Our.SumDamage damageDone := e.Ctx().Our.SumDamage
healAmount := damageDone.Div(e.Args()[1]) // 伤害的1/m healAmount := damageDone.Div(e.Args()[1]) // 伤害的1/m

View File

@@ -16,7 +16,7 @@ func init() {
} }
// 命中之后 // 命中之后
func (e *Effect154) SkillUseed() bool { func (e *Effect154) Skill_Use() bool {
if e.Ctx().Opp.StatEffect_Exist(info.EnumPetStatus(e.Args()[0].IntPart())) { if e.Ctx().Opp.StatEffect_Exist(info.EnumPetStatus(e.Args()[0].IntPart())) {
e.Input.Heal( e.Input.Heal(
e.Ctx().Our, &action.SelectSkillAction{}, e.Ctx().Our.SumDamage.Div(e.Args()[1]), e.Ctx().Our, &action.SelectSkillAction{}, e.Ctx().Our.SumDamage.Div(e.Args()[1]),

View File

@@ -13,7 +13,7 @@ type Effect415 struct {
node.EffectNode node.EffectNode
} }
func (e *Effect415) SkillUseed() bool { func (e *Effect415) Skill_Use() bool {
damageThreshold := int(e.Args()[0].IntPart()) damageThreshold := int(e.Args()[0].IntPart())
healAmount := e.Args()[1].IntPart() healAmount := e.Args()[1].IntPart()

View File

@@ -11,7 +11,7 @@ type Effect452 struct {
node.EffectNode node.EffectNode
} }
func (e *Effect452) SkillUseed() bool { func (e *Effect452) Skill_Use() bool {
damageDone := e.Ctx().Our.SumDamage damageDone := e.Ctx().Our.SumDamage
e.Ctx().Our.Heal(e.Ctx().Our, &action.SelectSkillAction{}, damageDone) e.Ctx().Our.Heal(e.Ctx().Our, &action.SelectSkillAction{}, damageDone)

View File

@@ -12,7 +12,7 @@ type Effect472 struct {
node.EffectNode node.EffectNode
} }
func (e *Effect472) SkillUseed() bool { func (e *Effect472) Skill_Use() bool {
if e.Ctx().Opp.StatEffect_Exist(info.EnumPetStatus(e.Args()[0].IntPart())) { // 对手处于异常状态 if e.Ctx().Opp.StatEffect_Exist(info.EnumPetStatus(e.Args()[0].IntPart())) { // 对手处于异常状态
// 造成的伤害恢复自身体力 // 造成的伤害恢复自身体力
damageDone := e.Ctx().Our.SumDamage damageDone := e.Ctx().Our.SumDamage

View File

@@ -21,7 +21,7 @@ type Effect6 struct {
} }
// 我方使用效果 // 我方使用效果
func (e *Effect6) SkillUseed() bool { func (e *Effect6) Skill_Use() bool {
t := &info.DamageZone{ t := &info.DamageZone{
Type: info.DamageType.Fixed, Type: info.DamageType.Fixed,
//这个对面计算前是在他的回合,所以后手也能拿到伤害 //这个对面计算前是在他的回合,所以后手也能拿到伤害

View File

@@ -30,7 +30,7 @@ func (e *Effect89) SetArgs(t *input.Input, a ...int) {
e.EffectNode.Duration(e.EffectNode.SideEffectArgs[0]) e.EffectNode.Duration(e.EffectNode.SideEffectArgs[0])
} }
func (e *Effect89) SkillUseed() bool { func (e *Effect89) Skill_Use() bool {
e.Ctx().Our.Heal(e.Ctx().Our, &action.SelectSkillAction{}, e.Ctx().Our.SumDamage.Div(e.Args()[1])) e.Ctx().Our.Heal(e.Ctx().Our, &action.SelectSkillAction{}, e.Ctx().Our.SumDamage.Div(e.Args()[1]))