feat: 《海克斯觉醒》DLC · 每条命 3 选 1 强化卡(协议 v11) - #44
Open
JeanHome123 wants to merge 1 commit into
Open
Conversation
- 服务端 hex.go:9 张强化卡(疾行者/强袭/狂热/稳定/铁壁/利爪/血牛/弹药扩容/快手), 进房与每次死亡发 3 选 1,效果本条命生效、死亡失效;bot 不参与 - 协议 v11:新增 OpHex(0x0E) 选卡上行、EvHexOffer(个人发卡)/ EvHexPick(全局播报)事件 - 血牛改用按玩家查询的 maxHP()(140 上限),全服回血/满血钳制点同步改造 - 速度/散布/射速/换弹系数客户端本地镜像,保证预测与服务端逐位一致 - 客户端紫色主题选卡面板(数字键 1-3 或点选,死亡倒计时期间可选),HUD 常驻当前卡徽章 - 新增 hex_test.go 全链路测试 + 协议逐字节编码测试,README 同步玩法与协议说明
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
《海克斯觉醒》DLC · 每条命 3 选 1 强化卡
进入对局与每次阵亡后,服务端从 9 张卡池随机发 3 张(不重复),玩家用数字键 1-3 或点选 1 张,效果仅本条命生效:死亡即失效,复活倒计时期间弹出新一批 3 选 1(面板保留,落地后仍可边打边选)。bot 不参与。
卡池(v1 九张)
Move查询乘系数 + 客户端speedMultiplier镜像Damage攻击方乘系数TryFiregap/1.25 + 客户端开火节奏镜像weaponSpread后乘系数(先于狙击腰射下限,双端同序)Damage受害方乘系数Damage内结算,按maxHP()钳制maxHP(),全服回血/满血钳制点改造StartReload+EvReloadStart的 ms 同步缩放 + 客户端本地镜像协议 v10 → v11
OpHex 0x0E(1 字节卡 id),服务端校验「该卡确实在本次 offer 内」,不要求存活(死亡倒计时期间可选)OpEvents,新增事件:EvHexOffer(个人事件,eventsFor仅发本人:player u16 + n u8 + 3×卡 id)/EvHexPick(广播:player u16 + 卡 id + 名字)ProtocolVersion同步升 11,新旧客户端混连会被拒绝并提示刷新设计要点
MaxHP常量消费点全部改为p.maxHP()(吸血/连杀回血/医疗包/传奇补给/据点/赏金/炸鸡/金鸡王/复活),无卡时行为不变Damage死亡结算块清零;Respawn不清 Hex——死亡倒计时期间选中的新卡要带入新的一命(有测试守护该行为)测试
server/hex_test.go:发卡合法性(3 张不重复、bot 跳过)、选卡校验(非法/重复拒绝)、死亡清卡 + 复活保留、血牛上限与即时回血、弹药翻倍、移速位移比 ≈1.15、强袭/铁壁伤害、利爪回血与上限钳制、狂热射速间隔、快手换弹时长与EvReloadStart缩放proto_test.go新增TestHexEventEncoding逐字节断言go test ./...全绿;npm run build通过备注
如何体验
docker compose up -d --build # 或 cd server && go run . + cd client && npm run dev进房即弹 3 选 1 面板(数字键 1-3 或点选);被击杀后 3 秒复活倒计时期间会自动弹出新一批卡。选「血牛」可看到 HP 上限变为 140、vitals 区出现当前卡徽章;另一窗口开第二个客户端互相击杀可看到「获得海克斯」的全局播报。