27 lines
604 B
Go
27 lines
604 B
Go
package rule
|
|
|
|
import (
|
|
"blazing/logic/service/common"
|
|
"blazing/modules/player/model"
|
|
)
|
|
|
|
// Rule306 对方在xx异常状态下击败后获取奖励
|
|
// args[0] = 异常状态类型(对应 EnumPetStatus 枚举值)
|
|
type Rule306 struct {
|
|
RuleBase
|
|
}
|
|
|
|
func (r *Rule306) Exec(f common.FightI, t *model.FightOverInfo) bool {
|
|
if t.WinnerId == f.Ownerid() { //获胜
|
|
statusIdx := r.args[0]
|
|
if statusIdx >= 0 && statusIdx < 20 {
|
|
oppAttack := f.GetAttackValue(true)
|
|
// Status[i] != 255(NULL) 表示该状态存在
|
|
if oppAttack.Status[statusIdx] != 0 {
|
|
return true
|
|
}
|
|
}
|
|
}
|
|
return false
|
|
}
|