34 lines
627 B
Go
34 lines
627 B
Go
package effect
|
|
|
|
import (
|
|
"blazing/logic/service/fight/input"
|
|
)
|
|
|
|
func init() {
|
|
|
|
input.InitEffect(input.EffectType.Skill, 152, &Effect152{})
|
|
|
|
}
|
|
|
|
// Effect 152: {0}回合内若对方使用属性技能,则{1}%使对方{2}
|
|
type Effect152 struct {
|
|
RoundEffectSideArg0Base
|
|
}
|
|
|
|
func (e *Effect152) Skill_Use_ex() bool {
|
|
if e.Ctx().SkillEntity == nil {
|
|
return true
|
|
}
|
|
ok, _, _ := e.Input.Player.Roll(e.SideEffectArgs[1], 100)
|
|
if !ok {
|
|
return true
|
|
}
|
|
eff := e.Ctx().Our.InitEffect(input.EffectType.Status, int(e.Args()[2].IntPart()))
|
|
if eff == nil {
|
|
return true
|
|
}
|
|
|
|
e.Ctx().Opp.AddEffect(e.Ctx().Our, eff)
|
|
return true
|
|
}
|