forked from sass/tipibot
feat(economy): add /achievements milestone badges
15 one-time achievements over the lifetime stat counters (work/wealth/gambling/ crime/heists/fishing/streaks/prestige), each paying a modest one-time coin reward when unlocked. Detection is lazy - opening /achievements claims any newly earned (like quests roll on view) - so no per-command hook is needed, and rewards are a bounded, one-time coin source. - New achievements.py: ACHIEVEMENTS table, pure newly_earned/achievements_view, and locked do_check_achievements. New achievements_earned schema field. - /achievements command (own view claims; viewing others is read-only) with progress bars, db_error handling, and an "unlocked" banner. 8 tests: threshold detection, one-time claim (no double pay), multi-unlock, view progress capping. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_013VbAVsrZuYesea99mPMmPT
This commit is contained in:
@@ -76,6 +76,7 @@ CMD: dict[str, str] = {
|
||||
"consumables": "Sirvi ja osta turgutusi (korduvostetavad boostid)",
|
||||
"vanity": "Staatusepood - osta ja kanna kosmeetilisi tiitleid",
|
||||
"lootbox": "Ava õnnekast - juhuslik auhind müntide või boonuse näol",
|
||||
"achievements": "Vaata oma saavutusi ja teeni märkide eest ühekordseid preemiaid",
|
||||
"bank": "Vaata oma panka - röövikindel hoius",
|
||||
"deposit": "Pane münte panka (röövikindel, aga ei teeni intressi)",
|
||||
"withdraw": "Võta münte pangast rahakotti",
|
||||
@@ -159,6 +160,7 @@ HELP_CATEGORIES: dict[str, dict] = {
|
||||
("/deposit <amount>", "Pane münte panka (röövikindel hoius, ei teeni intressi)."),
|
||||
("/withdraw <amount>", "Võta münte pangast rahakotti."),
|
||||
("/quests", "Vaata oma päeva- ja nädalaülesandeid ning nõua auhinnad (uueneb iga päev/nädal)."),
|
||||
("/achievements", "Vaata oma saavutusi. Iga lukust lahti saanud märk annab ühekordse müntipreemia."),
|
||||
("/leaderboard", "TipiBOTi edetabel - kes on kõige rikkam?"),
|
||||
("/shop", "Sirvi TipiBOTi poodi"),
|
||||
("/buy <item>", "Osta ese TipiBOTi poodist"),
|
||||
|
||||
Reference in New Issue
Block a user