27 lines
621 B
Go
27 lines
621 B
Go
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
|
||
}
|