Hero of the Village

Hero of the Village is a status effect granted upon defeating a raid.

Effect
Players will receive a discount from villager trades while under the effect. The effect is active only if the player is in the village in which the raid has been defeated.

Price decrement
The level one Hero of the Village effect will decrease the cost of the first item in a trade by 30%; each additional level can decrease the price by an additional 1/16, up to the 55% discount with a level 5 Hero of the Village effect. No matter how large the discount is, the final item count in the trade will always be at least one; in other words, it won't be free. In other cases, the decrement is the discount ratio multiplied by the original count rounded down, or rounded up if the decrement is less than 1.

Example: Level 3 effect would give 42.5% discount. For a recipe with 14 emeralds as the input for the first slot, the final discount would be 5 emeralds (rounded down from 5.95 emeralds), and the final price would be 9 emeralds.

History
Hero of the Village