Compare commits
2 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
0880b82677 | ||
|
|
050a642982 |
@@ -3,3 +3,4 @@ weaponProbabilities[WeaponType.SmartCannon] = {d = 0.65, p = 2.0}
|
|||||||
weaponProbabilities[WeaponType.HeavyCannon] = {d = 0.6, p = 1.0}
|
weaponProbabilities[WeaponType.HeavyCannon] = {d = 0.6, p = 1.0}
|
||||||
weaponProbabilities[WeaponType.Diffuser] = {d = 0.6, p = 1.0}
|
weaponProbabilities[WeaponType.Diffuser] = {d = 0.6, p = 1.0}
|
||||||
weaponProbabilities[WeaponType.Hookgun] = {d = 0.6, p = 1.0}
|
weaponProbabilities[WeaponType.Hookgun] = {d = 0.6, p = 1.0}
|
||||||
|
weaponProbabilities[WeaponType.HiveLauncher] = {d = 0.6, p = 1.0} -- TODO Подсмотреть у ванильных ракетниц
|
||||||
@@ -3,3 +3,4 @@ valueWeights[WeaponType.SmartCannon ] = 2
|
|||||||
valueWeights[WeaponType.HeavyCannon ] = 2.5
|
valueWeights[WeaponType.HeavyCannon ] = 2.5
|
||||||
valueWeights[WeaponType.Diffuser ] = 1.7
|
valueWeights[WeaponType.Diffuser ] = 1.7
|
||||||
valueWeights[WeaponType.Hookgun ] = 1.5
|
valueWeights[WeaponType.Hookgun ] = 1.5
|
||||||
|
valueWeights[WeaponType.HiveLauncher] = 2
|
||||||
|
|||||||
@@ -29,6 +29,13 @@ scales[WeaponType.Hookgun] = {
|
|||||||
{from = 51, to = 52, size = 3.0, usedSlots = 6},
|
{from = 51, to = 52, size = 3.0, usedSlots = 6},
|
||||||
}
|
}
|
||||||
|
|
||||||
|
scales[WeaponType.HiveLauncher] = {
|
||||||
|
{from = 0, to = 46, size = 1.0, usedSlots = 2},
|
||||||
|
{from = 47, to = 50, size = 2.0, usedSlots = 4},
|
||||||
|
--dummy for cooaxial, add 1 to size and level
|
||||||
|
{from = 51, to = 52, size = 3.0, usedSlots = 6},
|
||||||
|
}
|
||||||
|
|
||||||
if GameVersion() >= Version(0, 31, 0) then
|
if GameVersion() >= Version(0, 31, 0) then
|
||||||
possibleSpecialties[WeaponType.SmartCannon] = {
|
possibleSpecialties[WeaponType.SmartCannon] = {
|
||||||
{specialty = Specialty.HighDamage, probability = 0.2},
|
{specialty = Specialty.HighDamage, probability = 0.2},
|
||||||
@@ -95,6 +102,20 @@ else
|
|||||||
}
|
}
|
||||||
end
|
end
|
||||||
|
|
||||||
|
if GameVersion() >= Version(0, 31, 0) then
|
||||||
|
possibleSpecialties[WeaponType.HiveLauncher] = {
|
||||||
|
{specialty = Specialty.HighDamage, probability = 0.3},
|
||||||
|
{specialty = Specialty.HighRange, probability = 0.3},
|
||||||
|
-- {specialty = Specialty.FasterRechargeTime, probability = 0.6},
|
||||||
|
}
|
||||||
|
else
|
||||||
|
possibleSpecialties[WeaponType.HiveLauncher] = {
|
||||||
|
Specialty.HighDamage,
|
||||||
|
Specialty.HighRange,
|
||||||
|
Specialty.FasterRechargeTime,
|
||||||
|
}
|
||||||
|
end
|
||||||
|
|
||||||
function TurretGenerator.generateSmartCannonTurret(rand, dps, tech, material, rarity)
|
function TurretGenerator.generateSmartCannonTurret(rand, dps, tech, material, rarity)
|
||||||
local result = TurretTemplate()
|
local result = TurretTemplate()
|
||||||
|
|
||||||
@@ -125,14 +146,15 @@ function TurretGenerator.generateSmartCannonTurret(rand, dps, tech, material, ra
|
|||||||
|
|
||||||
local name = "SmartCannon /* weapon name*/"%_T
|
local name = "SmartCannon /* weapon name*/"%_T
|
||||||
|
|
||||||
|
local specType = 1
|
||||||
|
if specType > 0 then
|
||||||
|
name = "Ionized SmartCannon/* weapon name*/"%_T
|
||||||
|
weapon.shieldPenetration = 1
|
||||||
|
end
|
||||||
|
|
||||||
local dmgAdjective, outerAdjective, barrel, multishot, coax, serial = makeTitleParts(rand, specialties, result, DamageType.Physical)
|
local dmgAdjective, outerAdjective, barrel, multishot, coax, serial = makeTitleParts(rand, specialties, result, DamageType.Physical)
|
||||||
|
|
||||||
result.title = Format("%1%%2%%3%%4%%5%%6%%7% /* [outer-adjective][barrel][coax][dmg-adjective][multishot][name][serial], e.g. Enduring Dual Coaxial Plasmatic Tri-R-Mining Laser T-F */"%_T, outerAdjective, barrel, coax, dmgAdjective, multishot, name, serial)
|
result.title = Format("%1%%2%%3%%4%%5%%6%%7% /* [outer-adjective][barrel][coax][dmg-adjective][multishot][name][serial], e.g. Enduring Dual Coaxial Plasmatic Tri-R-Mining Laser T-F */"%_T, outerAdjective, barrel, coax, dmgAdjective, multishot, name, serial)
|
||||||
local specType = 1
|
|
||||||
if specType > 0 then
|
|
||||||
weapon.prefix = "Ionized /* Weapon Prefix*/"%_t
|
|
||||||
weapon.shieldPenetration = 1
|
|
||||||
end
|
|
||||||
|
|
||||||
return result
|
return result
|
||||||
end
|
end
|
||||||
@@ -174,7 +196,7 @@ function TurretGenerator.generateHeavyCannonTurret(rand, dps, tech, material, ra
|
|||||||
local Pen = rand:getInt(0, rarity.value)
|
local Pen = rand:getInt(0, rarity.value)
|
||||||
if Pen > 0 then
|
if Pen > 0 then
|
||||||
weapon.blockPenetration = Pen
|
weapon.blockPenetration = Pen
|
||||||
weapon.prefix = "Cumulative /* Weapon Prefix*/"%_t
|
name = "Cumulative Heavy Cannon /* weapon name*/"%_T
|
||||||
end
|
end
|
||||||
|
|
||||||
local dmgAdjective, outerAdjective, barrel, multishot, coax, serial = makeTitleParts(rand, specialties, result, DamageType.Physical)
|
local dmgAdjective, outerAdjective, barrel, multishot, coax, serial = makeTitleParts(rand, specialties, result, DamageType.Physical)
|
||||||
@@ -257,6 +279,13 @@ function TurretGenerator.generateHookgunTurret(rand, dps, tech, material, rarity
|
|||||||
|
|
||||||
local name = "Hookgun /* weapon name*/"%_T
|
local name = "Hookgun /* weapon name*/"%_T
|
||||||
|
|
||||||
|
local specType = 0
|
||||||
|
if specType >0 then
|
||||||
|
|
||||||
|
else
|
||||||
|
|
||||||
|
end
|
||||||
|
|
||||||
local dmgAdjective, outerAdjective, barrel, multishot, coax, serial = makeTitleParts(rand, specialties, result, DamageType.Physical)
|
local dmgAdjective, outerAdjective, barrel, multishot, coax, serial = makeTitleParts(rand, specialties, result, DamageType.Physical)
|
||||||
result.title = Format("%1%%2%%3%%4%%5%%6%%7% /* [outer-adjective][barrel][coax][dmg-adjective][multishot][name][serial], e.g. Enduring Dual Coaxial Plasmatic Tri-R-Mining Laser T-F */"%_T, outerAdjective, barrel, coax, dmgAdjective, multishot, name, serial)
|
result.title = Format("%1%%2%%3%%4%%5%%6%%7% /* [outer-adjective][barrel][coax][dmg-adjective][multishot][name][serial], e.g. Enduring Dual Coaxial Plasmatic Tri-R-Mining Laser T-F */"%_T, outerAdjective, barrel, coax, dmgAdjective, multishot, name, serial)
|
||||||
|
|
||||||
@@ -264,3 +293,49 @@ function TurretGenerator.generateHookgunTurret(rand, dps, tech, material, rarity
|
|||||||
end
|
end
|
||||||
|
|
||||||
generatorFunction[WeaponType.Hookgun] = TurretGenerator.generateHookgunTurret
|
generatorFunction[WeaponType.Hookgun] = TurretGenerator.generateHookgunTurret
|
||||||
|
|
||||||
|
function TurretGenerator.generateHiveLauncherTurret(rand, dps, tech, material, rarity)
|
||||||
|
local result = TurretTemplate()
|
||||||
|
|
||||||
|
-- generate turret
|
||||||
|
local requiredCrew = TurretGenerator.dpsToRequiredCrew(dps)
|
||||||
|
local crew = Crew()
|
||||||
|
crew:add(requiredCrew*2, CrewMan(CrewProfessionType.Gunner))
|
||||||
|
result.crew = crew
|
||||||
|
|
||||||
|
-- generate weapons
|
||||||
|
local numWeapons = rand:getInt(1, 2)
|
||||||
|
|
||||||
|
local weapon = WeaponGenerator.generateHiveLauncher(rand, dps, tech, material, rarity)
|
||||||
|
weapon.damage = weapon.damage / numWeapons
|
||||||
|
|
||||||
|
-- attach weapons to turret
|
||||||
|
TurretGenerator.attachWeapons(rand, result, weapon, numWeapons)
|
||||||
|
|
||||||
|
local rechargeTime = 4 * rand:getFloat(0.8, 1.2)
|
||||||
|
local shootingTime = 2 * rand:getFloat(0.8, 1.2)
|
||||||
|
TurretGenerator.createBatteryChargeCooling(result, rechargeTime, shootingTime)
|
||||||
|
|
||||||
|
|
||||||
|
TurretGenerator.scale(rand, result, WeaponType.HiveLauncher, tech, 0.75)
|
||||||
|
local specialties = TurretGenerator.addSpecialties(rand, result, WeaponType.HiveLauncher)
|
||||||
|
|
||||||
|
result.slotType = TurretSlotType.Armed
|
||||||
|
result:updateStaticStats()
|
||||||
|
|
||||||
|
local name = "HiveLauncher /* weapon name*/"%_T
|
||||||
|
|
||||||
|
local specType = 0
|
||||||
|
if specType >0 then
|
||||||
|
|
||||||
|
else
|
||||||
|
|
||||||
|
end
|
||||||
|
|
||||||
|
local dmgAdjective, outerAdjective, barrel, multishot, coax, serial = makeTitleParts(rand, specialties, result, DamageType.Physical)
|
||||||
|
result.title = Format("%1%%2%%3%%4%%5%%6%%7% /* [outer-adjective][barrel][coax][dmg-adjective][multishot][name][serial], e.g. Enduring Dual Coaxial Plasmatic Tri-R-Mining Laser T-F */"%_T, outerAdjective, barrel, coax, dmgAdjective, multishot, name, serial)
|
||||||
|
|
||||||
|
return result
|
||||||
|
end
|
||||||
|
|
||||||
|
generatorFunction[WeaponType.HiveLauncher] = TurretGenerator.generateHiveLauncherTurret
|
||||||
|
|||||||
@@ -43,3 +43,14 @@ TurretIngredients[WeaponType.Hookgun] =
|
|||||||
{name = "Silver", amount = 5, investable = 0, minimum = 5,},
|
{name = "Silver", amount = 5, investable = 0, minimum = 5,},
|
||||||
-- {name = "Targeting System", amount = 0, investable = 2, minimum = 0, turretStat = "automatic", investFactor = 1, changeType = StatChanges.Flat},
|
-- {name = "Targeting System", amount = 0, investable = 2, minimum = 0, turretStat = "automatic", investFactor = 1, changeType = StatChanges.Flat},
|
||||||
}
|
}
|
||||||
|
|
||||||
|
TurretIngredients[WeaponType.HiveLauncher] =
|
||||||
|
{
|
||||||
|
{name = "Plasma Cell", amount = 10, investable = 10, minimum = 10, weaponStat = "fireRate", investFactor = 1.0, changeType = StatChanges.Percentage},
|
||||||
|
{name = "High Capacity Lens", amount = 5, investable = 6, minimum = 1, weaponStat = "reach", },
|
||||||
|
{name = "Energy Tube", amount = 2, investable = 6, minimum = 1, weaponStat = "damage", },
|
||||||
|
{name = "Steel", amount = 20, investable = 0, minimum = 20,},
|
||||||
|
{name = "Copper", amount = 10, investable = 0, minimum = 10,},
|
||||||
|
{name = "Silver", amount = 5, investable = 0, minimum = 5,},
|
||||||
|
-- {name = "Targeting System", amount = 0, investable = 2, minimum = 0, turretStat = "automatic", investFactor = 1, changeType = StatChanges.Flat},
|
||||||
|
}
|
||||||
|
|||||||
@@ -192,3 +192,55 @@ function WeaponGenerator.generateHookgun(rand, dps, tech, material, rarity)
|
|||||||
end
|
end
|
||||||
|
|
||||||
generatorFunction[WeaponType.Hookgun] = WeaponGenerator.generateHookgun
|
generatorFunction[WeaponType.Hookgun] = WeaponGenerator.generateHookgun
|
||||||
|
|
||||||
|
function WeaponGenerator.generateHiveLauncher(rand, dps, tech, material, rarity)
|
||||||
|
local weapon = Weapon()
|
||||||
|
weapon:setBeam()
|
||||||
|
|
||||||
|
local fireDelay = rand:getFloat(0.2, 0.5)
|
||||||
|
local reach = rand:getFloat(500, 900)
|
||||||
|
local damage = dps * fireDelay
|
||||||
|
|
||||||
|
weapon.fireDelay = fireDelay
|
||||||
|
weapon.appearanceSeed = rand:getInt()
|
||||||
|
weapon.reach = reach
|
||||||
|
weapon.continuousBeam = true
|
||||||
|
weapon.appearance = WeaponAppearance.Cannon
|
||||||
|
weapon.name = "HiveLauncher /* Weapon Name*/"%_t
|
||||||
|
weapon.prefix = "HiveLauncher /* Weapon Prefix*/"%_t
|
||||||
|
weapon.icon = "data/textures/icons/hivelauncher.png"
|
||||||
|
weapon.sound = "cannon"
|
||||||
|
weapon.accuracy = 0.99 - rand:getFloat(0, 0.02)
|
||||||
|
|
||||||
|
weapon.blockPenetration = rand:getInt(0, rarity.value) + 2
|
||||||
|
|
||||||
|
|
||||||
|
weapon.otherForce = -500 * dps * rarity.value
|
||||||
|
|
||||||
|
weapon.damage = damage
|
||||||
|
weapon.damageType = DamageType.Physical
|
||||||
|
weapon.impactParticles = ImpactParticles.Physical
|
||||||
|
weapon.shieldDamageMultiplicator = 0.75
|
||||||
|
weapon.stoneDamageMultiplicator = 1.2
|
||||||
|
weapon.hullDamageMultiplicator = 1
|
||||||
|
weapon.impactSound = 1
|
||||||
|
|
||||||
|
weapon.blength = weapon.reach
|
||||||
|
weapon.bshape = BeamShape.Swirly
|
||||||
|
weapon.bwidth = 0.5
|
||||||
|
weapon.bauraWidth = 3
|
||||||
|
weapon.banimationSpeed = 0
|
||||||
|
weapon.banimationAcceleration = 0
|
||||||
|
weapon.bshapeSize = 13
|
||||||
|
|
||||||
|
-- shades of blue
|
||||||
|
weapon.bouterColor = ColorHSV(0, 0, rand:getFloat(0.35, 0.65))
|
||||||
|
weapon.binnerColor = ColorHSV(1, 1, rand:getFloat(0.35, 0.65))
|
||||||
|
|
||||||
|
WeaponGenerator.adaptWeapon(rand, weapon, tech, material, rarity)
|
||||||
|
|
||||||
|
|
||||||
|
return weapon
|
||||||
|
end
|
||||||
|
|
||||||
|
generatorFunction[WeaponType.HiveLauncher] = WeaponGenerator.generateHiveLauncher
|
||||||
|
|||||||
@@ -3,3 +3,4 @@ WeaponTypes.addType("SmartCannon", "Smart Сannon /* Weapon Type */"%_t, armed)
|
|||||||
WeaponTypes.addType("HeavyCannon", "Heavy Cannon /* Weapon Type */"%_t, armed)
|
WeaponTypes.addType("HeavyCannon", "Heavy Cannon /* Weapon Type */"%_t, armed)
|
||||||
WeaponTypes.addType("Diffuser", "Diffuser /* Weapon Type */"%_t, armed)
|
WeaponTypes.addType("Diffuser", "Diffuser /* Weapon Type */"%_t, armed)
|
||||||
WeaponTypes.addType("Hookgun", "Hookgun /* Weapon Type */"%_t, armed)
|
WeaponTypes.addType("Hookgun", "Hookgun /* Weapon Type */"%_t, armed)
|
||||||
|
WeaponTypes.addType("HiveLauncher", "HiveLauncher /* Weapon Type */"%_t, armed)
|
||||||
Binary file not shown.
|
Before Width: | Height: | Size: 36 KiB After Width: | Height: | Size: 37 KiB |
BIN
data/textures/icons/railgun.png
Normal file
BIN
data/textures/icons/railgun.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 36 KiB |
Reference in New Issue
Block a user