XY Problems are much more common from the person asking the question though...
Google for "replace conditional with polymorphism".
Just checked and it is in "Clean Code" - Chaper 17; Section G23 "Prefer Polymorphism to if/else or switch/case".
There are several existing ways to regain 1 focus point in combat - however all of them are constrained with "Frequency once per day".
I could see adding some kind of similar constraint - or making it a reaction where the trigger is if the previous focus spell failed it gives you a flat check to regain the focus point.
As for examples -
Fire Ray - fire domain clerics are now neverending flamethrowers.
Moonbeam - same for moon domain.
Ki Strike - every turn a monk can now do ki strike flurry of blows to have +1 and 1d6 extra on both strikes.
Hand of the Apprentice - wizards can become backline melee at range - thor hammers fly every round
Additional edit: The change to recover magic would also pretty much destroy any need for resource management - if I'm a caster why not just dump every spell slot I have in this current fight, rest an hour and then do it again? Clerics could just dump all the heal spells from their healing font after combat to heal everyone up, then rest an hour and regain them all and do it again next fight.
Extra Additional Edit: Both of these changes sound like fun cheat codes to make the players win, but it pretty much removes all challenge.
Parquet is a storage format; graphQL is a query language/transmission strategy.
This is also against clean code examples, because Uncle Bob seems to be allergic against function arguments and return values.
I think this is your strawman version of "Clean Code"... not anything that's actually in it...
I "like" some parts of your example more than the previous one, but a lot of this depends on where exactly in the whole program this method is - if this method is on a "Salesman" class - does it make sense to pass the "Contract" in? If there's a Contract class available, why doesn't the "calculateCommission" method exist on it?
"NPC Core" was announced at PaizoCon as a core rulebook coming out in 2025. Not a lot of description yet, but I'd assume it would be an expanded version of what came with the original GMG.
Just wait he could exonerate himself by exposing that the crimes were actually perpetrated by a secret identical twin brother or by opening up a warehouse full of dead clones and claiming that one of them did it.
On the map of the level, pick a room near the center of the dungeon (as long as it's not where players enter) and label it as "1", circle this rooms in a random order, labeling them 2, 3, 4, etc., making sure rooms that have connections don't have consecutive numers... keep circling outwards until all rooms have numbers. Then put the rooms in numerical order in the GM module book. Only refer to the room number on the map and the heading of the room. Don't use the room number to reference exits from the current room either, just state things like "a cave exit is to the east and a wooden door is in the north wall".
The DM will constantly have to refer back and forth from the map to the book - and have to flip to random parts of the book since the numbers aren't "in order".
For additional hate, make sure that north doesn't point toward the top of the map, and/or don't place a compass rose on the map.
For even more additional hate, make the players hunt down opponents/creatures in the dungeon that also move through the dungeon as the players move rooms.
Summary: 'Life is unfair', chortles an opportunist who benefits from an unfair system.