55 lines
2.3 KiB
Go
55 lines
2.3 KiB
Go
package input
|
|
|
|
import (
|
|
"blazing/logic/service/fight/info"
|
|
)
|
|
|
|
type Effect interface {
|
|
OnBattleStart() bool //战斗开始
|
|
OnTurnStart(opp *Input) //回合开始,注入特性
|
|
PreActionStart() bool //行动开始前,注入视为等参数在这里实现
|
|
CanSkill(opp *Input) bool //使用技能 可以取消用技能节点
|
|
PreSkill(opp *Input, skill *info.SkillEntity) //对技能修改,比如变威力
|
|
BeforeSkill(opp *Input, skill *info.SkillEntity) // 技能命中前触发
|
|
OnSkill(opp *Input, skill *info.SkillEntity) //闪避率计算,,实际上是修改命中的判断
|
|
|
|
BeferProp(in *Input, prop, level int8, ptype info.EnumAbilityOpType) bool //锁定属性
|
|
|
|
SetArgs(input *Input, param ...int)
|
|
|
|
BeforeAttack(opp *Input, id *info.DamageZone) // 攻击前触发 ,这时候就是+区间
|
|
Attack(opp *Input, id *info.DamageZone) // 攻击触发
|
|
PreAttacked(opp *Input, skill *info.SkillEntity) //预处理受击技能
|
|
BeforeAttacked(opp *Input, id *info.DamageZone) //受击前触发 这时候就是百分比减伤区间
|
|
Attacked(opp *Input, id *info.DamageZone) // 受击触发 这时候就是点数减伤
|
|
|
|
PostDamage() bool // 伤害结算后触发(血量扣除后),比如触发回神,反弹也在这里实现
|
|
Shield() bool // 护盾值变化时触发
|
|
|
|
OnSwitchIn() bool // 精灵出战 / 上场时触发
|
|
OnSwitchOut() bool // 精灵下场时触发
|
|
OnOwnerSwitchIn() bool // 所属玩家精灵出战时触发
|
|
OnOwnerSwitchOut() bool // 所属玩家精灵下场时触发
|
|
OnActionEnd() bool //行动结束后
|
|
TurnEnd(opp *Input) //闪避率计算,,实际上是修改命中的判断
|
|
PreBattleEnd() bool //战斗结束前
|
|
OnBattleEnd() bool //战斗结束
|
|
|
|
// OnSkillPP() bool //技能PP减少节点
|
|
// // 治疗相关触发
|
|
// OnBeforeHeal() bool // 治疗前触发
|
|
// OnHeal() bool // 治疗生效时触发
|
|
|
|
// // 精灵切换相关触发
|
|
// OnDefeat() bool // 精灵被击败时触发
|
|
//回合数,然后次数另外维护
|
|
Duration(...int) int
|
|
Hit(...bool) bool
|
|
Alive() bool
|
|
Stack(...int) int
|
|
MaxStack(...int) int
|
|
NotALive()
|
|
GetOwner() bool // 技能属主,比如寄生和镇魂歌,属主是对方)
|
|
//GetSkill() *BattleSkillEntity //获得技能ctx
|
|
}
|