mirror of
https://github.com/veden/Rampant.git
synced 2024-12-28 21:08:22 +02:00
working blockables
This commit is contained in:
parent
46af062667
commit
11ad4bc470
@ -1,3 +1,14 @@
|
||||
---------------------------------------------------------------------------------------------------
|
||||
Version: 0.16.19
|
||||
Date: 2. 05. 2018
|
||||
Features:
|
||||
- Blockable projectiles, most projectiles will be stop by walls and other objects.
|
||||
Improvements:
|
||||
- Switched linear tier generation from rounding using ceiling to nearest number
|
||||
Bugfixes:
|
||||
- Added check for null group (https://github.com/veden/Rampant/issues/16)
|
||||
|
||||
|
||||
---------------------------------------------------------------------------------------------------
|
||||
Version: 0.16.18
|
||||
Date: 2. 05. 2018
|
||||
|
@ -330,6 +330,11 @@ constants.SENTINEL_IMPASSABLE_CHUNK.y = -1
|
||||
|
||||
-- unit spawners
|
||||
|
||||
local function roundToNearest(number, multiple)
|
||||
local num = number + (multiple * 0.5)
|
||||
return num - (num % multiple)
|
||||
end
|
||||
|
||||
local tiers5 = {}
|
||||
|
||||
local tierStart = settings.startup["rampant-tierStart"].value
|
||||
@ -337,14 +342,14 @@ local tierEnd = settings.startup["rampant-tierEnd"].value
|
||||
|
||||
local step5 = (tierEnd - tierStart) / 5
|
||||
for i=tierStart,tierEnd,step5 do
|
||||
tiers5[#tiers5+1] = math.ceil(i)
|
||||
tiers5[#tiers5+1] = roundToNearest(i, 1)
|
||||
end
|
||||
|
||||
local tiers10 = {}
|
||||
|
||||
local step10 = (tierEnd - tierStart) / 10
|
||||
for i=tierStart,tierEnd,step10 do
|
||||
tiers10[#tiers10+1] = math.ceil(i)
|
||||
tiers10[#tiers10+1] = roundToNearest(i, 1)
|
||||
end
|
||||
|
||||
constants.TIER_UPGRADE_SET_5 = tiers5
|
||||
|
@ -68,7 +68,7 @@ function squadAttack.squadsAttack(map, surface, natives)
|
||||
for i=1,#squads do
|
||||
local squad = squads[i]
|
||||
local group = squad.group
|
||||
if group.valid and (squad.status == SQUAD_RAIDING) then
|
||||
if group and group.valid and (squad.status == SQUAD_RAIDING) then
|
||||
local groupState = group.state
|
||||
if (groupState == DEFINES_GROUP_FINISHED) or (groupState == DEFINES_GROUP_GATHERING) or ((groupState == DEFINES_GROUP_MOVING) and (squad.cycles == 0)) then
|
||||
local groupPosition = group.position
|
||||
@ -128,7 +128,7 @@ function squadAttack.squadsBeginAttack(natives, players)
|
||||
for i=1,#squads do
|
||||
local squad = squads[i]
|
||||
local group = squad.group
|
||||
if (squad.status == SQUAD_GUARDING) and group.valid then
|
||||
if (squad.status == SQUAD_GUARDING) and group and group.valid then
|
||||
local kamikazeThreshold = calculateKamikazeThreshold(#squad.group.members, natives)
|
||||
|
||||
local groupPosition = group.position
|
||||
|
@ -61,7 +61,7 @@ function aiDefense.retreatUnits(chunk, position, squad, map, surface, natives, t
|
||||
setRetreatTick(map, chunk, tick + (INTERVAL_LOGIC * 10))
|
||||
performRetreat = false
|
||||
end
|
||||
elseif squad.group.valid and (squad.status ~= SQUAD_RETREATING) and not squad.kamikaze then
|
||||
elseif squad.group and squad.group.valid and (squad.status ~= SQUAD_RETREATING) and not squad.kamikaze then
|
||||
performRetreat = #squad.group.members > 1
|
||||
end
|
||||
|
||||
|
@ -50,7 +50,7 @@ local euclideanDistanceNamed = mathUtils.euclideanDistanceNamed
|
||||
function unitGroupUtils.findNearbySquadFiltered(map, chunk, position)
|
||||
for _,squad in pairs(getSquadsOnChunk(map, chunk)) do
|
||||
local unitGroup = squad.group
|
||||
if unitGroup.valid and RETREAT_FILTER[squad.status] then
|
||||
if unitGroup and unitGroup.valid and RETREAT_FILTER[squad.status] then
|
||||
if (euclideanDistanceNamed(unitGroup.position, position) <= HALF_CHUNK_SIZE) then
|
||||
return squad
|
||||
end
|
||||
@ -62,7 +62,7 @@ function unitGroupUtils.findNearbySquadFiltered(map, chunk, position)
|
||||
for i=1,#neighbors do
|
||||
for _,squad in pairs(getSquadsOnChunk(map, neighbors[i])) do
|
||||
local unitGroup = squad.group
|
||||
if unitGroup.valid and RETREAT_FILTER[squad.status] then
|
||||
if unitGroup and unitGroup.valid and RETREAT_FILTER[squad.status] then
|
||||
if (euclideanDistanceNamed(unitGroup.position, position) <= HALF_CHUNK_SIZE) then
|
||||
return squad
|
||||
end
|
||||
@ -76,7 +76,7 @@ function unitGroupUtils.findNearbySquad(map, chunk, position)
|
||||
|
||||
for _,squad in pairs(getSquadsOnChunk(map, chunk)) do
|
||||
local unitGroup = squad.group
|
||||
if unitGroup.valid then
|
||||
if unitGroup and unitGroup.valid then
|
||||
if (euclideanDistanceNamed(unitGroup.position, position) <= HALF_CHUNK_SIZE) then
|
||||
return squad
|
||||
end
|
||||
@ -88,7 +88,7 @@ function unitGroupUtils.findNearbySquad(map, chunk, position)
|
||||
for i=1,#neighbors do
|
||||
for _,squad in pairs(getSquadsOnChunk(map, neighbors[i])) do
|
||||
local unitGroup = squad.group
|
||||
if unitGroup.valid then
|
||||
if unitGroup and unitGroup.valid then
|
||||
if (euclideanDistanceNamed(unitGroup.position, position) <= HALF_CHUNK_SIZE) then
|
||||
return squad
|
||||
end
|
||||
@ -214,28 +214,25 @@ end
|
||||
local function mergeGroups(squads, squad, group, status, position, memberCount)
|
||||
local merge = false
|
||||
local maxed = false
|
||||
for _,mergeSquad in pairs(squads) do
|
||||
if mergeSquad ~= squad then
|
||||
|
||||
local mergeGroup = mergeSquad.group
|
||||
if mergeGroup.valid and (euclideanDistanceNamed(position, mergeGroup.position) < GROUP_MERGE_DISTANCE) and (mergeSquad.status == status) and not isAttacking(mergeGroup) then
|
||||
local mergeMembers = mergeGroup.members
|
||||
local mergeCount = #mergeMembers
|
||||
if ((mergeCount + memberCount) < AI_MAX_BITER_GROUP_SIZE) then
|
||||
for memberIndex=1, mergeCount do
|
||||
group.add_member(mergeMembers[memberIndex])
|
||||
end
|
||||
if mergeSquad.kamikaze then
|
||||
squad.kamikaze = true
|
||||
end
|
||||
merge = true
|
||||
mergeGroup.destroy()
|
||||
for _,mergeSquad in pairs(squads) do
|
||||
local mergeGroup = mergeSquad.group
|
||||
if mergeGroup and mergeGroup.valid and (euclideanDistanceNamed(position, mergeGroup.position) < GROUP_MERGE_DISTANCE) and (mergeSquad.status == status) and not isAttacking(mergeGroup) then
|
||||
local mergeMembers = mergeGroup.members
|
||||
local mergeCount = #mergeMembers
|
||||
if ((mergeCount + memberCount) < AI_MAX_BITER_GROUP_SIZE) then
|
||||
for memberIndex=1, mergeCount do
|
||||
group.add_member(mergeMembers[memberIndex])
|
||||
end
|
||||
memberCount = memberCount + mergeCount
|
||||
if (memberCount > AI_SQUAD_MERGE_THRESHOLD) then
|
||||
maxed = true
|
||||
break
|
||||
if mergeSquad.kamikaze then
|
||||
squad.kamikaze = true
|
||||
end
|
||||
merge = true
|
||||
mergeGroup.destroy()
|
||||
end
|
||||
memberCount = memberCount + mergeCount
|
||||
if (memberCount > AI_SQUAD_MERGE_THRESHOLD) then
|
||||
maxed = true
|
||||
break
|
||||
end
|
||||
end
|
||||
end
|
||||
@ -252,7 +249,7 @@ function unitGroupUtils.regroupSquads(natives, map)
|
||||
for i=startIndex,maxSquadIndex do
|
||||
local squad = squads[i]
|
||||
local group = squad.group
|
||||
if group.valid and not isAttacking(group) then
|
||||
if group and group.valid and not isAttacking(group) then
|
||||
local memberCount = #group.members
|
||||
if (memberCount < AI_SQUAD_MERGE_THRESHOLD) then
|
||||
local status = squad.status
|
||||
|
@ -578,6 +578,7 @@ buildUnitSpawner(
|
||||
},
|
||||
attack = {
|
||||
type = "projectile",
|
||||
directionOnly = true,
|
||||
softSmokeName = softSmoke
|
||||
},
|
||||
resistances = {},
|
||||
|
@ -543,6 +543,7 @@ buildUnitSpawner(
|
||||
},
|
||||
attack = {
|
||||
type = "projectile",
|
||||
directionOnly = true,
|
||||
softSmokeName = softSmoke
|
||||
},
|
||||
resistances = {},
|
||||
|
@ -607,6 +607,7 @@ buildUnitSpawner(
|
||||
attack = {
|
||||
type = "projectile",
|
||||
damageType = "acid",
|
||||
directionOnly = true,
|
||||
softSmokeName = softSmoke
|
||||
},
|
||||
resistances = {},
|
||||
|
@ -593,6 +593,7 @@ buildUnitSpawner(
|
||||
bubble = laserBubble,
|
||||
softSmokeName = softSmoke,
|
||||
damageType = "laser",
|
||||
directionOnly = true,
|
||||
pointEffects = function(attributes)
|
||||
return
|
||||
{
|
||||
|
@ -521,6 +521,7 @@ buildUnitSpawner(
|
||||
},
|
||||
attack = {
|
||||
type = "projectile",
|
||||
directionOnly = true,
|
||||
softSmokeName = softSmoke
|
||||
},
|
||||
resistances = {},
|
||||
@ -990,7 +991,6 @@ buildUnitSpawner(
|
||||
},
|
||||
|
||||
function (attributes)
|
||||
|
||||
return createRangedAttack(attributes,
|
||||
createAttackBall(attributes),
|
||||
spitterattackanimation(attributes.scale,
|
||||
|
@ -604,6 +604,7 @@ buildUnitSpawner(
|
||||
explosion = "blood-explosion-small"
|
||||
},
|
||||
attack = {
|
||||
type = "projectile",
|
||||
softSmokeName = softSmoke
|
||||
},
|
||||
resistances = {},
|
||||
@ -1074,10 +1075,10 @@ buildUnitSpawner(
|
||||
|
||||
function (attributes)
|
||||
return createProjectileAttack(attributes,
|
||||
createCapsuleProjectile(attributes.name,
|
||||
attributes,
|
||||
attributes.name .. "-drone-rampant"),
|
||||
spitterattackanimation(attributes.scale, attributes.tint))
|
||||
createCapsuleProjectile(attributes.name,
|
||||
attributes,
|
||||
attributes.name .. "-drone-rampant"),
|
||||
spitterattackanimation(attributes.scale, attributes.tint))
|
||||
end,
|
||||
|
||||
{
|
||||
@ -1100,6 +1101,7 @@ buildWorm(
|
||||
attributes = {
|
||||
},
|
||||
attack = {
|
||||
type = "projectile",
|
||||
softSmokeName = softSmoke
|
||||
},
|
||||
resistances = {},
|
||||
@ -1396,9 +1398,9 @@ buildWorm(
|
||||
|
||||
function (attributes)
|
||||
return createProjectileAttack(attributes,
|
||||
createCapsuleProjectile(attributes.name,
|
||||
attributes,
|
||||
attributes.name .. "-drone-rampant"))
|
||||
createCapsuleProjectile(attributes.name,
|
||||
attributes,
|
||||
attributes.name .. "-drone-rampant"))
|
||||
end,
|
||||
|
||||
SPAWNER_WORM_VARIATIONS,
|
||||
|
@ -1,6 +1,6 @@
|
||||
-- module code
|
||||
|
||||
function generateLocal()
|
||||
local function generateLocal()
|
||||
-- local names = {"Alpha", "Beta", "Gamma", "Delta", "Epsilon", "Zeta", "Eta", "Theta", "Iota", "Kappa", "Lambda", "Mu", "Nu", "Xi", "Omicron", "Pi", "Rho", "Sigma", "Tau", "Upsilon", "Phi", "Chi", "Psi", "Omega"}
|
||||
local names = {"Neutral", "Acid", "Physical", "Electric", "Suicide", "Nuclear", "Fire", "Inferno", "Troll", "Fast", "Laser", "Wasp", "Spawner", "Xi", "Omicron", "Pi", "Rho", "Sigma", "Tau", "Upsilon", "Phi", "Chi", "Psi", "Omega"}
|
||||
local sizes = {"Larva", "Pupae", "Worker", "Grunt", "Soldier", "General", "Overlord", "Titan", "Leviathan", "Juggernaut"}
|
||||
|
@ -192,16 +192,16 @@ buildUnits(
|
||||
{
|
||||
type = "attribute",
|
||||
name = "movement",
|
||||
[1] = 0.01,
|
||||
[2] = 0.01,
|
||||
[3] = 0.02,
|
||||
[4] = 0.02,
|
||||
[5] = 0.03,
|
||||
[6] = 0.03,
|
||||
[7] = 0.04,
|
||||
[8] = 0.04,
|
||||
[9] = 0.05,
|
||||
[10] = 0.05
|
||||
[1] = 0.03,
|
||||
[2] = 0.03,
|
||||
[3] = 0.04,
|
||||
[4] = 0.04,
|
||||
[5] = 0.05,
|
||||
[6] = 0.05,
|
||||
[7] = 0.06,
|
||||
[8] = 0.06,
|
||||
[9] = 0.07,
|
||||
[10] = 0.07
|
||||
},
|
||||
{
|
||||
type = "attribute",
|
||||
@ -221,16 +221,16 @@ buildUnits(
|
||||
{
|
||||
type = "attack",
|
||||
name = "rangeFromPlayer",
|
||||
[1] = 10,
|
||||
[2] = 10,
|
||||
[3] = 11,
|
||||
[4] = 11,
|
||||
[5] = 12,
|
||||
[6] = 12,
|
||||
[7] = 13,
|
||||
[8] = 13,
|
||||
[9] = 14,
|
||||
[10] = 14
|
||||
[1] = 18,
|
||||
[2] = 18,
|
||||
[3] = 19,
|
||||
[4] = 19,
|
||||
[5] = 20,
|
||||
[6] = 20,
|
||||
[7] = 21,
|
||||
[8] = 21,
|
||||
[9] = 22,
|
||||
[10] = 22
|
||||
},
|
||||
|
||||
{
|
||||
@ -594,6 +594,9 @@ buildUnitSpawner(
|
||||
explosion = "blood-explosion-small"
|
||||
},
|
||||
attack = {
|
||||
type = "projectile",
|
||||
directionOnly = true,
|
||||
collisionBox = {{0,0}, {0,0}},
|
||||
softSmokeName = softSmoke
|
||||
},
|
||||
resistances = {},
|
||||
@ -1090,6 +1093,8 @@ buildWorm(
|
||||
attributes = {
|
||||
},
|
||||
attack = {
|
||||
type = "projectile",
|
||||
collisionBox = {{0,0}, {0,0}},
|
||||
softSmokeName = softSmoke
|
||||
},
|
||||
resistances = {},
|
||||
@ -1386,9 +1391,9 @@ buildWorm(
|
||||
|
||||
function (attributes)
|
||||
return createProjectileAttack(attributes,
|
||||
createCapsuleProjectile(attributes.name,
|
||||
attributes,
|
||||
attributes.name .. "-drone-rampant"))
|
||||
createCapsuleProjectile(attributes.name,
|
||||
attributes,
|
||||
attributes.name .. "-drone-rampant"))
|
||||
end,
|
||||
|
||||
WASP_WORM_VARIATIONS,
|
||||
|
@ -18,6 +18,13 @@ local AttackBall = {}
|
||||
|
||||
function AttackBall.createAttackBall(attributes)
|
||||
|
||||
if (attributes.type == "stream") or FORCE_OLD_PROJECTILES then
|
||||
|
||||
elseif (attributes.type == "projectile") then
|
||||
attributes.damage = attributes.damage * 2.7
|
||||
end
|
||||
|
||||
|
||||
local templateDamage = { amount = attributes.damage, type = attributes.damageType or "acid" }
|
||||
local templateArea = {
|
||||
type = "area",
|
||||
@ -68,31 +75,23 @@ function AttackBall.createAttackBall(attributes)
|
||||
}
|
||||
name = makeStream(template)
|
||||
elseif (attributes.type == "projectile") then
|
||||
template = {
|
||||
aTint = attributes.pTint,
|
||||
collisionMask = attributes.collisionMask,
|
||||
directionOnly = true,
|
||||
acceleration = attributes.acceleration,
|
||||
piercingDamage = attributes.piercingDamage
|
||||
}
|
||||
name = makeProjectile(attributes.name,
|
||||
template,
|
||||
attributes,
|
||||
templateActions)
|
||||
end
|
||||
|
||||
return name
|
||||
end
|
||||
|
||||
function AttackBall.generateLegacy()
|
||||
|
||||
AttackBall.createAttackBall({name="acid-ball", type="projectile", pTint={r=0, g=1, b=1, a=0.5}, sTint={r=0, g=1, b=1, a=0.5}, softSmokeName="the-soft-smoke-rampant", damage=4, radius=1.2})
|
||||
AttackBall.createAttackBall({name="acid-ball-1", type="projectile", pTint={r=0, g=1, b=1, a=0.5}, sTint={r=0, g=1, b=1, a=0.5}, softSmokeName="the-soft-smoke-rampant", damage=9, radius=1.3})
|
||||
AttackBall.createAttackBall({name="acid-ball-2", type="projectile", pTint={r=0, g=1, b=1, a=0.5}, sTint={r=0, g=1, b=1, a=0.5}, softSmokeName="the-soft-smoke-rampant", damage=14, radius=1.4})
|
||||
AttackBall.createAttackBall({name="acid-ball-3", type="projectile", pTint={r=0, g=1, b=1, a=0.5}, sTint={r=0, g=1, b=1, a=0.5}, softSmokeName="the-soft-smoke-rampant", damage=23, radius=1.5})
|
||||
AttackBall.createAttackBall({name="wide-acid-ball", type="projectile", pTint={r=0, g=1, b=1, a=0.5}, sTint={r=0, g=1, b=1, a=0.5}, softSmokeName="the-soft-smoke-rampant", damage=18, radius=3})
|
||||
AttackBall.createAttackBall({name="acid-ball-4", type="projectile", pTint={r=0, g=1, b=1, a=0.5}, sTint={r=0, g=1, b=1, a=0.5}, softSmokeName="the-soft-smoke-rampant", damage=25, radius=1.75})
|
||||
AttackBall.createAttackBall({name="acid-ball-5", type="projectile", pTint={r=0, g=1, b=1, a=0.5}, sTint={r=0, g=1, b=1, a=0.5}, softSmokeName="the-soft-smoke-rampant", damage=50, radius=2})
|
||||
AttackBall.createAttackBall({name="acid-ball-6", type="projectile", pTint={r=0, g=1, b=1, a=0.5}, sTint={r=0, g=1, b=1, a=0.5}, softSmokeName="the-soft-smoke-rampant", damage=70, radius=2.5})
|
||||
function AttackBall.generateLegacy()
|
||||
AttackBall.createAttackBall({name="acid-ball", type="stream", pTint={r=0, g=1, b=1, a=0.5}, sTint={r=0, g=1, b=1, a=0.5}, softSmokeName="the-soft-smoke-rampant", damage=4, radius=1.2})
|
||||
AttackBall.createAttackBall({name="acid-ball-1", type="stream", pTint={r=0, g=1, b=1, a=0.5}, sTint={r=0, g=1, b=1, a=0.5}, softSmokeName="the-soft-smoke-rampant", damage=9, radius=1.3})
|
||||
AttackBall.createAttackBall({name="acid-ball-2", type="stream", pTint={r=0, g=1, b=1, a=0.5}, sTint={r=0, g=1, b=1, a=0.5}, softSmokeName="the-soft-smoke-rampant", damage=14, radius=1.4})
|
||||
AttackBall.createAttackBall({name="acid-ball-3", type="stream", pTint={r=0, g=1, b=1, a=0.5}, sTint={r=0, g=1, b=1, a=0.5}, softSmokeName="the-soft-smoke-rampant", damage=23, radius=1.5})
|
||||
AttackBall.createAttackBall({name="wide-acid-ball", type="stream", pTint={r=0, g=1, b=1, a=0.5}, sTint={r=0, g=1, b=1, a=0.5}, softSmokeName="the-soft-smoke-rampant", damage=18, radius=3})
|
||||
AttackBall.createAttackBall({name="acid-ball-4", type="stream", pTint={r=0, g=1, b=1, a=0.5}, sTint={r=0, g=1, b=1, a=0.5}, softSmokeName="the-soft-smoke-rampant", damage=25, radius=1.75})
|
||||
AttackBall.createAttackBall({name="acid-ball-5", type="stream", pTint={r=0, g=1, b=1, a=0.5}, sTint={r=0, g=1, b=1, a=0.5}, softSmokeName="the-soft-smoke-rampant", damage=50, radius=2})
|
||||
AttackBall.createAttackBall({name="acid-ball-6", type="stream", pTint={r=0, g=1, b=1, a=0.5}, sTint={r=0, g=1, b=1, a=0.5}, softSmokeName="the-soft-smoke-rampant", damage=70, radius=2.5})
|
||||
end
|
||||
|
||||
return AttackBall
|
||||
|
@ -32,7 +32,7 @@ createAttackBall(
|
||||
pTint = {r=1, g=0.97, b=0.34, a=0.5},
|
||||
sTint = {r=1, g=0.97, b=0.34, a=0.5},
|
||||
softSmokeName = softSmoke,
|
||||
type = "projectile",
|
||||
type = "stream",
|
||||
pointEffects = function (attributes)
|
||||
return {
|
||||
{
|
||||
@ -88,7 +88,7 @@ createAttackBall(
|
||||
pTint = {r=1, g=0.17, b=0.17, a=0.5},
|
||||
sTint = {r=1, g=0.43, b=0.17, a=0.5},
|
||||
softSmokeName = softSmoke,
|
||||
type = "projectile",
|
||||
type = "stream",
|
||||
pointEffects = function (attributes)
|
||||
return {
|
||||
{
|
||||
@ -122,7 +122,7 @@ createAttackBall(
|
||||
pTint = {r=0.1, g=0.5, b=1, a=0.5},
|
||||
sTint = {r=0, g=0, b=1, a=0.5},
|
||||
softSmokeName = softSmoke,
|
||||
type = "projectile",
|
||||
type = "stream",
|
||||
pointEffects = function (attributes)
|
||||
return {
|
||||
{
|
||||
@ -184,7 +184,7 @@ createAttackBall(
|
||||
pTint = {r=0.1, g=0.1, b=0.1, a=0.8},
|
||||
sTint = {r=0.1, g=0.1, b=0.1, a=0.8},
|
||||
softSmokeName = softSmoke,
|
||||
type = "projectile",
|
||||
type = "stream",
|
||||
pointEffects = function (attributes)
|
||||
return
|
||||
{
|
||||
@ -268,7 +268,7 @@ createAttackBall(
|
||||
pTint = {r=0, g=0.1, b=1, a=1},
|
||||
sTint = {r=0, g=0.1, b=1, a=1},
|
||||
softSmokeName = softSmoke,
|
||||
type = "projectile",
|
||||
type = "stream",
|
||||
pointEffects = function (attributes)
|
||||
return
|
||||
{
|
||||
@ -310,7 +310,7 @@ createAttackBall(
|
||||
pTint = {r=0, g=0.1, b=1, a=1},
|
||||
sTint = {r=0, g=0.1, b=1, a=1},
|
||||
softSmokeName = softSmoke,
|
||||
type = "projectile",
|
||||
type = "stream",
|
||||
pointEffects = function (attributes)
|
||||
return
|
||||
{
|
||||
@ -353,7 +353,7 @@ createAttackBall(
|
||||
pTint = {r=0, g=0.1, b=1, a=1},
|
||||
sTint = {r=0, g=0.1, b=1, a=1},
|
||||
softSmokeName = softSmoke,
|
||||
type = "projectile",
|
||||
type = "stream",
|
||||
pointEffects = function (attributes)
|
||||
return
|
||||
{
|
||||
@ -400,7 +400,7 @@ createAttackBall(
|
||||
pTint = {r=0, g=0.1, b=1, a=1},
|
||||
sTint = {r=0, g=0.1, b=1, a=1},
|
||||
softSmokeName = softSmoke,
|
||||
type = "projectile",
|
||||
type = "stream",
|
||||
pointEffects = function (attributes)
|
||||
return
|
||||
{
|
||||
|
@ -14,7 +14,7 @@ createAttackBall(
|
||||
pTint = {r=0, g=0.97, b=0.34, a=0.5},
|
||||
sTint = {r=0, g=0.1, b=1, a=1},
|
||||
softSmokeName = softSmoke,
|
||||
type = "projectile",
|
||||
type = "stream",
|
||||
pointEffects = function (attributes)
|
||||
return {
|
||||
{
|
||||
@ -61,7 +61,7 @@ createAttackBall(
|
||||
pTint = {r=0.5, g=0.7, b=0.34, a=0.5},
|
||||
sTint = {r=0.5, g=0.97, b=0.34, a=0.5},
|
||||
softSmokeName = softSmoke,
|
||||
type = "projectile",
|
||||
type = "stream",
|
||||
pointEffects = function (attributes)
|
||||
return {
|
||||
{
|
||||
@ -104,7 +104,7 @@ createAttackBall(
|
||||
pTint = {r=0.5, g=0.7, b=0.34, a=0.5},
|
||||
sTint = {r=0.5, g=0.97, b=0.34, a=0.5},
|
||||
softSmokeName = softSmoke,
|
||||
type = "projectile",
|
||||
type = "stream",
|
||||
pointEffects = function (attributes)
|
||||
return {
|
||||
{
|
||||
@ -138,7 +138,7 @@ createAttackBall(
|
||||
pTint = {r=0.5, g=0.7, b=0.34, a=0.5},
|
||||
sTint = {r=0.5, g=0.97, b=0.34, a=0.5},
|
||||
softSmokeName = softSmoke,
|
||||
type = "projectile",
|
||||
type = "stream",
|
||||
pointEffects = function (attributes)
|
||||
return {
|
||||
{
|
||||
|
@ -661,25 +661,24 @@ end
|
||||
function biterFunctions.createProjectileAttack(attributes, projectile, animation)
|
||||
return {
|
||||
type = "projectile",
|
||||
ammo_category = "capsule",
|
||||
ammo_category = "rocket",
|
||||
cooldown = attributes.cooldown or 15,
|
||||
projectile_creation_distance = 0.6,
|
||||
range = attributes.range or 20,
|
||||
ammo_type =
|
||||
{
|
||||
category = "capsule",
|
||||
category = "rocket",
|
||||
clamp_position = true,
|
||||
target_type = "position",
|
||||
action =
|
||||
{
|
||||
type = "direct",
|
||||
entity_flags = { "player-creation" },
|
||||
action_delivery =
|
||||
{
|
||||
type = "projectile",
|
||||
projectile = projectile or "defender-capsule",
|
||||
entity_flags = { "player-creation" },
|
||||
projectile = projectile or "defender-bullet",
|
||||
starting_speed = attributes.startingSpeed or 0.3,
|
||||
max_range = attributes.maxRange or 20
|
||||
max_range = attributes.maxRange or attributes.range or 20
|
||||
}
|
||||
}
|
||||
},
|
||||
@ -688,32 +687,31 @@ function biterFunctions.createProjectileAttack(attributes, projectile, animation
|
||||
end
|
||||
|
||||
function biterFunctions.createMeleeAttack(attributes)
|
||||
return
|
||||
{
|
||||
type = "projectile",
|
||||
range = attributes.range or 0.5,
|
||||
cooldown = attributes.cooldown or 35,
|
||||
ammo_category = "melee",
|
||||
ammo_type = {
|
||||
category = "melee",
|
||||
target_type = "entity",
|
||||
action =
|
||||
{
|
||||
type = "direct",
|
||||
action_delivery =
|
||||
{
|
||||
type = "instant",
|
||||
target_effects =
|
||||
{
|
||||
type = "damage",
|
||||
damage = { amount = attributes.damage, type = attributes.damageType or "physical" }
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
sound = make_biter_roars(0.4),
|
||||
animation = biterattackanimation(attributes.scale, attributes.tint1, attributes.tint2)
|
||||
}
|
||||
return {
|
||||
type = "projectile",
|
||||
range = attributes.range or 0.5,
|
||||
cooldown = attributes.cooldown or 35,
|
||||
ammo_category = "melee",
|
||||
ammo_type = {
|
||||
category = "melee",
|
||||
target_type = "entity",
|
||||
action =
|
||||
{
|
||||
type = "direct",
|
||||
action_delivery =
|
||||
{
|
||||
type = "instant",
|
||||
target_effects =
|
||||
{
|
||||
type = "damage",
|
||||
damage = { amount = attributes.damage, type = attributes.damageType or "physical" }
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
sound = make_biter_roars(0.4),
|
||||
animation = biterattackanimation(attributes.scale, attributes.tint1, attributes.tint2)
|
||||
}
|
||||
end
|
||||
|
||||
function biterFunctions.biterAttackSounds()
|
||||
|
@ -198,9 +198,11 @@ function droneUtils.createCapsuleProjectile(name, attributes, entityName)
|
||||
type = "projectile",
|
||||
name = n,
|
||||
flags = {"not-on-map"},
|
||||
collision_box = {{-0.3, -1.1}, {0.3, 1.1}},
|
||||
direction_only = true,
|
||||
acceleration = 0.005,
|
||||
collision_box = attributes.collisionBox or {{-0.01, -0.01}, {0.01, 0.01}},
|
||||
collision_mask = attributes.collisionMask or { "layer-11" },
|
||||
direction_only = attributes.directionOnly,
|
||||
piercing_damage = attributes.piercingDamage or 0,
|
||||
acceleration = attributes.acceleration or 0.01,
|
||||
action =
|
||||
{
|
||||
type = "direct",
|
||||
|
@ -7,17 +7,17 @@ function projectileUtils.makeProjectile(name, attributes, attack)
|
||||
type = "projectile",
|
||||
name = n,
|
||||
flags = {"not-on-map"},
|
||||
collision_box = {{-0.3, -1.1}, {0.3, 1.1}},
|
||||
collision_mask = attributes.collisionMask or { "water-tile" },
|
||||
collision_box = attributes.collisionBox or {{-0.01, -0.01}, {0.01, 0.01}},
|
||||
collision_mask = attributes.collisionMask or { "layer-11" },
|
||||
direction_only = attributes.directionOnly,
|
||||
piercing_damage = attributes.piercingDamage or 0,
|
||||
acceleration = attributes.acceleration or 0.005,
|
||||
acceleration = attributes.acceleration or 0.01,
|
||||
action = attack,
|
||||
animation =
|
||||
{
|
||||
filename = "__base__/graphics/entity/acid-projectile-purple/acid-projectile-purple.png",
|
||||
line_length = 5,
|
||||
tint = attributes.aTint,
|
||||
tint = attributes.pTint,
|
||||
width = 16,
|
||||
height = 18,
|
||||
frame_count = 33,
|
||||
@ -27,7 +27,7 @@ function projectileUtils.makeProjectile(name, attributes, attack)
|
||||
{
|
||||
filename = "__base__/graphics/entity/acid-projectile-purple/acid-projectile-purple-shadow.png",
|
||||
line_length = 5,
|
||||
tint = attributes.aTint,
|
||||
tint = attributes.pTint,
|
||||
width = 28,
|
||||
height = 16,
|
||||
frame_count = 33,
|
||||
|
@ -6,8 +6,6 @@ local biterUtils = require("BiterUtils")
|
||||
|
||||
function bobsUpdates.useDumbProjectiles()
|
||||
local turrets = data.raw["turret"];
|
||||
|
||||
local attackType = (FORCE_OLD_PROJECTILES and "stream") or "projectile"
|
||||
|
||||
turrets["bob-big-explosive-worm-turret"]["attack_parameters"] = biterUtils.createRangedAttack(
|
||||
{
|
||||
@ -16,10 +14,10 @@ function bobsUpdates.useDumbProjectiles()
|
||||
min_range = 3,
|
||||
turn_range = 1,
|
||||
fire_penalty = 0,
|
||||
type = "projectile",
|
||||
type = "stream",
|
||||
scale = 1.2
|
||||
},
|
||||
"bob-explosive-ball-" .. attackType .. "-rampant")
|
||||
"bob-explosive-ball-stream-rampant")
|
||||
|
||||
turrets["bob-big-fire-worm-turret"]["attack_parameters"] = biterUtils.createRangedAttack(
|
||||
{
|
||||
@ -28,10 +26,10 @@ function bobsUpdates.useDumbProjectiles()
|
||||
min_range = 3,
|
||||
turn_range = 1,
|
||||
fire_penalty = 0,
|
||||
type = "projectile",
|
||||
type = "stream",
|
||||
scale = 1.2
|
||||
},
|
||||
"bob-fire-ball-" .. attackType .. "-rampant")
|
||||
"bob-fire-ball-stream-rampant")
|
||||
|
||||
turrets["bob-big-poison-worm-turret"]["attack_parameters"] = biterUtils.createRangedAttack(
|
||||
{
|
||||
@ -40,10 +38,10 @@ function bobsUpdates.useDumbProjectiles()
|
||||
min_range = 3,
|
||||
turn_range = 1,
|
||||
fire_penalty = 0,
|
||||
type = "projectile",
|
||||
type = "stream",
|
||||
scale = 1.2
|
||||
},
|
||||
"bob-poison-ball-" .. attackType .. "-rampant")
|
||||
"bob-poison-ball-stream-rampant")
|
||||
|
||||
turrets["bob-big-piercing-worm-turret"]["attack_parameters"] = biterUtils.createRangedAttack(
|
||||
{
|
||||
@ -52,10 +50,10 @@ function bobsUpdates.useDumbProjectiles()
|
||||
min_range = 3,
|
||||
turn_range = 1,
|
||||
fire_penalty = 0,
|
||||
type = "projectile",
|
||||
type = "stream",
|
||||
scale = 1.2
|
||||
},
|
||||
"bob-piercing-ball-" .. attackType .. "-rampant")
|
||||
"bob-piercing-ball-stream-rampant")
|
||||
|
||||
turrets["bob-big-electric-worm-turret"]["attack_parameters"] = biterUtils.createRangedAttack(
|
||||
{
|
||||
@ -64,10 +62,10 @@ function bobsUpdates.useDumbProjectiles()
|
||||
min_range = 3,
|
||||
turn_range = 1,
|
||||
fire_penalty = 0,
|
||||
type = "projectile",
|
||||
type = "stream",
|
||||
scale = 1.2
|
||||
},
|
||||
"bob-electric-ball-" .. attackType .. "-rampant")
|
||||
"bob-electric-ball-stream-rampant")
|
||||
|
||||
turrets["bob-giant-worm-turret"]["attack_parameters"] = biterUtils.createRangedAttack(
|
||||
{
|
||||
@ -76,10 +74,10 @@ function bobsUpdates.useDumbProjectiles()
|
||||
min_range = 3,
|
||||
turn_range = 1,
|
||||
fire_penalty = 0,
|
||||
type = "projectile",
|
||||
type = "stream",
|
||||
scale = 1.6
|
||||
},
|
||||
"acid-ball-5-" .. attackType .. "-rampant")
|
||||
"acid-ball-5-stream-rampant")
|
||||
|
||||
turrets["bob-behemoth-worm-turret"]["attack_parameters"] = biterUtils.createRangedAttack(
|
||||
{
|
||||
@ -88,10 +86,10 @@ function bobsUpdates.useDumbProjectiles()
|
||||
min_range = 3,
|
||||
turn_range = 1,
|
||||
fire_penalty = 0,
|
||||
type = "projectile",
|
||||
type = "stream",
|
||||
scale = 2
|
||||
},
|
||||
"acid-ball-6-" .. attackType .. "-rampant")
|
||||
"acid-ball-6-stream-rampant")
|
||||
|
||||
local units = data.raw["unit"]
|
||||
|
||||
@ -103,11 +101,11 @@ function bobsUpdates.useDumbProjectiles()
|
||||
min_range = 3,
|
||||
turn_range = 1,
|
||||
warmup = 30,
|
||||
type = "projectile",
|
||||
type = "stream",
|
||||
fire_penalty = 15,
|
||||
scale = biterUtils.findRunScale(unit)
|
||||
},
|
||||
"acid-ball-3-" .. attackType .. "-rampant",
|
||||
"acid-ball-3-stream-rampant",
|
||||
spitterattackanimation(biterUtils.findRunScale(unit),
|
||||
biterUtils.findTint(unit)))
|
||||
|
||||
@ -119,12 +117,12 @@ function bobsUpdates.useDumbProjectiles()
|
||||
min_range = 3,
|
||||
turn_range = 1,
|
||||
damageModifier = 0.6,
|
||||
type = "projectile",
|
||||
type = "stream",
|
||||
warmup = 30,
|
||||
fire_penalty = 0,
|
||||
scale = biterUtils.findRunScale(unit)
|
||||
},
|
||||
"bob-electric-ball-" .. attackType .. "-rampant",
|
||||
"bob-electric-ball-stream-rampant",
|
||||
spitterattackanimation(biterUtils.findRunScale(unit),
|
||||
biterUtils.findTint(unit)))
|
||||
|
||||
@ -134,14 +132,14 @@ function bobsUpdates.useDumbProjectiles()
|
||||
cooldown = 90,
|
||||
range = 16,
|
||||
min_range = 3,
|
||||
type = "projectile",
|
||||
type = "stream",
|
||||
warmup = 30,
|
||||
turn_range = 1,
|
||||
damageModifier = 0.8,
|
||||
fire_penalty = 15,
|
||||
scale = biterUtils.findRunScale(unit)
|
||||
},
|
||||
"bob-explosive-ball-" .. attackType .. "-rampant",
|
||||
"bob-explosive-ball-stream-rampant",
|
||||
spitterattackanimation(biterUtils.findRunScale(unit),
|
||||
biterUtils.findTint(unit)))
|
||||
|
||||
@ -151,13 +149,13 @@ function bobsUpdates.useDumbProjectiles()
|
||||
cooldown = 90,
|
||||
range = 16,
|
||||
min_range = 3,
|
||||
type = "projectile",
|
||||
type = "stream",
|
||||
turn_range = 1,
|
||||
warmup = 30,
|
||||
fire_penalty = 15,
|
||||
scale = biterUtils.findRunScale(unit)
|
||||
},
|
||||
"wide-acid-ball-" .. attackType .. "-rampant",
|
||||
"wide-acid-ball-stream-rampant",
|
||||
spitterattackanimation(biterUtils.findRunScale(unit),
|
||||
biterUtils.findTint(unit)))
|
||||
|
||||
@ -166,14 +164,14 @@ function bobsUpdates.useDumbProjectiles()
|
||||
{
|
||||
cooldown = 90,
|
||||
range = 16,
|
||||
type = "projectile",
|
||||
type = "stream",
|
||||
min_range = 3,
|
||||
turn_range = 1,
|
||||
warmup = 30,
|
||||
fire_penalty = 15,
|
||||
scale = biterUtils.findRunScale(unit)
|
||||
},
|
||||
"bob-fire-ball-" .. attackType .. "-rampant",
|
||||
"bob-fire-ball-stream-rampant",
|
||||
spitterattackanimation(biterUtils.findRunScale(unit),
|
||||
biterUtils.findTint(unit)))
|
||||
|
||||
@ -182,14 +180,14 @@ function bobsUpdates.useDumbProjectiles()
|
||||
{
|
||||
cooldown = 90,
|
||||
range = 16,
|
||||
type = "projectile",
|
||||
type = "stream",
|
||||
min_range = 3,
|
||||
turn_range = 1,
|
||||
warmup = 30,
|
||||
fire_penalty = 15,
|
||||
scale = biterUtils.findRunScale(unit)
|
||||
},
|
||||
"bob-poison-ball-" .. attackType .. "-rampant",
|
||||
"bob-poison-ball-stream-rampant",
|
||||
spitterattackanimation(biterUtils.findRunScale(unit),
|
||||
biterUtils.findTint(unit)))
|
||||
|
||||
@ -198,14 +196,14 @@ function bobsUpdates.useDumbProjectiles()
|
||||
{
|
||||
cooldown = 90,
|
||||
range = 16,
|
||||
type = "projectile",
|
||||
type = "stream",
|
||||
min_range = 3,
|
||||
turn_range = 1,
|
||||
warmup = 30,
|
||||
fire_penalty = 15,
|
||||
scale = biterUtils.findRunScale(unit)
|
||||
},
|
||||
"bob-titan-ball-" .. attackType .. "-rampant",
|
||||
"bob-titan-ball-stream-rampant",
|
||||
spitterattackanimation(biterUtils.findRunScale(unit),
|
||||
biterUtils.findTint(unit)))
|
||||
|
||||
@ -214,14 +212,14 @@ function bobsUpdates.useDumbProjectiles()
|
||||
{
|
||||
cooldown = 90,
|
||||
range = 16,
|
||||
type = "projectile",
|
||||
type = "stream",
|
||||
min_range = 3,
|
||||
turn_range = 1,
|
||||
warmup = 30,
|
||||
fire_penalty = 15,
|
||||
scale = biterUtils.findRunScale(unit)
|
||||
},
|
||||
"bob-behemoth-ball-" .. attackType .. "-rampant",
|
||||
"bob-behemoth-ball-stream-rampant",
|
||||
spitterattackanimation(biterUtils.findRunScale(unit),
|
||||
biterUtils.findTint(unit)))
|
||||
|
||||
@ -230,7 +228,7 @@ function bobsUpdates.useDumbProjectiles()
|
||||
unit["attack_parameters"] = biterUtils.createRangedAttack(
|
||||
{
|
||||
cooldown = 90,
|
||||
type = "projectile",
|
||||
type = "stream",
|
||||
range = 17,
|
||||
min_range = 3,
|
||||
warmup = 30,
|
||||
@ -238,7 +236,7 @@ function bobsUpdates.useDumbProjectiles()
|
||||
fire_penalty = 15,
|
||||
scale = biterUtils.findRunScale(unit)
|
||||
},
|
||||
"bob-leviathan-ball-" .. attackType .. "-rampant",
|
||||
"bob-leviathan-ball-stream-rampant",
|
||||
spitterattackanimation(biterUtils.findRunScale(unit),
|
||||
biterUtils.findTint(unit)))
|
||||
end
|
||||
|
@ -13,6 +13,7 @@ function NEUpdates.useNEUnitLaunchers ()
|
||||
{
|
||||
cooldown = 60,
|
||||
range = 25,
|
||||
type = "stream",
|
||||
min_range = 3,
|
||||
turn_range = 1,
|
||||
fire_penalty = 0,
|
||||
@ -26,6 +27,7 @@ function NEUpdates.useNEUnitLaunchers ()
|
||||
cooldown = 60,
|
||||
range = 30,
|
||||
min_range = 3,
|
||||
type = "stream",
|
||||
turn_range = 1,
|
||||
fire_penalty = 0,
|
||||
damageModifier = 3,
|
||||
@ -49,6 +51,7 @@ function NEUpdates.useDumbProjectiles()
|
||||
cooldown = 60,
|
||||
range = 25,
|
||||
min_range = 3,
|
||||
type = "stream",
|
||||
turn_range = 1,
|
||||
fire_penalty = 0,
|
||||
damageModifier = 4.5,
|
||||
@ -64,6 +67,7 @@ function NEUpdates.useDumbProjectiles()
|
||||
range = 30,
|
||||
min_range = 3,
|
||||
turn_range = 1,
|
||||
type = "stream",
|
||||
fire_penalty = 0,
|
||||
damageModifier = 5.5,
|
||||
scale = 1.6
|
||||
@ -79,13 +83,16 @@ function NEUpdates.useDumbProjectiles()
|
||||
range = 13,
|
||||
min_range = 3,
|
||||
turn_range = 1,
|
||||
type = "stream",
|
||||
fire_penalty = 15,
|
||||
warmup = 30,
|
||||
damageModifier = 1.1,
|
||||
scale = biterUtils.findRunScale(unit),
|
||||
tint = biterUtils.findTint(unit)
|
||||
},
|
||||
"ne-infected-ball-" .. attackType .. "-rampant")
|
||||
"ne-infected-ball-" .. attackType .. "-rampant",
|
||||
spitterattackanimation(biterUtils.findRunScale(unit),
|
||||
biterUtils.findTint(unit)))
|
||||
|
||||
unit = units["small-spitter-Mk3"]
|
||||
unit["attack_parameters"] = biterUtils.createRangedAttack(
|
||||
@ -94,13 +101,16 @@ function NEUpdates.useDumbProjectiles()
|
||||
range = 13,
|
||||
min_range = 3,
|
||||
turn_range = 1,
|
||||
type = "stream",
|
||||
warmup = 30,
|
||||
fire_penalty = 15,
|
||||
damageModifier = 1.2,
|
||||
scale = biterUtils.findRunScale(unit),
|
||||
tint = biterUtils.findTint(unit)
|
||||
},
|
||||
"ne-mutated-ball-" .. attackType .. "-rampant")
|
||||
"ne-mutated-ball-" .. attackType .. "-rampant",
|
||||
spitterattackanimation(biterUtils.findRunScale(unit),
|
||||
biterUtils.findTint(unit)))
|
||||
|
||||
|
||||
unit = units["medium-spitter-Mk2"]
|
||||
@ -109,6 +119,7 @@ function NEUpdates.useDumbProjectiles()
|
||||
cooldown = 100,
|
||||
range = 14,
|
||||
min_range = 3,
|
||||
type = "stream",
|
||||
turn_range = 1,
|
||||
warmup = 30,
|
||||
fire_penalty = 15,
|
||||
@ -116,7 +127,9 @@ function NEUpdates.useDumbProjectiles()
|
||||
scale = biterUtils.findRunScale(unit),
|
||||
tint = biterUtils.findTint(unit)
|
||||
},
|
||||
"ne-infected-ball-" .. attackType .. "-rampant")
|
||||
"ne-infected-ball-" .. attackType .. "-rampant",
|
||||
spitterattackanimation(biterUtils.findRunScale(unit),
|
||||
biterUtils.findTint(unit)))
|
||||
|
||||
unit = units["medium-spitter-Mk3"]
|
||||
unit["attack_parameters"] = biterUtils.createRangedAttack(
|
||||
@ -125,13 +138,16 @@ function NEUpdates.useDumbProjectiles()
|
||||
range = 14,
|
||||
min_range = 3,
|
||||
turn_range = 1,
|
||||
type = "stream",
|
||||
warmup = 30,
|
||||
fire_penalty = 15,
|
||||
damageModifier = 2.6,
|
||||
scale = biterUtils.findRunScale(unit),
|
||||
tint = biterUtils.findTint(unit)
|
||||
},
|
||||
"ne-mutated-ball-" .. attackType .. "-rampant")
|
||||
"ne-mutated-ball-" .. attackType .. "-rampant",
|
||||
spitterattackanimation(biterUtils.findRunScale(unit),
|
||||
biterUtils.findTint(unit)))
|
||||
|
||||
unit = units["big-spitter-Mk2"]
|
||||
unit["attack_parameters"] = biterUtils.createRangedAttack(
|
||||
@ -139,6 +155,7 @@ function NEUpdates.useDumbProjectiles()
|
||||
cooldown = 100,
|
||||
range = 15,
|
||||
min_range = 3,
|
||||
type = "stream",
|
||||
turn_range = 1,
|
||||
warmup = 30,
|
||||
fire_penalty = 15,
|
||||
@ -146,7 +163,9 @@ function NEUpdates.useDumbProjectiles()
|
||||
scale = biterUtils.findRunScale(unit),
|
||||
tint = biterUtils.findTint(unit)
|
||||
},
|
||||
"ne-infected-ball-" .. attackType .. "-rampant")
|
||||
"ne-infected-ball-" .. attackType .. "-rampant",
|
||||
spitterattackanimation(biterUtils.findRunScale(unit),
|
||||
biterUtils.findTint(unit)))
|
||||
|
||||
|
||||
unit = units["big-spitter-Mk3"]
|
||||
@ -156,13 +175,16 @@ function NEUpdates.useDumbProjectiles()
|
||||
range = 15,
|
||||
min_range = 3,
|
||||
turn_range = 1,
|
||||
type = "stream",
|
||||
warmup = 30,
|
||||
fire_penalty = 15,
|
||||
damageModifier = 3.6,
|
||||
scale = biterUtils.findRunScale(unit),
|
||||
tint = biterUtils.findTint(unit)
|
||||
},
|
||||
"ne-mutated-ball-" .. attackType .. "-rampant")
|
||||
"ne-mutated-ball-" .. attackType .. "-rampant",
|
||||
spitterattackanimation(biterUtils.findRunScale(unit),
|
||||
biterUtils.findTint(unit)))
|
||||
|
||||
end
|
||||
|
||||
|
@ -6,8 +6,6 @@ local biterUtils = require("BiterUtils")
|
||||
|
||||
function vanillaUpdates.useDumbProjectiles()
|
||||
local turrets = data.raw["turret"];
|
||||
|
||||
local attackType = (FORCE_OLD_PROJECTILES and "stream") or "projectile"
|
||||
|
||||
turrets["small-worm-turret"]["attack_parameters"] = biterUtils.createRangedAttack(
|
||||
{
|
||||
@ -15,12 +13,12 @@ function vanillaUpdates.useDumbProjectiles()
|
||||
range = 21,
|
||||
min_range = 5,
|
||||
turn_range = 1,
|
||||
type = "projectile",
|
||||
type = "stream",
|
||||
fire_penalty = 0,
|
||||
damageModifier = 0.9,
|
||||
scale = 0.8
|
||||
},
|
||||
"acid-ball-2-" .. attackType .. "-rampant")
|
||||
"acid-ball-2-stream-rampant")
|
||||
|
||||
turrets["medium-worm-turret"]["attack_parameters"] = biterUtils.createRangedAttack(
|
||||
{
|
||||
@ -28,12 +26,12 @@ function vanillaUpdates.useDumbProjectiles()
|
||||
range = 25,
|
||||
min_range = 3,
|
||||
turn_range = 1,
|
||||
type = "projectile",
|
||||
type = "stream",
|
||||
fire_penalty = 0,
|
||||
damageModifier = 0.87,
|
||||
scale = 1
|
||||
},
|
||||
"acid-ball-3-" .. attackType .. "-rampant")
|
||||
"acid-ball-3-stream-rampant")
|
||||
|
||||
|
||||
turrets["big-worm-turret"]["attack_parameters"] = biterUtils.createRangedAttack(
|
||||
@ -41,12 +39,12 @@ function vanillaUpdates.useDumbProjectiles()
|
||||
cooldown = 60,
|
||||
range = 26,
|
||||
min_range = 3,
|
||||
type = "projectile",
|
||||
type = "stream",
|
||||
turn_range = 1,
|
||||
fire_penalty = 0,
|
||||
scale = 1.2
|
||||
},
|
||||
"acid-ball-4-" .. attackType .. "-rampant")
|
||||
"acid-ball-4-stream-rampant")
|
||||
|
||||
local units = data.raw["unit"];
|
||||
|
||||
@ -58,11 +56,11 @@ function vanillaUpdates.useDumbProjectiles()
|
||||
warmup = 30,
|
||||
min_range = 3,
|
||||
turn_range = 1,
|
||||
type = "projectile",
|
||||
type = "stream",
|
||||
fire_penalty = 15,
|
||||
scale = biterUtils.findRunScale(unit)
|
||||
},
|
||||
"acid-ball-" .. attackType .. "-rampant",
|
||||
"acid-ball-stream-rampant",
|
||||
spitterattackanimation(biterUtils.findRunScale(unit),
|
||||
biterUtils.findTint(unit)))
|
||||
|
||||
@ -72,13 +70,13 @@ function vanillaUpdates.useDumbProjectiles()
|
||||
cooldown = 95,
|
||||
range = 14,
|
||||
min_range = 3,
|
||||
type = "projectile",
|
||||
type = "stream",
|
||||
warmup = 30,
|
||||
turn_range = 1,
|
||||
fire_penalty = 15,
|
||||
scale = biterUtils.findRunScale(unit)
|
||||
},
|
||||
"acid-ball-1-" .. attackType .. "-rampant",
|
||||
"acid-ball-1-stream-rampant",
|
||||
spitterattackanimation(biterUtils.findRunScale(unit),
|
||||
biterUtils.findTint(unit)))
|
||||
|
||||
@ -88,13 +86,13 @@ function vanillaUpdates.useDumbProjectiles()
|
||||
cooldown = 90,
|
||||
range = 15,
|
||||
min_range = 3,
|
||||
type = "projectile",
|
||||
type = "stream",
|
||||
warmup = 30,
|
||||
turn_range = 1,
|
||||
fire_penalty = 15,
|
||||
scale = biterUtils.findRunScale(unit)
|
||||
},
|
||||
"acid-ball-2-" .. attackType .. "-rampant",
|
||||
"acid-ball-2-stream-rampant",
|
||||
spitterattackanimation(biterUtils.findRunScale(unit),
|
||||
biterUtils.findTint(unit)))
|
||||
|
||||
@ -105,12 +103,12 @@ function vanillaUpdates.useDumbProjectiles()
|
||||
range = 16,
|
||||
min_range = 3,
|
||||
warmup = 30,
|
||||
type = "projectile",
|
||||
type = "stream",
|
||||
turn_range = 1,
|
||||
fire_penalty = 15,
|
||||
scale = biterUtils.findRunScale(unit)
|
||||
},
|
||||
"acid-ball-3-" .. attackType .. "-rampant",
|
||||
"acid-ball-3-stream-rampant",
|
||||
spitterattackanimation(biterUtils.findRunScale(unit),
|
||||
biterUtils.findTint(unit)))
|
||||
end
|
||||
|
Loading…
Reference in New Issue
Block a user