[Feature] Chemistry Calculation Engine #1
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Overview
Implement FIFA-style team chemistry calculation for squads. Chemistry is a core FUT mechanic that rewards building squads around shared clubs, leagues, and nationalities.
Implementation Steps
1. Add chemistry types to
src/models/chemistry.rs2. Implement link detection in
src/services/chemistry.rsRules:
3. Add formation position bonus
4. Wire into
POST /squadresponse insrc/routes/squad.rsAfter saving the squad, compute chemistry and include it in the response:
5. Wire into
GET /squadresponseReturn the same
chemistryblock when reading the active squad.6. Add
GET /squad/chemistryconvenience endpointReturns only the chemistry block without the full squad payload — useful for the bridge to call during squad edits.
7. Write tests in
tests/chemistry.rsAcceptance Criteria
calculate_chemistryfunction exists insrc/services/chemistry.rsPOST /squadresponse includeschemistryblockGET /squadresponse includeschemistryblockGET /squad/chemistryendpoint returns chem-only payloadcargo clippy -- -D warningspasses