feat(battle-node): BuildBattleStart consumes MatchContext for player half

ClassId/CharaId/CardMasterName/BattleType flow from ctx. PlayerBattleStart
Profile removed; Rank/BattlePoint remain as standalone consts pending real
per-viewer rank tracker. One test updated, one new test added.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
This commit is contained in:
gamer147
2026-06-01 12:49:54 -04:00
parent f589283572
commit b0488e3f2e
5 changed files with 35 additions and 14 deletions

View File

@@ -38,12 +38,17 @@ public static class ScriptedLifecycle
SelfDeck: BuildPlayerDeck(ctx.SelfDeckCardIds)),
bid: battleId);
public static MsgEnvelope BuildBattleStart(long playerViewerId) =>
public static MsgEnvelope BuildBattleStart(MatchContext ctx, long playerViewerId) =>
EnvelopeForPush(NetworkBattleUri.BattleStart,
new BattleStartBody(
TurnState: 0, // player goes first
BattleType: 11, // TK2 NetworkBattleType
SelfInfo: ScriptedProfiles.PlayerBattleStartProfile,
BattleType: ctx.BattleType,
SelfInfo: new BattleStartSelfInfo(
Rank: ScriptedProfiles.PlayerRank,
BattlePoint: ScriptedProfiles.PlayerBattlePoint,
ClassId: ctx.ClassId,
CharaId: ctx.CharaId,
CardMasterName: ctx.CardMasterName),
OppoInfo: ScriptedProfiles.OpponentBattleStartProfile));
public static MsgEnvelope BuildDeal() =>