37 lines
791 B
Go
37 lines
791 B
Go
package effect
|
|
|
|
import (
|
|
"blazing/logic/service/fight/input"
|
|
)
|
|
|
|
// Effect 557: {0}回合内对手使用正先制的技能时{1}%令对手{2}
|
|
type Effect557 struct {
|
|
RoundEffectArg0Base
|
|
}
|
|
|
|
func (e *Effect557) Skill_Use_ex() bool {
|
|
if e.Ctx().SkillEntity == nil {
|
|
return true
|
|
}
|
|
if e.Ctx().SkillEntity.XML.Priority <= 0 {
|
|
return true
|
|
}
|
|
|
|
chance := int(e.Args()[1].IntPart()) // 触发概率
|
|
statusType := int(e.Args()[2].IntPart()) // 异常状态类型
|
|
|
|
if success, _, _ := e.Input.Player.Roll(chance, 100); success {
|
|
statusEffect := e.Ctx().Our.InitEffect(input.EffectType.Status, statusType)
|
|
if statusEffect != nil {
|
|
e.Ctx().Opp.AddEffect(e.Ctx().Our, statusEffect)
|
|
}
|
|
|
|
}
|
|
|
|
return true
|
|
}
|
|
|
|
func init() {
|
|
input.InitEffect(input.EffectType.Skill, 557, &Effect557{})
|
|
}
|