Added tests, fix README.

This commit is contained in:
Rene Arumetsa
2026-07-26 20:32:13 +03:00
parent cb18d9b882
commit 5ba5642694
9 changed files with 769 additions and 138 deletions

View File

@@ -245,15 +245,15 @@ The house is listed at **#0** on the leaderboard. Players can attempt to rob it
| Command | Cooldown | Base payout | Notes |
|---|---|---|---|
| `/daily` | 20h | 150 ⬡ | Streak multiplier applied (see below). Kõrvaklapid reduces cooldown to 18h. LAN Pilet doubles the reward. Botikoobas adds 5% interest on your balance (capped at 500 ⬡/day). Prestige daily_plus adds +20% base per upgrade level. |
| `/daily` | 20h | 150 ⬡ | Streak multiplier applied (see below). Kõrvaklapid reduces cooldown to 18h. LAN pilet doubles the reward. Bot Farm adds 5% interest on your balance (capped at 500 ⬡/day). Prestige daily_plus adds +20% base per upgrade level. |
| `/work` | 1h | 1575 ⬡ | Random job flavour text. Mängurihiir +50%, Reguleeritav laud +25% (stacks). Red Bull: 30% chance of ×3. Ultralai monitor reduces cooldown to 40min. Prestige work_plus adds +20% per upgrade level. |
| `/beg` | 5min | 1040 ⬡ | XL hiirematt reduces cooldown to 3min. Mehhaaniline klaviatuur multiplies earnings ×2. |
| `/crime` | 2h | 200500 ⬡ | 60% success rate (75% with CAT6). +30% earnings with Mikrofon on win. Fail = fine + 30min jail. Mänguritool skips jail on fail. |
| `/beg` | 5min | 1040 ⬡ | Hiirematt reduces cooldown to 3min. Mehaaniline klaviatuur multiplies earnings ×2. |
| `/crime` | 2h | 200500 ⬡ | 60% success rate (75% with Cat6 kaabel). +30% earnings with Mikrofon on win. Fail = fine + 30min jail. Gaming tool skips jail on fail. |
| `/fish` | 2min | varies | Interactive minigame. Cast → wait for bite → press button within 2s → keep in inventory or sell immediately. Ussipurk reduces cooldown to 90s. |
### Daily streak
The streak increments each time you claim `/daily` within the cooldown window. Missing a day resets it to 1 **unless** you own the TipiLAN trofee item.
The streak increments each time you claim `/daily` within the cooldown window. Missing a day resets it to 1 **unless** you own the TipiLAN karikas item.
| Streak | Multiplier | Payout (base) |
|---|---|---|
@@ -262,7 +262,7 @@ The streak increments each time you claim `/daily` within the cooldown window. M
| 713 days | ×2.0 | 300 ⬡ |
| 14+ days | ×3.0 | 450 ⬡ |
> With LAN Pilet (×2 daily) and a 14-day streak (×3.0) the base payout reaches **900 ⬡**. Add Botikoobas 5% interest on top.
> With LAN pilet (×2 daily) and a 14-day streak (×3.0) the base payout reaches **900 ⬡**. Add Bot Farm 5% interest on top.
---
@@ -281,15 +281,15 @@ Every successful economy action awards EXP:
| `/beg` completed | +5 |
| `/fish` catch | +2 to +25 (varies by rarity: common 23, uncommon 67, rare 10, epic 1415, legendary 25) |
**Level formula:** `level = max(1, floor(√(total_exp ÷ 6)))`
**Level formula:** `level = max(1, floor(√(total_exp ÷ 10)))`
| Level | EXP required | Milestone |
|---|---|---|
| 1 | 0 | TipiNOOB role |
| 5 | 150 | TipiGRINDER role |
| 10 | 600 | TipiHUSTLER role · **T2 shop unlocks** |
| 20 | 2 400 | TipiCHAD role · **T3 shop unlocks** |
| 30 | 5 400 | TipiLEGEND role |
| 5 | 250 | TipiGRINDER role |
| 10 | 1 000 | TipiHUSTLER role · **T2 shop unlocks** |
| 20 | 4 000 | TipiCHAD role · **T3 shop unlocks** |
| 30 | 9 000 | TipiLEGEND role |
Use `/rank` to see your current EXP, level, progress bar to the next level, and leaderboard position.
@@ -340,6 +340,7 @@ The **ECONOMY** role is granted on your first EXP award (i.e. first successful e
| `/shop` | Browse all items by tier. Shows owned status, Anticheat charges remaining, and level lock for T2/T3. |
| `/buy <item>` | Purchase an item by name (partial match accepted). |
| `/reminders` | Toggle per-command DM notifications. Bot DMs you the moment each cooldown expires. |
| `/quests` | Personal daily (3) and weekly (2) quests with progress bars and a claim button. |
| `/fish` | Interactive fishing minigame. Cast, wait for bite, pull, then keep or sell. 2min cooldown (90s with Ussipurk). |
| `/fishbook` | View your fish collection - all caught species, rarity, count, and current inventory amounts. |
| `/fishsell` | Sell all fish currently in your inventory at once. |
@@ -351,7 +352,7 @@ The **ECONOMY** role is granted on your first EXP award (i.e. first successful e
### Jail system
`/crime` fail (without Mänguritool) jails you for **30 minutes**. While jailed, `/work`, `/beg`, `/crime`, `/rob`, and `/give` are blocked.
`/crime` fail (without Gaming tool) jails you for **30 minutes**. While jailed, `/work`, `/beg`, `/crime`, `/rob`, and `/give` are blocked.
#### `/jailbreak`
Press the roll button - both dice are rolled simultaneously with an animated reveal. **3 attempts** per sentence. Matching values (doubles) = free instantly. If all 3 fail you pay bail:
@@ -380,6 +381,19 @@ Spend PP in `/prestigeshop`:
---
### Quests
`/quests` shows your personal quest board: **3 daily** and **2 weekly** quests with progress bars and a claim button.
- Quests track counters you're already grinding: work/beg counts, coins earned, amount wagered, fish caught, crimes succeeded, coins given, heists joined.
- Progress starts counting from the moment the quest set rolls - stats earned before that don't count.
- The daily set resets at **UTC midnight**, the weekly set on the **ISO week** rollover. Each player gets their own rotation.
- Rewards are TipiCOINs (prestige coin multiplier applies) plus EXP through the normal level-up path.
> Schema note: the quest fields live in PocketBase - after pulling this feature run `python scripts/add_quest_fields.py` once (it patches both the dev and prod collections).
---
### Fishing
`/fish` is an interactive minigame with a **2-minute cooldown** (90s with Ussipurk):
@@ -407,39 +421,34 @@ All items are **permanent** once purchased **except Anticheat**, which expires a
| Item | Cost | Effect |
|---|---|---|
| Mängurihiir | 500 ⬡ | `/work` earns +50% |
| XL hiirematt | 600 ⬡ | `/beg` cooldown 5min → 3min |
| Anticheat | 750 ⬡ | Rob attempts against you fail and fine the robber. **2 uses**, then repurchase. |
| Hiirematt | 600 ⬡ | `/beg` cooldown 5min → 3min |
| Red Bull | 800 ⬡ | `/work` has 30% chance to earn ×3 |
| Anticheat | 1 000 ⬡ | Rob attempts against you fail and fine the robber. **2 uses**, then repurchase. |
| Kõrvaklapid | 1 200 ⬡ | `/daily` cooldown 20h → 18h |
| LAN Pilet | 1 200 ⬡ | `/daily` reward ×2 |
| Botikoobas | 1 500 ⬡ | `/daily` adds 5% interest on balance (capped at 500 ⬡/day) |
| LAN pilet | 1 200 ⬡ | `/daily` reward ×2 |
| Bot Farm | 1 500 ⬡ | `/daily` adds 5% interest on balance (capped at 500 ⬡/day) |
#### Tier 2 - level 10 required (TipiHUSTLER+)
| Item | Cost | Effect |
|---|---|---|
| Mehhaaniline klaviatuur | 1 800 ⬡ | `/beg` earns ×2 |
| Mehaaniline klaviatuur | 1 800 ⬡ | `/beg` earns ×2 |
| Ultralai monitor | 2 500 ⬡ | `/work` cooldown 1h → 40min |
| Mikrofon | 2 800 ⬡ | `/crime` win earns +30% |
| Eraldiseisev mikrofon | 2 800 ⬡ | `/crime` win earns +30% |
| Reguleeritav laud | 3 500 ⬡ | `/work` earns +25% (stacks with Mängurihiir → ×1.875 combined) |
| CAT6 netikaabel | 3 500 ⬡ | `/crime` success rate 60% → 75% |
| Cat6 kaabel | 3 500 ⬡ | `/crime` success rate 60% → 75% |
| Jellyfin server | 4 000 ⬡ | `/rob` success rate 45% → 60% |
#### Tier 2 - level 10 required (TipiHUSTLER+) - continued
| Item | Cost | Effect |
|---|---|---|
| Ussipurk | 3 500 ⬡ | `/fish` cooldown 2min → 90s |
#### Tier 3 - level 20 required (TipiCHAD+)
| Item | Cost | Effect |
|---|---|---|
| TipiLAN trofee | 6 000 ⬡ | Daily streak survives missed days |
| 360hz monitor | 7 500 ⬡ | Slots jackpot 10× → 15×, triple 4× → 6× |
| Mänguritool | 9 000 ⬡ | `/crime` fail never sends you to jail |
| Kalavõrk | 5 000 ⬡ | All fish caught are bumped up one rarity tier |
| TipiLAN karikas | 6 000 ⬡ | Daily streak survives missed days |
| 360Hz monitor | 7 500 ⬡ | Slots triple multipliers ×1.5 (jackpot ×25 → ×37) |
| Echolood | 8 000 ⬡ | Fishing bite window 2s → 3s |
| Gaming tool | 9 000 ⬡ | `/crime` fail never sends you to jail |
---
@@ -491,6 +500,7 @@ Every slash command invocation is logged with the user ID, display name, and all
│ ├── economy_income_commands.py # /daily, /work, /beg, /crime, /rob
│ ├── economy_prestige_commands.py# /prestige, /prestigeshop, /prestigebuy
│ ├── economy_profile_commands.py # /balance, /rank, /stats, /cooldowns, /leaderboard
│ ├── economy_quests_commands.py # /quests (daily/weekly quest board + claim)
│ ├── economy_support_commands.py # /shop, /buy, /give, /economysetup
│ ├── info_commands.py # /patchnotes, /help auxiliaries
│ ├── ops_admin_commands.py # /sync, /restart, /shutdown, /pause, /send, /status
@@ -501,7 +511,8 @@ Every slash command invocation is logged with the user ID, display name, and all
│ └── POCKETBASE_SETUP.md # PocketBase collection schema + setup instructions
├── scripts/
│ ├── migrate_to_pb.py # One-time legacy migration: economy.json → PocketBase
│ ├── add_stats_fields.py # Schema migration: add new fields to economy_users collection
│ ├── add_stats_fields.py # Schema migration: add stats fields to economy_users collection
│ ├── add_quest_fields.py # Schema migration: add quest fields (patches dev + prod)
│ └── reset_pb_collections.py # Destructive: deletes & recreates economy collections (--confirm required)
├── requirements.txt # Python dependencies
├── .env.example # Template for secrets