tune(battle-xp): raise defaults to XpPerWin=200 / XpPerLoss=50
Doubles the shipped defaults across all modes without touching per-mode overrides. Curve interaction against classexp.csv (L1=50, L2=150): - Win (200 XP): crosses both L1 + L2 → land at L3, Exp=0 - Loss (50 XP): exactly meets L1 → land at L2, Exp=0 Updates every affected test assertion (Practice, Rank, Free, TK2, Colosseum, Story) for the new level/exp math. Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
This commit is contained in:
@@ -218,11 +218,11 @@ public class PracticeControllerTests
|
||||
Assert.That(response.StatusCode, Is.EqualTo(HttpStatusCode.OK), body);
|
||||
|
||||
using var doc = JsonDocument.Parse(body);
|
||||
// BattleXpConfig.XpPerWin default = 100. classexp.csv seeds L1=50, L2=150, so 100 XP
|
||||
// crosses L1's threshold: land at Level=2 with 50 carry.
|
||||
Assert.That(doc.RootElement.GetProperty("get_class_experience").GetInt32(), Is.EqualTo(100));
|
||||
Assert.That(doc.RootElement.GetProperty("class_experience").GetInt32(), Is.EqualTo(50));
|
||||
Assert.That(doc.RootElement.GetProperty("class_level").GetInt32(), Is.EqualTo(2));
|
||||
// BattleXpConfig.XpPerWin default = 200. classexp.csv seeds L1=50, L2=150 → 200 XP
|
||||
// crosses L1 (spends 50, level→2, exp=150) then L2 (spends 150, level→3, exp=0).
|
||||
Assert.That(doc.RootElement.GetProperty("get_class_experience").GetInt32(), Is.EqualTo(200));
|
||||
Assert.That(doc.RootElement.GetProperty("class_experience").GetInt32(), Is.EqualTo(0));
|
||||
Assert.That(doc.RootElement.GetProperty("class_level").GetInt32(), Is.EqualTo(3));
|
||||
Assert.That(doc.RootElement.GetProperty("reward_list").GetArrayLength(), Is.EqualTo(0));
|
||||
|
||||
// Persistence check — reload viewer and confirm the ViewerClassData row moved.
|
||||
@@ -231,8 +231,8 @@ public class PracticeControllerTests
|
||||
var v = await db.Viewers.Include(x => x.Classes).ThenInclude(c => c.Class)
|
||||
.FirstAsync(x => x.Id == viewerId);
|
||||
var cls1 = v.Classes.Single(c => c.Class.Id == 1);
|
||||
Assert.That(cls1.Level, Is.EqualTo(2));
|
||||
Assert.That(cls1.Exp, Is.EqualTo(50));
|
||||
Assert.That(cls1.Level, Is.EqualTo(3));
|
||||
Assert.That(cls1.Exp, Is.EqualTo(0));
|
||||
}
|
||||
|
||||
[Test]
|
||||
@@ -252,10 +252,10 @@ public class PracticeControllerTests
|
||||
Assert.That(response.StatusCode, Is.EqualTo(HttpStatusCode.OK), body);
|
||||
|
||||
using var doc = JsonDocument.Parse(body);
|
||||
// BattleXpConfig.XpPerLoss default = 25. classexp.csv seeds L1=50, so 25 XP stays
|
||||
// under threshold: Level=1, Exp=25.
|
||||
Assert.That(doc.RootElement.GetProperty("get_class_experience").GetInt32(), Is.EqualTo(25));
|
||||
Assert.That(doc.RootElement.GetProperty("class_experience").GetInt32(), Is.EqualTo(25));
|
||||
Assert.That(doc.RootElement.GetProperty("class_level").GetInt32(), Is.EqualTo(1));
|
||||
// BattleXpConfig.XpPerLoss default = 50. classexp.csv L1=50 → 50 XP exactly meets
|
||||
// the threshold: Level=2, Exp=0.
|
||||
Assert.That(doc.RootElement.GetProperty("get_class_experience").GetInt32(), Is.EqualTo(50));
|
||||
Assert.That(doc.RootElement.GetProperty("class_experience").GetInt32(), Is.EqualTo(0));
|
||||
Assert.That(doc.RootElement.GetProperty("class_level").GetInt32(), Is.EqualTo(2));
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user