config(default-grants): zero out shipped Crystals/Rupees/Ether
Tutorial gifts now cover the starter pack + starter deck flow (crystals + ether + tickets granted via ViewerPresents on signup), so the 50k/50k/50k default deposit was double-dipping. Zero the ShippedDefaults so a fresh viewer's currency reflects exactly what they've earned. Also update the two tests that asserted the old 50k baseline. Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
This commit is contained in:
@@ -4,9 +4,9 @@ namespace SVSim.Database.Models.Config;
|
|||||||
[ConfigSection("DefaultGrants")]
|
[ConfigSection("DefaultGrants")]
|
||||||
public class DefaultGrantsConfig
|
public class DefaultGrantsConfig
|
||||||
{
|
{
|
||||||
public ulong Crystals { get; set; } = 50000;
|
public ulong Crystals { get; set; } = 0;
|
||||||
public ulong Rupees { get; set; } = 50000;
|
public ulong Rupees { get; set; } = 0;
|
||||||
public ulong Ether { get; set; } = 50000;
|
public ulong Ether { get; set; } = 0;
|
||||||
|
|
||||||
public static DefaultGrantsConfig ShippedDefaults() => new();
|
public static DefaultGrantsConfig ShippedDefaults() => new();
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -100,7 +100,7 @@ public class AchievementControllerTests
|
|||||||
var grant = rewardList[0];
|
var grant = rewardList[0];
|
||||||
Assert.That(grant.GetProperty("reward_type").GetInt32(), Is.EqualTo(9));
|
Assert.That(grant.GetProperty("reward_type").GetInt32(), Is.EqualTo(9));
|
||||||
// For currency grants, reward_num is the POST-STATE TOTAL (per project convention,
|
// For currency grants, reward_num is the POST-STATE TOTAL (per project convention,
|
||||||
// matches /pack/open behavior). Default-seeded viewer has 50000 rupees → 50100 after grant.
|
// matches /pack/open behavior). Default-seeded viewer starts at 0 rupees → 100 after grant.
|
||||||
Assert.That(grant.GetProperty("reward_num").GetInt32(), Is.GreaterThanOrEqualTo(100),
|
Assert.That(grant.GetProperty("reward_num").GetInt32(), Is.GreaterThanOrEqualTo(100),
|
||||||
"reward_num is post-state total for currencies, must be at least the granted amount");
|
"reward_num is post-state total for currencies, must be at least the granted amount");
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -55,9 +55,9 @@ public class GameConfigurationJsonbTests
|
|||||||
Assert.That(slot8!.Silver, Is.EqualTo(0.7692).Within(1e-9));
|
Assert.That(slot8!.Silver, Is.EqualTo(0.7692).Within(1e-9));
|
||||||
|
|
||||||
var grants = JsonSerializer.Deserialize<DefaultGrantsConfig>(byName["DefaultGrants"].ValueJson)!;
|
var grants = JsonSerializer.Deserialize<DefaultGrantsConfig>(byName["DefaultGrants"].ValueJson)!;
|
||||||
Assert.That(grants.Crystals, Is.EqualTo(50000UL));
|
Assert.That(grants.Crystals, Is.EqualTo(0UL));
|
||||||
Assert.That(grants.Rupees, Is.EqualTo(50000UL));
|
Assert.That(grants.Rupees, Is.EqualTo(0UL));
|
||||||
Assert.That(grants.Ether, Is.EqualTo(50000UL));
|
Assert.That(grants.Ether, Is.EqualTo(0UL));
|
||||||
|
|
||||||
var player = JsonSerializer.Deserialize<PlayerConfig>(byName["Player"].ValueJson)!;
|
var player = JsonSerializer.Deserialize<PlayerConfig>(byName["Player"].ValueJson)!;
|
||||||
Assert.That(player.MaxFriends, Is.EqualTo(20));
|
Assert.That(player.MaxFriends, Is.EqualTo(20));
|
||||||
|
|||||||
Reference in New Issue
Block a user