This commit is contained in:
2025-12-02 17:52:01 +09:00
parent 457eed4d3e
commit 0e96aa4f7c
10 changed files with 314 additions and 128 deletions
+3 -2
View File
@@ -515,8 +515,9 @@ class BattleProvider with ChangeNotifier {
void sellItem(Item item) {
if (player.inventory.remove(item)) {
player.gold += item.price;
_addLog("Sold ${item.name} for ${item.price} G.");
int sellPrice = GameMath.floor(item.price * 0.6);
player.gold += sellPrice;
_addLog("Sold ${item.name} for $sellPrice G.");
notifyListeners();
}
}