Files
bl/logic/service/fight/rule/rule307.go
2026-03-21 00:41:13 +08:00

27 lines
621 B
Go
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

package rule
import (
"blazing/logic/service/common"
"blazing/modules/player/model"
)
// Rule307 满足特定属性强化下击败后获取奖励
// args[0] = 属性索引0攻击,1防御,2特攻,3特防,4速度,5命中
// args[1] = 最低属性等级(范围 -6~+6
type Rule307 struct {
RuleBase
}
func (r *Rule307) Exec(f common.FightI, t *model.FightOverInfo) bool {
if t.WinnerId == f.Ownerid() { //获胜
propIdx := r.args[0]
if propIdx >= 0 && propIdx < 6 {
selfAttack := f.GetAttackValue(false)
if selfAttack.Prop[propIdx] >= int8(r.args[1]) {
return true
}
}
}
return false
}