```
All checks were successful
ci/woodpecker/push/my-first-workflow Pipeline was successful

feat(fight): 添加效果工厂模式支持以解决闭包变量捕获问题

- 新增initskillFactory函数用于注册效果工厂
- 修改技能效果注册逻辑从直接实例化改为工厂模式
- 解决循环中闭包捕获变量导致的潜在问题

feat(fight): 实现对手输入获取逻辑优化回合处理

- 添加roundOpponentInput方法获取对手输入
- 重构enterturn方法中的先后手逻辑
- 确保攻击方和被攻击
This commit is contained in:
昔念
2026-04-12 22:44:13 +08:00
parent 82bb99d141
commit e1a994ba11
6 changed files with 87 additions and 8 deletions

View File

@@ -12,7 +12,7 @@ const TableNameServerList = "server_list"
type ServerList struct {
*cool.Model
coolconfig.ServerList
ServerShow *ServerShow `orm:"with:server_id=online_id" gorm:"-" json:"server_show,omitempty"`
ServerShow *ServerShow `orm:"with:server_id=online_id" gorm:"-" json:"servershow,omitempty"`
// isonline
IsOnline uint8 `gorm:"column:isonline;default:0;comment:'是否在线'" json:"isonline"`
}