```feat(fight): 新增特性实现及逻辑优化
1. 实现NewSel114免疫瞬杀特性逻辑 2. 完善NewSel113异常状态伤害锁定逻辑 3. 修复Effect13技能效果添加错误 4. 优化ParasiticSeed状态切换处理 5. 移除无用TODO注释和废弃代码
This commit is contained in:
@@ -162,7 +162,6 @@ func (h Controller) PetTawor(data *fight.StartTwarInboundInfo, c *player.Player)
|
|||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
//todo 特性填装
|
|
||||||
|
|
||||||
if len(r.Effect) != 0 {
|
if len(r.Effect) != 0 {
|
||||||
|
|
||||||
|
|||||||
@@ -6,7 +6,7 @@ import (
|
|||||||
)
|
)
|
||||||
|
|
||||||
// NewSel112 受到物理时使自身的一种 battle_lv 提升1个等级,可提升n次;(a1: which blv, a2: max_blv_up_times)
|
// NewSel112 受到物理时使自身的一种 battle_lv 提升1个等级,可提升n次;(a1: which blv, a2: max_blv_up_times)
|
||||||
// TODO: 实现受到物理时使自身的一种 battle_lv 提升1个等级,可提升n次;(a1: which blv, a2: max_blv_up_times)的核心逻辑
|
|
||||||
type NewSel112 struct {
|
type NewSel112 struct {
|
||||||
NewSel0
|
NewSel0
|
||||||
count int
|
count int
|
||||||
|
|||||||
@@ -1,7 +1,10 @@
|
|||||||
package effect
|
package effect
|
||||||
|
|
||||||
import (
|
import (
|
||||||
|
"blazing/logic/service/fight/info"
|
||||||
"blazing/logic/service/fight/input"
|
"blazing/logic/service/fight/input"
|
||||||
|
|
||||||
|
"github.com/alpacahq/alpacadecimal"
|
||||||
)
|
)
|
||||||
|
|
||||||
// todo "只有当自己处于异常状态时才会受到伤害"
|
// todo "只有当自己处于异常状态时才会受到伤害"
|
||||||
@@ -10,6 +13,25 @@ type NewSel113 struct {
|
|||||||
count int
|
count int
|
||||||
}
|
}
|
||||||
|
|
||||||
|
func (e *NewSel404) DamageLock(t *info.DamageZone) bool {
|
||||||
|
//魂印特性有不在场的情况,绑定时候将精灵和特性绑定
|
||||||
|
if e.ID().GetCatchTime() != e.Ctx().Our.CurrentPet.Info.CatchTime {
|
||||||
|
return true
|
||||||
|
}
|
||||||
|
if t.Type != info.DamageType.Red {
|
||||||
|
return true
|
||||||
|
}
|
||||||
|
for _, v := range e.Ctx().Our.Effects {
|
||||||
|
if v.Alive() && input.IS_Stat(v) {
|
||||||
|
|
||||||
|
return true
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
t.Damage = alpacadecimal.Zero
|
||||||
|
return true
|
||||||
|
}
|
||||||
func init() {
|
func init() {
|
||||||
input.InitEffect(input.EffectType.NewSel, 113, &NewSel113{})
|
input.InitEffect(input.EffectType.NewSel, 113, &NewSel113{})
|
||||||
}
|
}
|
||||||
|
|||||||
39
logic/service/fight/boss/NewSeIdx_114.go
Normal file
39
logic/service/fight/boss/NewSeIdx_114.go
Normal file
@@ -0,0 +1,39 @@
|
|||||||
|
package effect
|
||||||
|
|
||||||
|
import (
|
||||||
|
"blazing/logic/service/fight/action"
|
||||||
|
"blazing/logic/service/fight/input"
|
||||||
|
)
|
||||||
|
|
||||||
|
// 免疫瞬杀
|
||||||
|
type NewSel114 struct {
|
||||||
|
NewSel0
|
||||||
|
v *input.Effect
|
||||||
|
}
|
||||||
|
|
||||||
|
func (e *NewSel114) TurnStart(fattack *action.SelectSkillAction, sattack *action.SelectSkillAction) {
|
||||||
|
// TODO: 实现若遇到天敌, 则战斗开始时连续害怕 n 回合;(a1: n)的核心逻辑
|
||||||
|
if e.ID().GetCatchTime() != e.Ctx().Our.CurrentPet.Info.CatchTime {
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
|
for _, v := range e.Ctx().Opp.Opp.Effects {
|
||||||
|
|
||||||
|
if v.ID().GetEffectType() == input.EffectType.NewSel && v.ID().Suffix() == 32 {
|
||||||
|
v.Alive()
|
||||||
|
e.v = &v
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
func (e *NewSel114) TurnEnd() {
|
||||||
|
if e.v != nil {
|
||||||
|
e.Alive(true)
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
func init() {
|
||||||
|
input.InitEffect(input.EffectType.NewSel, 114, &NewSel114{})
|
||||||
|
}
|
||||||
@@ -9,6 +9,7 @@ import (
|
|||||||
// TODO: 实现若遇到天敌, 则战斗开始时连续害怕 n 回合;(a1: n)的核心逻辑
|
// TODO: 实现若遇到天敌, 则战斗开始时连续害怕 n 回合;(a1: n)的核心逻辑
|
||||||
type NewSel14 struct {
|
type NewSel14 struct {
|
||||||
NewSel0
|
NewSel0
|
||||||
|
conut int
|
||||||
}
|
}
|
||||||
|
|
||||||
func (e *NewSel14) TurnStart(fattack *action.SelectSkillAction, sattack *action.SelectSkillAction) {
|
func (e *NewSel14) TurnStart(fattack *action.SelectSkillAction, sattack *action.SelectSkillAction) {
|
||||||
@@ -16,6 +17,8 @@ func (e *NewSel14) TurnStart(fattack *action.SelectSkillAction, sattack *action.
|
|||||||
if e.ID().GetCatchTime() != e.Ctx().Our.CurrentPet.Info.CatchTime {
|
if e.ID().GetCatchTime() != e.Ctx().Our.CurrentPet.Info.CatchTime {
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//xmlres.PetMAP[e.Ctx().Our.CurrentPet.ID].SpAtk
|
||||||
}
|
}
|
||||||
func init() {
|
func init() {
|
||||||
input.InitEffect(input.EffectType.NewSel, 14, &NewSel14{})
|
input.InitEffect(input.EffectType.NewSel, 14, &NewSel14{})
|
||||||
|
|||||||
@@ -38,6 +38,6 @@ func (e *Effect13) OnSkill() bool {
|
|||||||
}
|
}
|
||||||
eff.Duration(e.EffectNode.SideEffectArgs[0] - 1)
|
eff.Duration(e.EffectNode.SideEffectArgs[0] - 1)
|
||||||
|
|
||||||
e.Ctx().Opp.AddEffect(e.Ctx().Opp, eff)
|
e.Ctx().Opp.AddEffect(e.Ctx().Our, eff)
|
||||||
return true
|
return true
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -98,6 +98,14 @@ type ParasiticSeed struct {
|
|||||||
Status info.EnumPetStatus // 状态类型枚举
|
Status info.EnumPetStatus // 状态类型枚举
|
||||||
}
|
}
|
||||||
|
|
||||||
|
func (e *ParasiticSeed) SwitchOut(in *input.Input) bool {
|
||||||
|
|
||||||
|
if in == e.Ctx().Our {
|
||||||
|
e.Alive(false)
|
||||||
|
}
|
||||||
|
return true
|
||||||
|
}
|
||||||
|
|
||||||
// 技能命中前触发寄生效果
|
// 技能命中前触发寄生效果
|
||||||
func (e *ParasiticSeed) ActionStartEx(attacker, defender *action.SelectSkillAction) bool {
|
func (e *ParasiticSeed) ActionStartEx(attacker, defender *action.SelectSkillAction) bool {
|
||||||
// 过滤特定类型单位(假设1是植物类型,使用枚举替代魔法数字)
|
// 过滤特定类型单位(假设1是植物类型,使用枚举替代魔法数字)
|
||||||
|
|||||||
@@ -7,7 +7,7 @@ import (
|
|||||||
)
|
)
|
||||||
|
|
||||||
var MilestoneEnum = enum.New[struct {
|
var MilestoneEnum = enum.New[struct {
|
||||||
CollectElfCount EnumMilestone `enum:"3515"` // 收集精灵数量
|
// CollectElfCount EnumMilestone `enum:"3515"` // 收集精灵数量
|
||||||
DailyTaskCount EnumMilestone `enum:"3510"` // 日常任务次数
|
DailyTaskCount EnumMilestone `enum:"3510"` // 日常任务次数
|
||||||
MaxLevelCount EnumMilestone `enum:"3511"` // 满级数量
|
MaxLevelCount EnumMilestone `enum:"3511"` // 满级数量
|
||||||
SingleAttrCount EnumMilestone `enum:"3512"` // 单属性数量
|
SingleAttrCount EnumMilestone `enum:"3512"` // 单属性数量
|
||||||
|
|||||||
Reference in New Issue
Block a user