I am developing a turn-based combat game that uses D&D rules (as much as possible) as its foundation. The relevant rules are around concepts such as movement, distance, range, HP, AC, to hit, and damage. The game is almost entirely focused on combat, and to balance the fact that fighters can effectively keep swinging a sword until their arms fall off, I am implementing an "energy" system to introduce some form of action economy.
The way energy works is by being depleted every time a character makes a move (1 tile generally = 1 energy point) or uses a weapon (energy points vary by weapon weight, but for example fists = 1 energy point). Also, wearing heavier armour/equipment taxes your moves/attacks more than normal.
Is there anything like this energy management system in any D&D rules? I'm open to drawing from any version (Basic, 1e, 2e etc.), supplements, magazines, potentially other games like Pathfinder, or even other computer games that have a similar system.
To address some of the questions raised:
Q: What do you mean by D&D based? A: It's a medieval fighting game that uses the same weapons and items as D&D, uses the d20+ system for determining hits, damage etc., but only has one race/class: human fighter. There are no other skills, feats, attributes etc. to worry about.
Q: When does "energy" refill? A: It increases slightly every time you "defend" (effectively don't take an action) during a turn. To give an example: assume a player starts with 10 energy. If he moves forward 4 tiles, that's 4 energy so 6 remaining. If he swings a punch, that's 1 energy so 5 remaining (if he had a sword, it would cost 2 energy). If he now "defends" he gets 2 energy back, so 7 remaining.
Q: In what way does the existing action economy not already address this problem in a satisfactory way? A: There would not be any tactical decisions to make about moving, attacking, switching weapons or defending based on how much energy you have in total/remaining. Without energy, the most effective way to fight would be to close with your opponent and keep swinging until one of you falls, and your tactical decisions would be based solely around your remaining health. Without energy, if you wanted to run away you simply would do so: with energy, you need to decide if your remaining energy would get you far enough or if you should expend it on continuing to attack, judging by how much health you have vs your opponent. You may want to switch to a lighter weapon - less damage, but less costly to wield.
Q: "Stamina" seems like a better word to fit this use. A: You're spot on - it's actually called stamina in my game concept, I just used the term energy for this question as it's a more generic term that more people would understand.