2026-03-08 14:55:53 +08:00
|
|
|
package effect
|
|
|
|
|
|
|
|
|
|
import (
|
|
|
|
|
"blazing/logic/service/fight/input"
|
|
|
|
|
"blazing/logic/service/fight/node"
|
|
|
|
|
)
|
|
|
|
|
|
2026-03-28 21:57:22 +08:00
|
|
|
// Effect 403: 技能使用成功时,{0}%令自身特攻和速度等级+{1}。若和对手属性相同,则技能效果翻倍
|
2026-03-08 14:55:53 +08:00
|
|
|
type Effect403 struct {
|
|
|
|
|
node.EffectNode
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
func (e *Effect403) OnSkill() bool {
|
|
|
|
|
chance := e.Args()[0].IntPart()
|
|
|
|
|
success, _, _ := e.Input.Player.Roll(int(chance), 100)
|
|
|
|
|
|
|
|
|
|
if success {
|
|
|
|
|
boostValue := int8(e.Args()[1].IntPart())
|
|
|
|
|
// 检查属性是否相同
|
|
|
|
|
if e.Ctx().Our.CurrentPet.Type == e.Ctx().Opp.CurrentPet.Type {
|
|
|
|
|
boostValue *= 2
|
|
|
|
|
}
|
|
|
|
|
|
2026-03-08 23:24:18 +08:00
|
|
|
e.Ctx().Our.SetProp(e.Ctx().Our, 4, boostValue)
|
|
|
|
|
e.Ctx().Our.SetProp(e.Ctx().Our, 2, boostValue)
|
2026-03-08 14:55:53 +08:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
return true
|
|
|
|
|
}
|
|
|
|
|
func init() {
|
|
|
|
|
input.InitEffect(input.EffectType.Skill, 403, &Effect403{})
|
|
|
|
|
|
|
|
|
|
}
|