Skip to content

Commit

Permalink
Immolator will now do x2 damage to light units in addition to armored…
Browse files Browse the repository at this point in the history
… units

Removed damage bonus for turrets due to unithealthmodifier
Increase the number of metal spots for 16x16 maps
Tighter controls for number of mex spots on all map sizes
Shrink size of t0 mex and storage
Fix tech requirements of radar
Shrink size of metal spot graphic and animation
  • Loading branch information
ForbodingAngel committed May 16, 2021
1 parent 161bd85 commit 2ed3a77
Show file tree
Hide file tree
Showing 10 changed files with 103 additions and 25 deletions.
16 changes: 8 additions & 8 deletions Gamedata/alldefs_post.lua
Expand Up @@ -355,14 +355,14 @@ function ModOptions_Post (UnitDefs, WeaponDefs)
end

-- Make sure that land based defense weapons and turrets are scaled up to match
for id,wDef in pairs(WeaponDefs) do
if wDef.customparams and wDef.customparams.effectedbyunithealthmodifier == true then
if wDef.damage.default then
wDef.damage.default = wDef.damage.default * (unitHealthModifier * 0.33)
end
--Spring.Echo(wDef.damage.default)
end
end
-- for id,wDef in pairs(WeaponDefs) do
-- if wDef.customparams and wDef.customparams.effectedbyunithealthmodifier == true then
-- if wDef.damage.default then
-- wDef.damage.default = wDef.damage.default * (unitHealthModifier * 0.33)
-- end
-- --Spring.Echo(wDef.damage.default)
-- end
-- end

--------------------------------------------------------------------------------
-- Process Upgrades --
Expand Down
66 changes: 66 additions & 0 deletions Gamedata/explosions/fusionreaction.lua
Expand Up @@ -437,6 +437,72 @@ return {
},
},
},

["fusionreactionstoragenew-small"] = {
electricarcs1 = {
air = true,
class = [[CSimpleParticleSystem]],
count = 1,
ground = true,
water = true,
underwater = true,
properties = {
airdrag = 1,
--alwaysvisible = true,
colormap = [[1.0 1.0 1.0 0.04 0.5 0 0 0.01 0.8 0.5 0 0.01 0 0 0 0.01]],
directional = true,
emitrot = 0,
emitrotspread = 15,
emitvector = [[dir]],
gravity = [[0, 0, 0]],
numparticles = 1,
particlelife = 70,
particlelifespread = 1,
particlesize = 0.5,
particlesizespread = 0,
particlespeed = 0.1,
particlespeedspread = 0.5,
pos = [[0, 2, 0]],
sizegrowth = 0.3,
sizemod = 1,
texture = [[plasmaball]],
useairlos = false,
},
},
},

["fusionreactionstoragenew-blue-small"] = {
electricarcs1 = {
air = true,
class = [[CSimpleParticleSystem]],
count = 1,
ground = true,
water = true,
underwater = true,
properties = {
airdrag = 1,
--alwaysvisible = true,
colormap = [[1.0 1.0 1.0 0.04 0 0 0.5 0.01 0 0.5 0.8 0.01 0 0 0 0.01]],
directional = true,
emitrot = 0,
emitrotspread = 15,
emitvector = [[dir]],
gravity = [[0, 0, 0]],
numparticles = 1,
particlelife = 70,
particlelifespread = 1,
particlesize = 0.5,
particlesizespread = 0,
particlespeed = 0.1,
particlespeedspread = 0.5,
pos = [[0, 2, 0]],
sizegrowth = 0.3,
sizemod = 1,
texture = [[plasmaball]],
useairlos = false,
},
},
},

