feat(server): add special loot and data-driven gameplay rules
Generate equipment loot atomically, grant random boxes and prevent repeat claims. Read gacha pools, pity, products, tickets, missions, presets, chapter rewards and inventory costs from GameData; extend both collaboration UR ticket pools. Sync owned recipes, configure startup state and calendars in versioned seeds, and validate unlock tickets and revival talents.
This commit is contained in:
@@ -95,11 +95,20 @@ func TestPackJamClaimPersistsAndRepeatedDockingSucceeds(t *testing.T) {
|
||||
if s.wallet.Snapshot().FreeJewelry != 150 || s.wallet.WasGranted(packJamIdentity(9999)) {
|
||||
t.Fatal("invalid pack changed wallet")
|
||||
}
|
||||
s.packJamDesign.Reward.Type = 4
|
||||
s.packJamDesign.Reward.Type = 8
|
||||
if _, _, _, err := s.Handle("/PackJamEvent", story); err == nil {
|
||||
t.Fatal("unsupported reward accepted")
|
||||
}
|
||||
if s.wallet.WasGranted(packJamIdentity(21)) {
|
||||
t.Fatal("unsupported reward marked claimed")
|
||||
}
|
||||
s.packJamDesign.Reward.Type = 4
|
||||
s.packJamDesign.Reward.Count = 73
|
||||
code, body, _, err = s.Handle("/PackJamEvent", story)
|
||||
item, _, _ = wire.Bytes(body, 1)
|
||||
typ, _, _ = wire.Varint(item, 3)
|
||||
count, _, _ = wire.Varint(item, 4)
|
||||
if err != nil || code != 72 || typ != 4 || count != 73 || s.wallet.Snapshot().Gold != 73 {
|
||||
t.Fatal("changed reward currency/count ignored")
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user