Item Sale Prices
Today i worked on including sale prices for all the materials in the game, so that when the player finishes crafting he is able to sell the item.
This script holds the bulk of the code needed to make the new calculations, it doesn’t have the variables i created or the line that adds the price to the coin pool, but those things should both be self-explanatory. Each weapon, material and element type has price range. I did this using Random.range for most of the items. The items all ascend in value the more expensive they are but they are all priced randomly from a set range i had given them. Two Bronze Spears may not end up being the exact same prize. The most profit will come from upgrading your weapon, at the moment the exponential grow from upgrading is very high, i will still have to either rework the formula for prices or the success rate of upgrading an item.
Some goals i plan to reach shortly include implementing a turn counter (to restrict how many items a player can make an item before the game finishes) and possibly some sort of delay process on receiving the coin from sold items. I may able to create a delay that can be randomised between a handful of turns then i could include a shop/store page where the player would see his items sitting on display waiting for an adventurer to buy them. And finally i’ll need to decide on the goal limit of coins the player needs to “win” the stage, this will be determined after i play the game through the game over a couple of days and just how i perform on average.