refactor(fight): 统一Action方法命名规范 将Action_start和Action_start_ex方法重命名为ActionStart和ActionStartEx, 使其符合Go语言驼峰命名规范。同时更新接口定义和所有相关调用处的方法名。 - 重命名Action_start为ActionStart - 重命名Action_start_ex为ActionStartEx - 更新interface.go中的方法定义 - 更新所有实现类中的方法签名 - 更新fightc.go中的方法
31 lines
772 B
Go
31 lines
772 B
Go
package effect
|
||
|
||
import (
|
||
"blazing/logic/service/fight/action"
|
||
"blazing/logic/service/fight/input"
|
||
)
|
||
|
||
// 405. n%几率令本次攻击先制+1(a1: n)
|
||
type NewSel405 struct {
|
||
NewSel0
|
||
}
|
||
|
||
func (e *NewSel405) ActionStartEx(fattack, sattack *action.SelectSkillAction) bool {
|
||
//魂印特性有不在场的情况,绑定时候将精灵和特性绑定
|
||
if e.ID().GetCatchTime() != e.Ctx().Our.CurrentPet.Info.CatchTime {
|
||
return true
|
||
}
|
||
|
||
// n%几率触发
|
||
success, _, _ := e.Input.Player.Roll(int(e.Args()[0].IntPart()), 100)
|
||
if success && e.Ctx().SkillEntity != nil {
|
||
// 先制+1(提升优先级)
|
||
e.Ctx().SkillEntity.AttackTime = e.Ctx().SkillEntity.AttackTime + 1
|
||
}
|
||
return true
|
||
}
|
||
|
||
func init() {
|
||
input.InitEffect(input.EffectType.NewSel, 405, &NewSel405{})
|
||
}
|