Skip to content

Conversation

@Uncraftbar
Copy link
Contributor

Summary

Adds a complete item crafting/upgrade system to solve the "useless loot" problem with a Loot → Salvage → Improve gameplay loop.

New Commands

Command Description
!blacksmith View materials wallet and available services
!materials Quick view of crafting materials
!dismantle <item_id> Salvage single item for materials
!dismantle all <rarity> Bulk salvage with confirmation (excludes equipped)
!reforge <item_id> Reroll stats within rarity tier (shows preview)
!upgrade <item_id> Enhance item (+5% per level, risk at higher levels)

Material Economy

  • Scrap Metal → from Common/Uncommon items (1-3 per item)
  • Magic Dust → from Rare/Magic items (1-3 per item)
  • Void Essence → from Legendary+ items (1 per item)

Upgrade Risk System

Level Success Rate On Failure
+1 to +3 100% N/A
+4 to +6 70% Materials lost
+7 to +9 40% Downgrade 1 level
+10 10% Reset to +0

Files Changed

  • New: cogs/blacksmith.py - Complete blacksmith cog
  • Modified: classes/items.py - Added upgrade_level, effective_* properties, reroll_item()
  • Modified: cogs/inventory.py - Display upgrade levels and effective stats
  • Modified: cogs/help.py - Blacksmith section in help
  • Modified: schema.sql - Material columns (material_scrap, material_dust, material_essence)
  • Modified: utils/database.py - Migration for materials + upgrade_level
  • Modified: bot.py - Load blacksmith cog

Design Decisions

  • Reroll preserves item type's stat distribution (weapons stay damage-focused)
  • Upgrade bonuses calculated at runtime, base stats stay clean in DB
  • +10 upgrade failure resets to +0 (not item destruction)
  • Reforge allowed on equipped items, dismantle blocked (same as sell)
  • Bulk dismantle requires confirmation, excludes equipped items

Adds a complete item crafting/upgrade system to solve the 'useless loot' problem:

New Blacksmith Commands:
- !blacksmith - View materials wallet and services
- !materials - Quick view of crafting materials
- !dismantle <item_id> - Salvage items for materials
- !dismantle all <rarity> - Bulk salvage with confirmation
- !reforge <item_id> - Reroll stats within rarity tier
- !upgrade <item_id> - Enhance item (+5% per level, risk curve)

Material Economy:
- Scrap Metal: from Common/Uncommon items
- Magic Dust: from Rare/Magic items
- Void Essence: from Legendary+ items

Upgrade Risk System:
- +1 to +3: 100% success
- +4 to +6: 70% success (materials lost on fail)
- +7 to +9: 40% success (item downgrades on fail)
- +10: 10% success (resets to +0 on fail)

Files changed:
- New: cogs/blacksmith.py
- Modified: classes/items.py (upgrade_level, effective stats, reroll)
- Modified: cogs/inventory.py (show upgrade levels in displays)
- Modified: cogs/help.py (Blacksmith section)
- Modified: schema.sql (material columns)
- Modified: utils/database.py (material migration)
- Modified: bot.py (load blacksmith cog)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant