Add naming scheme support for genlockes with lineage-aware suggestions (#20)
Genlockes can now select a naming scheme at creation time, which is automatically applied to every leg's run. When catching a pokemon whose evolution family appeared in a previous leg, the system suggests the original nickname with a roman numeral suffix (e.g., "Heracles II"). Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com> Reviewed-on: TheFurya/nuzlocke-tracker#20 Co-authored-by: Julian Tabel <juliantabel.jt@gmail.com> Co-committed-by: Julian Tabel <juliantabel.jt@gmail.com>
This commit was merged in pull request #20.
This commit is contained in:
@@ -458,6 +458,7 @@ async def create_genlocke(
|
||||
status="active",
|
||||
genlocke_rules=data.genlocke_rules,
|
||||
nuzlocke_rules=data.nuzlocke_rules,
|
||||
naming_scheme=data.naming_scheme,
|
||||
)
|
||||
session.add(genlocke)
|
||||
await session.flush() # get genlocke.id
|
||||
@@ -480,6 +481,7 @@ async def create_genlocke(
|
||||
name=f"{data.name.strip()} \u2014 Leg 1",
|
||||
status="active",
|
||||
rules=data.nuzlocke_rules,
|
||||
naming_scheme=data.naming_scheme,
|
||||
)
|
||||
session.add(first_run)
|
||||
await session.flush() # get first_run.id
|
||||
@@ -653,6 +655,7 @@ async def advance_leg(
|
||||
name=f"{genlocke.name} \u2014 Leg {next_leg.leg_order}",
|
||||
status="active",
|
||||
rules=genlocke.nuzlocke_rules,
|
||||
naming_scheme=genlocke.naming_scheme,
|
||||
)
|
||||
session.add(new_run)
|
||||
await session.flush()
|
||||
|
||||
Reference in New Issue
Block a user