Some checks failed
ci/woodpecker/push/my-first-workflow Pipeline failed
refactor(fight): 统一技能执行方法命名并修复战斗逻辑错误 - 将多个boss技能结构体中的OnSkill()方法重命名为Skill_Use()以保持一致性 - 修改fightc.go中的战斗回合逻辑,修复attacker和defender的执行顺序错误 - 将Effect126的TurnStart方法改为Skill_Use方法并返回bool值 - 为Effect499添加缺失的方法实现 - 移除effect_124_126.go中未
31 lines
788 B
Go
31 lines
788 B
Go
package effect
|
||
|
||
import (
|
||
"blazing/logic/service/fight/info"
|
||
"blazing/logic/service/fight/input"
|
||
)
|
||
|
||
// 116. 自身的物理攻击有n%几率使对方处于异常状态(a1: n, a2: 异常状态类型)
|
||
// TODO: 实现自身的物理攻击有n%几率使对方处于异常状态(a1: n, a2: 异常状态类型)的核心逻辑
|
||
type NewSel116 struct {
|
||
NewSel0
|
||
}
|
||
|
||
func (e *NewSel116) Skill_Use() bool {
|
||
if e.ID().GetCatchTime() != e.Ctx().Our.CurrentPet.Info.CatchTime {
|
||
return true
|
||
}
|
||
|
||
success, _, _ := e.Input.Player.Roll(50, 100)
|
||
if !success {
|
||
return true
|
||
}
|
||
eff := e.Ctx().Our.InitEffect(input.EffectType.Status, int(info.PetStatus.Tired))
|
||
|
||
e.Ctx().Opp.AddEffect(e.Ctx().Our, eff)
|
||
return true
|
||
}
|
||
func init() {
|
||
input.InitEffect(input.EffectType.NewSel, 116, &NewSel116{})
|
||
}
|