update
This commit is contained in:
@@ -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();
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user