Skip to content

Commit

Permalink
(v3.1.12e_fix2) Fix Treasure Hunter
Browse files Browse the repository at this point in the history
  • Loading branch information
Jumitti committed Jun 29, 2024
1 parent 64ea32d commit 1d6b00b
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 7 deletions.
4 changes: 2 additions & 2 deletions documentation/DOCUMENTATION.md
Original file line number Diff line number Diff line change
Expand Up @@ -145,8 +145,8 @@ The Interstellar Commerce grade discounts the price of shuttles by 5% per rank
| 10 | MAX |

### 7. Treasure Hunter
The Treasure Hunter rank increases the money earned (+5% per rank), the resources found (+2.5% per rank) and the probability of obtaining an Artifact (+0.01% per rank). Money and resources are multiplied by a factor between 1 and your rank.
You have a 0.01% chance of finding an Artifact without a bonus. Up to you !
The Treasure Hunter rank increases the money earned (+5% per rank), the resources found (+2.5% per rank) and the probability of obtaining an Artifact (+0.015% per rank). Money and resources are multiplied by a factor between 1 and your rank.
You have a no chance of finding an Artifact without a bonus. Up to you !

| Grade | Treasure Hunter ($) |
|-------|---------------------|
Expand Down
10 changes: 5 additions & 5 deletions starwalkers/sql.py
Original file line number Diff line number Diff line change
Expand Up @@ -94,8 +94,8 @@ def init_db():
c.execute('ALTER TABLE users ADD COLUMN treasure_resource_bonus REAL DEFAULT 1.00')
c.execute('UPDATE users SET treasure_resource_bonus = 1.00 WHERE treasure_resource_bonus IS NULL')
if 'treasure_artifact_bonus' not in columns:
c.execute('ALTER TABLE users ADD COLUMN treasure_artifact_bonus REAL DEFAULT 1.00')
c.execute('UPDATE users SET treasure_artifact_bonus = 1.00 WHERE treasure_artifact_bonus IS NULL')
c.execute('ALTER TABLE users ADD COLUMN treasure_artifact_bonus REAL DEFAULT 0.0001')
c.execute('UPDATE users SET treasure_artifact_bonus = 0.0001 WHERE treasure_artifact_bonus IS NULL')

if 'grade_commerce' not in columns:
c.execute('ALTER TABLE users ADD COLUMN grade_commerce INTEGER DEFAULT 0')
Expand Down Expand Up @@ -171,7 +171,7 @@ def add_user(username, password):
(
username, hashed_password, 100, '', '', 10, 0, 0, 0.00, 0,
0, 0, 0.5, -0.0004, 0, 0, 0, 1.00, 0, 1.00,
0, 0.10, 0, 1.00, 1.00, 1.00, 0, 1.00, 0, 1.00,
0, 0.10, 0, 1.00, 1.00, 0.0001, 0, 1.00, 0, 1.00,
0, 0, 0))
conn.commit()
conn.close()
Expand Down Expand Up @@ -559,9 +559,9 @@ def upgrade_treasure(username, amount, treasure_money_bonus, treasure_resource_b
treasure_resource_bonus = decimal.Decimal(treasure_resource_bonus)
new_treasure_resource_bonus = round(treasure_resource_bonus + decimal.Decimal('0.025'), 3)

decimal.getcontext().prec = 4
decimal.getcontext().prec = 6
treasure_artifact_bonus = decimal.Decimal(treasure_artifact_bonus)
new_treasure_artifact_bonus = round(treasure_artifact_bonus + decimal.Decimal('0.01'), 3)
new_treasure_artifact_bonus = round(treasure_artifact_bonus + decimal.Decimal('0.00015'), 5)

c.execute("""
UPDATE users SET money = money - ?,
Expand Down

0 comments on commit 1d6b00b

Please sign in to comment.