diff --git a/changelog/snippets/balance.6591.md b/changelog/snippets/balance.6591.md new file mode 100644 index 0000000000..0d250359cc --- /dev/null +++ b/changelog/snippets/balance.6591.md @@ -0,0 +1,7 @@ +- (#6591) Buff UEF ACU Drone's rebuild costs by making it half the upgrade's cost. Previously it was too high due to not being changed alongside the upgrade's cost, and had an unreasonable drain for a T1 economy. + Additionally, the drone now rebuilds based off the ACU's buildpower instead of a hardcoded 10 seconds. + + - UEF ACU Drone: + - Rebuild mass cost: 160 -> 60 + - Rebuild energy cost: 1600 -> 800 + - Rebuild time: 10 seconds -> 200 buildtime diff --git a/lua/RuleInit.lua b/lua/RuleInit.lua index 9db7918960..c3502f6ab3 100644 --- a/lua/RuleInit.lua +++ b/lua/RuleInit.lua @@ -5,6 +5,12 @@ -- This is the minimal setup required to load the game rules. -- Do global init + +--[[`number` is `BlueprintOrdinal` from the entity creation dialog, used by all types of blueprints +`BlueprintId` for units +`FileName` for projectiles and meshes (meshes have the file extension stripped)]] +---@type table +---@diagnostic disable-next-line: lowercase-global __blueprints = {} doscript '/lua/system/config.lua' diff --git a/units/UEA0001/UEA0001_unit.bp b/units/UEA0001/UEA0001_unit.bp index b01b70fe4d..98f6cd768e 100644 --- a/units/UEA0001/UEA0001_unit.bp +++ b/units/UEA0001/UEA0001_unit.bp @@ -68,11 +68,11 @@ UnitBlueprint{ UniformScale = 0.1, }, Economy = { - BuildCostEnergy = 1600, - BuildCostMass = 160, + BuildCostEnergy = 800, + BuildCostMass = 60, BuildRadius = 8, BuildRate = 5, - BuildTime = 400, + BuildTime = 200, BuildableCategory = { "BUILTBYCOMMANDER UEF" }, NaturalProducer = true, }, diff --git a/units/UEL0001/UEL0001_script.lua b/units/UEL0001/UEL0001_script.lua index 35202b054b..461c8a800d 100644 --- a/units/UEL0001/UEL0001_script.lua +++ b/units/UEL0001/UEL0001_script.lua @@ -25,6 +25,8 @@ local TDFOverchargeWeapon = TerranWeaponFile.TDFOverchargeWeapon local EffectUtil = import("/lua/effectutilities.lua") local Buff = import("/lua/sim/buff.lua") +local podBpEco = __blueprints['uea0001']--[[@as UnitBlueprint]].Economy + ---@class UEL0001 : ACUUnit ---@field LeftPod TConstructionPodUnit ---@field HasLeftPod boolean @@ -234,7 +236,7 @@ UEL0001 = ClassUnit(ACUUnit) { WaitFor(self.RebuildingPod2) end if self.HasLeftPod == true then - self.RebuildingPod = CreateEconomyEvent(self, 1600, 160, 10, self.SetWorkProgress) + self.RebuildingPod = CreateEconomyEvent(self, podBpEco.BuildCostEnergy, podBpEco.BuildCostMass, podBpEco.BuildTime / self:GetBuildRate(), self.SetWorkProgress) self:RequestRefreshUI() WaitFor(self.RebuildingPod) self:SetWorkProgress(0.0) @@ -255,7 +257,7 @@ UEL0001 = ClassUnit(ACUUnit) { WaitFor(self.RebuildingPod) end if self.HasRightPod == true then - self.RebuildingPod2 = CreateEconomyEvent(self, 1600, 160, 10, self.SetWorkProgress) + self.RebuildingPod2 = CreateEconomyEvent(self, podBpEco.BuildCostEnergy, podBpEco.BuildCostMass, podBpEco.BuildTime / self:GetBuildRate(), self.SetWorkProgress) self:RequestRefreshUI() WaitFor(self.RebuildingPod2) self:SetWorkProgress(0.0)