Hero of the Village

Hero of the Village (or village hero) is a status effect granted to the player upon defeating a raid.
== Effect ==
Players receive gifts and discounts from villager trades while under the effect, which lasts 40 minutes. It does not affect the wandering trader's trades.
=== Animation ===
, upon the effect being given a short animation of the effect icon appearing on the screen plays, similar to a Totem of Undying.
=== Price decrement ===
Level I Hero of the Village decreases the cost of the first item in a trade by 30%; each additional level decreases the price by an additional (6.25%). In Survival, the maximum level is V or I, giving discounts of 55% and 30%, respectively. Nevertheless, one can use commands to give higher levels of the effect. Hero of the Village XII gives a discount of 98.75%, decreasing all prices to 1. No matter how large the discount is, the final item count in the trade is always at least one, never zero. 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 III would give a 42.5% discount. For trade with 14 emeralds as the cost, the discount would be 5 emeralds (rounded down from 5.95 emeralds), for a final price of 9 emeralds.
The formula can be written as Discounted price = Initial price - max[1, floor(Initial Price × (0.0625 × (Level - 1) + 0.3))].
Hero of the Village is a status effect and can be removed through all conventional methods, such as drinking milk, using Totem of Undying, or dying.‌
=== Gifts === 
Upon obtaining the effect, villagers randomly throw items from a certain pool at the player as rewards, listed below. In order for a player to have gifts thrown to them, they must have Hero of the Village, the villager must be able to see them, and they must be within 5 blocks of the villager. After throwing a gift, a villager enters a cooldown lasting between 30 seconds and 5min 30 sec. Villagers give gifts only while idle, working, or meeting at the town center (bell). They do not give gifts during the night when they should be sleeping.
Type of villager 	Gift pool
Baby 	
*
Armorer 	
*
*
*
*
Butcher 	
*
*
*
*
*
Cartographer 	
*
*
Cleric 	
*
*
Farmer 	
*
*
*
Fisherman 	
*
*
Fletcher 	
*
*
*
*
*
*
*
*
*
*
*
*
*
*
Leatherworker 	
*
Librarian 	
*
Mason 	
*
Shepherd 	
*
Toolsmith 	
*
*
*
*
Weaponsmith 	
*
*
*
Nitwit, Unemployed	
*
If is set to , villagers might pick up seeds and bread that were thrown as gifts if the player doesn't get to them first.
== Causes ==
Cause 	Potency	Length	Notes
All illagers in the final wave of a raid are killed.	I–V 	40:00 	The player must have killed at least one raider. The level is the same as the level of Bad Omen the raid was started with.
All illagers in the final wave of a raid are killed.	I 	40:00 	The player must have killed at least one raider.
Even using the command can give the player the Hero of the Village effect and cause the villagers to decrease prices, give gifts, and increase the player's popularity.
== Data values ==
=== ID ===
:
:
== Achievements ==
== Advancements ==
== History ==
== Issues ==
== References ==
de:Held des Dorfes
it:Eroe del villaggio
ja:村の英雄
pt:Herói da vila
ru:Герой деревни
zh:村庄英雄