Unfortunately, upgrades cannot be "downgraded" again, but it would certainly be way easier if they could be. That's why all the hassle with unit requirements is needed, instead.
If you wish to sometimes disable an ability, you can do this:
Create a new dummy unit. This unit will not do anything, the only important thing is its name as seen in the game. In your case, you'd probably name it "Not sprinting".
Go to the ability you want disabled sometimes...
I believe they're using units too. Reason is simple, DotA does not allow "feeding" of any sort. If you buy a unit from a shop, it'll be your unit even though you could reach that particular shop through an ally's hero - if that occurs, the bought unit would be ignored.
You cannot do this with...
For question 1, this could be what you're looking for:
For each (Integer A) from 1 to 12, do (Actions)
Loop - Actions
Player - Limit training of (Unit-type of (Sold unit)) to 0 for (Player((Integer A)))
As for disabling a hero only from a specific tavern, I don't know.
Just thought I'd mention another option: (ab)using the Techtree requirement for a unit. Then, the ability works when your player is in control of that unit.
In this example, the unit is named "A nearby hero slain":
When you want to allow the player to use this ability, create this...
I think another problem with this is that the affected unit will stop/reset its attack animation (thus its DPS will be lowered) even if it's still gonna attack the same enemy.
Someone should correct me if I'm wrong, but AFAIK there is no reliable way to see which player bought some item - you only know which hero got it and what shop he bought it from.
However, when you buy a unit, you along with a buying and selling unit you also know who bought it (since he's the...
Yeah, it works.
One interesting thing that happens when you "heal" a unit which has Mana Shield this way: the unit will get bonus mana instead of bonus HP (or a bit of both depending on the shield resist percentage).
Sorry if I'm not helpful, but I'm really curious why you (or DotA for that matter) would need such a function after 1.22? As far as I'm aware, items already have shared cooldown since then, and they'll keep it even if you give it to another hero.
Are you sure this is player-specific (meaning that if a certain player has >100 units, only his units will start behaving oddly while moving)?
I always presumed that this happened when too many units moved around because wacraft 3 can't keep up with it; all the pathfinding calculations are...