refactor(fight/effect): 统一效果索引从0开始,调整循环范围和伤害效果初始化

This commit is contained in:
1
2025-09-23 17:42:41 +00:00
parent d52a9a05fa
commit 82d4b4bb59
4 changed files with 7 additions and 22 deletions

View File

@@ -27,7 +27,7 @@ type Input struct {
func NewInput(c common.FightI, p common.PlayerI) *Input {
ret := &Input{FightC: c, Player: p}
t:= ret.GetDamageEffect(1)
t := ret.GetDamageEffect(0)
ret.AddEffect(deepcopy.Copy(t).(Effect)) //添加默认基类,实现继承
p.SetFightC(c) //给玩家设置战斗容器
return ret
@@ -95,21 +95,6 @@ func (i *Input) GetStatusBonus() float64 {
// ItemID int // 使用的道具ID
// Statuses [20]byte // 异常状态数组存在的状态对应位置为1
// OwnedCount int // 已拥有数量(-1=保底0=锁定≥1=衰减)
// }
// 胶囊配置ItemID -> Bonus
// var capsuleBonuses = map[int]float64{
// 300001: 1.0, // 普通精灵胶囊
// 300002: 1.5, // 中级精灵胶囊
// 300003: 2.0, // 高级精灵胶囊
// 300004: 3.0, // 超级精灵胶囊
// 300005: 4.0, // 特级精灵胶囊
// 300006: 256.0, // 无敌精灵胶囊
// 300007: 256.0, // 超能胶囊
// 300008: 2.0, // 赫星精灵胶囊
// 300009: 256.0, // 时空精灵胶囊
// 300010: 256.0, // 无敌精灵胶囊Ω
// }
//
// -1是保底模式0是锁定模式》0是衰减模式
// Capture 执行捕捉 ,捕捉精灵,使用的道具,模式