Non-persistent durability for natural reinforcement #102
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This is the first in a series of changes to make breaking naturally reinforced resources less "grindy" and make this mechanic more acceptable to a wider group of players. It also makes natural reinforcements not being saved less of an issue.
This changes the natural reinforcement mechanics so that rather than taking a fixed number of hits, it has a random chance to break on each hit. This fits in better with the reinforcements not being saved - instead of the count resetting to maximum if the cache is unloaded you have a continuous probability of the block breaking on each hit.
The probability is 1.0 / durability. If you set the durability to 50, there's a 1/50 chance of it breaking on each hit. It could take 1, it could take forever, but on average will take 50 breaks. Failed breaks don't weaken or reduce its reinforcement, making the non-saving of natural reinforcements not a problem.
I have plans to add support for "chips" in another pull - random drops from naturally reinforced blocks. For example, a diamond ore could have a high durability, small chance of dropping extra diamonds on each failed break. It would produce several diamonds before finally breaking (balanced with rarity and durability). This requires (a) this change to avoid resetting durability for unlimited d and (b) ability to disable getting chips with silk touch tools.