Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Buff UEF ACU Drone's rebuild costs #6591

Open
wants to merge 4 commits into
base: develop
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions changelog/snippets/balance.6591.md
Original file line number Diff line number Diff line change
@@ -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
6 changes: 6 additions & 0 deletions lua/RuleInit.lua
Original file line number Diff line number Diff line change
Expand Up @@ -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<number | BlueprintId | FileName, UnitBlueprint | ProjectileBlueprint | MeshBlueprint>
---@diagnostic disable-next-line: lowercase-global
__blueprints = {}

doscript '/lua/system/config.lua'
Expand Down
6 changes: 3 additions & 3 deletions units/UEA0001/UEA0001_unit.bp
Original file line number Diff line number Diff line change
Expand Up @@ -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,
},
Expand Down
6 changes: 4 additions & 2 deletions units/UEL0001/UEL0001_script.lua
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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)
Expand All @@ -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)
Expand Down
Loading