fix(tk2): match original SV (5-battle cap, no loss limit)

User clarified: the 0..7 win reward tiers came from Shadowverse Worlds
Beyond (sequel), not the original game we're emulating. Original SV's
Take Two caps at 5 total battles played and has no loss limit (verified
on prod: queueing continues with 2+ losses).

- arena-two-pick-rewards.json: drop 6w + 7w tiers (12 rows remain).
- ArenaTwoPickConfig: remove MaxLosses property.
- ArenaTwoPickService: termination is now battlesPlayed >= maxBattles
  (5 from MAX(reward.WinCount)). RecordBattleResult no longer flips
  IsSelectCompleted on the 2nd loss.
- ResolveMaxBattleCountAsync empty-catalog default 7 → 5.
- Tests updated for the new counts (16 → 12 rows, max 7 → 5).

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
This commit is contained in:
gamer147
2026-05-31 12:47:43 -04:00
parent dc19289818
commit 6381e4da51
7 changed files with 31 additions and 32 deletions

View File

@@ -26,7 +26,7 @@ public class ArenaTwoPickRewardRepositoryTests
await using var db = await SeededContextAsync();
var repo = new ArenaTwoPickRewardRepository(db);
for (int w = 0; w <= 7; w++)
for (int w = 0; w <= 5; w++)
{
var rows = await repo.GetRewardsByWinCountAsync(w);
Assert.That(rows.Count, Is.EqualTo(2), $"WinCount={w} should have 2 reward rows");
@@ -34,12 +34,12 @@ public class ArenaTwoPickRewardRepositoryTests
}
[Test]
public async Task GetMaxWinCount_returns_7()
public async Task GetMaxWinCount_returns_5()
{
await using var db = await SeededContextAsync();
var repo = new ArenaTwoPickRewardRepository(db);
var max = await repo.GetMaxWinCountAsync();
Assert.That(max, Is.EqualTo(7));
Assert.That(max, Is.EqualTo(5));
}
[Test]