```
refactor(fight): 统一战斗系统函数命名规范 统一了boss技能和效果系统中的函数命名规范,将下划线命名方式 改为驼峰命名方式,提高代码一致性和可读性。 函数名变更包括: - Prop_Befer -> PropBefer - Damage_DIV_ex -> DamageDivEx - Compare_Pre -> ComparePre - Skill_Hit_ex -> SkillHit_ex - Damage_SUB_ex -> DamageSubEx - Skill_Hit -> SkillHit - DamageLock_ex -> DamageLock_ex 同时更新了相关注释中的函数名引用,
This commit is contained in:
@@ -27,7 +27,7 @@ type NewSel1 struct {
|
||||
NewSel0
|
||||
}
|
||||
|
||||
func (e *NewSel1) Prop_Befer(in *input.Input, prop int8, level int8, ptype info.EnumAbilityOpType) bool {
|
||||
func (e *NewSel1) PropBefer(in *input.Input, prop int8, level int8, ptype info.EnumAbilityOpType) bool {
|
||||
|
||||
//魂印特性有不在场的情况,绑定时候将精灵和特性绑定
|
||||
if e.ID().GetCatchTime() != e.Ctx().Our.CurrentPet.Info.CatchTime {
|
||||
|
||||
@@ -5,14 +5,14 @@ import (
|
||||
"blazing/logic/service/fight/input"
|
||||
)
|
||||
|
||||
// 12. 受到特殊攻击时使自身的一种 battle_lv 提升1个等级,可提升n次;(a1: which blv, a2: max_blv_up_times)
|
||||
// NewSel12 受到特殊攻击时使自身的一种 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 NewSel12 struct {
|
||||
NewSel0
|
||||
count int
|
||||
}
|
||||
|
||||
func (e *NewSel12) Damage_DIV_ex(t *info.DamageZone) bool {
|
||||
func (e *NewSel12) DamageDivEx(t *info.DamageZone) bool {
|
||||
|
||||
// fmt.Println(e.ID().GetCatchTime(), e.Ctx().Our.CurrentPet.Info.CatchTime)
|
||||
if e.ID().GetCatchTime() != e.Ctx().Our.CurrentPet.Info.CatchTime {
|
||||
|
||||
@@ -12,7 +12,7 @@ type NewSel19 struct {
|
||||
NewSel0
|
||||
}
|
||||
|
||||
func (e *NewSel19) Compare_Pre(fattack *action.SelectSkillAction, sattack *action.SelectSkillAction) bool {
|
||||
func (e *NewSel19) ComparePre(fattack *action.SelectSkillAction, sattack *action.SelectSkillAction) bool {
|
||||
|
||||
if e.ID().GetCatchTime() != e.Ctx().Our.CurrentPet.Info.CatchTime {
|
||||
return true
|
||||
|
||||
@@ -11,7 +11,7 @@ type NewSel22 struct {
|
||||
NewSel0
|
||||
}
|
||||
|
||||
func (e *NewSel22) Damage_DIV_ex(t *info.DamageZone) bool {
|
||||
func (e *NewSel22) DamageDivEx(t *info.DamageZone) bool {
|
||||
//魂印特性有不在场的情况,绑定时候将精灵和特性绑定
|
||||
if e.ID().GetCatchTime() != e.Ctx().Our.CurrentPet.Info.CatchTime {
|
||||
return true
|
||||
|
||||
@@ -14,7 +14,7 @@ type NewSel23 struct {
|
||||
NewSel0
|
||||
}
|
||||
|
||||
func (e *NewSel23) Compare_Pre(fattack *action.SelectSkillAction, sattack *action.SelectSkillAction) bool {
|
||||
func (e *NewSel23) ComparePre(fattack *action.SelectSkillAction, sattack *action.SelectSkillAction) bool {
|
||||
|
||||
if e.ID().GetCatchTime() != e.Ctx().Our.CurrentPet.Info.CatchTime {
|
||||
return true
|
||||
|
||||
@@ -13,7 +13,7 @@ type NewSel24 struct {
|
||||
NewSel0
|
||||
}
|
||||
|
||||
func (e *NewSel24) Skill_Hit_ex() bool {
|
||||
func (e *NewSel24) SkillHit_ex() bool {
|
||||
if e.ID().GetCatchTime() != e.Ctx().Our.CurrentPet.Info.CatchTime {
|
||||
return true
|
||||
}
|
||||
|
||||
@@ -15,7 +15,7 @@ type NewSel27 struct {
|
||||
index int
|
||||
}
|
||||
|
||||
func (e *NewSel27) Damage_DIV_ex(t *info.DamageZone) bool {
|
||||
func (e *NewSel27) DamageDivEx(t *info.DamageZone) bool {
|
||||
//魂印特性有不在场的情况,绑定时候将精灵和特性绑定
|
||||
if e.ID().GetCatchTime() != e.Ctx().Our.CurrentPet.Info.CatchTime {
|
||||
return true
|
||||
|
||||
@@ -13,7 +13,7 @@ type NewSel3 struct {
|
||||
NewSel0
|
||||
}
|
||||
|
||||
func (e *NewSel3) Damage_DIV_ex(t *info.DamageZone) bool {
|
||||
func (e *NewSel3) DamageDivEx(t *info.DamageZone) bool {
|
||||
//魂印特性有不在场的情况,绑定时候将精灵和特性绑定
|
||||
if e.ID().GetCatchTime() != e.Ctx().Our.CurrentPet.Info.CatchTime {
|
||||
return true
|
||||
|
||||
@@ -11,7 +11,7 @@ type NewSel34 struct {
|
||||
NewSel0
|
||||
}
|
||||
|
||||
func (e *NewSel34) Damage_DIV_ex(t *info.DamageZone) bool {
|
||||
func (e *NewSel34) DamageDivEx(t *info.DamageZone) bool {
|
||||
if e.ID().GetCatchTime() != e.Ctx().Our.CurrentPet.Info.CatchTime {
|
||||
return true
|
||||
}
|
||||
|
||||
@@ -11,7 +11,7 @@ type NewSel35 struct {
|
||||
NewSel0
|
||||
}
|
||||
|
||||
func (e *NewSel35) Damage_DIV_ex(t *info.DamageZone) bool {
|
||||
func (e *NewSel35) DamageDivEx(t *info.DamageZone) bool {
|
||||
|
||||
// fmt.Println(e.ID().GetCatchTime(), e.Ctx().Our.CurrentPet.Info.CatchTime)
|
||||
if e.ID().GetCatchTime() != e.Ctx().Our.CurrentPet.Info.CatchTime {
|
||||
|
||||
@@ -27,7 +27,7 @@ func (e *NewSel36) Turn_Start(fattack *action.SelectSkillAction, sattack *action
|
||||
}
|
||||
}
|
||||
}
|
||||
func (e *NewSel36) Damage_DIV_ex(t *info.DamageZone) bool {
|
||||
func (e *NewSel36) DamageDivEx(t *info.DamageZone) bool {
|
||||
|
||||
e.Ctx().Our.AttackValue.State = uint32(e.Args()[e.index].IntPart())
|
||||
|
||||
|
||||
@@ -14,7 +14,7 @@ type NewSel40 struct {
|
||||
can bool
|
||||
}
|
||||
|
||||
func (e *NewSel40) Damage_DIV_ex(t *info.DamageZone) bool {
|
||||
func (e *NewSel40) DamageDivEx(t *info.DamageZone) bool {
|
||||
if e.ID().GetCatchTime() != e.Ctx().Our.CurrentPet.Info.CatchTime {
|
||||
return true
|
||||
}
|
||||
|
||||
@@ -12,7 +12,7 @@ type NewSel404 struct {
|
||||
NewSel0
|
||||
}
|
||||
|
||||
func (e *NewSel404) Damage_DIV_ex(t *info.DamageZone) bool {
|
||||
func (e *NewSel404) DamageDivEx(t *info.DamageZone) bool {
|
||||
//魂印特性有不在场的情况,绑定时候将精灵和特性绑定
|
||||
if e.ID().GetCatchTime() != e.Ctx().Our.CurrentPet.Info.CatchTime {
|
||||
return true
|
||||
|
||||
@@ -12,7 +12,7 @@ type NewSel406 struct {
|
||||
NewSel0
|
||||
}
|
||||
|
||||
func (e *NewSel406) Damage_DIV_ex(t *info.DamageZone) bool {
|
||||
func (e *NewSel406) DamageDivEx(t *info.DamageZone) bool {
|
||||
//魂印特性有不在场的情况,绑定时候将精灵和特性绑定
|
||||
if e.ID().GetCatchTime() != e.Ctx().Our.CurrentPet.Info.CatchTime {
|
||||
return true
|
||||
|
||||
@@ -11,7 +11,7 @@ type NewSel41 struct {
|
||||
NewSel0
|
||||
}
|
||||
|
||||
func (e *NewSel41) Compare_Pre(fattack *action.SelectSkillAction, sattack *action.SelectSkillAction) bool {
|
||||
func (e *NewSel41) ComparePre(fattack *action.SelectSkillAction, sattack *action.SelectSkillAction) bool {
|
||||
if e.ID().GetCatchTime() != e.Ctx().Our.CurrentPet.Info.CatchTime {
|
||||
return true
|
||||
}
|
||||
|
||||
@@ -12,7 +12,7 @@ type NewSel48 struct {
|
||||
NewSel0
|
||||
}
|
||||
|
||||
func (e *NewSel48) Damage_DIV_ex(t *info.DamageZone) bool {
|
||||
func (e *NewSel48) DamageDivEx(t *info.DamageZone) bool {
|
||||
//魂印特性有不在场的情况,绑定时候将精灵和特性绑定
|
||||
if e.ID().GetCatchTime() != e.Ctx().Our.CurrentPet.Info.CatchTime {
|
||||
return true
|
||||
|
||||
@@ -40,7 +40,7 @@ func (e *NewSel49) Action_end_ex() bool {
|
||||
return true
|
||||
}
|
||||
|
||||
func (e *NewSel49) Damage_DIV_ex(t *info.DamageZone) bool {
|
||||
func (e *NewSel49) DamageDivEx(t *info.DamageZone) bool {
|
||||
//魂印特性有不在场的情况,绑定时候将精灵和特性绑定
|
||||
if e.ID().GetCatchTime() != e.Ctx().Our.CurrentPet.Info.CatchTime {
|
||||
return true
|
||||
|
||||
@@ -12,7 +12,7 @@ type NewSel52 struct {
|
||||
NewSel0
|
||||
}
|
||||
|
||||
func (e *NewSel52) Damage_DIV_ex(t *info.DamageZone) bool {
|
||||
func (e *NewSel52) DamageDivEx(t *info.DamageZone) bool {
|
||||
//魂印特性有不在场的情况,绑定时候将精灵和特性绑定
|
||||
if e.ID().GetCatchTime() != e.Ctx().Our.CurrentPet.Info.CatchTime {
|
||||
return true
|
||||
|
||||
@@ -29,7 +29,7 @@ func (e *NewSel59) Action_end_ex() bool {
|
||||
return true
|
||||
}
|
||||
|
||||
func (e *NewSel59) Damage_SUB_ex(t *info.DamageZone) bool {
|
||||
func (e *NewSel59) DamageSubEx(t *info.DamageZone) bool {
|
||||
//魂印特性有不在场的情况,绑定时候将精灵和特性绑定
|
||||
if e.ID().GetCatchTime() != e.Ctx().Our.CurrentPet.Info.CatchTime {
|
||||
return true
|
||||
|
||||
@@ -13,7 +13,7 @@ type NewSel60 struct {
|
||||
NewSel0
|
||||
}
|
||||
|
||||
func (e *NewSel60) Damage_SUB_ex(t *info.DamageZone) bool {
|
||||
func (e *NewSel60) DamageSubEx(t *info.DamageZone) bool {
|
||||
if e.ID().GetCatchTime() != e.Ctx().Our.CurrentPet.Info.CatchTime {
|
||||
return true
|
||||
}
|
||||
|
||||
@@ -13,7 +13,7 @@ type NewSel61 struct {
|
||||
NewSel0
|
||||
}
|
||||
|
||||
func (e *NewSel61) Damage_DIV_ex(t *info.DamageZone) bool {
|
||||
func (e *NewSel61) DamageDivEx(t *info.DamageZone) bool {
|
||||
if e.ID().GetCatchTime() != e.Ctx().Our.CurrentPet.Info.CatchTime {
|
||||
return true
|
||||
}
|
||||
|
||||
@@ -10,7 +10,7 @@ type NewSel64 struct {
|
||||
NewSel0
|
||||
}
|
||||
|
||||
func (e *NewSel64) Skill_Hit_ex() bool {
|
||||
func (e *NewSel64) SkillHit_ex() bool {
|
||||
if e.ID().GetCatchTime() != e.Ctx().Our.CurrentPet.Info.CatchTime {
|
||||
return true
|
||||
}
|
||||
|
||||
@@ -10,7 +10,7 @@ type NewSel7 struct {
|
||||
NewSel0
|
||||
}
|
||||
|
||||
func (e *NewSel7) Skill_Hit_ex() bool {
|
||||
func (e *NewSel7) SkillHit_ex() bool {
|
||||
if e.ID().GetCatchTime() != e.Ctx().Our.CurrentPet.Info.CatchTime {
|
||||
return true
|
||||
}
|
||||
|
||||
@@ -10,7 +10,7 @@ type NewSel70 struct {
|
||||
NewSel0
|
||||
}
|
||||
|
||||
func (e *NewSel70) Prop_Befer(in *input.Input, prop int8, level int8, ptype info.EnumAbilityOpType) bool {
|
||||
func (e *NewSel70) PropBefer(in *input.Input, prop int8, level int8, ptype info.EnumAbilityOpType) bool {
|
||||
// 只有对手提升能力时触发,且对手提升的技能是给自己用的
|
||||
if in != e.Ctx().Our || e.Ctx().Opp != e.Ctx().Our {
|
||||
return true
|
||||
|
||||
@@ -12,7 +12,7 @@ type NewSel79 struct {
|
||||
triggered bool
|
||||
}
|
||||
|
||||
func (e *NewSel79) Damage_DIV_ex(t *info.DamageZone) bool {
|
||||
func (e *NewSel79) DamageDivEx(t *info.DamageZone) bool {
|
||||
if e.ID().GetCatchTime() != e.Ctx().Our.CurrentPet.Info.CatchTime {
|
||||
return true
|
||||
}
|
||||
|
||||
@@ -13,7 +13,7 @@ type NewSel81 struct {
|
||||
damageReduceTurns int
|
||||
}
|
||||
|
||||
func (e *NewSel81) Damage_DIV_ex(t *info.DamageZone) bool {
|
||||
func (e *NewSel81) DamageDivEx(t *info.DamageZone) bool {
|
||||
if e.ID().GetCatchTime() != e.Ctx().Our.CurrentPet.Info.CatchTime {
|
||||
return true
|
||||
}
|
||||
|
||||
@@ -10,7 +10,7 @@ type NewSel84 struct {
|
||||
NewSel0
|
||||
}
|
||||
|
||||
func (e *NewSel84) Skill_Hit_ex() bool {
|
||||
func (e *NewSel84) SkillHit_ex() bool {
|
||||
if e.ID().GetCatchTime() != e.Ctx().Our.CurrentPet.Info.CatchTime {
|
||||
return true
|
||||
}
|
||||
|
||||
@@ -45,7 +45,7 @@ func registerAttackMissEffects() {
|
||||
// -----------------------------------------------------------
|
||||
// 核心逻辑:技能命中时,若为目标攻击类型则强制miss
|
||||
// -----------------------------------------------------------
|
||||
func (e *EffectAttackMiss) Skill_Hit_ex() bool {
|
||||
func (e *EffectAttackMiss) SkillHit_ex() bool {
|
||||
|
||||
// 技能为空时不处理
|
||||
skill := e.Ctx().SkillEntity
|
||||
|
||||
@@ -39,7 +39,7 @@ func registerRandomPower(effectID, min, max int) {
|
||||
// -----------------------------------------------------------
|
||||
// 命中时触发
|
||||
// -----------------------------------------------------------
|
||||
func (e *EffectRandomPower) Skill_Hit() bool {
|
||||
func (e *EffectRandomPower) SkillHit() bool {
|
||||
if e.Max <= e.Min {
|
||||
e.Ctx().SkillEntity.Power = e.Min
|
||||
return true
|
||||
|
||||
@@ -13,7 +13,7 @@ type Effect100 struct {
|
||||
node.EffectNode
|
||||
}
|
||||
|
||||
func (e *Effect100) Skill_Hit() bool {
|
||||
func (e *Effect100) SkillHit() bool {
|
||||
|
||||
if e.Ctx().SkillEntity == nil {
|
||||
return true
|
||||
|
||||
@@ -12,7 +12,7 @@ type Effect113 struct {
|
||||
node.EffectNode
|
||||
}
|
||||
|
||||
func (e *Effect113) Skill_Hit() bool {
|
||||
func (e *Effect113) SkillHit() bool {
|
||||
|
||||
if e.Ctx().SkillEntity == nil {
|
||||
return true
|
||||
|
||||
@@ -127,7 +127,7 @@ type Effect122 struct {
|
||||
can bool
|
||||
}
|
||||
|
||||
func (e *Effect122) Skill_Hit() bool {
|
||||
func (e *Effect122) SkillHit() bool {
|
||||
if e.Input.FightC.IsFirst(e.Input.Player) {
|
||||
e.can = true
|
||||
}
|
||||
|
||||
@@ -25,7 +25,7 @@ type Effect131 struct {
|
||||
node.EffectNode
|
||||
}
|
||||
|
||||
// Damage_DIV_ex 受击前触发(核心伤害拦截节点)
|
||||
// DamageDivEx 受击前触发(核心伤害拦截节点)
|
||||
// 该方法在伤害计算前执行,适合修改/清零伤害实现免疫效果
|
||||
func (e *Effect131) DamageLock_ex(t *info.DamageZone) bool {
|
||||
|
||||
|
||||
@@ -21,7 +21,7 @@ func init() {
|
||||
}
|
||||
|
||||
// 命中之后
|
||||
func (e *Effect136) Skill_Hit() bool {
|
||||
func (e *Effect136) SkillHit() bool {
|
||||
|
||||
if e.Ctx().SkillEntity == nil {
|
||||
return true
|
||||
@@ -31,8 +31,8 @@ func (e *Effect136) Skill_Hit() bool {
|
||||
return true
|
||||
}
|
||||
|
||||
heal := e.Ctx().Our.CurrentPet.GetMaxHP().Div(e.Args()[0])
|
||||
e.Ctx().Our.Heal(e.Ctx().Our, &action.SelectSkillAction{}, heal)
|
||||
heal := e.Ctx().Our.CurrentPet.GetMaxHP().Div(e.Args()[0])
|
||||
e.Ctx().Our.Heal(e.Ctx().Our, &action.SelectSkillAction{}, heal)
|
||||
|
||||
return true
|
||||
}
|
||||
|
||||
@@ -26,7 +26,7 @@ func (e *Effect195) OnSkill() bool {
|
||||
e.Ctx().Opp.CancelTurn(e.Ctx().Our)
|
||||
return true
|
||||
}
|
||||
func (e *Effect195) Skill_Hit() bool {
|
||||
func (e *Effect195) SkillHit() bool {
|
||||
|
||||
e.Ctx().Opp.Prop[1] = utils.Min(e.Ctx().Opp.Prop[1], 0)
|
||||
e.Ctx().Opp.Prop[3] = utils.Min(e.Ctx().Opp.Prop[3], 0)
|
||||
|
||||
@@ -12,7 +12,7 @@ type Effect35 struct {
|
||||
can bool
|
||||
}
|
||||
|
||||
func (e *Effect35) Skill_Hit() bool {
|
||||
func (e *Effect35) SkillHit() bool {
|
||||
|
||||
if e.Ctx().SkillEntity == nil {
|
||||
return true
|
||||
|
||||
@@ -11,7 +11,7 @@ type Effect37 struct {
|
||||
can bool
|
||||
}
|
||||
|
||||
func (e *Effect37) Skill_Hit() bool {
|
||||
func (e *Effect37) SkillHit() bool {
|
||||
|
||||
cmphp := e.GetInput().CurrentPet.GetMaxHP().Div(e.Args()[0])
|
||||
if e.GetInput().CurrentPet.GetHP().Cmp(cmphp) == -1 {
|
||||
|
||||
@@ -34,7 +34,7 @@ func (e *Effect41) SetArgs(t *input.Input, a ...int) {
|
||||
}
|
||||
|
||||
// 伤害落实前触发,限制最大伤害
|
||||
func (e *Effect41) Damage_DIV_ex(t *info.DamageZone) bool {
|
||||
func (e *Effect41) DamageDivEx(t *info.DamageZone) bool {
|
||||
|
||||
if e.Ctx().SkillEntity == nil {
|
||||
return true
|
||||
|
||||
@@ -15,7 +15,7 @@ type Effect44 struct {
|
||||
StatusID int
|
||||
}
|
||||
|
||||
func (e *Effect44) Damage_DIV_ex(t *info.DamageZone) bool {
|
||||
func (e *Effect44) DamageDivEx(t *info.DamageZone) bool {
|
||||
|
||||
if e.Ctx().SkillEntity == nil {
|
||||
return true
|
||||
|
||||
@@ -16,7 +16,7 @@ type Effect46 struct {
|
||||
conut int64
|
||||
}
|
||||
|
||||
func (e *Effect46) Damage_DIV_ex(t *info.DamageZone) bool {
|
||||
func (e *Effect46) DamageDivEx(t *info.DamageZone) bool {
|
||||
|
||||
if e.Ctx().SkillEntity == nil {
|
||||
return true
|
||||
|
||||
@@ -14,7 +14,7 @@ type Effect47 struct {
|
||||
conut int
|
||||
}
|
||||
|
||||
func (e *Effect47) Prop_Befer(in *input.Input, prop int8, level int8, ptype info.EnumAbilityOpType) bool {
|
||||
func (e *Effect47) PropBefer(in *input.Input, prop int8, level int8, ptype info.EnumAbilityOpType) bool {
|
||||
if in == e.Ctx().Opp && ptype == info.AbilityOpType.SUB {
|
||||
return false
|
||||
}
|
||||
|
||||
@@ -28,7 +28,7 @@ func (e *Effect478) OnSkill() bool {
|
||||
return true
|
||||
}
|
||||
|
||||
func (e *Effect478) Skill_Hit_ex() bool {
|
||||
func (e *Effect478) SkillHit_ex() bool {
|
||||
|
||||
if !e.can {
|
||||
return true
|
||||
|
||||
@@ -12,7 +12,7 @@ type Effect49 struct {
|
||||
node.EffectNode
|
||||
}
|
||||
|
||||
func (e *Effect49) Damage_SUB_ex(t *info.DamageZone) bool {
|
||||
func (e *Effect49) DamageSubEx(t *info.DamageZone) bool {
|
||||
|
||||
if e.Ctx().SkillEntity == nil {
|
||||
return true
|
||||
|
||||
@@ -15,7 +15,7 @@ type Effect50 struct {
|
||||
StatusID int
|
||||
}
|
||||
|
||||
func (e *Effect50) Damage_DIV_ex(t *info.DamageZone) bool {
|
||||
func (e *Effect50) DamageDivEx(t *info.DamageZone) bool {
|
||||
|
||||
if e.Ctx().SkillEntity == nil {
|
||||
return true
|
||||
|
||||
@@ -30,7 +30,7 @@ func (e *Effect52) SetArgs(t *input.Input, a ...int) {
|
||||
|
||||
}
|
||||
|
||||
func (e *Effect52) Skill_Hit_ex() bool {
|
||||
func (e *Effect52) SkillHit_ex() bool {
|
||||
|
||||
//fmt.Println(e.Ctx().SkillEntity)
|
||||
if e.Ctx().SkillEntity == nil {
|
||||
|
||||
@@ -6,14 +6,14 @@ import (
|
||||
"blazing/logic/service/fight/node"
|
||||
)
|
||||
|
||||
// n 回合使对方攻击伤害是正常状态下的 1/m
|
||||
// Effect54 n 回合使对方攻击伤害是正常状态下的 1/m
|
||||
// ---- Effect54 ----
|
||||
type Effect54 struct {
|
||||
node.EffectNode
|
||||
StatusID int
|
||||
}
|
||||
|
||||
func (e *Effect54) Damage_DIV_ex(t *info.DamageZone) bool {
|
||||
func (e *Effect54) DamageDivEx(t *info.DamageZone) bool {
|
||||
|
||||
if e.Ctx().SkillEntity == nil {
|
||||
return true
|
||||
|
||||
@@ -26,7 +26,7 @@ func (e *Effect566) OnSkill() bool {
|
||||
e.Ctx().Opp.CancelTurn(e.Ctx().Our)
|
||||
return true
|
||||
}
|
||||
func (e *Effect566) Skill_Hit() bool {
|
||||
func (e *Effect566) SkillHit() bool {
|
||||
if e.Ctx().SkillEntity == nil {
|
||||
return true
|
||||
}
|
||||
|
||||
@@ -13,7 +13,7 @@ type Effect65 struct {
|
||||
can bool
|
||||
}
|
||||
|
||||
func (e *Effect65) Skill_Hit() bool {
|
||||
func (e *Effect65) SkillHit() bool {
|
||||
|
||||
if e.Ctx().SkillEntity == nil {
|
||||
return true
|
||||
|
||||
@@ -24,7 +24,7 @@ type Effect7 struct {
|
||||
max alpacadecimal.Decimal
|
||||
}
|
||||
|
||||
func (e *Effect7) Skill_Hit() bool {
|
||||
func (e *Effect7) SkillHit() bool {
|
||||
if e.Ctx().Opp.CurrentPet.Info.Hp <= e.Ctx().Our.CurrentPet.Info.Hp {
|
||||
e.Ctx().SkillEntity.Accuracy = 0
|
||||
}
|
||||
|
||||
@@ -22,8 +22,8 @@ func init() {
|
||||
|
||||
}
|
||||
|
||||
// 命中之后
|
||||
func (e *Effect72) Skill_Hit() bool {
|
||||
// SkillHit 命中之后
|
||||
func (e *Effect72) SkillHit() bool {
|
||||
|
||||
if e.Ctx().SkillEntity == nil {
|
||||
return true
|
||||
|
||||
@@ -29,7 +29,7 @@ func (e *Effect83) OnSkill() bool {
|
||||
return true
|
||||
}
|
||||
|
||||
func (e *Effect83) Compare_Pre(fattack *action.SelectSkillAction, sattack *action.SelectSkillAction) bool {
|
||||
func (e *Effect83) ComparePre(fattack *action.SelectSkillAction, sattack *action.SelectSkillAction) bool {
|
||||
|
||||
if !e.can {
|
||||
return true
|
||||
|
||||
@@ -24,7 +24,7 @@ type Effect9 struct {
|
||||
UseSkillCount int //技能使用了多少次,切换后置0
|
||||
}
|
||||
|
||||
func (e *Effect9) Skill_Hit() bool {
|
||||
func (e *Effect9) SkillHit() bool {
|
||||
if e.Skillid != 0 && e.Ctx().SkillEntity.ID != e.Skillid {
|
||||
e.Alive(false)
|
||||
e.UseSkillCount = 0
|
||||
|
||||
@@ -31,7 +31,7 @@ type Effect96 struct {
|
||||
StatusID int
|
||||
}
|
||||
|
||||
func (e *Effect96) Skill_Hit() bool {
|
||||
func (e *Effect96) SkillHit() bool {
|
||||
if f := statusFuncRegistry.Get(e.StatusID); f != nil && f(e.Ctx().Our, e.Ctx().Opp) {
|
||||
e.Ctx().SkillEntity.Power *= 2
|
||||
}
|
||||
@@ -88,7 +88,7 @@ type Effect129 struct {
|
||||
StatusID int
|
||||
}
|
||||
|
||||
func (e *Effect129) Skill_Hit() bool {
|
||||
func (e *Effect129) SkillHit() bool {
|
||||
if e.Ctx().Opp.CurrentPet.Gender != e.SideEffectArgs[0] {
|
||||
return true
|
||||
}
|
||||
|
||||
@@ -86,7 +86,7 @@ type Burned struct {
|
||||
ContinuousDamage //继承扣血类
|
||||
}
|
||||
|
||||
func (e *Burned) Skill_Hit() bool {
|
||||
func (e *Burned) SkillHit() bool {
|
||||
|
||||
e.Ctx().SkillEntity.Power /= 2
|
||||
return true
|
||||
@@ -175,7 +175,7 @@ type Weakened struct {
|
||||
BaseStatus
|
||||
}
|
||||
|
||||
func (e *Weakened) Damage_DIV_ex(t *info.DamageZone) bool {
|
||||
func (e *Weakened) DamageDivEx(t *info.DamageZone) bool {
|
||||
// 1. 定义衰弱等级对应的倍率表(索引对应等级,0级无倍率)
|
||||
// 索引0: 0%(未衰弱)、1:25%、2:50%、3:100%、4:250%、5:500%
|
||||
weakenedMultiples := []alpacadecimal.Decimal{
|
||||
|
||||
@@ -21,7 +21,7 @@ func (f *FightC) processSkillAttack(attacker, defender *input.Input, skill *info
|
||||
|
||||
defender.Exec(func(effect input.Effect) bool { //计算闪避,然后修改对方命中),同时相当于计算属性无效这种
|
||||
effect.Ctx().SkillEntity = skill
|
||||
effect.Skill_Hit_ex()
|
||||
effect.SkillHit_ex()
|
||||
return true
|
||||
})
|
||||
|
||||
@@ -33,7 +33,7 @@ func (f *FightC) processSkillAttack(attacker, defender *input.Input, skill *info
|
||||
attacker.Exec(func(effect input.Effect) bool {
|
||||
//计算变威力
|
||||
effect.Ctx().SkillEntity = skill
|
||||
effect.Skill_Hit() //相当于先调整基础命中,不光调整命中,这里还能调整技能属性,暴击率
|
||||
effect.SkillHit() //相当于先调整基础命中,不光调整命中,这里还能调整技能属性,暴击率
|
||||
return true
|
||||
})
|
||||
//技能命中+效果失效 这里就是修改效果命中为false
|
||||
@@ -144,7 +144,7 @@ func (f *FightC) enterturn(firstAttack, secondAttack *action.SelectSkillAction)
|
||||
}
|
||||
f.Broadcast(func(fighter *input.Input) {
|
||||
fighter.Exec(func(effect input.Effect) bool { //回合开始前
|
||||
effect.Compare_Pre(firstAttack, secondAttack) //先结算技能的优先级
|
||||
effect.ComparePre(firstAttack, secondAttack) //先结算技能的优先级
|
||||
return true
|
||||
})
|
||||
fighter.ResetAttackValue()
|
||||
|
||||
@@ -138,7 +138,7 @@ func (our *Input) Damage(in *Input, sub *info.DamageZone) {
|
||||
if ok {
|
||||
ok = our.Exec(func(t Effect) bool {
|
||||
|
||||
t.Damage_DIV_ex(sub) //红伤落实,内部有befer
|
||||
t.DamageDivEx(sub) //红伤落实,内部有befer
|
||||
|
||||
return true
|
||||
})
|
||||
@@ -148,7 +148,7 @@ func (our *Input) Damage(in *Input, sub *info.DamageZone) {
|
||||
if ok {
|
||||
ok = our.Exec(func(t Effect) bool {
|
||||
|
||||
t.Damage_SUB_ex(sub)
|
||||
t.DamageSubEx(sub)
|
||||
|
||||
return true
|
||||
})
|
||||
|
||||
@@ -8,15 +8,15 @@ import (
|
||||
)
|
||||
|
||||
type Effect interface {
|
||||
Fight_Start() bool //战斗开始 首发也写这里吧,别)单独写了
|
||||
Turn_Start(fattack, sattack *action.SelectSkillAction) //回合开始,注入特性
|
||||
Compare_Pre(fattack, sattack *action.SelectSkillAction) bool //比较前对优先级的修改
|
||||
Fight_Start() bool //战斗开始 首发也写这里吧,别)单独写了
|
||||
Turn_Start(fattack, sattack *action.SelectSkillAction) //回合开始,注入特性
|
||||
ComparePre(fattack, sattack *action.SelectSkillAction) bool //比较前对优先级的修改
|
||||
//技能命中前的返回值代表是否可以出手 ,对命中本身的修改应该是对上下文本身的修改
|
||||
//对技能修改 行动开始前,注入视为等参数在这里实现
|
||||
Action_start_ex(fattack, sattack *action.SelectSkillAction) bool //比较前对优先级的修改
|
||||
Action_start(fattack, sattack *action.SelectSkillAction) bool //比较前对优先级的修改
|
||||
Skill_Hit() bool //这是是命中后的对技能的修改,比如变威力
|
||||
Skill_Hit_ex() bool // 技能命中前触发//预处理受击技能 被攻击方效果,比如受击时无效技能这样
|
||||
SkillHit() bool //这是是命中后的对技能的修改,比如变威力
|
||||
SkillHit_ex() bool // 技能命中前触发//预处理受击技能 被攻击方效果,比如受击时无效技能这样
|
||||
|
||||
//Calculate_Pre() bool //视为 无视效果,相当于这里对敌方的修改
|
||||
OnSkill() bool // 触发on miss onhit
|
||||
@@ -26,8 +26,8 @@ type Effect interface {
|
||||
Damage_Mul(*info.DamageZone) bool // 攻击触发
|
||||
|
||||
DamageFloor(*info.DamageZone) bool // 保底伤害
|
||||
Damage_DIV_ex(*info.DamageZone) bool //受击前触发 这时候就是百分比减伤区间
|
||||
Damage_SUB_ex(*info.DamageZone) bool // 受击触发 这时候就是点数减伤
|
||||
DamageDivEx(*info.DamageZone) bool //受击前触发 这时候就是百分比减伤区间
|
||||
DamageSubEx(*info.DamageZone) bool // 受击触发 这时候就是点数减伤
|
||||
DamageLock(*info.DamageZone) bool //锁定伤害
|
||||
DamageLock_ex(*info.DamageZone) bool //被动方锁定伤害
|
||||
Damage_Shield(*info.DamageZone) bool // 护盾值变化时触发
|
||||
@@ -49,8 +49,8 @@ type Effect interface {
|
||||
Turn_End() //回合结束计算
|
||||
HookAction() bool //出手前的hook参数,返回false阻止继续出手
|
||||
//PreBattleEnd() bool //战斗结束前
|
||||
OnBattleEnd() bool //战斗结束
|
||||
Prop_Befer(in *Input, prop, level int8, ptype info.EnumAbilityOpType) bool //锁定属性
|
||||
OnBattleEnd() bool //战斗结束
|
||||
PropBefer(in *Input, prop, level int8, ptype info.EnumAbilityOpType) bool //锁定属性
|
||||
//效果添加时候应该区分主动方和被动方来确认是主动添加的还是受击添加的
|
||||
//boss是进入防守方才被添加抵御异常状态效果的,boss免疫的实质是给挑战者挂载一个阻止添加给对手的debuff
|
||||
EFFect_Befer(in *Input, effEffect Effect) bool //属性免疫
|
||||
|
||||
@@ -13,7 +13,7 @@ func (target *Input) SetProp(source *Input, prop, level int8, opType info.EnumAb
|
||||
// 前置状态结算:判断是否允许执行属性操作
|
||||
canExecute := target.Exec(func(effect Effect) bool {
|
||||
// 执行前置效果,返回true表示可以继续操作
|
||||
return effect.Prop_Befer(source, prop, level, opType)
|
||||
return effect.PropBefer(source, prop, level, opType)
|
||||
})
|
||||
if !canExecute {
|
||||
return false
|
||||
|
||||
@@ -10,7 +10,7 @@ func (e *EffectNode) Action_start(fattack, sattack *action.SelectSkillAction) bo
|
||||
func (e *EffectNode) Action_start_ex(fattack, sattack *action.SelectSkillAction) bool {
|
||||
return true
|
||||
}
|
||||
func (e *EffectNode) Compare_Pre(fattack, sattack *action.SelectSkillAction) bool { //比较前对优先级的修改 {
|
||||
func (e *EffectNode) ComparePre(fattack, sattack *action.SelectSkillAction) bool { //比较前对优先级的修改 {
|
||||
return true
|
||||
}
|
||||
|
||||
|
||||
@@ -15,11 +15,11 @@ func (e *EffectNode) DamageFloor(_ *info.DamageZone) bool {
|
||||
return true
|
||||
}
|
||||
|
||||
func (e *EffectNode) Damage_DIV_ex(_ *info.DamageZone) bool {
|
||||
func (e *EffectNode) DamageDivEx(_ *info.DamageZone) bool {
|
||||
return true
|
||||
}
|
||||
|
||||
func (e *EffectNode) Damage_SUB_ex(_ *info.DamageZone) bool {
|
||||
func (e *EffectNode) DamageSubEx(_ *info.DamageZone) bool {
|
||||
return true
|
||||
}
|
||||
|
||||
|
||||
@@ -120,7 +120,7 @@ func (e *EffectNode) AttackTime(*input.Input, *input.Input) bool {
|
||||
return true
|
||||
|
||||
}
|
||||
func (e *EffectNode) Prop_Befer(in *input.Input, prop int8, level int8, ptype info.EnumAbilityOpType) bool {
|
||||
func (e *EffectNode) PropBefer(in *input.Input, prop int8, level int8, ptype info.EnumAbilityOpType) bool {
|
||||
return true
|
||||
}
|
||||
func (e *EffectNode) BoolisFalse(t ...bool) bool {
|
||||
|
||||
@@ -13,10 +13,10 @@ func (e *EffectNode) Skill_Pre() bool {
|
||||
// return true
|
||||
// }
|
||||
|
||||
func (e *EffectNode) Skill_Hit() bool {
|
||||
func (e *EffectNode) SkillHit() bool {
|
||||
return true
|
||||
}
|
||||
func (e *EffectNode) Skill_Hit_ex() bool {
|
||||
func (e *EffectNode) SkillHit_ex() bool {
|
||||
return true
|
||||
}
|
||||
func (e *EffectNode) OnSkill() bool {
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
Reference in New Issue
Block a user