Global hero bonuses

To implement things like Lighthouses, Obelisks, Necromancy Amplifiers, some Grail structures and so on I’m thinking there might be a need for a global hero bonus. It would be just a regular hero bonus, but applied to all heroes under your control (or your team).
Adding/removing hero bonuses the regular way to each hero might be too much work. They’d have to be added to all under current control, any you recruit, any you free from prison and removed when dead. Global hero bonuses would get assigned to a team, rather than individual heroes.
Functions like valOfBonuses/hasBonusOfType then take the global hero bonuses into account as well as the local hero bonuses.

Indeed, we need to add some kind of vector to PlayerState.
I thought about that when I was implementing creature dwellings on adventure map. Flagged dwelling should also increase the growth of their creatures in towns.
I haven’t implemented it because I wasn’t sure how to implement that GlobalBonus. In many cases it will be same as HeroBonus but some of possible bonuses doesn’t apply to heroes (like town growth bonus, obelisks) and I thought it’ll be little strange to implement non-hero bonuses on HeroBonus. But I guess it’s the best and simplest solution (and later optionally refactor the class name).