diff --git a/scripts/sold-staging-up.py b/scripts/sold-staging-up.py index 3a9b2ba..e258e69 100755 --- a/scripts/sold-staging-up.py +++ b/scripts/sold-staging-up.py @@ -214,10 +214,16 @@ STAGING_CLUB_ITEMS = [ # Every value below is read out of the client's OWN tables, never invented: # managercards.carddbid 1000509 (assetid == carddbid on all 417 rows) # managercards.nation 45 -> the flag and the nation half of chemistry +# managercards.value 88 -> the rating the client re-rates this card to +# managercards.rare 1 -> selects its discard price column # manager[509].surname "Luis Enrique", teamid 241 # leagueteamlinks[241].leagueid 53 -> the badge and the league half of chemistry # League 53 is also the dominant league in the restored squad (12 of 23 players), # so this manager is the chemistry-correct choice for it, not an arbitrary one. +# +# value/rare are LIVE-CONFIRMED: read back out of the running client's own record +# (tools/coach_probe.py grades it HIT, so +0xb4 == value and +0x58 == rare), and +# the discard value it computes for itself at +0x3c is 282 = 88 * 320 / 100. MANAGER_SUBTYPE = 4 STAGING_MANAGER = { "owned_id": "owned-a-manager", @@ -226,6 +232,8 @@ STAGING_MANAGER = { "nation": 45, "league_id": 53, "team_id": 241, + "rating": 88, + "rare": 1, "label": "Luis Enrique", } @@ -602,12 +610,18 @@ def materialise(lay: Layout) -> None: catalog["cards"][mgr["card_id"]] = { "asset_id": mgr["resource_id"], "version": 0, - "rareflag": 0, + # managercards.rare, NOT cosmetic: it selects the discard price column, + # and rare 1 is why this manager is worth 282 rather than 97. + "rareflag": mgr["rare"], "kind": "staff", "subtype": MANAGER_SUBTYPE, "team_id": mgr["team_id"], "nation": mgr["nation"], "league_id": mgr["league_id"], + # managercards.value. The client re-rates staff from its own DB, so + # without this the server cannot price a quick sell to the number the + # client displays. + "rating": mgr["rating"], } with open(safe_path(lay.cards), "w") as fh: json.dump(definitions, fh, indent=2)