All checks were successful
ci/woodpecker/push/my-first-workflow Pipeline was successful
feat(fight): 添加战斗攻击值获取接口并实现战斗规则系统 添加 GetAttackValue 方法到 FightI 接口,用于获取战斗中的攻击值信息。 新增 RuleI 接口定义战斗规则契约,包括 SetArgs 和 Exec 方法。 重构战斗规则系统: - 创建 RuleBase 基类提供通用参数存储和基础方法 - 实现 17
27 lines
709 B
Go
27 lines
709 B
Go
package common
|
|
|
|
import (
|
|
"blazing/logic/service/fight/info"
|
|
"blazing/modules/player/model"
|
|
"math/rand"
|
|
)
|
|
|
|
type FightI interface {
|
|
Over(c PlayerI, id model.EnumBattleOverReason) //逃跑
|
|
UseSkill(c PlayerI, id uint32) //使用技能
|
|
GetCurrPET(c PlayerI) *info.BattlePetEntity //当前精灵
|
|
GetOverInfo() model.FightOverInfo
|
|
Ownerid() uint32
|
|
ReadyFight(c PlayerI) //是否准备战斗
|
|
ChangePet(c PlayerI, id uint32)
|
|
Capture(c PlayerI, id uint32)
|
|
GetRand() *rand.Rand
|
|
|
|
LoadPercent(c PlayerI, percent int32)
|
|
UseItem(c PlayerI, cacthid, itemid uint32)
|
|
Chat(c PlayerI, msg string)
|
|
IsFirst(c PlayerI) bool
|
|
GetOverChan() chan struct{}
|
|
GetAttackValue(bool) *model.AttackValue
|
|
}
|