29 lines
571 B
Go
29 lines
571 B
Go
package rule
|
|
|
|
import (
|
|
"blazing/logic/service/common"
|
|
"blazing/modules/player/model"
|
|
)
|
|
|
|
// Rule316 在自身所有技能都进入PP耗尽状态的情况下获胜获取精灵
|
|
type Rule316 struct {
|
|
RuleBase
|
|
}
|
|
|
|
func (r *Rule316) Exec(f common.FightI, t *model.FightOverInfo) bool {
|
|
if t.WinnerId == f.Ownerid() { //获胜
|
|
attack := f.GetAttackValue(false)
|
|
allPPEmpty := true
|
|
for _, skill := range attack.SkillList {
|
|
if skill.PP > 0 {
|
|
allPPEmpty = false
|
|
break
|
|
}
|
|
}
|
|
if allPPEmpty && len(attack.SkillList) > 0 {
|
|
return true
|
|
}
|
|
}
|
|
return false
|
|
}
|