["fusionreactionburrow"] = {
electricarcs1 = {
Expand Down
22 changes: 17 additions & 5 deletions LuaRules/Configs/MetalSpots/defaultLayout.lua
Expand Up @@ -248,18 +248,30 @@ end

if mexRandomLayout == "standard" then
if teamIDCount <= 2 then
mexSpotsPerSide = 10
mexSpotsPerSide = 20
elseif teamIDCount > 2 and teamIDCount <= 4 then
mexSpotsPerSide = 15
mexSpotsPerSide = 30
elseif teamIDCount > 4 and teamIDCount <= 6 then
mexSpotsPerSide = 20
mexSpotsPerSide = 40
elseif teamIDCount > 6 then
mexSpotsPerSide = 25
mexSpotsPerSide = 50
end
local mapSize = size * 2
if mapSize <= 6144 then -- An exception for 10x10 and smaller maps

if mapSize >= 14336 then -- An exception for 28x28 maps
mexSpotsPerSide = mexSpotsPerSide * 2
elseif mapSize >= 12288 then -- An exception for 24x24 maps
mexSpotsPerSide = mexSpotsPerSide * 1.75
elseif mapSize >= 10240 then -- An exception for 20x20 maps
mexSpotsPerSide = mexSpotsPerSide * 1.5
elseif mapSize >= 8192 then -- An exception for 16x16 maps
mexSpotsPerSide = mexSpotsPerSide * 1
elseif mapSize >= 7168 then -- An exception for 14x14 maps
mexSpotsPerSide = mexSpotsPerSide * 0.75
elseif mapSize >= 6144 then -- An exception for 12x12 and smaller maps
mexSpotsPerSide = mexSpotsPerSide * 0.5
end

randomMirrored = true
padding = 100
pointRadius = 100 -- TODO: change this into how big a metal circle is
Expand Down
2 changes: 1 addition & 1 deletion LuaUI/Widgets_Evo/cmd_mex_placement.lua
Expand Up @@ -123,7 +123,7 @@ local minimapIconSizeMult = 0.0145 --0.0145
-- only used when animating a spreadsheet/atlas texture
local spotTexture = "bitmaps/default/metalshimmer_color4.dds"
local animRate = 500 -- That's actually the reverse of animrate, the lower it is the faster the animation goes
local texturewidth = 160 --160 (actual in-game rect width)
local texturewidth = 80 --160 (actual in-game rect width)
local textureYoffset = 2 --10 (offset from the ground)
local numberOfImagesX = 8
local numberOfImagesY = 8
Expand Down
Binary file added Objects3D/emetalextractor2_small.s3o
Binary file not shown.
Binary file added Objects3D/estorage2_small.s3o
Binary file not shown.
Expand Up @@ -124,7 +124,7 @@ weaponDefs = {
waterweapon = true,
customparams = {
isupgraded = isUpgraded,
damagetype = "turretantiarmored",
damagetype = "turretantilightarmored",
effectedByunitHealthModifier = true,
},
damage = {
Expand Down
Expand Up @@ -57,7 +57,7 @@ unitDef = {
},
},
customParams = {
RequireTech = techrequired,
RequireTech = tech,
unittype = "building",
needed_cover = 2,
death_sounds = "generic",
Expand Down
2 changes: 1 addition & 1 deletion Units/ebuilding/emetalextractor.lua
Expand Up @@ -14,7 +14,7 @@ primaryCEG = "custom:fusionreactionnuclear-1color"

humanName = [[Metal Extractor]]

objectName = [[emetalextractor2.s3o]]
objectName = [[emetalextractor2_small.s3o]]
script = [[emetalextractor.cob]]

tech = [[tech0]]
Expand Down
16 changes: 8 additions & 8 deletions Units/ebuilding/estorage.lua
Expand Up @@ -32,8 +32,8 @@ local unitDef = {
metalStorage = storage,
energyUse = 0,
explodeAs = "smallBuildingExplosionGenericPurple",
footprintX = 4,
footprintZ = 8,
footprintX = 2,
footprintZ = 4,
idleAutoHeal = .5,
idleTime = 2200,
icontype = "storage",
Expand All @@ -42,7 +42,7 @@ local unitDef = {
maxWaterDepth = 5000,
--metalStorage = storage,
name = "Supply/Storage Depot",
objectName = "estorage2.s3o",
objectName = "estorage2_small.s3o",
script = "estorage2.cob",
radarDistance = 0,
repairable = false,
Expand All @@ -52,7 +52,7 @@ local unitDef = {
smoothAnim = true,
unitname = "estorage",
workerTime = 0,
yardMap = "yyooooyy yyooooyy yyooooyy yyooooyy yyooooyy yyooooyy yyooooyy yyooooyy ",
yardMap = "oo oo oo oo oo oo oo oo",

sfxtypes = {
pieceExplosionGenerators = {
Expand All @@ -62,8 +62,8 @@ local unitDef = {

explosiongenerators = {
"custom:blacksmoke",
"custom:fusionreactionstoragenew",
"custom:fusionreactionstoragenew-blue",
"custom:fusionreactionstoragenew-small",
"custom:fusionreactionstoragenew-blue-small",
"custom:skyhatelaser",
},
},
Expand Down Expand Up @@ -92,8 +92,8 @@ local unitDef = {
},
useGroundDecal = true,
BuildingGroundDecalType = "factorygroundplate.dds",
BuildingGroundDecalSizeX = 10,
BuildingGroundDecalSizeY = 10,
BuildingGroundDecalSizeX = 4,
BuildingGroundDecalSizeY = 6,
BuildingGroundDecalDecaySpeed = 0.9,
}

Expand Down

0 comments on commit 2ed3a77

Please sign in to comment.