1. Upon entering the tavern, the hero's movement points are set according to the army they arrived with. This means there will be no heroes with 2000 moves and, conversely, no heroes with fewer moves due to "phantom" 3 stacks (for example, when a hero arrives with 1 centaur, but the number of moves is as if they have dwarves).
2. Overwriting a hero in the tavern is handled as death (mana and movement points are restored).
3. Upon the death of a hero, their temporary modifiers are removed: visits to stables, fountains of youth, etc. The number of Dimension Door uses this turn is also reset.
4. Expansion of the mechanism that prevents "digging up" heroes. Currently, heroes who died simultaneously in battle are excluded from the pool. This could be expanded to any hero deaths. To ensure the pool does not run dry, the following mechanic applies:
— Each hero capable of arriving at the tavern is assigned a rank based on their experience, artifacts, spells, etc. The minimum rank is assigned to zero-level heroes and weakly developed heroes (conditionally up to level 5 in the absence of artifacts). The next rank is for heroes up to level 10, and so on.
— When selecting heroes for the tavern, a hero of the minimum rank is always chosen. If such heroes have run out, a hero of the second rank is taken, and so on. Because of this, the hero pool cannot be exhausted. At the same time, dead mains or heroes with powerful artifacts receive a high rank, making their arrival at the tavern practically impossible.
---
In single player, all of this should work exactly the same way. The anti-digging mechanism might potentially harm games in the style of offline Tournaments, where inviting a hero to the tavern is used. But it's hard for me to judge how much of a problem that is, and the format isn't very popular in HotA anyway. On the other hand, for casual play against the computer, anti-digging is only a plus — powerful AI heroes will not be dug up.
---
I will also say right away that I do not consider it possible to introduce resetting hero experience upon death, primarily for atmospheric reasons. The problem needs to be solved with other mechanics.