mirror of
https://github.com/veden/Rampant.git
synced 2025-01-28 03:29:34 +02:00
working blockables, added rocket event, support for bob, ne
This commit is contained in:
parent
11ad4bc470
commit
a910db6448
@ -2,7 +2,8 @@
|
||||
Version: 0.16.19
|
||||
Date: 2. 05. 2018
|
||||
Features:
|
||||
- Blockable projectiles, most projectiles will be stop by walls and other objects.
|
||||
- Blockable projectiles, most projectiles will be stop by walls and other objects
|
||||
- Rocket launches now agitate biters
|
||||
Improvements:
|
||||
- Switched linear tier generation from rounding using ceiling to nearest number
|
||||
Bugfixes:
|
||||
|
19
control.lua
19
control.lua
@ -514,6 +514,10 @@ local function onResourceDepleted(event)
|
||||
end
|
||||
end
|
||||
|
||||
local function onTriggerEntityCreated(event)
|
||||
print("triggered", event.tick)
|
||||
end
|
||||
|
||||
local function onUsedCapsule(event)
|
||||
local surface = game.players[event.player_index].surface
|
||||
if (event.item.name == "cliff-explosives") and (surface.index == 1) then
|
||||
@ -526,6 +530,16 @@ local function onUsedCapsule(event)
|
||||
end
|
||||
end
|
||||
|
||||
local function onRocketLaunch(event)
|
||||
local entity = event.rocket_silo or event.rocket
|
||||
if entity and (entity.surface.index == 1) then
|
||||
natives.points = natives.points + 2000
|
||||
if (natives.points > AI_MAX_OVERFLOW_POINTS) then
|
||||
natives.points = AI_MAX_OVERFLOW_POINTS
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
local function onInit()
|
||||
global.map = {}
|
||||
global.pendingChunks = {}
|
||||
@ -558,6 +572,10 @@ script.on_event({defines.events.on_player_mined_entity,
|
||||
script.on_event({defines.events.on_built_entity,
|
||||
defines.events.on_robot_built_entity}, onBuild)
|
||||
|
||||
script.on_event(defines.events.on_trigger_created_entity, onTriggerEntityCreated)
|
||||
|
||||
script.on_event(defines.events.on_rocket_launched, onRocketLaunch)
|
||||
|
||||
script.on_event(defines.events.on_entity_died, onDeath)
|
||||
script.on_event(defines.events.on_tick, onTick)
|
||||
script.on_event(defines.events.on_chunk_generated, onChunkGenerated)
|
||||
@ -568,6 +586,7 @@ remote.add_interface("rampantTests",
|
||||
activeSquads = tests.activeSquads,
|
||||
entitiesOnPlayerChunk = tests.entitiesOnPlayerChunk,
|
||||
findNearestPlayerEnemy = tests.findNearestPlayerEnemy,
|
||||
morePoints = tests.morePoints,
|
||||
aiStats = tests.aiStats,
|
||||
dumpEnvironment = tests.dumpEnvironment,
|
||||
fillableDirtTest = tests.fillableDirtTest,
|
||||
|
@ -260,7 +260,7 @@ constants.RALLY_CRY_DISTANCE = 96
|
||||
|
||||
constants.GROUP_MERGE_DISTANCE = 28
|
||||
|
||||
constants.MAX_PENALTY_BEFORE_PURGE = 10000
|
||||
constants.MAX_PENALTY_BEFORE_PURGE = 20000
|
||||
|
||||
-- player building pheromones
|
||||
|
||||
|
@ -160,7 +160,6 @@ function unitGroupUtils.cleanSquads(natives, map)
|
||||
local squadCount = #squads
|
||||
|
||||
local cleanSquads = {}
|
||||
|
||||
for i=1, squadCount do
|
||||
local squad = squads[i]
|
||||
local group = squad.group
|
||||
@ -214,25 +213,27 @@ end
|
||||
local function mergeGroups(squads, squad, group, status, position, memberCount)
|
||||
local merge = false
|
||||
local maxed = false
|
||||
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])
|
||||
for _,mergeSquad in pairs(squads) do
|
||||
if (mergeSquad ~= squad) then
|
||||
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
|
||||
if mergeSquad.kamikaze then
|
||||
squad.kamikaze = true
|
||||
end
|
||||
merge = true
|
||||
mergeGroup.destroy()
|
||||
end
|
||||
if mergeSquad.kamikaze then
|
||||
squad.kamikaze = true
|
||||
memberCount = memberCount + mergeCount
|
||||
if (memberCount > AI_SQUAD_MERGE_THRESHOLD) then
|
||||
maxed = true
|
||||
break
|
||||
end
|
||||
merge = true
|
||||
mergeGroup.destroy()
|
||||
end
|
||||
memberCount = memberCount + mergeCount
|
||||
if (memberCount > AI_SQUAD_MERGE_THRESHOLD) then
|
||||
maxed = true
|
||||
break
|
||||
end
|
||||
end
|
||||
end
|
||||
|
@ -50,6 +50,7 @@ buildUnits(
|
||||
followsPlayer = false
|
||||
},
|
||||
attack = {
|
||||
checkBuildability = true,
|
||||
softSmokeName = softSmoke
|
||||
},
|
||||
death = function (attack, attributes)
|
||||
@ -605,7 +606,18 @@ buildUnitSpawner(
|
||||
},
|
||||
attack = {
|
||||
type = "projectile",
|
||||
softSmokeName = softSmoke
|
||||
softSmokeName = softSmoke,
|
||||
sourceEffect = function (attributes)
|
||||
return
|
||||
{
|
||||
type = "area",
|
||||
radius = 10.0,
|
||||
action_delivery = {
|
||||
type = "damage",
|
||||
damage = {amount = attributes.damage or 5, type = attributes.damageType or "physical"}
|
||||
}
|
||||
}
|
||||
end
|
||||
},
|
||||
resistances = {},
|
||||
|
||||
@ -671,16 +683,16 @@ buildUnitSpawner(
|
||||
{
|
||||
type = "attack",
|
||||
name = "cooldown",
|
||||
[1] = 100,
|
||||
[2] = 100,
|
||||
[3] = 97,
|
||||
[4] = 97,
|
||||
[5] = 95,
|
||||
[6] = 95,
|
||||
[7] = 93,
|
||||
[8] = 93,
|
||||
[9] = 90,
|
||||
[10] = 90
|
||||
[1] = 180,
|
||||
[2] = 180,
|
||||
[3] = 177,
|
||||
[4] = 177,
|
||||
[5] = 175,
|
||||
[6] = 175,
|
||||
[7] = 173,
|
||||
[8] = 173,
|
||||
[9] = 170,
|
||||
[10] = 170
|
||||
},
|
||||
|
||||
{
|
||||
@ -1075,10 +1087,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,
|
||||
|
||||
{
|
||||
@ -1398,9 +1410,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,
|
||||
|
@ -20,7 +20,7 @@ function AttackBall.createAttackBall(attributes)
|
||||
|
||||
if (attributes.type == "stream") or FORCE_OLD_PROJECTILES then
|
||||
|
||||
elseif (attributes.type == "projectile") then
|
||||
elseif attributes.damage and (attributes.type == "projectile") then
|
||||
attributes.damage = attributes.damage * 2.7
|
||||
end
|
||||
|
||||
@ -84,14 +84,24 @@ function AttackBall.createAttackBall(attributes)
|
||||
end
|
||||
|
||||
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})
|
||||
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})
|
||||
if not FORCE_OLD_PROJECTILES then
|
||||
AttackBall.createAttackBall({name="acid-ball-direction", directionOnly=true, 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-direction", directionOnly=true, 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-direction", directionOnly=true, 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-direction", directionOnly=true, 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-direction", directionOnly=true, 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-direction", directionOnly=true, 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-direction", directionOnly=true, 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-direction", directionOnly=true, 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})
|
||||
end
|
||||
end
|
||||
|
||||
return AttackBall
|
||||
|
@ -10,6 +10,8 @@ local attackBall = require("AttackBall")
|
||||
|
||||
local DISALLOW_FRIENDLY_FIRE = settings.startup["rampant-disallowFriendlyFire"].value
|
||||
|
||||
local FORCE_OLD_PROJECTILES = settings.startup["rampant-forceOldProjectiles"].value
|
||||
|
||||
-- imported functions
|
||||
|
||||
local makeSpreadEffect = fireUtils.makeSpreadEffect
|
||||
@ -26,13 +28,15 @@ local smokeWithoutGlow = "the-without-glow-smoke-rampant"
|
||||
local smokeFuel = "the-adding-fuel-rampant"
|
||||
|
||||
|
||||
local multipler = (FORCE_OLD_PROJECTILES and 1) or 2.7
|
||||
|
||||
createAttackBall(
|
||||
{
|
||||
name = "bob-explosive-ball",
|
||||
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 = "stream",
|
||||
type = "projectile",
|
||||
pointEffects = function (attributes)
|
||||
return {
|
||||
{
|
||||
@ -57,13 +61,54 @@ createAttackBall(
|
||||
{
|
||||
{
|
||||
type = "damage",
|
||||
damage = { amount = 25, type = "explosion" }
|
||||
damage = { amount = 25 * multipler, type = "explosion" }
|
||||
}
|
||||
}
|
||||
end
|
||||
}
|
||||
)
|
||||
|
||||
if not FORCE_OLD_PROJECTILES then
|
||||
createAttackBall(
|
||||
{
|
||||
name = "bob-explosive-ball-direction",
|
||||
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,
|
||||
directionOnly = true,
|
||||
type = "projectile",
|
||||
pointEffects = function (attributes)
|
||||
return {
|
||||
{
|
||||
type = "create-entity",
|
||||
entity_name = "small-scorchmark",
|
||||
check_buildability = true
|
||||
},
|
||||
{
|
||||
type = "create-entity",
|
||||
entity_name = "big-explosion",
|
||||
check_buildability = true
|
||||
},
|
||||
{
|
||||
type = "create-entity",
|
||||
entity_name = "small-fire-cloud"
|
||||
}
|
||||
}
|
||||
end,
|
||||
radius = 3,
|
||||
areaEffects = function (attributes)
|
||||
return
|
||||
{
|
||||
{
|
||||
type = "damage",
|
||||
damage = { amount = 25 * multipler, type = "explosion" }
|
||||
}
|
||||
}
|
||||
end
|
||||
}
|
||||
)
|
||||
end
|
||||
|
||||
--
|
||||
|
||||
local name = "bob-fire-ball"
|
||||
@ -88,7 +133,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 = "stream",
|
||||
type = "projectile",
|
||||
pointEffects = function (attributes)
|
||||
return {
|
||||
{
|
||||
@ -107,13 +152,49 @@ createAttackBall(
|
||||
},
|
||||
{
|
||||
type = "damage",
|
||||
damage = { amount = 20, type = "fire" }
|
||||
damage = { amount = 20 * multipler, type = "fire" }
|
||||
}
|
||||
}
|
||||
end
|
||||
}
|
||||
)
|
||||
|
||||
if not FORCE_OLD_PROJECTILES then
|
||||
name = "bob-fire-ball-direction"
|
||||
createAttackBall(
|
||||
{
|
||||
name = name,
|
||||
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,
|
||||
directionOnly = true,
|
||||
type = "projectile",
|
||||
pointEffects = function (attributes)
|
||||
return {
|
||||
{
|
||||
type = "create-fire",
|
||||
entity_name = fireName
|
||||
}
|
||||
}
|
||||
end,
|
||||
radius = 2,
|
||||
areaEffects = function (attributes)
|
||||
return
|
||||
{
|
||||
{
|
||||
type = "create-sticker",
|
||||
sticker = stickerName,
|
||||
},
|
||||
{
|
||||
type = "damage",
|
||||
damage = { amount = 20 * multipler, type = "fire" }
|
||||
}
|
||||
}
|
||||
end
|
||||
}
|
||||
)
|
||||
end
|
||||
|
||||
--
|
||||
|
||||
createAttackBall(
|
||||
@ -122,7 +203,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 = "stream",
|
||||
type = "projectile",
|
||||
pointEffects = function (attributes)
|
||||
return {
|
||||
{
|
||||
@ -137,13 +218,44 @@ createAttackBall(
|
||||
{
|
||||
{
|
||||
type = "damage",
|
||||
damage = { amount = 20, type = "poison" }
|
||||
damage = { amount = 20 * multipler, type = "poison" }
|
||||
}
|
||||
}
|
||||
end
|
||||
}
|
||||
)
|
||||
|
||||
if not FORCE_OLD_PROJECTILES then
|
||||
createAttackBall(
|
||||
{
|
||||
name = "bob-poison-ball-direction",
|
||||
pTint = {r=0.1, g=0.5, b=1, a=0.5},
|
||||
sTint = {r=0, g=0, b=1, a=0.5},
|
||||
softSmokeName = softSmoke,
|
||||
directionOnly = true,
|
||||
type = "projectile",
|
||||
pointEffects = function (attributes)
|
||||
return {
|
||||
{
|
||||
type = "create-entity",
|
||||
entity_name = "small-poison-cloud"
|
||||
}
|
||||
}
|
||||
end,
|
||||
radius = 2,
|
||||
areaEffects = function (attributes)
|
||||
return
|
||||
{
|
||||
{
|
||||
type = "damage",
|
||||
damage = { amount = 20 * multipler, type = "poison" }
|
||||
}
|
||||
}
|
||||
end
|
||||
}
|
||||
)
|
||||
end
|
||||
|
||||
-- piercing
|
||||
|
||||
data:extend({
|
||||
@ -163,7 +275,7 @@ data:extend({
|
||||
target_effects =
|
||||
{
|
||||
type = "damage",
|
||||
damage = {amount = 8, type = "bob-pierce"}
|
||||
damage = {amount = 8 * multipler, type = "bob-pierce"}
|
||||
}
|
||||
}
|
||||
},
|
||||
@ -184,7 +296,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 = "stream",
|
||||
type = "projectile",
|
||||
pointEffects = function (attributes)
|
||||
return
|
||||
{
|
||||
@ -211,7 +323,7 @@ createAttackBall(
|
||||
{
|
||||
{
|
||||
type = "damage",
|
||||
damage = { amount = 30, type = "bob-pierce" }
|
||||
damage = { amount = 30 * multipler, type = "bob-pierce" }
|
||||
}
|
||||
}
|
||||
end
|
||||
@ -242,7 +354,7 @@ data:extend({
|
||||
},
|
||||
{
|
||||
type = "damage",
|
||||
damage = { amount = 8, type = "electric"}
|
||||
damage = { amount = 8 * multipler, type = "electric"}
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -268,7 +380,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 = "stream",
|
||||
type = "projectile",
|
||||
pointEffects = function (attributes)
|
||||
return
|
||||
{
|
||||
@ -295,13 +407,56 @@ createAttackBall(
|
||||
{
|
||||
{
|
||||
type = "damage",
|
||||
damage = { amount = 25, type = "electric" }
|
||||
damage = { amount = 25 * multipler, type = "electric" }
|
||||
}
|
||||
}
|
||||
end
|
||||
}
|
||||
)
|
||||
|
||||
if not FORCE_OLD_PROJECTILES then
|
||||
createAttackBall(
|
||||
{
|
||||
name = "bob-electric-ball-direction",
|
||||
pTint = {r=0, g=0.1, b=1, a=1},
|
||||
sTint = {r=0, g=0.1, b=1, a=1},
|
||||
softSmokeName = softSmoke,
|
||||
directionOnly = true,
|
||||
type = "projectile",
|
||||
pointEffects = function (attributes)
|
||||
return
|
||||
{
|
||||
type = "nested-result",
|
||||
action = {
|
||||
type = "cluster",
|
||||
cluster_count = 5,
|
||||
distance = 2,
|
||||
distance_deviation = 2,
|
||||
action_delivery =
|
||||
{
|
||||
type = "projectile",
|
||||
projectile = "electric-spike-rampant",
|
||||
direction_deviation = 0.6,
|
||||
starting_speed = 0.65,
|
||||
starting_speed_deviation = 0.0
|
||||
}
|
||||
}
|
||||
}
|
||||
end,
|
||||
radius = 3,
|
||||
areaEffects = function (attributes)
|
||||
return
|
||||
{
|
||||
{
|
||||
type = "damage",
|
||||
damage = { amount = 25 * multipler, type = "electric" }
|
||||
}
|
||||
}
|
||||
end
|
||||
}
|
||||
)
|
||||
end
|
||||
|
||||
--
|
||||
|
||||
createAttackBall(
|
||||
@ -310,7 +465,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 = "stream",
|
||||
type = "projectile",
|
||||
pointEffects = function (attributes)
|
||||
return
|
||||
{
|
||||
@ -330,21 +485,64 @@ createAttackBall(
|
||||
{
|
||||
{
|
||||
type = "damage",
|
||||
damage = { amount = 10, type = "electric" }
|
||||
damage = { amount = 10 * multipler, type = "electric" }
|
||||
},
|
||||
{
|
||||
type = "damage",
|
||||
damage = { amount = 10, type = "explosion" }
|
||||
damage = { amount = 10 * multipler, type = "explosion" }
|
||||
},
|
||||
{
|
||||
type = "damage",
|
||||
damage = { amount = 10, type = "fire" }
|
||||
damage = { amount = 10 * multipler, type = "fire" }
|
||||
}
|
||||
}
|
||||
end
|
||||
}
|
||||
)
|
||||
|
||||
if not FORCE_OLD_PROJECTILES then
|
||||
createAttackBall(
|
||||
{
|
||||
name = "bob-titan-ball-direction",
|
||||
pTint = {r=0, g=0.1, b=1, a=1},
|
||||
sTint = {r=0, g=0.1, b=1, a=1},
|
||||
softSmokeName = softSmoke,
|
||||
type = "projectile",
|
||||
pointEffects = function (attributes)
|
||||
return
|
||||
{
|
||||
{
|
||||
type = "create-entity",
|
||||
entity_name = "small-fire-cloud"
|
||||
},
|
||||
{
|
||||
type = "create-entity",
|
||||
entity_name = "big-explosion"
|
||||
}
|
||||
}
|
||||
end,
|
||||
radius = 3,
|
||||
areaEffects = function (attributes)
|
||||
return
|
||||
{
|
||||
{
|
||||
type = "damage",
|
||||
damage = { amount = 10 * multipler, type = "electric" }
|
||||
},
|
||||
{
|
||||
type = "damage",
|
||||
damage = { amount = 10 * multipler, type = "explosion" }
|
||||
},
|
||||
{
|
||||
type = "damage",
|
||||
damage = { amount = 10 * multipler, type = "fire" }
|
||||
}
|
||||
}
|
||||
end
|
||||
}
|
||||
)
|
||||
end
|
||||
|
||||
--
|
||||
|
||||
createAttackBall(
|
||||
@ -353,7 +551,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 = "stream",
|
||||
type = "projectile",
|
||||
pointEffects = function (attributes)
|
||||
return
|
||||
{
|
||||
@ -373,25 +571,73 @@ createAttackBall(
|
||||
{
|
||||
{
|
||||
type = "damage",
|
||||
damage = { amount = 15, type = "electric" }
|
||||
damage = { amount = 15 * multipler, type = "electric" }
|
||||
},
|
||||
{
|
||||
type = "damage",
|
||||
damage = { amount = 15, type = "explosion" }
|
||||
damage = { amount = 15 * multipler, type = "explosion" }
|
||||
},
|
||||
{
|
||||
type = "damage",
|
||||
damage = { amount = 15, type = "fire" }
|
||||
damage = { amount = 15 * multipler, type = "fire" }
|
||||
},
|
||||
{
|
||||
type = "damage",
|
||||
damage = { amount = 15, type = "poison" }
|
||||
damage = { amount = 15 * multipler, type = "poison" }
|
||||
}
|
||||
}
|
||||
end
|
||||
}
|
||||
)
|
||||
|
||||
if not FORCE_OLD_PROJECTILES then
|
||||
createAttackBall(
|
||||
{
|
||||
name = "bob-behemoth-ball-direction",
|
||||
pTint = {r=0, g=0.1, b=1, a=1},
|
||||
sTint = {r=0, g=0.1, b=1, a=1},
|
||||
softSmokeName = softSmoke,
|
||||
directionOnly = true,
|
||||
type = "projectile",
|
||||
pointEffects = function (attributes)
|
||||
return
|
||||
{
|
||||
{
|
||||
type = "create-entity",
|
||||
entity_name = "small-poison-cloud"
|
||||
},
|
||||
{
|
||||
type = "create-entity",
|
||||
entity_name = "big-explosion"
|
||||
}
|
||||
}
|
||||
end,
|
||||
radius = 3,
|
||||
areaEffects = function (attributes)
|
||||
return
|
||||
{
|
||||
{
|
||||
type = "damage",
|
||||
damage = { amount = 15 * multipler, type = "electric" }
|
||||
},
|
||||
{
|
||||
type = "damage",
|
||||
damage = { amount = 15 * multipler, type = "explosion" }
|
||||
},
|
||||
{
|
||||
type = "damage",
|
||||
damage = { amount = 15 * multipler, type = "fire" }
|
||||
},
|
||||
{
|
||||
type = "damage",
|
||||
damage = { amount = 15 * multipler, type = "poison" }
|
||||
}
|
||||
}
|
||||
end
|
||||
}
|
||||
)
|
||||
end
|
||||
|
||||
--
|
||||
|
||||
createAttackBall(
|
||||
@ -400,7 +646,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 = "stream",
|
||||
type = "projectile",
|
||||
pointEffects = function (attributes)
|
||||
return
|
||||
{
|
||||
@ -432,29 +678,97 @@ createAttackBall(
|
||||
{
|
||||
{
|
||||
type = "damage",
|
||||
damage = { amount = 15, type = "electric" }
|
||||
damage = { amount = 15 * multipler, type = "electric" }
|
||||
},
|
||||
{
|
||||
type = "damage",
|
||||
damage = { amount = 15, type = "explosion" }
|
||||
damage = { amount = 15 * multipler, type = "explosion" }
|
||||
},
|
||||
{
|
||||
type = "damage",
|
||||
damage = { amount = 15, type = "fire" }
|
||||
damage = { amount = 15 * multipler, type = "fire" }
|
||||
},
|
||||
{
|
||||
type = "damage",
|
||||
damage = { amount = 15, type = "poison" }
|
||||
damage = { amount = 15 * multipler, type = "poison" }
|
||||
},
|
||||
{
|
||||
type = "damage",
|
||||
damage = { amount = 15, type = "bob-pierce" }
|
||||
damage = { amount = 15 * multipler, type = "bob-pierce" }
|
||||
},
|
||||
{
|
||||
type = "damage",
|
||||
damage = { amount = 15, type = "acid" }
|
||||
damage = { amount = 15 * multipler, type = "acid" }
|
||||
}
|
||||
}
|
||||
end
|
||||
}
|
||||
)
|
||||
|
||||
if not FORCE_OLD_PROJECTILES then
|
||||
createAttackBall(
|
||||
{
|
||||
name = "bob-leviathan-ball-direction",
|
||||
pTint = {r=0, g=0.1, b=1, a=1},
|
||||
sTint = {r=0, g=0.1, b=1, a=1},
|
||||
softSmokeName = softSmoke,
|
||||
directionOnly = true,
|
||||
type = "projectile",
|
||||
pointEffects = function (attributes)
|
||||
return
|
||||
{
|
||||
type = "nested-result",
|
||||
action =
|
||||
{
|
||||
type = "cluster",
|
||||
cluster_count = 4,
|
||||
distance = 3,
|
||||
distance_deviation = 1,
|
||||
action_delivery ={
|
||||
type = "instant",
|
||||
target_effects = {
|
||||
{
|
||||
type = "create-entity",
|
||||
entity_name = "big-explosion",
|
||||
direction_deviation = 0.6,
|
||||
starting_speed = 1,
|
||||
starting_speed_deviation = 0.0
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
end,
|
||||
radius = 3,
|
||||
areaEffects = function (attributes)
|
||||
return
|
||||
{
|
||||
{
|
||||
type = "damage",
|
||||
damage = { amount = 15 * multipler, type = "electric" }
|
||||
},
|
||||
{
|
||||
type = "damage",
|
||||
damage = { amount = 15 * multipler, type = "explosion" }
|
||||
},
|
||||
{
|
||||
type = "damage",
|
||||
damage = { amount = 15 * multipler, type = "fire" }
|
||||
},
|
||||
{
|
||||
type = "damage",
|
||||
damage = { amount = 15 * multipler, type = "poison" }
|
||||
},
|
||||
{
|
||||
type = "damage",
|
||||
damage = { amount = 15 * multipler, type = "bob-pierce" }
|
||||
},
|
||||
{
|
||||
type = "damage",
|
||||
damage = { amount = 15 * multipler, type = "acid" }
|
||||
}
|
||||
}
|
||||
end
|
||||
}
|
||||
)
|
||||
end
|
||||
|
@ -2,11 +2,14 @@
|
||||
|
||||
local attackBall = require("AttackBall")
|
||||
|
||||
local FORCE_OLD_PROJECTILES = settings.startup["rampant-forceOldProjectiles"].value
|
||||
|
||||
-- module code
|
||||
|
||||
local softSmoke = "the-soft-smoke-rampant"
|
||||
local createAttackBall = attackBall.createAttackBall
|
||||
|
||||
local multipler = (FORCE_OLD_PROJECTILES and 1) or 2.7
|
||||
|
||||
createAttackBall(
|
||||
{
|
||||
@ -14,7 +17,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 = "stream",
|
||||
type = "projectile",
|
||||
pointEffects = function (attributes)
|
||||
return {
|
||||
{
|
||||
@ -32,11 +35,11 @@ createAttackBall(
|
||||
},
|
||||
{
|
||||
type = "damage",
|
||||
damage = {amount = 10, type = "explosion"}
|
||||
damage = {amount = 10 * multipler, type = "explosion"}
|
||||
},
|
||||
{
|
||||
type = "damage",
|
||||
damage = {amount = 24, type = "poison"}
|
||||
damage = {amount = 24 * multipler, type = "poison"}
|
||||
}
|
||||
}
|
||||
end,
|
||||
@ -61,7 +64,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 = "stream",
|
||||
type = "projectile",
|
||||
pointEffects = function (attributes)
|
||||
return {
|
||||
{
|
||||
@ -85,11 +88,11 @@ createAttackBall(
|
||||
{
|
||||
{
|
||||
type = "damage",
|
||||
damage = { amount = 8, type = "explosion" }
|
||||
damage = { amount = 8 * multipler, type = "explosion" }
|
||||
},
|
||||
{
|
||||
type = "damage",
|
||||
damage = { amount = 18, type = "acid" }
|
||||
damage = { amount = 18 * multipler, type = "acid" }
|
||||
}
|
||||
}
|
||||
end
|
||||
@ -104,7 +107,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 = "stream",
|
||||
type = "projectile",
|
||||
pointEffects = function (attributes)
|
||||
return {
|
||||
{
|
||||
@ -119,17 +122,52 @@ createAttackBall(
|
||||
{
|
||||
{
|
||||
type = "damage",
|
||||
damage = { amount = 5, type = "explosion" }
|
||||
damage = { amount = 5 * multipler, type = "explosion" }
|
||||
},
|
||||
{
|
||||
type = "damage",
|
||||
damage = { amount = 12, type = "poison" }
|
||||
damage = { amount = 12 * multipler, type = "poison" }
|
||||
}
|
||||
}
|
||||
end
|
||||
}
|
||||
)
|
||||
|
||||
if not FORCE_OLD_PROJECTILES then
|
||||
createAttackBall(
|
||||
{
|
||||
name = "ne-infected-ball-direction",
|
||||
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,
|
||||
directionOnly = true,
|
||||
type = "projectile",
|
||||
pointEffects = function (attributes)
|
||||
return {
|
||||
{
|
||||
type = "create-entity",
|
||||
entity_name = "Infected-Poison-Cloud"
|
||||
}
|
||||
}
|
||||
end,
|
||||
radius = 1.5,
|
||||
areaEffects = function (attributes)
|
||||
return
|
||||
{
|
||||
{
|
||||
type = "damage",
|
||||
damage = { amount = 5 * multipler, type = "explosion" }
|
||||
},
|
||||
{
|
||||
type = "damage",
|
||||
damage = { amount = 12 * multipler, type = "poison" }
|
||||
}
|
||||
}
|
||||
end
|
||||
}
|
||||
)
|
||||
end
|
||||
|
||||
--
|
||||
|
||||
createAttackBall(
|
||||
@ -138,7 +176,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 = "stream",
|
||||
type = "projectile",
|
||||
pointEffects = function (attributes)
|
||||
return {
|
||||
{
|
||||
@ -153,13 +191,48 @@ createAttackBall(
|
||||
{
|
||||
{
|
||||
type = "damage",
|
||||
damage = { amount = 5, type = "explosion" }
|
||||
damage = { amount = 5 * multipler, type = "explosion" }
|
||||
},
|
||||
{
|
||||
type = "damage",
|
||||
damage = { amount = 12, type = "acid" }
|
||||
damage = { amount = 12 * multipler, type = "acid" }
|
||||
}
|
||||
}
|
||||
end
|
||||
}
|
||||
)
|
||||
|
||||
if not FORCE_OLD_PROJECTILES then
|
||||
createAttackBall(
|
||||
{
|
||||
name = "ne-mutated-ball-direction",
|
||||
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,
|
||||
directionOnly = true,
|
||||
type = "projectile",
|
||||
pointEffects = function (attributes)
|
||||
return {
|
||||
{
|
||||
type = "create-entity",
|
||||
entity_name = "acid-splash-purple"
|
||||
}
|
||||
}
|
||||
end,
|
||||
radius = 1.5,
|
||||
areaEffects = function (attributes)
|
||||
return
|
||||
{
|
||||
{
|
||||
type = "damage",
|
||||
damage = { amount = 5 * multipler, type = "explosion" }
|
||||
},
|
||||
{
|
||||
type = "damage",
|
||||
damage = { amount = 12 * multipler, type = "acid" }
|
||||
}
|
||||
}
|
||||
end
|
||||
}
|
||||
)
|
||||
end
|
||||
|
@ -194,78 +194,87 @@ end
|
||||
function droneUtils.createCapsuleProjectile(name, attributes, entityName)
|
||||
local n = name .. "-capsule-rampant"
|
||||
|
||||
local cap = {
|
||||
type = "projectile",
|
||||
name = n,
|
||||
flags = {"not-on-map"},
|
||||
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",
|
||||
action_delivery =
|
||||
local actions = {
|
||||
{
|
||||
type = "direct",
|
||||
action_delivery =
|
||||
{
|
||||
type = "instant",
|
||||
target_effects =
|
||||
{
|
||||
{
|
||||
type = "instant",
|
||||
target_effects =
|
||||
{
|
||||
{
|
||||
type = "create-entity",
|
||||
show_in_tooltip = true,
|
||||
entity_name = entityName,
|
||||
},
|
||||
{
|
||||
type = "damage",
|
||||
damage = {amount = attributes.damage or 5, type = attributes.damageType or "explosion"}
|
||||
}
|
||||
}
|
||||
type = "create-entity",
|
||||
show_in_tooltip = true,
|
||||
trigger_created_entity = attributes.triggerCreated,
|
||||
entity_name = entityName,
|
||||
check_buildability = attributes.checkBuildability
|
||||
},
|
||||
{
|
||||
type = "damage",
|
||||
damage = {amount = attributes.damage or 5, type = attributes.damageType or "explosion"}
|
||||
}
|
||||
},
|
||||
light = {intensity = 0.5, size = 4},
|
||||
enable_drawing_with_mask = true,
|
||||
animation = {
|
||||
layers = {
|
||||
{
|
||||
filename = "__base__/graphics/entity/combat-robot-capsule/defender-capsule.png",
|
||||
flags = { "no-crop" },
|
||||
frame_count = 1,
|
||||
width = 28,
|
||||
height = 20,
|
||||
priority = "high"
|
||||
},
|
||||
{
|
||||
filename = "__base__/graphics/entity/combat-robot-capsule/defender-capsule-mask.png",
|
||||
flags = { "no-crop" },
|
||||
frame_count = 1,
|
||||
width = 28,
|
||||
height = 20,
|
||||
priority = "high",
|
||||
apply_runtime_tint = true,
|
||||
},
|
||||
},
|
||||
},
|
||||
shadow =
|
||||
{
|
||||
filename = "__base__/graphics/entity/combat-robot-capsule/defender-capsule-shadow.png",
|
||||
flags = { "no-crop" },
|
||||
frame_count = 1,
|
||||
width = 26,
|
||||
height = 20,
|
||||
priority = "high"
|
||||
},
|
||||
smoke = {
|
||||
{
|
||||
name = attributes.softSmokeName,
|
||||
deviation = {0.15, 0.15},
|
||||
frequency = 1,
|
||||
position = {0, 0},
|
||||
starting_frame = 3,
|
||||
starting_frame_deviation = 5,
|
||||
starting_frame_speed_deviation = 5
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if attributes.sourceEffect then
|
||||
actions[#actions+1] = attributes.sourceEffect(attributes)
|
||||
end
|
||||
|
||||
local cap = {
|
||||
type = "projectile",
|
||||
name = n,
|
||||
flags = {"not-on-map"},
|
||||
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 = actions,
|
||||
light = {intensity = 0.5, size = 4},
|
||||
enable_drawing_with_mask = true,
|
||||
animation = {
|
||||
layers = {
|
||||
{
|
||||
filename = "__base__/graphics/entity/combat-robot-capsule/defender-capsule.png",
|
||||
flags = { "no-crop" },
|
||||
frame_count = 1,
|
||||
width = 28,
|
||||
height = 20,
|
||||
priority = "high"
|
||||
},
|
||||
{
|
||||
filename = "__base__/graphics/entity/combat-robot-capsule/defender-capsule-mask.png",
|
||||
flags = { "no-crop" },
|
||||
frame_count = 1,
|
||||
width = 28,
|
||||
height = 20,
|
||||
priority = "high",
|
||||
apply_runtime_tint = true,
|
||||
},
|
||||
},
|
||||
},
|
||||
shadow =
|
||||
{
|
||||
filename = "__base__/graphics/entity/combat-robot-capsule/defender-capsule-shadow.png",
|
||||
flags = { "no-crop" },
|
||||
frame_count = 1,
|
||||
width = 26,
|
||||
height = 20,
|
||||
priority = "high"
|
||||
},
|
||||
smoke = {
|
||||
{
|
||||
name = attributes.softSmokeName,
|
||||
deviation = {0.15, 0.15},
|
||||
frequency = 1,
|
||||
position = {0, 0},
|
||||
starting_frame = 3,
|
||||
starting_frame_deviation = 5,
|
||||
starting_frame_speed_deviation = 5
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
data:extend({cap})
|
||||
|
@ -6,6 +6,9 @@ local biterUtils = require("BiterUtils")
|
||||
|
||||
function bobsUpdates.useDumbProjectiles()
|
||||
local turrets = data.raw["turret"];
|
||||
|
||||
local attackType = (FORCE_OLD_PROJECTILES and "stream") or "projectile"
|
||||
local unitPrefix = (FORCE_OLD_PROJECTILES and "") or "direction-"
|
||||
|
||||
turrets["bob-big-explosive-worm-turret"]["attack_parameters"] = biterUtils.createRangedAttack(
|
||||
{
|
||||
@ -14,10 +17,10 @@ function bobsUpdates.useDumbProjectiles()
|
||||
min_range = 3,
|
||||
turn_range = 1,
|
||||
fire_penalty = 0,
|
||||
type = "stream",
|
||||
type = "projectile",
|
||||
scale = 1.2
|
||||
},
|
||||
"bob-explosive-ball-stream-rampant")
|
||||
"bob-explosive-ball-" .. attackType .. "-rampant")
|
||||
|
||||
turrets["bob-big-fire-worm-turret"]["attack_parameters"] = biterUtils.createRangedAttack(
|
||||
{
|
||||
@ -26,10 +29,10 @@ function bobsUpdates.useDumbProjectiles()
|
||||
min_range = 3,
|
||||
turn_range = 1,
|
||||
fire_penalty = 0,
|
||||
type = "stream",
|
||||
type = "projectile",
|
||||
scale = 1.2
|
||||
},
|
||||
"bob-fire-ball-stream-rampant")
|
||||
"bob-fire-ball-" .. attackType .. "-rampant")
|
||||
|
||||
turrets["bob-big-poison-worm-turret"]["attack_parameters"] = biterUtils.createRangedAttack(
|
||||
{
|
||||
@ -38,10 +41,10 @@ function bobsUpdates.useDumbProjectiles()
|
||||
min_range = 3,
|
||||
turn_range = 1,
|
||||
fire_penalty = 0,
|
||||
type = "stream",
|
||||
type = "projectile",
|
||||
scale = 1.2
|
||||
},
|
||||
"bob-poison-ball-stream-rampant")
|
||||
"bob-poison-ball-" .. attackType .. "-rampant")
|
||||
|
||||
turrets["bob-big-piercing-worm-turret"]["attack_parameters"] = biterUtils.createRangedAttack(
|
||||
{
|
||||
@ -50,10 +53,10 @@ function bobsUpdates.useDumbProjectiles()
|
||||
min_range = 3,
|
||||
turn_range = 1,
|
||||
fire_penalty = 0,
|
||||
type = "stream",
|
||||
type = "projectile",
|
||||
scale = 1.2
|
||||
},
|
||||
"bob-piercing-ball-stream-rampant")
|
||||
"bob-piercing-ball-" .. attackType .. "-rampant")
|
||||
|
||||
turrets["bob-big-electric-worm-turret"]["attack_parameters"] = biterUtils.createRangedAttack(
|
||||
{
|
||||
@ -62,10 +65,10 @@ function bobsUpdates.useDumbProjectiles()
|
||||
min_range = 3,
|
||||
turn_range = 1,
|
||||
fire_penalty = 0,
|
||||
type = "stream",
|
||||
type = "projectile",
|
||||
scale = 1.2
|
||||
},
|
||||
"bob-electric-ball-stream-rampant")
|
||||
"bob-electric-ball-" .. attackType .. "-rampant")
|
||||
|
||||
turrets["bob-giant-worm-turret"]["attack_parameters"] = biterUtils.createRangedAttack(
|
||||
{
|
||||
@ -74,10 +77,10 @@ function bobsUpdates.useDumbProjectiles()
|
||||
min_range = 3,
|
||||
turn_range = 1,
|
||||
fire_penalty = 0,
|
||||
type = "stream",
|
||||
type = "projectile",
|
||||
scale = 1.6
|
||||
},
|
||||
"acid-ball-5-stream-rampant")
|
||||
"acid-ball-5-" .. attackType .. "-rampant")
|
||||
|
||||
turrets["bob-behemoth-worm-turret"]["attack_parameters"] = biterUtils.createRangedAttack(
|
||||
{
|
||||
@ -86,10 +89,10 @@ function bobsUpdates.useDumbProjectiles()
|
||||
min_range = 3,
|
||||
turn_range = 1,
|
||||
fire_penalty = 0,
|
||||
type = "stream",
|
||||
type = "projectile",
|
||||
scale = 2
|
||||
},
|
||||
"acid-ball-6-stream-rampant")
|
||||
"acid-ball-6-" .. attackType .. "-rampant")
|
||||
|
||||
local units = data.raw["unit"]
|
||||
|
||||
@ -101,11 +104,11 @@ function bobsUpdates.useDumbProjectiles()
|
||||
min_range = 3,
|
||||
turn_range = 1,
|
||||
warmup = 30,
|
||||
type = "stream",
|
||||
type = "projectile",
|
||||
fire_penalty = 15,
|
||||
scale = biterUtils.findRunScale(unit)
|
||||
},
|
||||
"acid-ball-3-stream-rampant",
|
||||
"acid-ball-3-" .. unitPrefix .. attackType .. "-rampant",
|
||||
spitterattackanimation(biterUtils.findRunScale(unit),
|
||||
biterUtils.findTint(unit)))
|
||||
|
||||
@ -117,12 +120,12 @@ function bobsUpdates.useDumbProjectiles()
|
||||
min_range = 3,
|
||||
turn_range = 1,
|
||||
damageModifier = 0.6,
|
||||
type = "stream",
|
||||
type = "projectile",
|
||||
warmup = 30,
|
||||
fire_penalty = 0,
|
||||
scale = biterUtils.findRunScale(unit)
|
||||
},
|
||||
"bob-electric-ball-stream-rampant",
|
||||
"bob-electric-ball-" .. unitPrefix .. attackType .. "-rampant",
|
||||
spitterattackanimation(biterUtils.findRunScale(unit),
|
||||
biterUtils.findTint(unit)))
|
||||
|
||||
@ -132,14 +135,14 @@ function bobsUpdates.useDumbProjectiles()
|
||||
cooldown = 90,
|
||||
range = 16,
|
||||
min_range = 3,
|
||||
type = "stream",
|
||||
type = "projectile",
|
||||
warmup = 30,
|
||||
turn_range = 1,
|
||||
damageModifier = 0.8,
|
||||
fire_penalty = 15,
|
||||
scale = biterUtils.findRunScale(unit)
|
||||
},
|
||||
"bob-explosive-ball-stream-rampant",
|
||||
"bob-explosive-ball-" .. unitPrefix .. attackType .. "-rampant",
|
||||
spitterattackanimation(biterUtils.findRunScale(unit),
|
||||
biterUtils.findTint(unit)))
|
||||
|
||||
@ -149,13 +152,13 @@ function bobsUpdates.useDumbProjectiles()
|
||||
cooldown = 90,
|
||||
range = 16,
|
||||
min_range = 3,
|
||||
type = "stream",
|
||||
type = "projectile",
|
||||
turn_range = 1,
|
||||
warmup = 30,
|
||||
fire_penalty = 15,
|
||||
scale = biterUtils.findRunScale(unit)
|
||||
},
|
||||
"wide-acid-ball-stream-rampant",
|
||||
"wide-acid-ball-" .. unitPrefix .. attackType .. "-rampant",
|
||||
spitterattackanimation(biterUtils.findRunScale(unit),
|
||||
biterUtils.findTint(unit)))
|
||||
|
||||
@ -164,14 +167,14 @@ function bobsUpdates.useDumbProjectiles()
|
||||
{
|
||||
cooldown = 90,
|
||||
range = 16,
|
||||
type = "stream",
|
||||
type = "projectile",
|
||||
min_range = 3,
|
||||
turn_range = 1,
|
||||
warmup = 30,
|
||||
fire_penalty = 15,
|
||||
scale = biterUtils.findRunScale(unit)
|
||||
},
|
||||
"bob-fire-ball-stream-rampant",
|
||||
"bob-fire-ball-" .. unitPrefix .. attackType .. "-rampant",
|
||||
spitterattackanimation(biterUtils.findRunScale(unit),
|
||||
biterUtils.findTint(unit)))
|
||||
|
||||
@ -180,14 +183,14 @@ function bobsUpdates.useDumbProjectiles()
|
||||
{
|
||||
cooldown = 90,
|
||||
range = 16,
|
||||
type = "stream",
|
||||
type = "projectile",
|
||||
min_range = 3,
|
||||
turn_range = 1,
|
||||
warmup = 30,
|
||||
fire_penalty = 15,
|
||||
scale = biterUtils.findRunScale(unit)
|
||||
},
|
||||
"bob-poison-ball-stream-rampant",
|
||||
"bob-poison-ball-" .. unitPrefix .. attackType .. "-rampant",
|
||||
spitterattackanimation(biterUtils.findRunScale(unit),
|
||||
biterUtils.findTint(unit)))
|
||||
|
||||
@ -196,14 +199,14 @@ function bobsUpdates.useDumbProjectiles()
|
||||
{
|
||||
cooldown = 90,
|
||||
range = 16,
|
||||
type = "stream",
|
||||
type = "projectile",
|
||||
min_range = 3,
|
||||
turn_range = 1,
|
||||
warmup = 30,
|
||||
fire_penalty = 15,
|
||||
scale = biterUtils.findRunScale(unit)
|
||||
},
|
||||
"bob-titan-ball-stream-rampant",
|
||||
"bob-titan-ball-" .. unitPrefix .. attackType .. "-rampant",
|
||||
spitterattackanimation(biterUtils.findRunScale(unit),
|
||||
biterUtils.findTint(unit)))
|
||||
|
||||
@ -212,14 +215,14 @@ function bobsUpdates.useDumbProjectiles()
|
||||
{
|
||||
cooldown = 90,
|
||||
range = 16,
|
||||
type = "stream",
|
||||
type = "projectile",
|
||||
min_range = 3,
|
||||
turn_range = 1,
|
||||
warmup = 30,
|
||||
fire_penalty = 15,
|
||||
scale = biterUtils.findRunScale(unit)
|
||||
},
|
||||
"bob-behemoth-ball-stream-rampant",
|
||||
"bob-behemoth-ball-" .. unitPrefix .. attackType .. "-rampant",
|
||||
spitterattackanimation(biterUtils.findRunScale(unit),
|
||||
biterUtils.findTint(unit)))
|
||||
|
||||
@ -228,7 +231,7 @@ function bobsUpdates.useDumbProjectiles()
|
||||
unit["attack_parameters"] = biterUtils.createRangedAttack(
|
||||
{
|
||||
cooldown = 90,
|
||||
type = "stream",
|
||||
type = "projectile",
|
||||
range = 17,
|
||||
min_range = 3,
|
||||
warmup = 30,
|
||||
@ -236,7 +239,7 @@ function bobsUpdates.useDumbProjectiles()
|
||||
fire_penalty = 15,
|
||||
scale = biterUtils.findRunScale(unit)
|
||||
},
|
||||
"bob-leviathan-ball-stream-rampant",
|
||||
"bob-leviathan-ball-" .. unitPrefix .. attackType .. "-rampant",
|
||||
spitterattackanimation(biterUtils.findRunScale(unit),
|
||||
biterUtils.findTint(unit)))
|
||||
end
|
||||
|
@ -13,7 +13,7 @@ function NEUpdates.useNEUnitLaunchers ()
|
||||
{
|
||||
cooldown = 60,
|
||||
range = 25,
|
||||
type = "stream",
|
||||
type = "projectile",
|
||||
min_range = 3,
|
||||
turn_range = 1,
|
||||
fire_penalty = 0,
|
||||
@ -27,7 +27,7 @@ function NEUpdates.useNEUnitLaunchers ()
|
||||
cooldown = 60,
|
||||
range = 30,
|
||||
min_range = 3,
|
||||
type = "stream",
|
||||
type = "projectile",
|
||||
turn_range = 1,
|
||||
fire_penalty = 0,
|
||||
damageModifier = 3,
|
||||
@ -40,6 +40,7 @@ function NEUpdates.useDumbProjectiles()
|
||||
local turrets = data.raw["turret"];
|
||||
|
||||
local attackType = (FORCE_OLD_PROJECTILES and "stream") or "projectile"
|
||||
local unitPrefix = (FORCE_OLD_PROJECTILES and "") or "direction-"
|
||||
|
||||
local turret = turrets["small-worm-turret"]
|
||||
turret["attack_parameters"].range = 19
|
||||
@ -51,7 +52,7 @@ function NEUpdates.useDumbProjectiles()
|
||||
cooldown = 60,
|
||||
range = 25,
|
||||
min_range = 3,
|
||||
type = "stream",
|
||||
type = "projectile",
|
||||
turn_range = 1,
|
||||
fire_penalty = 0,
|
||||
damageModifier = 4.5,
|
||||
@ -67,7 +68,7 @@ function NEUpdates.useDumbProjectiles()
|
||||
range = 30,
|
||||
min_range = 3,
|
||||
turn_range = 1,
|
||||
type = "stream",
|
||||
type = "projectile",
|
||||
fire_penalty = 0,
|
||||
damageModifier = 5.5,
|
||||
scale = 1.6
|
||||
@ -83,14 +84,14 @@ function NEUpdates.useDumbProjectiles()
|
||||
range = 13,
|
||||
min_range = 3,
|
||||
turn_range = 1,
|
||||
type = "stream",
|
||||
type = "projectile",
|
||||
fire_penalty = 15,
|
||||
warmup = 30,
|
||||
damageModifier = 1.1,
|
||||
scale = biterUtils.findRunScale(unit),
|
||||
tint = biterUtils.findTint(unit)
|
||||
},
|
||||
"ne-infected-ball-" .. attackType .. "-rampant",
|
||||
"ne-infected-ball-" .. unitPrefix .. attackType .. "-rampant",
|
||||
spitterattackanimation(biterUtils.findRunScale(unit),
|
||||
biterUtils.findTint(unit)))
|
||||
|
||||
@ -101,14 +102,14 @@ function NEUpdates.useDumbProjectiles()
|
||||
range = 13,
|
||||
min_range = 3,
|
||||
turn_range = 1,
|
||||
type = "stream",
|
||||
type = "projectile",
|
||||
warmup = 30,
|
||||
fire_penalty = 15,
|
||||
damageModifier = 1.2,
|
||||
scale = biterUtils.findRunScale(unit),
|
||||
tint = biterUtils.findTint(unit)
|
||||
},
|
||||
"ne-mutated-ball-" .. attackType .. "-rampant",
|
||||
"ne-mutated-ball-" .. unitPrefix .. attackType .. "-rampant",
|
||||
spitterattackanimation(biterUtils.findRunScale(unit),
|
||||
biterUtils.findTint(unit)))
|
||||
|
||||
@ -119,7 +120,7 @@ function NEUpdates.useDumbProjectiles()
|
||||
cooldown = 100,
|
||||
range = 14,
|
||||
min_range = 3,
|
||||
type = "stream",
|
||||
type = "projectile",
|
||||
turn_range = 1,
|
||||
warmup = 30,
|
||||
fire_penalty = 15,
|
||||
@ -127,7 +128,7 @@ function NEUpdates.useDumbProjectiles()
|
||||
scale = biterUtils.findRunScale(unit),
|
||||
tint = biterUtils.findTint(unit)
|
||||
},
|
||||
"ne-infected-ball-" .. attackType .. "-rampant",
|
||||
"ne-infected-ball-" .. unitPrefix .. attackType .. "-rampant",
|
||||
spitterattackanimation(biterUtils.findRunScale(unit),
|
||||
biterUtils.findTint(unit)))
|
||||
|
||||
@ -138,14 +139,14 @@ function NEUpdates.useDumbProjectiles()
|
||||
range = 14,
|
||||
min_range = 3,
|
||||
turn_range = 1,
|
||||
type = "stream",
|
||||
type = "projectile",
|
||||
warmup = 30,
|
||||
fire_penalty = 15,
|
||||
damageModifier = 2.6,
|
||||
scale = biterUtils.findRunScale(unit),
|
||||
tint = biterUtils.findTint(unit)
|
||||
},
|
||||
"ne-mutated-ball-" .. attackType .. "-rampant",
|
||||
"ne-mutated-ball-" .. unitPrefix .. attackType .. "-rampant",
|
||||
spitterattackanimation(biterUtils.findRunScale(unit),
|
||||
biterUtils.findTint(unit)))
|
||||
|
||||
@ -155,7 +156,7 @@ function NEUpdates.useDumbProjectiles()
|
||||
cooldown = 100,
|
||||
range = 15,
|
||||
min_range = 3,
|
||||
type = "stream",
|
||||
type = "projectile",
|
||||
turn_range = 1,
|
||||
warmup = 30,
|
||||
fire_penalty = 15,
|
||||
@ -163,7 +164,7 @@ function NEUpdates.useDumbProjectiles()
|
||||
scale = biterUtils.findRunScale(unit),
|
||||
tint = biterUtils.findTint(unit)
|
||||
},
|
||||
"ne-infected-ball-" .. attackType .. "-rampant",
|
||||
"ne-infected-ball-" .. unitPrefix .. attackType .. "-rampant",
|
||||
spitterattackanimation(biterUtils.findRunScale(unit),
|
||||
biterUtils.findTint(unit)))
|
||||
|
||||
@ -175,14 +176,14 @@ function NEUpdates.useDumbProjectiles()
|
||||
range = 15,
|
||||
min_range = 3,
|
||||
turn_range = 1,
|
||||
type = "stream",
|
||||
type = "projectile",
|
||||
warmup = 30,
|
||||
fire_penalty = 15,
|
||||
damageModifier = 3.6,
|
||||
scale = biterUtils.findRunScale(unit),
|
||||
tint = biterUtils.findTint(unit)
|
||||
},
|
||||
"ne-mutated-ball-" .. attackType .. "-rampant",
|
||||
"ne-mutated-ball-" .. unitPrefix .. attackType .. "-rampant",
|
||||
spitterattackanimation(biterUtils.findRunScale(unit),
|
||||
biterUtils.findTint(unit)))
|
||||
|
||||
|
@ -6,6 +6,9 @@ local biterUtils = require("BiterUtils")
|
||||
|
||||
function vanillaUpdates.useDumbProjectiles()
|
||||
local turrets = data.raw["turret"];
|
||||
|
||||
local attackType = (FORCE_OLD_PROJECTILES and "stream") or "projectile"
|
||||
local unitPrefix = (FORCE_OLD_PROJECTILES and "") or "direction-"
|
||||
|
||||
turrets["small-worm-turret"]["attack_parameters"] = biterUtils.createRangedAttack(
|
||||
{
|
||||
@ -13,12 +16,12 @@ function vanillaUpdates.useDumbProjectiles()
|
||||
range = 21,
|
||||
min_range = 5,
|
||||
turn_range = 1,
|
||||
type = "stream",
|
||||
type = "projectile",
|
||||
fire_penalty = 0,
|
||||
damageModifier = 0.9,
|
||||
scale = 0.8
|
||||
},
|
||||
"acid-ball-2-stream-rampant")
|
||||
"acid-ball-2-" .. attackType .. "-rampant")
|
||||
|
||||
turrets["medium-worm-turret"]["attack_parameters"] = biterUtils.createRangedAttack(
|
||||
{
|
||||
@ -26,12 +29,12 @@ function vanillaUpdates.useDumbProjectiles()
|
||||
range = 25,
|
||||
min_range = 3,
|
||||
turn_range = 1,
|
||||
type = "stream",
|
||||
type = "projectile",
|
||||
fire_penalty = 0,
|
||||
damageModifier = 0.87,
|
||||
scale = 1
|
||||
},
|
||||
"acid-ball-3-stream-rampant")
|
||||
"acid-ball-3-" .. attackType .. "-rampant")
|
||||
|
||||
|
||||
turrets["big-worm-turret"]["attack_parameters"] = biterUtils.createRangedAttack(
|
||||
@ -39,12 +42,12 @@ function vanillaUpdates.useDumbProjectiles()
|
||||
cooldown = 60,
|
||||
range = 26,
|
||||
min_range = 3,
|
||||
type = "stream",
|
||||
type = "projectile",
|
||||
turn_range = 1,
|
||||
fire_penalty = 0,
|
||||
scale = 1.2
|
||||
},
|
||||
"acid-ball-4-stream-rampant")
|
||||
"acid-ball-4-" .. attackType .. "-rampant")
|
||||
|
||||
local units = data.raw["unit"];
|
||||
|
||||
@ -56,11 +59,11 @@ function vanillaUpdates.useDumbProjectiles()
|
||||
warmup = 30,
|
||||
min_range = 3,
|
||||
turn_range = 1,
|
||||
type = "stream",
|
||||
type = "projectile",
|
||||
fire_penalty = 15,
|
||||
scale = biterUtils.findRunScale(unit)
|
||||
},
|
||||
"acid-ball-stream-rampant",
|
||||
"acid-ball-" .. unitPrefix .. attackType .. "-rampant",
|
||||
spitterattackanimation(biterUtils.findRunScale(unit),
|
||||
biterUtils.findTint(unit)))
|
||||
|
||||
@ -70,13 +73,13 @@ function vanillaUpdates.useDumbProjectiles()
|
||||
cooldown = 95,
|
||||
range = 14,
|
||||
min_range = 3,
|
||||
type = "stream",
|
||||
type = "projectile",
|
||||
warmup = 30,
|
||||
turn_range = 1,
|
||||
fire_penalty = 15,
|
||||
scale = biterUtils.findRunScale(unit)
|
||||
},
|
||||
"acid-ball-1-stream-rampant",
|
||||
"acid-ball-1-" .. unitPrefix .. attackType .. "-rampant",
|
||||
spitterattackanimation(biterUtils.findRunScale(unit),
|
||||
biterUtils.findTint(unit)))
|
||||
|
||||
@ -86,13 +89,13 @@ function vanillaUpdates.useDumbProjectiles()
|
||||
cooldown = 90,
|
||||
range = 15,
|
||||
min_range = 3,
|
||||
type = "stream",
|
||||
type = "projectile",
|
||||
warmup = 30,
|
||||
turn_range = 1,
|
||||
fire_penalty = 15,
|
||||
scale = biterUtils.findRunScale(unit)
|
||||
},
|
||||
"acid-ball-2-stream-rampant",
|
||||
"acid-ball-2-" .. unitPrefix .. attackType .. "-rampant",
|
||||
spitterattackanimation(biterUtils.findRunScale(unit),
|
||||
biterUtils.findTint(unit)))
|
||||
|
||||
@ -103,12 +106,12 @@ function vanillaUpdates.useDumbProjectiles()
|
||||
range = 16,
|
||||
min_range = 3,
|
||||
warmup = 30,
|
||||
type = "stream",
|
||||
type = "projectile",
|
||||
turn_range = 1,
|
||||
fire_penalty = 15,
|
||||
scale = biterUtils.findRunScale(unit)
|
||||
},
|
||||
"acid-ball-3-stream-rampant",
|
||||
"acid-ball-3-" .. unitPrefix .. attackType .. "-rampant",
|
||||
spitterattackanimation(biterUtils.findRunScale(unit),
|
||||
biterUtils.findTint(unit)))
|
||||
end
|
||||
|
@ -121,6 +121,10 @@ function tests.findNearestPlayerEnemy()
|
||||
print("--")
|
||||
end
|
||||
|
||||
function tests.morePoints(points)
|
||||
global.natives.points = global.natives.points + points
|
||||
end
|
||||
|
||||
function tests.getOffsetChunk(x, y)
|
||||
local playerPosition = game.players[1].position
|
||||
local chunkX = math.floor(playerPosition.x * 0.03125)
|
||||
|
Loading…
x
Reference in New Issue
Block a user