Skip to content

Commit

Permalink
ezmorph won't choose locked morphs
Browse files Browse the repository at this point in the history
  • Loading branch information
sprunk committed Jan 24, 2019
1 parent 3a5844f commit c41c8ec
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions LuaRules/Gadgets/unit_morph.lua
Original file line number Diff line number Diff line change
Expand Up @@ -1070,7 +1070,8 @@ local function handleEzMorph(unitID, unitDefID, teamID, targetDefID)
return true, true
end
for morphCmd, morphDef in pairs(morphSet) do
if not targetDefID or morphDef.into == targetDefID then
if (not targetDefID or morphDef.into == targetDefID)
and MorphRequirementsFulfilled(unitID, morphDef, teamTechLevel[teamID] or 0, TechReqList(teamID, morphDef.require)) then
StartMorph(unitID, unitDefID, teamID, morphDef)
break
end
Expand Down Expand Up @@ -1445,4 +1446,4 @@ end
end
--------------------------------------------------------------------------------
-- COMMON
--------------------------------------------------------------------------------
--------------------------------------------------------------------------------

0 comments on commit c41c8ec

Please sign in to comment.