1
0
mirror of https://github.com/veden/Rampant.git synced 2025-01-26 03:20:07 +02:00

see changelog

This commit is contained in:
Aaron Veden 2019-02-18 16:43:01 -08:00
parent 9d5429ec96
commit 8c76f7d855
18 changed files with 488 additions and 231 deletions

View File

@ -253,6 +253,13 @@ function upgrade.attempt(natives)
game.surfaces[natives.activeSurface].print("Rampant - Version 0.16.40")
global.version = constants.VERSION_75
end
if (global.version < constants.VERSION_76) then
natives.drainPylons = {}
game.surfaces[natives.activeSurface].print("Rampant - Version 0.16.41")
global.version = constants.VERSION_76
end
return starting ~= global.version, natives
end

View File

@ -1,3 +1,28 @@
---------------------------------------------------------------------------------------------------
Version: 0.16.41
Date: 2. 18. 2019
Tweaks:
- Added energy thief crystal and pylon physical resistance 25%
- Increased crystal pylon health from 150 to 750
- Decreased electric faction damages (7->6, 15->10, 22.5->15, 35->20, 45->30, 60->45, 75->60, 90->75, 150->90, 200->150)
- Decreased energy thief beam width (1.5->1, 1.5->1, 1.6->1.2, 1.6->1.2, 1.7->1.3, 1.7->1.3, 1.8->1.4, 1.8->1.4, 1.9->1.5, 1.9->1.5)
- Decreased energy thief range (11->9, 11->9, 12->10, 12->10, 13->11, 13->11, 14->12, 14->12, 15->13, 15->13)
- Decreased crystal pylon resistances for fire, electric, laser from 100, 100, 100 to 85, 95, 90
- Added energy drain to crystal pylon of 500kW
- Increased drain crystal drain amount from 300kW per tier to 1.3MW
- Increased drain crystal health from 100 per tier to 400 per tier
- Increased all biter default health for levels 5 to 10 (400->1000, 750->2000, 1500->3500, 3000->7500, 5000->15000, 10000->30000)
- Increased physical and troll biter default health for levels 5 to 10 (800->1500, 1500->3000, 3000->5000, 6000->12000, 10000->20000, 20000->40000)
- Increased all spitter default health for levels 5 to 10 (750->1250, 1000->2250, 1500->3250, 2500->6500, 4500->12500, 7000->25000)
- Increased all nests default health for levels 5 to 10 (2500->3500, 3500->7500, 5000->11000, 7000->20000, 10000->30000, 15000->45000)
- Increased all worms default health for levels 5 to 10 (750->2000, 1000->3500, 1500->7500, 3000->12000, 5000->20000, 9000->25000)
- Increased nuclear and suicide biter faction health for levels 9 to 10 (3000->5000, 5000->10000)
- Increased spawner spawned biter faction health for levels 8 to 10 (145->250, 165->500, 180->1000)
Bugfixes:
- Fixed a chance that connecting wires on entity death has invalid target
- Fixed electric turret not being counted for energy thief conversion
- Fixed pylons not being targeted by turrets
---------------------------------------------------------------------------------------------------
Version: 0.16.40
Date: 2. 16. 2019

View File

