feat: 新增多个战斗技能效果实现
Some checks failed
ci/woodpecker/push/my-first-workflow Pipeline failed

This commit is contained in:
xinian
2026-03-08 10:34:23 +08:00
committed by cnb
parent 042a48088d
commit 3dd2d40c50
43 changed files with 1278 additions and 797 deletions

View File

@@ -58,7 +58,7 @@ func GeteffectIDs(etype EnumEffectType) []uint32 {
}
// 这里的catchtime为0,取出来之后如果是魂印,要重新赋值
func Geteffect[T int | byte | uint16](etype EnumEffectType, id T) Effect {
func geteffect[T int | byte | uint16](etype EnumEffectType, id T) Effect {
pr := EffectIDCombiner{}
pr.Combine(etype, 0, gconv.Uint16(id))
@@ -81,7 +81,7 @@ func Geteffect[T int | byte | uint16](etype EnumEffectType, id T) Effect {
return nil
}
func (our *Input) InitEffect(etype EnumEffectType, id int) Effect {
ret := Geteffect(etype, id)
ret := geteffect(etype, id)
ret.SetArgs(our) //输入参数是对方
return ret

View File

@@ -70,7 +70,7 @@ func (our *Input) SortPet() {
for _, s := range our.AllPet {
if s.Info.Hp > 0 {
for _, e1 := range s.Info.EffectInfo {
t := Geteffect(EffectType.NewSel, e1.EID)
t := our.InitEffect(EffectType.NewSel, int(e1.EID))
if t != nil {
ef := t.ID()
if cool.Config.ServerInfo.IsDebug != 0 {
@@ -215,7 +215,7 @@ func (our *Input) GetStatusBonus() float64 {
maxBonus := 1.0 // 默认无状态倍率
for statusIdx := 0; statusIdx < 20; statusIdx++ {
t := Geteffect(EffectType.Status, statusIdx)
t := our.InitEffect(EffectType.Status, statusIdx)
// 检查状态是否存在数组中值为1表示存在该状态
if t != nil && t.Stack() > 0 {
@@ -243,7 +243,7 @@ func (our *Input) Parseskill(skill *action.SelectSkillAction) {
for _, v := range skill.SideEffectS {
t := Geteffect(EffectType.Skill, v)
t := our.InitEffect(EffectType.Skill, v)
args := xmlres.EffectArgs[v]
//这里是给双方添加buff