mirror of
https://github.com/Refactorio/RedMew.git
synced 2024-12-12 10:04:40 +02:00
balance changes
This commit is contained in:
parent
79f253143c
commit
07c7ad5ea2
@ -17,6 +17,8 @@ ScenarioInfo.add_map_extra_info(
|
||||
'- Outposts have enemy turrets defending them.\n- Outposts have loot and provide a steady stream of resources.\n- Outpost markets with different resources and at prices.\n- Capturing outposts increases evolution.\n- Reduced damage by all player weapons, turrets, and ammo.\n- Biters have more health and deal more damage.\n- Biters and spitters spawn on death of entities.'
|
||||
)
|
||||
|
||||
global.config.fish_market.enabled = false
|
||||
|
||||
-- leave seeds nil to have them filled in based on teh map seed.
|
||||
local outpost_seed = nil --91000
|
||||
local ore_seed = nil --92000
|
||||
@ -282,7 +284,7 @@ local function init()
|
||||
local start_patch = b.circle(9)
|
||||
local start_iron_patch =
|
||||
b.resource(
|
||||
b.translate(start_patch, -26, -26),
|
||||
b.translate(start_patch, -30, -30),
|
||||
'iron-ore',
|
||||
function()
|
||||
return 1500
|
||||
@ -290,7 +292,7 @@ local function init()
|
||||
)
|
||||
local start_copper_patch =
|
||||
b.resource(
|
||||
b.translate(start_patch, 26, -26),
|
||||
b.translate(start_patch, 30, -30),
|
||||
'copper-ore',
|
||||
function()
|
||||
return 1200
|
||||
@ -298,7 +300,7 @@ local function init()
|
||||
)
|
||||
local start_stone_patch =
|
||||
b.resource(
|
||||
b.translate(start_patch, 26, 26),
|
||||
b.translate(start_patch, 30, 30),
|
||||
'stone',
|
||||
function()
|
||||
return 900
|
||||
@ -306,7 +308,7 @@ local function init()
|
||||
)
|
||||
local start_coal_patch =
|
||||
b.resource(
|
||||
b.translate(start_patch, -26, 26),
|
||||
b.translate(start_patch, -30, 30),
|
||||
'coal',
|
||||
function()
|
||||
return 1350
|
||||
@ -730,7 +732,6 @@ Event.add(
|
||||
game.players[event.player_index].character = nil
|
||||
end
|
||||
) ]]
|
||||
|
||||
return function(x, y, world)
|
||||
return map(x, y, world)
|
||||
end
|
||||
|
@ -3,9 +3,11 @@ local Task = require 'utils.task'
|
||||
local Token = require 'utils.token'
|
||||
local Global = require 'utils.global'
|
||||
local Game = require 'utils.game'
|
||||
local math = require 'utils.math'
|
||||
|
||||
local random = math.random
|
||||
local set_timeout_in_ticks = Task.set_timeout_in_ticks
|
||||
local ceil = math.ceil
|
||||
|
||||
local no_coin_entity = {}
|
||||
|
||||
@ -25,11 +27,11 @@ local entity_drop_amount = {
|
||||
['big-spitter'] = {low = -2, high = 1},
|
||||
['behemoth-biter'] = {low = 1, high = 1},
|
||||
['behemoth-spitter'] = {low = 1, high = 1}, ]]
|
||||
['biter-spawner'] = {low = 5, high = 15},
|
||||
['spitter-spawner'] = {low = 5, high = 15},
|
||||
['small-worm-turret'] = {low = 2, high = 8},
|
||||
['medium-worm-turret'] = {low = 5, high = 15},
|
||||
['big-worm-turret'] = {low = 10, high = 20}
|
||||
['biter-spawner'] = {low = 8, high = 24},
|
||||
['spitter-spawner'] = {low = 8, high = 24},
|
||||
['small-worm-turret'] = {low = 3, high = 10},
|
||||
['medium-worm-turret'] = {low = 8, high = 24},
|
||||
['big-worm-turret'] = {low = 15, high = 30}
|
||||
}
|
||||
|
||||
local spill_items =
|
||||
@ -44,9 +46,9 @@ local entity_spawn_map = {
|
||||
['medium-biter'] = {name = 'small-biter', count = 2, chance = 1},
|
||||
['big-biter'] = {name = 'medium-biter', count = 2, chance = 1},
|
||||
['behemoth-biter'] = {name = 'big-biter', count = 2, chance = 1},
|
||||
['medium-spitter'] = {name = 'small-worm-turret', count = 1, chance = 0.25},
|
||||
['big-spitter'] = {name = 'medium-worm-turret', count = 1, chance = 0.25},
|
||||
['behemoth-spitter'] = {name = 'big-worm-turret', count = 1, chance = 0.25},
|
||||
['medium-spitter'] = {name = 'small-worm-turret', count = 1, chance = 0.2},
|
||||
['big-spitter'] = {name = 'medium-worm-turret', count = 1, chance = 0.2},
|
||||
['behemoth-spitter'] = {name = 'big-worm-turret', count = 1, chance = 0.2},
|
||||
['biter-spawner'] = {type = 'biter', count = 5, chance = 1},
|
||||
['spitter-spawner'] = {type = 'spitter', count = 5, chance = 1},
|
||||
['stone-furnace'] = {type = 'cause', count = 1, chance = 1},
|
||||
@ -90,6 +92,12 @@ local unit_levels = {
|
||||
}
|
||||
}
|
||||
|
||||
local worms = {
|
||||
['small-worm-turret'] = true,
|
||||
['medium-worm-turret'] = true,
|
||||
['big-worm-turret'] = true
|
||||
}
|
||||
|
||||
local allowed_cause_source = {
|
||||
['small-biter'] = true,
|
||||
['medium-biter'] = true,
|
||||
@ -126,7 +134,11 @@ local spawn_worm =
|
||||
|
||||
local function get_level()
|
||||
local ef = game.forces.enemy.evolution_factor
|
||||
return math.floor(ef * 4) + 1
|
||||
if ef == 0 then
|
||||
return 1
|
||||
else
|
||||
return ceil(ef * 4)
|
||||
end
|
||||
end
|
||||
|
||||
local spawn_units =
|
||||
@ -161,19 +173,15 @@ Event.add(
|
||||
return
|
||||
end
|
||||
|
||||
local force = event.force
|
||||
if force and force == entity.force then
|
||||
return
|
||||
end
|
||||
|
||||
local entity_force = entity.force
|
||||
local entity_name = entity.name
|
||||
|
||||
local factor = turret_evolution_factor[entity_name]
|
||||
if factor then
|
||||
if force.name == 'enemy' then
|
||||
local old = force.evolution_factor
|
||||
if entity_force.name == 'enemy' then
|
||||
local old = entity_force.evolution_factor
|
||||
local new = old + (1 - old) * factor
|
||||
force.evolution_factor = math.min(new, 1)
|
||||
entity_force.evolution_factor = math.min(new, 1)
|
||||
end
|
||||
end
|
||||
|
||||
@ -205,19 +213,31 @@ Event.add(
|
||||
local type = spawn.type
|
||||
if type == 'cause' then
|
||||
local cause = event.cause
|
||||
if not cause or not allowed_cause_source[cause.name] then
|
||||
if not cause then
|
||||
return
|
||||
end
|
||||
name = cause.name
|
||||
if not allowed_cause_source[cause.name] then
|
||||
return
|
||||
end
|
||||
else
|
||||
name = unit_levels[spawn.type][get_level()]
|
||||
name = unit_levels[type][get_level()]
|
||||
end
|
||||
end
|
||||
set_timeout_in_ticks(
|
||||
5,
|
||||
spawn_units,
|
||||
{surface = entity.surface, name = name, position = entity.position, count = spawn.count}
|
||||
)
|
||||
|
||||
if worms[name] then
|
||||
set_timeout_in_ticks(
|
||||
5,
|
||||
spawn_worm,
|
||||
{surface = entity.surface, name = name, position = entity.position}
|
||||
)
|
||||
else
|
||||
set_timeout_in_ticks(
|
||||
5,
|
||||
spawn_units,
|
||||
{surface = entity.surface, name = name, position = entity.position, count = spawn.count}
|
||||
)
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
|
@ -24,7 +24,7 @@ local factory = {
|
||||
callback = ob.magic_item_crafting_callback,
|
||||
data = {
|
||||
recipe = 'piercing-rounds-magazine',
|
||||
output = {min_rate = 1.5 / 60, distance_factor = 1.5 / 60 / 512, item = 'piercing-rounds-magazine'}
|
||||
output = {min_rate = 3 / 60, distance_factor = 2 / 60 / 512, item = 'piercing-rounds-magazine'}
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -26,7 +26,7 @@ local factory = {
|
||||
callback = ob.magic_item_crafting_callback,
|
||||
data = {
|
||||
recipe = 'piercing-rounds-magazine',
|
||||
output = {min_rate = 1 / 60, distance_factor = 1 / 60 / 512, item = 'piercing-rounds-magazine'}
|
||||
output = {min_rate = 2 / 60, distance_factor = 2 / 60 / 512, item = 'piercing-rounds-magazine'}
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -27,7 +27,7 @@ local factory = {
|
||||
callback = ob.magic_item_crafting_callback,
|
||||
data = {
|
||||
recipe = 'firearm-magazine',
|
||||
output = {min_rate = 1 / 60, distance_factor = 1 / 60 / 512, item = 'firearm-magazine'}
|
||||
output = {min_rate = 2 / 60, distance_factor = 2 / 60 / 512, item = 'firearm-magazine'}
|
||||
}
|
||||
}
|
||||
|
||||
@ -35,7 +35,7 @@ local factory_b = {
|
||||
callback = ob.magic_item_crafting_callback,
|
||||
data = {
|
||||
recipe = 'piercing-rounds-magazine',
|
||||
output = {min_rate = 0.5 / 60, distance_factor = 0.5 / 60 / 512, item = 'piercing-rounds-magazine'}
|
||||
output = {min_rate = 1 / 60, distance_factor = 1 / 60 / 512, item = 'piercing-rounds-magazine'}
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user