From 629cf0987943a49c35b655855a046847edb08fe9 Mon Sep 17 00:00:00 2001 From: MewMew <=> Date: Mon, 18 Mar 2019 14:23:12 +0100 Subject: [PATCH] things --- maps/biter_battles_v2/bb_map_intro.lua | 9 +++++---- maps/biter_battles_v2/biter_battles_v2.lua | 15 ++++++++------- maps/biter_battles_v2/feeding.lua | 2 +- maps/biter_battles_v2/terrain.lua | 14 ++++++++++++-- maps/labyrinth.lua | 2 +- modules/landfill_reveals_nauvis.lua | 3 ++- 6 files changed, 29 insertions(+), 16 deletions(-) diff --git a/maps/biter_battles_v2/bb_map_intro.lua b/maps/biter_battles_v2/bb_map_intro.lua index b072a239..68fed5c3 100644 --- a/maps/biter_battles_v2/bb_map_intro.lua +++ b/maps/biter_battles_v2/bb_map_intro.lua @@ -7,22 +7,23 @@ local info = [[ Feed the opponent's biters with science packs to increase their strength. High tier science juice will yield stronger results. - There is no major direct pvp combat + There is no major direct pvp combat. The horizontal border river is landfill proof. Construction robots can not build on the other teams's side. + The random map layout is mirrored to provide a fair competition. There is no biter evolution from pollution, time or destruction. ONLY feeding increases their power and will lead to your teams victory. The gui yields two different main stats for each team's biters. - EVO - - The evolution of the biters. + The evolution of the biters, which increases when they get fed. It can go above 100% which unlocks endgame modifiers, granting them increased damage and evasion. - THREAT - - Threat creates biter attacks. - Feeding gives permanent "threat-income", as well as creating instant threat. + Causes biters to attack and reduces when biters are slain. + Feeding gives permanent "threat-income", as well as creating instant threat. A high threat value causes big attacks. Values of zero or below will cause no attacks. ]] diff --git a/maps/biter_battles_v2/biter_battles_v2.lua b/maps/biter_battles_v2/biter_battles_v2.lua index 86bff7ff..8025b704 100644 --- a/maps/biter_battles_v2/biter_battles_v2.lua +++ b/maps/biter_battles_v2/biter_battles_v2.lua @@ -2,20 +2,20 @@ require "on_tick_schedule" require "modules.dynamic_landfill" -require "modules.spawners_contain_biters" +require "modules.spawners_contain_biters" local event = require 'utils.event' local function init_surface() local map_gen_settings = {} - map_gen_settings.water = "0.35" + map_gen_settings.water = "0.3" map_gen_settings.starting_area = "4.25" map_gen_settings.cliff_settings = {cliff_elevation_interval = 12, cliff_elevation_0 = 32} map_gen_settings.autoplace_controls = { - ["coal"] = {frequency = "2", size = "1", richness = "1"}, - ["stone"] = {frequency = "2", size = "1", richness = "1"}, - ["copper-ore"] = {frequency = "2", size = "1", richness = "1"}, - ["iron-ore"] = {frequency = "2", size = "1", richness = "1"}, + ["coal"] = {frequency = "2.5", size = "1", richness = "1"}, + ["stone"] = {frequency = "2.5", size = "1", richness = "1"}, + ["copper-ore"] = {frequency = "2.5", size = "1", richness = "1"}, + ["iron-ore"] = {frequency = "2.5", size = "1", richness = "1"}, ["uranium-ore"] = {frequency = "2", size = "1", richness = "1"}, ["crude-oil"] = {frequency = "3", size = "1", richness = "1"}, ["trees"] = {frequency = "1", size = "0.5", richness = "0.7"}, @@ -176,4 +176,5 @@ event.add(defines.events.on_player_joined_game, on_player_joined_game) require "maps.biter_battles_v2.on_tick" require "maps.biter_battles_v2.terrain" require "maps.biter_battles_v2.chat" -require "maps.biter_battles_v2.bb_map_intro" \ No newline at end of file +require "maps.biter_battles_v2.bb_map_intro" +require "modules.custom_death_messages" \ No newline at end of file diff --git a/maps/biter_battles_v2/feeding.lua b/maps/biter_battles_v2/feeding.lua index a3ede8c5..73ea83d5 100644 --- a/maps/biter_battles_v2/feeding.lua +++ b/maps/biter_battles_v2/feeding.lua @@ -61,7 +61,7 @@ local function feed_biters(player, food) local e = (global.bb_evolution[biter_force_name] * 100) + 1 --local diminishing_modifier = 1 / (10 ^ (e * 0.03)) local diminishing_modifier = (1 / (10 ^ (e * 0.014))) / (e * 0.5) - global.bb_threat_income[biter_force_name] = global.bb_threat_income[biter_force_name] + (food_values[food].value * diminishing_modifier * 15) + global.bb_threat_income[biter_force_name] = global.bb_threat_income[biter_force_name] + (food_values[food].value * diminishing_modifier * 12) ---SET EVOLUTION local e = (game.forces[biter_force_name].evolution_factor * 100) + 1 diff --git a/maps/biter_battles_v2/terrain.lua b/maps/biter_battles_v2/terrain.lua index d87fc8aa..42634ccd 100644 --- a/maps/biter_battles_v2/terrain.lua +++ b/maps/biter_battles_v2/terrain.lua @@ -31,11 +31,20 @@ local function get_noise(name, pos) local noise = {} noise[1] = simplex_noise(pos.x * 0.011, pos.y * 0.011, seed) seed = seed + noise_seed_add - noise[2] = simplex_noise(pos.x * 0.07, pos.y * 0.07, seed) + noise[2] = simplex_noise(pos.x * 0.08, pos.y * 0.08, seed) seed = seed + noise_seed_add local noise = noise[1] + noise[2] * 0.2 return noise end + if name == 3 then + local noise = {} + noise[1] = simplex_noise(pos.x * 0.02, pos.y * 0.02, seed) + seed = seed + noise_seed_add + noise[2] = simplex_noise(pos.x * 0.08, pos.y * 0.08, seed) + seed = seed + noise_seed_add + local noise = noise[1] + noise[2] * 0.1 + return noise + end end local function draw_smoothed_out_ore_circle(position, name, surface, radius, richness) @@ -69,7 +78,8 @@ end local function generate_horizontal_river(surface, pos) if pos.y < -32 then return false end if pos.y > -3 and pos.x > -3 and pos.x < 3 then return false end - if -14 < pos.y + (get_noise(1, pos) * 5) then return true end + --if -14 < pos.y + (get_noise(1, pos) * 5) then return true end + if -12 < pos.y + (get_noise(3, pos) * 6) then return true end return false end diff --git a/maps/labyrinth.lua b/maps/labyrinth.lua index 118a5650..6b2c3e63 100644 --- a/maps/labyrinth.lua +++ b/maps/labyrinth.lua @@ -4,7 +4,7 @@ require "modules.teleporters" require "modules.satellite_score" require "modules.landfill_reveals_nauvis" -local map_functions = require "maps.tools.map_functions" +local map_functions = require "tools.map_functions" local simplex_noise = require 'utils.simplex_noise' simplex_noise = simplex_noise.d2 local event = require 'utils.event' diff --git a/modules/landfill_reveals_nauvis.lua b/modules/landfill_reveals_nauvis.lua index caa4e539..64e995ea 100644 --- a/modules/landfill_reveals_nauvis.lua +++ b/modules/landfill_reveals_nauvis.lua @@ -49,7 +49,8 @@ local function regenerate_decoratives(surface, position) end local function place_entity(surface, e) - if e.type == "resource" then surface.create_entity({name = e.name, position = e.position, amount = e.amount}) return end + if e.type == "resource" then surface.create_entity({name = e.name, position = e.position, amount = e.amount}) return end + if not surface.can_place_entity({name = e.name, position = e.position}) then return end if e.type == "cliff" then surface.create_entity({name = e.name, position = e.position, force = e.force, cliff_orientation = e.cliff_orientation}) return end if e.direction then surface.create_entity({name = e.name, position = e.position, force = e.force, direction = e.direction}) return end surface.create_entity({name = e.name, position = e.position, force = e.force})