- 重构了 BattleSkillEntity 结构,改名为 SkillEntity - 优化了 Input 结构,移除了冗余的 Effect 容器 - 调整了 Effect 接口,增加了 SetInput 和 Alive 方法 - 重构了战斗逻辑中的技能使用和效果处理流程 - 优化了代码结构,提高了可读性和可维护性
81 lines
1.9 KiB
Go
81 lines
1.9 KiB
Go
package node
|
|
|
|
import (
|
|
"blazing/logic/service/fight/info"
|
|
"blazing/logic/service/fight/input"
|
|
)
|
|
|
|
// 技能命中计算
|
|
func (this *EffectNode) IsHit(opp *input.Input, skill *info.SkillEntity) {
|
|
|
|
}
|
|
|
|
// 被命中计算,默认直接返回,重写这个来实现闪避率
|
|
func (this *EffectNode) TakeHit(opp *input.Input, skill *info.SkillEntity) {
|
|
|
|
}
|
|
|
|
func (this *EffectNode) UseSkill(opp *input.Input) bool {
|
|
|
|
return this.Input.CurrentPet.HP != 0
|
|
}
|
|
func (this *EffectNode) OnSkillPP() bool {
|
|
panic("not implemented") // TODO: Implement
|
|
}
|
|
func (this *EffectNode) SkillUseEnd() bool {
|
|
panic("not implemented") // TODO: Implement
|
|
}
|
|
|
|
func (this *EffectNode) BeforeMultiHit() bool {
|
|
panic("not implemented") // TODO: Implement
|
|
}
|
|
|
|
func (this *EffectNode) BeforeHit() bool {
|
|
panic("not implemented") // TODO: Implement
|
|
}
|
|
|
|
func (this *EffectNode) OnBeforeCalculateDamage(opp *input.Input, skill *info.SkillEntity) {
|
|
panic("not implemented") // TODO: Implement
|
|
}
|
|
|
|
func (this *EffectNode) PreDamage() bool {
|
|
panic("not implemented") // TODO: Implement
|
|
}
|
|
|
|
func (this *EffectNode) CalculateDamage(opp *input.Input, skill *info.SkillEntity) {
|
|
panic("not implemented") // TODO: Implement
|
|
}
|
|
|
|
func (this *EffectNode) OnDamage() bool {
|
|
panic("not implemented") // TODO: Implement
|
|
}
|
|
|
|
func (this *EffectNode) Shield() bool {
|
|
panic("not implemented") // TODO: Implement
|
|
}
|
|
|
|
func (this *EffectNode) PostDamage() bool {
|
|
panic("not implemented") // TODO: Implement
|
|
}
|
|
|
|
// 正常来说,什么都不做
|
|
func (this *EffectNode) IsCrit(opp *input.Input, skill *info.SkillEntity) {
|
|
//return skill.Crit
|
|
}
|
|
|
|
func (this *EffectNode) OnHit() bool {
|
|
panic("not implemented") // TODO: Implement
|
|
}
|
|
|
|
func (this *EffectNode) OnMiss() bool {
|
|
panic("not implemented") // TODO: Implement
|
|
}
|
|
|
|
func (this *EffectNode) AfterAttacked() bool {
|
|
panic("not implemented") // TODO: Implement
|
|
}
|
|
|
|
func (this *EffectNode) OnDefeat() bool {
|
|
panic("not implemented") // TODO: Implement
|
|
}
|