@ -207,6 +207,7 @@ local function rebuildMap()
map.chunkToPassable = {}
map.chunkToPathRating = {}
map.chunkToDeathGenerator = {}
map.chunkToDrained = {}
-- map.queueSpawners = {}
@ -451,6 +452,7 @@ local function onDeath(event)
local entityPosition = entity.position
local chunk = getChunkByPosition(map, entityPosition)
local cause = event.cause
local tick = event.tick
if (entity.force.name == "enemy") then
if (entity.type == "unit") then
@ -459,7 +461,6 @@ local function onDeath(event)
deathScent(map, chunk)
if event.force and (event.force.name ~= "enemy") and (chunk[MOVEMENT_PHEROMONE] < -natives.retreatThreshold) then
local tick = event.tick
local artilleryBlast = (cause and ((cause.type == "artillery-wagon") or (cause.type == "artillery-turret")))
@ -487,7 +488,6 @@ local function onDeath(event)
end
elseif event.force and (event.force.name ~= "enemy") and ((entity.type == "unit-spawner") or (entity.type == "turret")) then
local tick = event.tick
if (chunk ~= SENTINEL_IMPASSABLE_CHUNK) then
unregisterEnemyBaseStructure(map, entity)
@ -505,6 +505,25 @@ local function onDeath(event)
(cause and ((cause.type == "artillery-wagon") or (cause.type == "artillery-turret"))))
end
end
local pair = natives.drainPylons[entity.unit_number]
if pair then
local target = pair[1]
local pole = pair[2]
if target == entity then
natives.drainPylons[entity.unit_number] = nil
if pole.valid then
natives.drainPylons[pole.unit_number] = nil
pole.die()
end
elseif (pole == entity) then
natives.drainPylons[entity.unit_number] = nil
if target.valid then
natives.drainPylons[target.unit_number] = nil
target.destroy()
end
end
end
elseif (entity.force.name ~= "enemy") then
local creditNatives = false
if (event.force ~= nil) and (event.force.name == "enemy") then
@ -513,24 +532,38 @@ local function onDeath(event)
victoryScent(map, chunk, entity.type)
end
if (cause ~= nil) then
if (ENERGY_THIEF_LOOKUP[cause.name]) then
local drained = (entity.type == "electric-turret") and map.chunkToDrained[chunk]
if (cause ~= nil) or (drained and (drained - tick) > 0) then
if ((cause and ENERGY_THIEF_LOOKUP[cause.name]) or (not cause)) then
local conversion = ENERGY_THIEF_CONVERSION_TABLE[entity.type]
if conversion then
local newEntity = surface.create_entity({position=entity.position,
name=convertTypeToDrainCrystal(entity.force.evolution_factor, conversion),
direction=entity.direction})
if (conversion == "pole") then
local targetEntity = surface.create_entity({position=entity.position,
name="pylon-target-rampant",
direction=entity.direction})
targetEntity.backer_name = ""
local pair = {targetEntity, newEntity}
natives.drainPylons[targetEntity.unit_number] = pair
natives.drainPylons[newEntity.unit_number] = pair
local wires = entity.neighbours
if wires then
for _,v in pairs(wires.copper) do
newEntity.connect_neighbour(v);
if (v.valid) then
newEntity.connect_neighbour(v);
end
end
for _,v in pairs(wires.red) do
newEntity.connect_neighbour({wire = DEFINES_WIRE_TYPE_RED, target_entity = v});
if (v.valid) then
newEntity.connect_neighbour({wire = DEFINES_WIRE_TYPE_RED, target_entity = v});
end
end
for _,v in pairs(wires.green) do
newEntity.connect_neighbour({wire = DEFINES_WIRE_TYPE_GREEN, target_entity = v});
if (v.valid) then
newEntity.connect_neighbour({wire = DEFINES_WIRE_TYPE_GREEN, target_entity = v});
end
end
end
elseif newEntity.backer_name then
@ -634,6 +667,18 @@ local function onRocketLaunch(event)
end
end
local function onTriggerEntityCreated(event)
local entity = event.entity
if entity.valid and (entity.name == "drain-trigger-rampant") then
local chunk = getChunkByPosition(map, entity.position)
if (chunk ~= SENTINEL_IMPASSABLE_CHUNK) then
map.chunkToDrained[chunk] = event.tick + 60
end
entity.destroy()
end
end
local function onInit()
global.map = {}
global.pendingChunks = {}
@ -660,6 +705,8 @@ script.on_event({defines.events.on_player_built_tile,
script.on_event(defines.events.on_player_used_capsule, onUsedCapsule)
script.on_event(defines.events.on_trigger_created_entity, onTriggerEntityCreated)
script.on_event(defines.events.on_biter_base_built, onEnemyBaseBuild)
script.on_event({defines.events.on_player_mined_entity,
defines.events.on_robot_mined_entity}, onMine)

View File

@ -1,7 +1,7 @@
{
"name" : "Rampant",
"factorio_version" : "0.16",
"version" : "0.16.40",
"version" : "0.16.41",
"title" : "Rampant",
"author" : "Veden",
"homepage" : "https://forums.factorio.com/viewtopic.php?f=94&t=31445",

View File

@ -537,13 +537,19 @@ function chunkUtils.makeImmortalEntity(surface, entity)
force=repairForce})
if wires then
for _,v in pairs(wires.copper) do
newEntity.connect_neighbour(v);
if (v.valid) then
newEntity.connect_neighbour(v);
end
end
for _,v in pairs(wires.red) do
newEntity.connect_neighbour({wire = DEFINES_WIRE_TYPE_RED, target_entity = v});
if (v.valid) then
newEntity.connect_neighbour({wire = DEFINES_WIRE_TYPE_RED, target_entity = v});
end
end
for _,v in pairs(wires.green) do
newEntity.connect_neighbour({wire = DEFINES_WIRE_TYPE_GREEN, target_entity = v});
if (v.valid) then
newEntity.connect_neighbour({wire = DEFINES_WIRE_TYPE_GREEN, target_entity = v});
end
end
end

View File

@ -27,6 +27,7 @@ constants.VERSION_57 = 57
constants.VERSION_72 = 72
constants.VERSION_73 = 73
constants.VERSION_75 = 75
constants.VERSION_76 = 76
-- misc

View File

@ -257,6 +257,7 @@ function mapProcessor.scanMap(map, surface, natives, tick)
local rallys = map.chunkToRallys
local spawners = map.chunkToSpawner
local settlers = map.chunkToSettler
local drained = map.chunkToDrained
local processQueue = map.processQueue
local endIndex = mMin(index + SCAN_QUEUE_SIZE, #processQueue)
@ -290,6 +291,11 @@ function mapProcessor.scanMap(map, surface, natives, tick)
settlers[chunk] = nil
end
local drainTick = drained[chunk]
if drainTick and ((tick - drainTick) > 0) then
drained[chunk] = nil
end
local closeBy = findNearbySquad(map, chunk, chunk)
if closeBy then

View File

@ -10,6 +10,7 @@ crystal-v8-drain-rampant=Power Draining Crystal
crystal-v9-drain-rampant=Power Draining Crystal
crystal-v10-drain-rampant=Power Draining Crystal
crystal-drain-pole-rampant=Crystal Pylon
pylon-target-rampant=Crystal Pylon
neutral-biter-v1-t1-rampant=Neutral biter: Larva class
neutral-spitter-v1-t1-rampant=Neutral spitter: Larva class

View File

@ -83,19 +83,19 @@ function electric.addFaction()
{
unit = {
{
type = "attribute",
name = "health",
[1] = 10,
[2] = 50,
[3] = 200,
[4] = 350,
[5] = 750,
[6] = 1000,
[7] = 1500,
[8] = 2500,
[9] = 4500,
[10] = 7000
},
type = "attribute",
name = "health",
[1] = 10,
[2] = 50,
[3] = 200,
[4] = 350,
[5] = 1250,
[6] = 2250,
[7] = 3250,
[8] = 6500,
[9] = 12500,
[10] = 25000
},
{
type = "attack",
@ -142,6 +142,21 @@ function electric.addFaction()
[10] = 24
},
{
type = "attack",
name = "damage",
[1] = 6,
[2] = 10,
[3] = 15,
[4] = 20,
[5] = 30,
[6] = 45,
[7] = 60,
[8] = 75,
[9] = 90,
[10] = 150
},
{
type = "resistance",
name = "electric",

View File

@ -62,7 +62,26 @@ function energyThief.addFaction()
},
loot = biterLoot,
attack = {
damageType = "electric"
damageType = "electric",
actions = function(attributes, electricBeam)
return
{
{
type = "instant",
target_effects =
{
type = "create-entity",
trigger_created_entity = true,
entity_name = "drain-trigger-rampant"
}
},
{
type = "beam",
beam = electricBeam or "electric-beam",
duration = attributes.duration or 20
}
}
end
},
resistances = {},
@ -85,33 +104,33 @@ function energyThief.addFaction()
{
unit = {
{
type = "attribute",
name = "health",
[1] = 10,
[2] = 50,
[3] = 200,
[4] = 350,
[5] = 750,
[6] = 1000,
[7] = 1500,
[8] = 2500,
[9] = 4500,
[10] = 7000
},
type = "attribute",
name = "health",
[1] = 10,
[2] = 50,
[3] = 200,
[4] = 350,
[5] = 1250,
[6] = 2250,
[7] = 3250,
[8] = 6500,
[9] = 12500,
[10] = 25000
},
{
type = "attack",
name = "width",
[1] = 1.5,
[2] = 1.5,
[3] = 1.6,
[4] = 1.6,
[5] = 1.7,
[6] = 1.7,
[7] = 1.8,
[8] = 1.8,
[9] = 1.9,
[10] = 1.9
[1] = 1,
[2] = 1,
[3] = 1.2,
[4] = 1.2,
[5] = 1.3,
[6] = 1.3,
[7] = 1.4,
[8] = 1.4,
[9] = 1.5,
[10] = 1.5
},
{
@ -129,6 +148,21 @@ function energyThief.addFaction()
[10] = 24
},
{
type = "attack",
name = "damage",
[1] = 4,
[2] = 8,
[3] = 15,
[4] = 20,
[5] = 25,
[6] = 35,
[7] = 50,
[8] = 65,
[9] = 80,
[10] = 140
},
{
type = "attack",
name = "duration",
@ -205,16 +239,16 @@ function energyThief.addFaction()
{
type = "attack",
name = "range",
[1] = 11,
[2] = 11,
[3] = 12,
[4] = 12,
[5] = 13,
[6] = 13,
[7] = 14,
[8] = 14,
[9] = 15,
[10] = 15
[1] = 9,
[2] = 9,
[3] = 10,
[4] = 10,
[5] = 11,
[6] = 11,
[7] = 12,
[8] = 12,
[9] = 13,
[10] = 13
}
},
@ -461,6 +495,43 @@ function energyThief.addFaction()
)
data:extend({
{
type = "simple-entity-with-force",
name = "drain-trigger-rampant",
render_layer = "object",
icon = "__base__/graphics/icons/steel-chest.png",
icon_size = 32,
flags = {"placeable-neutral", "player-creation"},
order = "s-e-w-f",
minable = {mining_time = 1, result = "drain-trigger-rampant"},
max_health = 100,
selectable_in_game = false,
corpse = "small-remnants",
collision_box = {{-0.35, -0.35}, {0.35, 0.35}},
selection_box = {{-0.5, -0.5}, {0.5, 0.5}},
picture =
{
filename = "__core__/graphics/empty.png",
priority = "extra-high",
width = 46,
height = 33,
shift = {0.25, 0.015625}
}
},
{
type = "item",
name = "drain-trigger-rampant",
icon = "__Rampant__/graphics/icons/thief/crystal-drain.png",
icon_size = 32,
hidden = true,
flags = {"goes-to-quickbar"},
subgroup = "energy",
order = "e[accumulator]-a[accumulator]",
place_result = "drain-trigger-rampant",
stack_size = 50
},
{
type = "item",
name = "crystal-drain-pole-rampant",
@ -479,23 +550,28 @@ function energyThief.addFaction()
icon = "__Rampant__/graphics/icons/thief/crystal-drain.png",
icon_size = 32,
flags = {},
selectable_in_game = false,
minable = {hardness = 0.2, mining_time = 0.5, result = "big-electric-pole"},
max_health = 150,
max_health = 750,
healing_per_tick = 0.02,
corpse = "medium-remnants",
resistances =
{
{
type = "physical",
percent = 25
},
{
type = "fire",
percent = 100
percent = 85
},
{
type = "electric",
percent = 100
percent = 95
},
{
type = "laser",
percent = 100
percent = 90
}
},
collision_box = {{-0.55, -0.55}, {0.55, 0.55}},
@ -582,12 +658,80 @@ function energyThief.addFaction()
}
})
local chest = util.table.deepcopy(data.raw["radar"]["radar"])
chest.name = "pylon-target-rampant"
chest.icon = "__Rampant__/graphics/icons/thief/crystal-drain.png"
chest.flags = {"not-repairable", "not-on-map"}
chest.pictures = {
layers={
{
filename = "__core__/graphics/empty.png",
priority = "low",
width = 46,
height = 49,
direction_count = 1,
line_length = 1,
shift = {0.1875, -0.2}
}
}}
chest.max_health = 750
chest.resistances =
{
{
type = "physical",
percent = 25
},
{
type = "fire",
percent = 85
},
{
type = "electric",
percent = 95
},
{
type = "laser",
percent = 90
}
}
chest.energy_usage = "500kW"
-- chest.collision_mask = {}
chest.collision_box = nil
chest.selection_box = {{-0.55, -0.55}, {0.55, 0.55}}
chest.minable.result = "pylon-target-rampant"
chest.working_sound = {
sound = {
{
filename = "__base__/sound/accumulator-working.ogg"
}
},
apparent_volume = 2,
}
data:extend({
chest,
{
type = "item",
name = "pylon-target-rampant",
icon = "__Rampant__/graphics/icons/thief/crystal-drain.png",
icon_size = 32,
flags = {"goes-to-quickbar"},
subgroup = "storage",
hidden = true,
order = "a[items]-h[steel-collector]",
place_result = "pylon-target-rampant",
stack_size = 50
}
})
for i=1,10 do
local drainCrystalAttributes = {
name = "crystal-v" .. i,
drain = i * 300 .. "kW",
drain = i * 1.3 .. "MW",
scale = (i * 0.1) + 0.5,
health = 100 * i
health = 400 * i
}
makeDrainCrystal(drainCrystalAttributes)

View File

@ -70,7 +70,7 @@ function nuclear.addFaction()
name = "nuclear-biter-nest",
loot = spawnerLoot,
attributes = {},
attributes = {},
resistances = {},
tint = {r=0.76, g=0.76, b=0, a=0.65}
}
@ -90,11 +90,11 @@ function nuclear.addFaction()
[6] = 350,
[7] = 750,
[8] = 1500,
[9] = 3000,
[10] = 5000
[9] = 5000,
[10] = 10000
},
{
{
type = "attribute",
name = "spawningTimeModifer",
[1] = 0,
@ -106,10 +106,10 @@ function nuclear.addFaction()
[7] = 6,
[8] = 6,
[9] = 8,
[10] = 8
[10] = 8
},
{
{
type = "attack",
mapping = "explosion",
[1] = "explosion",
@ -121,10 +121,10 @@ function nuclear.addFaction()
[7] = "massive-explosion",
[8] = "massive-explosion",
[9] = "massive-explosion",
[10] = "massive-explosion"
[10] = "massive-explosion"
},
{
{
type = "attack",
name = "radius",
[1] = 5,
@ -136,10 +136,10 @@ function nuclear.addFaction()
[7] = 16,
[8] = 18,
[9] = 18,
[10] = 20
[10] = 20
},
{
{
type = "attack",
name = "repeatCount",
[1] = 150,
@ -153,8 +153,8 @@ function nuclear.addFaction()
[9] = 550,
[10] = 600
},
{
{
type = "attack",
name = "damage",
[1] = 50,
@ -166,10 +166,10 @@ function nuclear.addFaction()
[7] = 140,
[8] = 150,
[9] = 180,
[10] = 200
},
[10] = 200
},
{
{
type = "attribute",
name = "movement",
[1] = 0.23,
@ -228,11 +228,11 @@ function nuclear.addFaction()
}
}
},
unitSpawner = {
unitSpawner = {
{
type = "attribute",
name = "spawingCooldownStart",
[1] = 330,
@ -244,11 +244,11 @@ function nuclear.addFaction()
[7] = 315,
[8] = 315,
[9] = 310,
[10] = 310
[10] = 310
},
{
type = "attribute",
name = "spawingCooldownEnd",
[1] = 120,
@ -263,7 +263,7 @@ function nuclear.addFaction()
[10] = 100
},
{
{
type = "attribute",
name = "evolutionRequirement",
[1] = 0,
@ -275,10 +275,10 @@ function nuclear.addFaction()
[7] = 0.6,
[8] = 0.7,
[9] = 0.8,
[10] = 0.9
[10] = 0.9
},
{
{
type = "attribute",
name = "unitsOwned",
[1] = 1,
@ -290,10 +290,10 @@ function nuclear.addFaction()
[7] = 5,
[8] = 6,
[9] = 6,
[10] = 6
[10] = 6
},
{
{
type = "attribute",
name = "unitsToSpawn",
[1] = 1,
@ -412,7 +412,7 @@ function nuclear.addFaction()
type = "create-sticker",
sticker = attributes.name .. "-sticker-rampant"
}
}
}
end,
softSmokeName = softSmoke
},
@ -425,8 +425,8 @@ function nuclear.addFaction()
},
{
{
{
type = "attack",
name = "stickerMovementModifier",
[1] = 0.8,
@ -440,8 +440,8 @@ function nuclear.addFaction()
[9] = 0.4,
[10] = 0.4
},
{
{
type = "attack",
name = "stickerDuration",
[1] = 1800,
@ -454,7 +454,7 @@ function nuclear.addFaction()
[8] = 2100,
[9] = 2200,
[10] = 2200
},
},
{
type = "resistance",

View File

@ -105,12 +105,12 @@ function physical.addFaction()
[2] = 150,
[3] = 300,
[4] = 500,
[5] = 800,
[6] = 1500,
[7] = 3000,
[8] = 6000,
[9] = 10000,
[10] = 20000
[5] = 1500,
[6] = 3000,
[7] = 5000,
[8] = 12000,
[9] = 20000,
[10] = 40000
},
{

View File

@ -581,9 +581,9 @@ function spawner.addFaction()
[5] = 75,
[6] = 90,
[7] = 110,
[8] = 145,
[9] = 165,
[10] = 180
[8] = 250,
[9] = 500,
[10] = 1000
}
},

View File

@ -77,6 +77,7 @@ function suicide.addFaction()
{
unit = {
{
type = "attribute",
name = "health",
[1] = 7,
@ -87,8 +88,8 @@ function suicide.addFaction()
[6] = 350,
[7] = 750,
[8] = 1500,
[9] = 3000,
[10] = 5000
[9] = 5000,
[10] = 10000
},
{

View File

@ -286,12 +286,12 @@ local function addUnitDefaults(template, upgrades)
[2] = 75,
[3] = 150,
[4] = 250,
[5] = 400,
[6] = 750,
[7] = 1500,
[8] = 3000,
[9] = 5000,
[10] = 10000
[5] = 1000,
[6] = 2000,
[7] = 3500,
[8] = 7500,
[9] = 15000,
[10] = 30000
})
pushUpgrade(upgrades,
@ -367,12 +367,12 @@ local function addUnitDefaults(template, upgrades)
[2] = 50,
[3] = 200,
[4] = 350,
[5] = 750,
[6] = 1000,
[7] = 1500,
[8] = 2500,
[9] = 4500,
[10] = 7000
[5] = 1250,
[6] = 2250,
[7] = 3250,
[8] = 6500,
[9] = 12500,
[10] = 25000
})
pushUpgrade(upgrades,
@ -582,12 +582,12 @@ local function addUnitSpawnerDefaults(template, upgrades)
[2] = 500,
[3] = 750,
[4] = 1500,
[5] = 2500,
[6] = 3500,
[7] = 5000,
[8] = 7000,
[9] = 10000,
[10] = 15000
[5] = 3500,
[6] = 7500,
[7] = 11000,
[8] = 20000,
[9] = 30000,
[10] = 45000
})
pushUpgrade(upgrades,
@ -1014,12 +1014,12 @@ local function addWormDefaults(template, upgrades)
[2] = 350,
[3] = 500,
[4] = 750,
[5] = 900,
[6] = 1000,
[7] = 1500,
[8] = 3000,
[9] = 5000,
[10] = 9000
[5] = 2000,
[6] = 3500,
[7] = 7500,
[8] = 12000,
[9] = 20000,
[10] = 25000
})
end

View File

@ -101,12 +101,12 @@ function troll.addFaction()
[2] = 150,
[3] = 300,
[4] = 500,
[5] = 800,
[6] = 1500,
[7] = 3000,
[8] = 6000,
[9] = 10000,
[10] = 20000
[5] = 1500,
[6] = 3000,
[7] = 5000,
[8] = 12000,
[9] = 20000,
[10] = 40000
},
{

View File

@ -125,11 +125,11 @@ function biterFunctions.makeBiter(name, biterAttributes, biterAttack, biterResis
subgroup="enemies",
healing_per_tick = biterAttributes.healing,
resistances = resistances,
collision_box = {{-0.4 * biterAttributes.scale, -0.4 * biterAttributes.scale},
collision_box = {{-0.4 * biterAttributes.scale, -0.4 * biterAttributes.scale},
{0.4 * biterAttributes.scale, 0.4 * biterAttributes.scale}},
selection_box = {{-0.7 * biterAttributes.scale, -1.5 * biterAttributes.scale},
selection_box = {{-0.7 * biterAttributes.scale, -1.5 * biterAttributes.scale},
{0.7 * biterAttributes.scale, 0.3 * biterAttributes.scale}},
sticker_box = {{-0.6 * biterAttributes.scale, -0.8 * biterAttributes.scale},
sticker_box = {{-0.6 * biterAttributes.scale, -0.8 * biterAttributes.scale},
{0.6 * biterAttributes.scale, 0}},
attack_parameters = biterAttack,
vision_distance = biterAttributes.vision or 30,
@ -165,11 +165,11 @@ function biterFunctions.makeSpitter(name, biterAttributes, biterAttack, biterRes
subgroup="enemies",
healing_per_tick = biterAttributes.healing,
resistances = resistances,
collision_box = {{-0.4 * biterAttributes.scale, -0.4 * biterAttributes.scale},
collision_box = {{-0.4 * biterAttributes.scale, -0.4 * biterAttributes.scale},
{0.4 * biterAttributes.scale, 0.4 * biterAttributes.scale}},
selection_box = {{-0.7 * biterAttributes.scale, -1.5 * biterAttributes.scale},
selection_box = {{-0.7 * biterAttributes.scale, -1.5 * biterAttributes.scale},
{0.7 * biterAttributes.scale, 0.3 * biterAttributes.scale}},
sticker_box = {{-0.6 * biterAttributes.scale, -0.8 * biterAttributes.scale},
sticker_box = {{-0.6 * biterAttributes.scale, -0.8 * biterAttributes.scale},
{0.6 * biterAttributes.scale, 0}},
attack_parameters = biterAttack,
loot = biterAttributes.loot,
@ -265,7 +265,7 @@ function biterFunctions.makeWorm(name, attributes, attack, wormResistances)
v.type = k
resistances[#resistances+1] = v
end
-- print(name .. " " .. attributes.health)
-- print(name .. " " .. attributes.health)
local o = {
type = "turret",
name = name .. "-rampant",
@ -318,13 +318,13 @@ function biterFunctions.createSuicideAttack(attributes, blastWave)
range = attributes.range or 0.5,
cooldown = attributes.cooldown or 35,
ammo_category = "melee",
ammo_type = {
ammo_type = {
category = "biological"
},
sound = make_biter_roars(0.5),
animation = biterattackanimation(attributes.scale, attributes.tint1, attributes.tint2)
}
if attributes.nuclear then
o.ammo_type.action = {
type = "direct",
@ -402,7 +402,7 @@ function biterFunctions.createSuicideAttack(attributes, blastWave)
{
type = "damage",
damage = {
amount = attributes.damage,
amount = attributes.damage,
type = attributes.damageType or "explosion"
}
},
@ -416,7 +416,7 @@ function biterFunctions.createSuicideAttack(attributes, blastWave)
check_buildability = true
}
}
},
},
{
@ -449,7 +449,7 @@ function biterFunctions.createSuicideAttack(attributes, blastWave)
{
type = "damage",
damage = {
amount = attributes.damage,
amount = attributes.damage,
type = attributes.damageType or "explosion"
}
}
@ -460,9 +460,9 @@ function biterFunctions.createSuicideAttack(attributes, blastWave)
}
}
}
}
end
return o
end
@ -476,7 +476,7 @@ function biterFunctions.makeWormAlienLootTable(name)
local artifacts = (a and a.value) or (b and b.value) or d
local c = settings.startup["bobmods-enemies-enablenewartifacts"]
local newArtifacts = c and c.value
if newArtifacts and name then
biterLoot = {
[1] = { item = "alien-artifact-" .. name, count_min = 1, count_max = 1, probability = 0.5 },
@ -504,7 +504,7 @@ function biterFunctions.makeWormAlienLootTable(name)
[10] = { item = "alien-artifact", count_min = 3, count_max = 4, probability = 0.75 }
}
end
return biterLoot
end
@ -516,7 +516,7 @@ function biterFunctions.makeSpawnerAlienLootTable(name)
local artifacts = (a and a.value) or (b and b.value) or d
local c = settings.startup["bobmods-enemies-enablenewartifacts"]
local newArtifacts = c and c.value
if newArtifacts and name then
biterLoot = {
[1] = { item = "alien-artifact-" .. name, count_min = 1, count_max = 1, probability = 0.5 },
@ -544,7 +544,7 @@ function biterFunctions.makeSpawnerAlienLootTable(name)
[10] = { item = "alien-artifact", count_min = 3, count_max = 7, probability = 0.75 }
}
end
return biterLoot
end
@ -598,7 +598,7 @@ function biterFunctions.makeUnitAlienLootTable(name)
[10] = { item = "alien-artifact", count_min = 3, count_max = 7, probability = 0.75 }
}
end
return biterLoot
end
@ -655,7 +655,7 @@ function biterFunctions.createElectricAttack(attributes, electricBeam, animation
type = "line",
range = (attributes.range and (attributes.range + 2)) or 15,
width = attributes.width or 0.5,
action_delivery =
action_delivery = (attributes.actions and attributes.actions(attributes, electricBeam)) or
{
type = "beam",
beam = electricBeam or "electric-beam",
@ -775,14 +775,14 @@ function biterFunctions.createStreamAttack(attributes, fireAttack, animation)
cooldown = attributes.cooldown,
range = attributes.range,
min_range = attributes.minRange,
turn_range = attributes.turnRange,
fire_penalty = attributes.firePenalty,
warmup = attributes.warmup or 0,
damage_modifier = attributes.damageModifier or 1.0,
gun_barrel_length = 2 * attributes.scale,
gun_center_shift = {
north = {0, -0.65 * attributes.scale},
@ -804,7 +804,7 @@ function biterFunctions.createStreamAttack(attributes, fireAttack, animation)
}
}
},
cyclic_sound =
{
begin_sound = biterFunctions.biterAttackSounds(),
@ -824,7 +824,7 @@ function biterFunctions.createStreamAttack(attributes, fireAttack, animation)
}
},
animation = animation
}
}
return attack
end

View File

@ -7,78 +7,82 @@ function thiefUtils.makeDrainCrystal(attributes)
local itemName = attributes.name .. "-item-drain-rampant"
data:extend({
{
type = "item",
name = itemName,
icon = "__Rampant__/graphics/icons/thief/crystal-drain.png",
icon_size = 32,
flags = {"goes-to-quickbar"},
subgroup = "energy",
order = "e[accumulator]-a[accumulator]",
place_result = name,
stack_size = 50
},
{
type = "item",
name = itemName,
icon = "__Rampant__/graphics/icons/thief/crystal-drain.png",
icon_size = 32,
flags = {"goes-to-quickbar"},
subgroup = "energy",
order = "e[accumulator]-a[accumulator]",
place_result = name,
stack_size = 50
},
{
type = "radar",
name = name,
icon = "__Rampant__/graphics/icons/thief/crystal-drain.png",
icon_size = 32,
flags = {"placeable-enemy"},
minable = {hardness = 0.2, mining_time = 0.5, result = itemName},
max_health = attributes.health or 500,
corpse = "small-remnants",
collision_box = {{-0.9 * attributes.scale, -0.9 * attributes.scale}, {0.9 * attributes.scale, 0.9 * attributes.scale}},
selection_box = {{-1.1 * attributes.scale, -1.1 * attributes.scale}, {1.1 * attributes.scale, 1.1 * attributes.scale}},
energy_per_sector = "100MJ",
max_distance_of_sector_revealed = 0,
max_distance_of_nearby_sector_revealed = 0,
energy_per_nearby_scan = "750kJ",
resistances = {
{
type = "fire",
percent = 100
},
{
type = "electric",
percent = 100
},
{
type = "laser",
percent = 100
}
{
type = "radar",
name = name,
icon = "__Rampant__/graphics/icons/thief/crystal-drain.png",
icon_size = 32,
flags = {"placeable-enemy"},
minable = {hardness = 0.2, mining_time = 0.5, result = itemName},
max_health = attributes.health or 500,
corpse = "small-remnants",
collision_box = {{-0.9 * attributes.scale, -0.9 * attributes.scale}, {0.9 * attributes.scale, 0.9 * attributes.scale}},
selection_box = {{-1.1 * attributes.scale, -1.1 * attributes.scale}, {1.1 * attributes.scale, 1.1 * attributes.scale}},
energy_per_sector = "100MJ",
max_distance_of_sector_revealed = 0,
max_distance_of_nearby_sector_revealed = 0,
energy_per_nearby_scan = "750kJ",
resistances = {
{
type = "physical",
percent = 25
},
energy_source =
{
type = "electric",
usage_priority = "primary-input"
{
type = "fire",
percent = 85
},
{
type = "electric",
percent = 95
},
{
type = "laser",
percent = 90
}
},
energy_source =
{
type = "electric",
usage_priority = "primary-input"
},
energy_usage = attributes.drain or "500kW",
pictures =
{
filename = "__Rampant__/graphics/entities/thief/crystal-drain.png",
priority = "low",
width = 128,
height = 128,
scale = attributes.scale,
apply_projection = false,
direction_count = 32,
animation_speed = 0.5,
line_length = 8,
shift = {0.65, 0}
},
vehicle_impact_sound = { filename = "__base__/sound/car-metal-impact.ogg", volume = 0.65 },
working_sound =
{
sound = {
{
filename = "__base__/sound/accumulator-working.ogg"
}
},
energy_usage = attributes.drain or "500kW",
pictures =
{
filename = "__Rampant__/graphics/entities/thief/crystal-drain.png",
priority = "low",
width = 128,
height = 128,
scale = attributes.scale,
apply_projection = false,
direction_count = 32,
animation_speed = 0.5,
line_length = 8,
shift = {0.65, 0}
},
vehicle_impact_sound = { filename = "__base__/sound/car-metal-impact.ogg", volume = 0.65 },
working_sound =
{
sound = {
{
filename = "__base__/sound/accumulator-working.ogg"
}
},
apparent_volume = 2,
},
radius_minimap_visualisation_color = { r = 0.059, g = 0.092, b = 0.8, a = 0.275 },
}
apparent_volume = 2,
},
radius_minimap_visualisation_color = { r = 0.059, g = 0.092, b = 0.8, a = 0.275 },
}
})
return
end