mirror of
https://gitlab.com/the-no-frauds-club/cosmonarchy-bw-prerelease.git
synced 2026-09-24 07:41:34 +00:00
34 lines
986 B
Lua
34 lines
986 B
Lua
|
|
MeleeCommon = {}
|
||
|
|
|
||
|
|
---@param race RaceId
|
||
|
|
---@return UnitId worker_unit_id
|
||
|
|
function MeleeCommon.default_worker(race)
|
||
|
|
if race == RaceId.Terran then
|
||
|
|
return UnitId.TerranMason
|
||
|
|
elseif race == RaceId.Zerg then
|
||
|
|
return UnitId.ZergDroleth
|
||
|
|
elseif race == RaceId.Protoss then
|
||
|
|
return UnitId.ProtossScribe
|
||
|
|
elseif race == RaceId.Askosi then
|
||
|
|
return UnitId.AskosiPilgrim
|
||
|
|
end
|
||
|
|
error("Race " .. tostring(race) .. " has no default worker set")
|
||
|
|
end
|
||
|
|
|
||
|
|
---@param race RaceId
|
||
|
|
---@return UnitId town_building_unit_id
|
||
|
|
function MeleeCommon.default_town_building(race)
|
||
|
|
if race == RaceId.Terran then
|
||
|
|
return UnitId.TerranMinistry
|
||
|
|
elseif race == RaceId.Zerg then
|
||
|
|
return UnitId.ZergHachirosk
|
||
|
|
elseif race == RaceId.Protoss then
|
||
|
|
return UnitId.ProtossNexus
|
||
|
|
elseif race == RaceId.Askosi then
|
||
|
|
return UnitId.AskosiLandlock
|
||
|
|
end
|
||
|
|
error("Race " .. tostring(race) .. " has no default town set")
|
||
|
|
end
|
||
|
|
|
||
|
|
return MeleeCommon
|