Hi Guys,
I don't like the egg.
Thus, this once, I am going to publish all the ways to break the egg. So hopefully it goes away.
Method 1: using hatchForTeam abuse in order to duplicate coms through teamshare
-
Two players share a team (commshare). Player A is on Team 1, Player B is Team 2.
-
Team 1 loses their commander. Team 2's commander is still alive.
-
FindTeamNeedingCommander correctly says "Team 1 needs one" → hatchForTeam = 1.
-
MorphCompleted's final check counts only units with commander_owner_team == 1. If Team 2's alive commander is tagged as owner_team=2 (different ID), it is invisible to the check.
-
The egg hatches → Team 1 gets a new commander even though the shared group already has one.
Method 2: start_comm_count abuse (not really useful)
start_comm_count is only set for teams that got a starting commander via start_unit_setup.lua. However, its default fallback is 1, not 0. This means any team that never had a starting commander is implicitly assumed to deserve one. If a player starts without a commander (e.g., a special game mode), they can hatch one from an egg without any check ever proving they had a commander that died.
Method 3: GG.MorphCompleted nil setstate abuse (making your com invisible to the counter)
This code runs for all commander morphs (not just from eggs). When a regular commander upgrades (e.g., dynstrike0 → dynstrike1), hatchForTeam is nil, so the function returns true immediately — but it has already overwritten commander_owner_team on the new commander unit. If ownerTeam resolves to nil (because neither param was set), the new commander has commander_owner_team = nil, making it invisible to CountCommandersByTeam. A commander with no owner-team entry effectively bypasses the egg limit check for all future hatches on the same team.
Method 4: Domi/Reef steel counter freeze (make it so your opponent can never egg again!)
-
Team A's commander is dead. Egg starts morphing. egg_morph_owner_team = A. This reserves a slot and blocks other eggs.
-
An ally (or an enemy using Dominatrix) captures the egg mid-morph.
unit_morph.lua:UnitTaken correctly updates morphData.teamID = newTeamID.
-
But egg_morph_owner_team is never cleared on the captured egg.
MorphCompleted still uses hatchForTeam = A for its final check, while the commander spawns for the new owner — potentially giving the new team a "free" commander on Team A's quota, while also leaving Team A's slot permanently reserved (blocking further hatches for A).
Method 5: GameFrame related breaking (accomplishable with widgets)
If two eggs reach progress >= 1.0 in the same game frame, FinishMorph is called for each sequentially within pairs(morphUnits). The second egg's MorphCompleted does see the first commander already (it has comm_level set via UnitCreated), so it should be blocked. However, Lua's pairs() traversal order over a table is non-deterministic, and if the iteration order means both eggs are processed before any UnitCreated callback fires (unusual but engine-dependent), both could slip through. This is probably possible with widgets somewhat consistently.