feat: 新增技能效果525、530、550、558、565
All checks were successful
ci/woodpecker/push/my-first-workflow Pipeline was successful

This commit is contained in:
xinian
2026-03-17 14:35:06 +08:00
committed by cnb
parent a47b35df88
commit a2e4ec867c
5 changed files with 150 additions and 0 deletions

View File

@@ -0,0 +1,31 @@
package effect
import (
"blazing/logic/service/fight/info"
"blazing/logic/service/fight/input"
"blazing/logic/service/fight/node"
"github.com/alpacahq/alpacadecimal"
)
// 525 - {0}回合内有{1}%概率免疫对手的攻击伤害
type Effect525 struct {
node.EffectNode
}
func (e *Effect525) DamageLockEx(t *info.DamageZone) bool {
success, _, _ := e.Input.Player.Roll(int(e.SideEffectArgs[1]), 100)
if success { // 先出手
t.Damage = alpacadecimal.Zero
}
return true
}
func (e *Effect525) SetArgs(t *input.Input, a ...int) {
e.EffectNode.SetArgs(t, a...)
e.EffectNode.Duration(a[0]) // 持续n回合
}
func init() {
input.InitEffect(input.EffectType.Skill, 525, &Effect525{})
}

View File

@@ -0,0 +1,30 @@
package effect
import (
"blazing/logic/service/fight/action"
"blazing/logic/service/fight/input"
"blazing/logic/service/fight/node"
)
// 530 -
type Effect530 struct {
node.EffectNode
}
func (e *Effect530) Skill_Use() bool {
maxHp := e.Ctx().Our.CurrentPet.GetMaxHP()
healAmount := maxHp.Div(e.Args()[0]) // 1/n
if e.Ctx().Our.CurrentPet.GetHP().Cmp(healAmount) < 0{ // 先出手
// 回复1/n的最大体力值
e.Ctx().Our.Heal(e.Ctx().Our, &action.SelectSkillAction{}, maxHp)
}
return true
}
func init() {
input.InitEffect(input.EffectType.Skill, 530, &Effect530{})
}

View File

@@ -0,0 +1,30 @@
package effect
import (
"blazing/logic/service/fight/action"
"blazing/logic/service/fight/input"
"blazing/logic/service/fight/node"
)
// 550 -
type Effect550 struct {
node.EffectNode
}
func (e *Effect550) Skill_Use() bool {
maxHp := e.Ctx().Our.CurrentPet.GetMaxHP()
if e.Ctx().Our.StatEffect_Exist_all() { // 先出手
// 回复1/n的最大体力值
e.Ctx().Our.Heal(e.Ctx().Our, &action.SelectSkillAction{}, maxHp)
}
return true
}
func init() {
input.InitEffect(input.EffectType.Skill, 550, &Effect550{})
}

View File

@@ -0,0 +1,29 @@
package effect
import (
"blazing/logic/service/fight/action"
"blazing/logic/service/fight/input"
"blazing/logic/service/fight/node"
)
// 558 -
type Effect558 struct {
node.EffectNode
}
func (e *Effect558) Skill_Use() bool {
if e.Ctx().Our.HasPropADD() || e.Ctx().Our.HasPropSub() { // 先出手
// 回复1/n的最大体力值
return true
}
e.Ctx().Our.Heal(e.Ctx().Our, &action.SelectSkillAction{}, e.Args()[0])
return true
}
func init() {
input.InitEffect(input.EffectType.Skill, 558, &Effect558{})
}

View File

@@ -0,0 +1,30 @@
package effect
import (
"blazing/logic/service/fight/action"
"blazing/logic/service/fight/input"
"blazing/logic/service/fight/node"
)
// 565 -
type Effect565 struct {
node.EffectNode
}
func (e *Effect565) Skill_Use() bool {
if e.IsFirst() { // 先出手
// 回复1/n的最大体力值
maxHp := e.Ctx().Our.CurrentPet.GetMaxHP()
healAmount := maxHp.Div(e.Args()[0]) // 1/n
e.Ctx().Our.Heal(e.Ctx().Our, &action.SelectSkillAction{}, healAmount)
}
return true
}
func init() {
input.InitEffect(input.EffectType.Skill, 565, &Effect565{})
}