Files
bl/logic/service/fight/input/effecti.go

77 lines
2.9 KiB
Go
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

package input
import (
"blazing/logic/service/fight/info"
)
type Effect interface {
OnBattleStart() bool //战斗开始
OnTurnStart(opp *Input) //回合开始
UseSkill(opp *Input) bool //使用技能 可以取消用技能节点
SkillUseEnd(opp *Input)
// OnSkillPP() bool //技能PP减少节点
// BeforeMultiHit() bool //多段攻击前
// BeforeHit() bool //命中前
// OnCritPreDamage() bool //暴击判定成功且伤害计算前触发
// PreDamage() bool // 技能伤害计算前触发(增伤 / 减伤等)
// OnBeforeCalculateDamage() bool // 最终伤害计算前触发
// OnDamage() bool // 造成伤害时触发
//使用技能 可以取消用技能节点
AfterAttr(t *info.BattlePetEntity) //在获取属性前,比如重写对方属性AfterAttr
BeferAttr(t *info.BattlePetEntity) //在获取属性后,比如视为对方属性
SetArgs(input *Input, param ...int)
IsCrit(opp *Input, skill *info.SkillEntity) //是否暴击
CalculateDamage(opp *Input, skill *info.SkillEntity) //击判定成功且伤害计算前触发
OnBeforeCalculateDamage(opp *Input, skill *info.SkillEntity) // 最终伤害计算前触发
OnSkill(opp *Input, skill *info.SkillEntity) //闪避率计算,,实际上是修改命中的判断
BeforHit(opp *Input, skill *info.SkillEntity) // 技能命中前触发
AfterHit(opp *Input, skill *info.SkillEntity) // 技能命中后触发
AfterAttacked(opp *Input, skill *info.SkillEntity) // 受击触发
// Shield() bool // 护盾值变化时触发
// PostDamage() bool // 伤害结算后触发(血量扣除后)
// AfterAttacked() bool // 被攻击后触发(受击判定)
// SetOwner(bool)
// OnDefeat() bool // 精灵被击败时触发
TurnEnd(opp *Input) //闪避率计算,,实际上是修改命中的判断
// // 堆叠Stack相关触发
// OnStackBefore() bool // 堆叠效果前触发
// OnStack() bool // 堆叠效果触发
// OnBeforeConsumeStack() bool // 消耗堆叠前触发
// OnConsumeStack() bool // 消耗堆叠时触发
// // 治疗相关触发
// OnBeforeHeal() bool // 治疗前触发
// OnHeal() bool // 治疗生效时触发
// // 精灵切换相关触发
// OnSwitchIn() bool // 精灵出战 / 上场时触发
// OnSwitchOut() bool // 精灵下场时触发
// OnOwnerSwitchIn() bool // 所属玩家精灵出战时触发
// OnOwnerSwitchOut() bool // 所属玩家精灵下场时触发
// PreBattleEnd() bool //战斗结束前
// OnBattleEnd() bool //战斗结束
//回合数,然后次数另外维护
Duration(...int) int
Hit(...bool) bool
Alive() bool
Stack(...int) int
GetMaxStack() int
NotALive()
GetOwner() bool // 技能属主,比如寄生和镇魂歌,属主是对方)
//GetSkill() *BattleSkillEntity //获得技能ctx
}