Straight-Shooter Droids and Player Percentage-Shields

Straight-Shooter was my first enemy that fired enemy shots, that corrected its flight back to its original course when hit, and that had shields. Pretty good for the little guy.

As I worked, the itch to unify the player and enemies as things that could shoot, could have shields, and could intentionally change course, was moving me closer to DRYing up my code and building base_entity.

Welp, I’ve implemented percentage shields for the player, enemy bullets, and a straight-flying droid that stabilizes its speed and shoots in front of itself. It’s a big accomplishment that opens up some space, but the more I add these features, the more it feels like everything should inherit from a parent entity and then split off into other things. I worry I’m accumulating technical debt.

I also want to retool the master enemy script area to use the constructor function so I can have defaults (rather than add a new entry to EACH enemy when I think of something new to track, like whether the enemy should stabilize its speed.)