Closed knyghtmare closed 3 days ago
The gold value will also give an indication of the item's rank (common/uncommon/rare/pristine)
ATM you can put a gold_value
key inside the [object]
and it will always stay with that with that particular item. You can get the item from an equipped unit using
https://github.com/babaissarkar/WISh/blob/9d5c9ff167705e56e19b6a99ee6c046acb31747a/lua/items.lua#L75-L83
and for storage items there's https://github.com/babaissarkar/WISh/blob/9d5c9ff167705e56e19b6a99ee6c046acb31747a/lua/items.lua#L60-L67
After that, it's just a matter of using item.gold_value
.
Possible improvements:
The get_item_from_storage takes an item_number
, it should take an item id instead. A for loop search around the storage items should be able to do that.
@knyghtmare does the above presented solution work?
Yeah, it does sound like it would work.
Yeah, it does sound like it would work.
Okay, please give it try and close this if it works. Otherwise let me know here what went wrong.
I kind of realized that the "Transmute to Gold" option for the item needs to be implemented before I can try this out.
Superseded by #20.
Would be necessary if we add a thing in future of "transmute artifact to gold" for unwanted items. So if
GOLD_VALUE=50
for an item, transmuting it will give 50 gold to that side.