In this chapter, we are going to implement a power-up mechanic for our game. Power-ups have been a core ingredient of video games since their early inception. One of the first games that implemented power-ups is Pac-Man from 1980. In the game, you could eat Power Pellets that would give Pac-Man temporary invincibility. Another classic example is the mushrooms in Mario Bros., which made Mario taller and more robust.
The power-up ingredients that we will build will be similar to the classics but with a little more granularity. Instead of having a power-up boost a singular ability of an entity, we can create combos that give out multiple benefits at once. For instance, we could have a power-up named "Protector"Â that adds durability to the front-facing shield and increments the strength of the primary weapon.
And so, in...