mirror of
https://github.com/ComfyFactory/ComfyFactorio.git
synced 2025-03-17 20:58:13 +02:00
v1.1.2.1.2
- small adjustments to wave spawning - cannon resistance buffed - biters now deal bonus damage at night (up to a maximum of 10%) - uranium ammo is now properly researchable - modular armor/equipment slightly less rare
This commit is contained in:
parent
3d111a3211
commit
924837e16a
@ -68,18 +68,14 @@ function Public.Tick_actions(tickinterval)
|
||||
|
||||
[16] = Public.tell_biters_near_silo_to_attack_it,
|
||||
[18] = Public.poke_script_groups,
|
||||
[20] = Public.try_rogue_attack,
|
||||
[20] = Public.try_secondary_attack,
|
||||
|
||||
[32] = Public.tell_biters_near_silo_to_attack_it,
|
||||
[34] = Public.poke_script_groups,
|
||||
[36] = Public.try_main_attack,
|
||||
[36] = Public.try_rogue_attack,
|
||||
|
||||
[46] = Public.tell_biters_near_silo_to_attack_it,
|
||||
[48] = Public.poke_script_groups,
|
||||
[50] = Public.try_secondary_attack,
|
||||
|
||||
[56] = Public.poke_inactive_scripted_biters,
|
||||
[58] = Public.create_mail_delivery_biters,
|
||||
[46] = Public.poke_inactive_scripted_biters,
|
||||
[48] = Public.create_mail_delivery_biters,
|
||||
}
|
||||
|
||||
if minute_cycle[(game.tick / 60) % 60] then
|
||||
@ -132,7 +128,7 @@ function Public.wave_size_rng() -- random variance in attack sizes
|
||||
local memory = Memory.get_crew_memory()
|
||||
if memory.overworldx > 0 then
|
||||
local rng1 = Math.random(100)
|
||||
if rng1 <= 74 then
|
||||
if rng1 <= 65 then
|
||||
wave_size_multiplier = 0
|
||||
else
|
||||
local rng2 = Math.random(1000)
|
||||
|
@ -253,12 +253,17 @@ function Public.evolution_per_full_silo_charge()
|
||||
return 0.05 + 0.03 * Common.overworldx()/1000
|
||||
end
|
||||
|
||||
function Public.bonus_damage_to_humans()
|
||||
local ret = 0.025
|
||||
local diff = Common.difficulty_scale()
|
||||
if diff <= 0.7 then ret = 0 end
|
||||
if diff >= 1.3 then ret = 0.050 end
|
||||
return ret
|
||||
-- function Public.bonus_damage_to_humans()
|
||||
-- local ret = 0.025
|
||||
-- local diff = Common.difficulty_scale()
|
||||
-- if diff <= 0.7 then ret = 0 end
|
||||
-- if diff >= 1.3 then ret = 0.050 end
|
||||
-- return ret
|
||||
-- end
|
||||
|
||||
|
||||
function Public.biter_timeofday_bonus_damage(darkness) -- a surface having min_brightness of 0.2 will cap this at 0.8
|
||||
return 0.1 * darkness
|
||||
end
|
||||
|
||||
|
||||
@ -332,7 +337,8 @@ Public.covered_first_appears_at = 40
|
||||
|
||||
Public.starting_fuel = 4000
|
||||
|
||||
Public.silo_max_hp = 8000
|
||||
Public.silo_max_hp = 5000
|
||||
Public.silo_resistance_factor = 7
|
||||
|
||||
function Public.pistol_damage_multiplier() return 2.25 end --2.0 slightly too low, 2.5 causes players to yell at each other for not using pistol
|
||||
|
||||
|
@ -390,10 +390,10 @@ end
|
||||
function Public.surplus_evo_biter_damage_modifier(surplus_evo)
|
||||
return Math.floor(surplus_evo/2*1000)/1000 --is this floor needed?
|
||||
end
|
||||
function Public.surplus_evo_biter_health_fractional_modifier(surplus_evo)
|
||||
return surplus_evo*3
|
||||
-- return Math.floor(surplus_evo*3*1000)/1000
|
||||
end
|
||||
-- function Public.surplus_evo_biter_health_fractional_modifier(surplus_evo)
|
||||
-- return surplus_evo*3
|
||||
-- -- return Math.floor(surplus_evo*3*1000)/1000
|
||||
-- end
|
||||
|
||||
function Public.set_biter_surplus_evo_modifiers()
|
||||
local memory = Memory.get_crew_memory()
|
||||
@ -652,10 +652,11 @@ function Public.spend_stored_resources(to_spend)
|
||||
end
|
||||
|
||||
|
||||
function Public.new_healthbar(text, target_entity, max_health, optional_id, health, size, location_override)
|
||||
function Public.new_healthbar(text, target_entity, max_health, optional_id, health, size, extra_offset, location_override)
|
||||
health = health or max_health
|
||||
size = size or 0.5
|
||||
text = text or false
|
||||
extra_offset = extra_offset or 0
|
||||
location_override = location_override or Memory.get_crew_memory()
|
||||
|
||||
local render1 = rendering.draw_sprite(
|
||||
@ -666,7 +667,7 @@ function Public.new_healthbar(text, target_entity, max_health, optional_id, heal
|
||||
y_scale = size,
|
||||
render_layer = 'light-effect',
|
||||
target = target_entity,
|
||||
target_offset = {0, -2.5},
|
||||
target_offset = {0, -2.5 + extra_offset},
|
||||
surface = target_entity.surface,
|
||||
}
|
||||
)
|
||||
@ -675,10 +676,10 @@ function Public.new_healthbar(text, target_entity, max_health, optional_id, heal
|
||||
render2 = rendering.draw_text(
|
||||
{
|
||||
color = {255, 255, 255},
|
||||
scale = 2,
|
||||
scale = 1.2 + size*2,
|
||||
render_layer = 'light-effect',
|
||||
target = target_entity,
|
||||
target_offset = {0, -4},
|
||||
target_offset = {0, -3.6 - size*0.6 + extra_offset},
|
||||
surface = target_entity.surface,
|
||||
alignment = 'center',
|
||||
}
|
||||
@ -689,6 +690,7 @@ function Public.new_healthbar(text, target_entity, max_health, optional_id, heal
|
||||
health = health,
|
||||
max_health = max_health,
|
||||
size = size,
|
||||
extra_offset = extra_offset,
|
||||
render1 = render1,
|
||||
render2 = render2,
|
||||
id = optional_id,
|
||||
@ -718,7 +720,7 @@ function Public.transfer_healthbar(old_unit_number, new_entity, location_overrid
|
||||
-- memory.healthbars[new_unit_number] = old_healthbar
|
||||
-- end
|
||||
|
||||
Public.new_healthbar(old_healthbar.render2, new_entity, old_healthbar.max_health, old_healthbar.id, old_healthbar.health, old_healthbar.size, location_override)
|
||||
Public.new_healthbar(old_healthbar.render2, new_entity, old_healthbar.max_health, old_healthbar.id, old_healthbar.health, old_healthbar.size, old_healthbar.extra_offset, location_override)
|
||||
|
||||
if rendering.is_valid(old_healthbar.render1) then
|
||||
rendering.destroy(old_healthbar.render1)
|
||||
@ -730,11 +732,11 @@ function Public.transfer_healthbar(old_unit_number, new_entity, location_overrid
|
||||
location_override.healthbars[old_unit_number] = nil
|
||||
end
|
||||
|
||||
function Public.entity_damage_healthbar(entity, damage)
|
||||
local memory = Memory.get_crew_memory()
|
||||
function Public.entity_damage_healthbar(entity, damage, location_override)
|
||||
location_override = location_override or Memory.get_crew_memory()
|
||||
local unit_number = entity.unit_number
|
||||
|
||||
local healthbar = memory.healthbars[unit_number]
|
||||
local healthbar = location_override.healthbars[unit_number]
|
||||
if not healthbar then return 0 end
|
||||
|
||||
local new_health = healthbar.health - damage
|
||||
|
@ -5,8 +5,8 @@ local _inspect = require 'utils.inspect'.inspect
|
||||
local Public = {}
|
||||
|
||||
Public.scenario_id_name = 'pirates'
|
||||
Public.version_string = '1.1.2.1.0'
|
||||
Public.version_float = 1.1210
|
||||
Public.version_string = '1.1.2.1.2'
|
||||
Public.version_float = 1.1212
|
||||
|
||||
Public.blueprint_library_allowed = true
|
||||
Public.blueprint_importing_allowed = true
|
||||
|
@ -746,7 +746,7 @@ function Public.initialise_crew(accepted_proposal)
|
||||
local boat = memory.boat
|
||||
|
||||
for _, e in pairs(memory.boat.cannons_temporary_reference or {}) do
|
||||
Common.new_healthbar(true, e, 2000, nil, e.health, 0.3, memory.boat)
|
||||
Common.new_healthbar(true, e, 2000, nil, e.health, 0.3, -0.1, memory.boat)
|
||||
end
|
||||
|
||||
boat.dockedposition = boat.position
|
||||
@ -850,13 +850,21 @@ function Public.reset_crew_and_enemy_force(id)
|
||||
crew_force.technologies['inserter-capacity-bonus-1'].researched = true --needed to make stack inserters different to fast inserters
|
||||
-- crew_force.technologies['inserter-capacity-bonus-2'].researched = true
|
||||
|
||||
--as prerequisites for uranium ammo and automation 3:
|
||||
crew_force.technologies['speed-module'].researched = true
|
||||
crew_force.technologies['tank'].researched = true
|
||||
crew_force.recipes['speed-module'].enabled = false
|
||||
crew_force.recipes['tank'].enabled = false
|
||||
crew_force.recipes['cannon-shell'].enabled = false
|
||||
crew_force.recipes['explosive-cannon-shell'].enabled = false
|
||||
|
||||
--@TRYING this out:
|
||||
crew_force.technologies['coal-liquefaction'].enabled = true
|
||||
crew_force.technologies['coal-liquefaction'].researched = true
|
||||
|
||||
crew_force.technologies['automobilism'].enabled = false
|
||||
|
||||
-- note: some of these are overwritten after tech researched!!!!!!! like pistol
|
||||
-- note: many of these recipes are overwritten after tech researched!!!!!!! like pistol. check elsewhere in code
|
||||
|
||||
crew_force.recipes['pistol'].enabled = false
|
||||
|
||||
@ -939,8 +947,9 @@ function Public.reset_crew_and_enemy_force(id)
|
||||
crew_force.technologies['stronger-explosives-5'].enabled = false
|
||||
crew_force.technologies['stronger-explosives-6'].enabled = false
|
||||
crew_force.technologies['stronger-explosives-7'].enabled = false
|
||||
-- these require 2000 white sci each:
|
||||
crew_force.technologies['artillery-shell-range-1'].enabled = false --infinite techs
|
||||
-- crew_force.technologies['artillery-shell-speed-1'].enabled = false --infinite techs
|
||||
crew_force.technologies['artillery-shell-speed-1'].enabled = false --infinite techs
|
||||
|
||||
crew_force.technologies['steel-axe'].enabled = false
|
||||
|
||||
@ -949,7 +958,8 @@ function Public.reset_crew_and_enemy_force(id)
|
||||
|
||||
crew_force.technologies['effect-transmission'].enabled = true
|
||||
|
||||
crew_force.technologies['gate'].enabled = false
|
||||
-- exploit?:
|
||||
crew_force.technologies['gate'].enabled = true
|
||||
|
||||
crew_force.technologies['productivity-module-2'].enabled = true
|
||||
crew_force.technologies['productivity-module-3'].enabled = false
|
||||
|
@ -143,7 +143,7 @@ local function protect_special_entities(event)
|
||||
end
|
||||
|
||||
|
||||
local function silo_damage(event)
|
||||
local function damage_to_silo(event)
|
||||
local memory = Memory.get_crew_memory()
|
||||
local entity = event.entity
|
||||
|
||||
@ -152,7 +152,7 @@ local function silo_damage(event)
|
||||
if destination.dynamic_data.rocketsilos and destination.dynamic_data.rocketsilos[1] and destination.dynamic_data.rocketsilos[1].valid and entity == Common.current_destination().dynamic_data.rocketsilos[1] then
|
||||
|
||||
if string.sub(event.cause.force.name, 1, 4) ~= 'crew' then
|
||||
if Common.entity_damage_healthbar(entity, event.original_damage_amount / 4) <= 0 then
|
||||
if Common.entity_damage_healthbar(entity, event.original_damage_amount / Balance.silo_resistance_factor * (1 + Balance.biter_timeofday_bonus_damage(event.cause.surface.darkness))) <= 0 then
|
||||
Public.silo_die()
|
||||
else
|
||||
destination.dynamic_data.rocketsilohp = memory.healthbars[entity.unit_number].health
|
||||
@ -178,10 +178,10 @@ local function damage_to_enemyboat_spawners(event)
|
||||
local damage = event.final_damage_amount
|
||||
local adjusted_damage = damage
|
||||
|
||||
adjusted_damage = adjusted_damage / 3
|
||||
adjusted_damage = adjusted_damage / 2.6
|
||||
|
||||
if event.cause.name == 'artillery-turret' then
|
||||
adjusted_damage = adjusted_damage / 1.8
|
||||
adjusted_damage = adjusted_damage / 2
|
||||
end
|
||||
|
||||
if Common.entity_damage_healthbar(event.entity, adjusted_damage) <= 0 then
|
||||
@ -197,7 +197,6 @@ end
|
||||
local function damage_to_artillery(event)
|
||||
-- local memory = Memory.get_crew_memory()
|
||||
|
||||
if not (event.entity and event.entity.valid and event.entity.name and event.entity.name == 'artillery-turret') then return end
|
||||
if not event.cause then return end
|
||||
if not event.cause.valid then return end
|
||||
if not event.cause.name then return end
|
||||
@ -209,7 +208,7 @@ local function damage_to_artillery(event)
|
||||
-- remove resistances:
|
||||
-- event.entity.health = event.entity.health + event.final_damage_amount - event.original_damage_amount
|
||||
|
||||
if Common.entity_damage_healthbar(event.entity, event.original_damage_amount) <= 0 then
|
||||
if Common.entity_damage_healthbar(event.entity, event.original_damage_amount / 1.5 * (1 + Balance.biter_timeofday_bonus_damage(event.cause.surface.darkness)), Memory.get_crew_memory().boat) <= 0 then
|
||||
event.entity.die()
|
||||
end
|
||||
else
|
||||
@ -266,13 +265,11 @@ end
|
||||
local function damage_to_players_changes(event)
|
||||
local memory = Memory.get_crew_memory()
|
||||
|
||||
if not (event.entity and event.entity.valid and event.entity.name and event.entity.name == 'character') then return end
|
||||
if not event.cause then return end
|
||||
if not event.cause.valid then return end
|
||||
if not event.cause.name then return end
|
||||
|
||||
-- if not (event.cause.name == 'small-biter') or (event.cause.name == 'small-spitter') or (event.cause.name == 'medium-biter') or (event.cause.name == 'medium-spitter') or (event.cause.name == 'big-biter') or (event.cause.name == 'big-spitter') or (event.cause.name == 'behemoth-biter') or (event.cause.name == 'behemoth-spitter') then return end
|
||||
-- if string.sub(event.cause.force.name, 1, 5) ~= 'enemy' then return end --Enemy Forces
|
||||
|
||||
local player_index = event.entity.player.index
|
||||
local class = memory.classes_table and memory.classes_table[player_index]
|
||||
@ -297,11 +294,15 @@ local function damage_to_players_changes(event)
|
||||
if count and count >= 3500 then
|
||||
damage_multiplier = damage_multiplier * 0.18
|
||||
end
|
||||
else
|
||||
damage_multiplier = damage_multiplier * (1 + Balance.bonus_damage_to_humans())
|
||||
-- else
|
||||
-- damage_multiplier = damage_multiplier * (1 + Balance.bonus_damage_to_humans())
|
||||
end
|
||||
end
|
||||
|
||||
if string.sub(event.cause.force.name, 1, 5) == 'enemy' then
|
||||
damage_multiplier = damage_multiplier * (1 + Balance.biter_timeofday_bonus_damage(event.cause.surface.darkness))
|
||||
end --Enemy Forces
|
||||
|
||||
|
||||
if damage_multiplier > 1 then
|
||||
event.entity.health = event.entity.health - event.final_damage_amount * (damage_multiplier - 1)
|
||||
@ -311,6 +312,28 @@ local function damage_to_players_changes(event)
|
||||
end
|
||||
|
||||
|
||||
local function other_enemy_damage_bonuses(event)
|
||||
|
||||
if not event.cause then return end
|
||||
if not event.cause.valid then return end
|
||||
if not event.cause.name then return end
|
||||
if not event.cause.surface then return end
|
||||
if not event.cause.surface.valid then return end
|
||||
|
||||
if event.damage_type.name == 'impact' then return end --avoid circularity
|
||||
|
||||
-- if not (event.cause.name == 'small-biter') or (event.cause.name == 'small-spitter') or (event.cause.name == 'medium-biter') or (event.cause.name == 'medium-spitter') or (event.cause.name == 'big-biter') or (event.cause.name == 'big-spitter') or (event.cause.name == 'behemoth-biter') or (event.cause.name == 'behemoth-spitter') then return end
|
||||
if string.sub(event.cause.force.name, 1, 5) ~= 'enemy' then return end --Enemy Forces
|
||||
|
||||
local bonusDamage = event.final_damage_amount * Balance.biter_timeofday_bonus_damage(event.cause.surface.darkness)
|
||||
|
||||
if bonusDamage > 0 then
|
||||
event.entity.damage(bonusDamage, event.cause.force, 'impact', event.cause)
|
||||
end
|
||||
end
|
||||
|
||||
|
||||
|
||||
local function damage_dealt_by_players_changes(event)
|
||||
local memory = Memory.get_crew_memory()
|
||||
|
||||
@ -455,30 +478,31 @@ end
|
||||
|
||||
|
||||
|
||||
local function damage_to_enemies(event)
|
||||
local memory = Memory.get_crew_memory()
|
||||
-- functions like this need to be rewritten so they play nicely with healthbars:
|
||||
-- local function damage_to_enemies(event)
|
||||
-- local memory = Memory.get_crew_memory()
|
||||
|
||||
if not (event.entity and event.entity.valid and event.entity.force and event.entity.force.valid) then return end
|
||||
-- if not (event.entity and event.entity.valid and event.entity.force and event.entity.force.valid) then return end
|
||||
|
||||
if not string.sub(event.entity.force.name, 1, 5) == 'enemy' then return end
|
||||
local evo = memory.evolution_factor
|
||||
-- if not string.sub(event.entity.force.name, 1, 5) == 'enemy' then return end
|
||||
-- local evo = memory.evolution_factor
|
||||
|
||||
if evo and evo > 1 and event.final_health > 0 then --lethal damage needs to be unaffected, else they never die
|
||||
-- if evo and evo > 1 and event.final_health > 0 then --lethal damage needs to be unaffected, else they never die
|
||||
|
||||
local surplus = evo - 1
|
||||
-- local surplus = evo - 1
|
||||
|
||||
local damage_multiplier = 1/(1 + Common.surplus_evo_biter_health_fractional_modifier(surplus))
|
||||
-- local damage_multiplier = 1/(1 + Common.surplus_evo_biter_health_fractional_modifier(surplus))
|
||||
|
||||
if damage_multiplier < 1 then
|
||||
event.entity.health = event.entity.health + event.final_damage_amount * (1 - damage_multiplier)
|
||||
end
|
||||
end
|
||||
-- if damage_multiplier < 1 then
|
||||
-- event.entity.health = event.entity.health + event.final_damage_amount * (1 - damage_multiplier)
|
||||
-- end
|
||||
-- end
|
||||
|
||||
-- commented out as this is done elsewhere:
|
||||
-- if event.damage_type.name == 'poison' then
|
||||
-- event.entity.health = event.entity.health + event.final_damage_amount
|
||||
-- end
|
||||
end
|
||||
-- -- commented out as this is done elsewhere:
|
||||
-- -- if event.damage_type.name == 'poison' then
|
||||
-- -- event.entity.health = event.entity.health + event.final_damage_amount
|
||||
-- -- end
|
||||
-- end
|
||||
|
||||
|
||||
local function event_on_entity_damaged(event)
|
||||
@ -494,23 +518,33 @@ local function event_on_entity_damaged(event)
|
||||
-- local difficulty = memory.difficulty
|
||||
|
||||
if not event.entity.valid then return end
|
||||
silo_damage(event)
|
||||
|
||||
damage_to_silo(event)
|
||||
damage_to_krakens(event)
|
||||
damage_to_enemyboat_spawners(event)
|
||||
|
||||
if event.entity and event.entity.valid and event.entity.name and event.entity.name == 'artillery-turret' then
|
||||
damage_to_artillery(event)
|
||||
end
|
||||
|
||||
protect_special_entities(event)
|
||||
if not event.entity.valid then return end -- need to call again, silo might be dead
|
||||
|
||||
if not event.entity.valid then return end -- need to call again, healthbar'd object might have been killed by script, so we shouldn't proceed now
|
||||
if not event.entity.health then return end
|
||||
|
||||
damage_to_players_changes(event)
|
||||
if (event.entity and event.entity.valid and event.entity.name and event.entity.name == 'character') then
|
||||
damage_to_players_changes(event)
|
||||
else
|
||||
other_enemy_damage_bonuses(event)
|
||||
end
|
||||
|
||||
damage_to_enemyboat_spawners(event)
|
||||
biters_chew_stuff_faster(event)
|
||||
damage_to_artillery(event)
|
||||
swamp_resist_poison(event)
|
||||
maze_walls_resistance(event)
|
||||
damage_to_krakens(event)
|
||||
|
||||
damage_dealt_by_players_changes(event)
|
||||
|
||||
damage_to_enemies(event)
|
||||
-- damage_to_enemies(event)
|
||||
end
|
||||
|
||||
|
||||
@ -1093,6 +1127,13 @@ local function event_on_research_finished(event)
|
||||
p_force.recipes['slowdown-capsule'].enabled = false
|
||||
p_force.recipes['nuclear-fuel'].enabled = false
|
||||
-- p_force.recipes['rail'].enabled = false
|
||||
p_force.recipes['speed-module'].enabled = false
|
||||
p_force.recipes['tank'].enabled = false
|
||||
p_force.recipes['cannon-shell'].enabled = false
|
||||
p_force.recipes['explosive-cannon-shell'].enabled = false
|
||||
-- and since we can't build tanks anyway, let's disable this for later:
|
||||
p_force.recipes['uranium-cannon-shell'].enabled = false
|
||||
p_force.recipes['explosive-uranium-cannon-shell'].enabled = false
|
||||
end
|
||||
|
||||
local function event_on_player_joined_game(event)
|
||||
|
@ -129,13 +129,15 @@ Public.chest_loot_data_raw = {
|
||||
{2, 0.3, 1.2, true, 'combat-shotgun', 1, 1},
|
||||
{5, 0.2, 1.8, true, 'cluster-grenade', 8, 16},
|
||||
|
||||
{0.04, 0.25, 1.75, true, 'modular-armor', 1, 1},
|
||||
{0.01, 0.5, 1.5, true, 'power-armor', 1, 1},
|
||||
{0.3, 0.1, 1, true, 'solar-panel-equipment', 1, 2},
|
||||
{0.2, 0.1, 1, true, 'battery-equipment', 1, 1},
|
||||
{0.16, 0.2, 1, true, 'energy-shield-equipment', 1, 2},
|
||||
{0.08, 0.1, 1, true, 'night-vision-equipment', 1, 1},
|
||||
{0.04, 0.5, 1.5, true, 'personal-laser-defense-equipment', 1, 1},
|
||||
{0.04, 0.1, 1.9, true, 'modular-armor', 1, 1},
|
||||
{0.01, 0.4, 1.6, true, 'power-armor', 1, 1},
|
||||
{0.001, 0.6, 1.4, true, 'power-armor-mk2', 1, 1},
|
||||
{0.6, 0.05, 2, true, 'solar-panel-equipment', 1, 2},
|
||||
{0.4, 0.05, 2, true, 'battery-equipment', 1, 1},
|
||||
{0.32, 0.05, 2, true, 'energy-shield-equipment', 1, 2},
|
||||
{0.16, 0.05, 1.5, true, 'night-vision-equipment', 1, 1},
|
||||
{0.12, 0.01, 1.8, true, 'personal-laser-defense-equipment', 1, 1},
|
||||
{0.12, 0.01, 1.8, true, 'exoskeleton-equipment', 1, 1},
|
||||
|
||||
{8, -0.5, 0.5, true, 'automation-science-pack', 4, 24},
|
||||
{8, -0.6, 0.6, true, 'logistic-science-pack', 4, 24},
|
||||
@ -366,17 +368,17 @@ Public.maze_treasure_data_raw = {
|
||||
{1, 0, 2, true, 'power-armor', 1, 1},
|
||||
{0.1, 0, 2, true, 'power-armor-mk2', 1, 1},
|
||||
|
||||
{2, -1, 1, true, 'solar-panel-equipment', 3, 4},
|
||||
{2, -1, 1, true, 'battery-equipment', 1, 1},
|
||||
{1, 0, 2, true, 'battery-mk2-equipment', 1, 1},
|
||||
{2, -1, 1, true, 'energy-shield-equipment', 1, 2},
|
||||
{1, 0, 2, true, 'energy-shield-mk2-equipment', 1, 1},
|
||||
{1, -1, 1, true, 'personal-roboport-equipment', 1, 1},
|
||||
{0.5, 0, 2, true, 'personal-roboport-mk2-equipment', 1, 1},
|
||||
{0.5, 0, 0.8, false, 'night-vision-equipment', 1, 1},
|
||||
{1, 0, 1, false, 'personal-laser-defense-equipment', 1, 1},
|
||||
{0.5, 0, 1, false, 'fusion-reactor-equipment', 1, 1},
|
||||
{2, 0, 1, false, 'exoskeleton-equipment', 1, 1},
|
||||
{4, -1, 1, true, 'solar-panel-equipment', 3, 4},
|
||||
{4, -1, 1, true, 'battery-equipment', 1, 1},
|
||||
{2, 0, 2, true, 'battery-mk2-equipment', 1, 1},
|
||||
{4, -1, 1, true, 'energy-shield-equipment', 1, 2},
|
||||
{2, 0, 2, true, 'energy-shield-mk2-equipment', 1, 1},
|
||||
{2, -1, 1, true, 'personal-roboport-equipment', 1, 1},
|
||||
{1, 0, 2, true, 'personal-roboport-mk2-equipment', 1, 1},
|
||||
{1, 0, 0.8, false, 'night-vision-equipment', 1, 1},
|
||||
{2, 0, 1, false, 'personal-laser-defense-equipment', 1, 1},
|
||||
{1, 0, 1, false, 'fusion-reactor-equipment', 1, 1},
|
||||
{4, 0, 1, false, 'exoskeleton-equipment', 1, 1},
|
||||
|
||||
{2, -0.7, 1.3, true, 'advanced-circuit', 40, 90},
|
||||
|
||||
|
@ -79,6 +79,12 @@ function Public.generate_destination_type_and_subtype(overworld_position)
|
||||
if macro_x == 4 then
|
||||
island_subtype_raffle = Utils.ordered_table_with_values_removed(island_subtype_raffle, Surfaces.Island.enum.STANDARD)
|
||||
end
|
||||
if macro_x == 11 then
|
||||
island_subtype_raffle = Utils.ordered_table_with_values_removed(island_subtype_raffle, 'none') --make sure there's an island after kraken
|
||||
end
|
||||
if macro_x == 12 then
|
||||
island_subtype_raffle = Utils.ordered_table_with_values_removed(island_subtype_raffle, 'none') --make sure there's another island after kraken
|
||||
end
|
||||
if macro_x == 18 then
|
||||
island_subtype_raffle = Utils.ordered_table_with_values_removed(island_subtype_raffle, 'none') --flying-robot-frame cost is here, and we just make sure there's an island to see it
|
||||
end
|
||||
@ -140,7 +146,7 @@ function Public.generate_destination_type_and_subtype(overworld_position)
|
||||
-- else
|
||||
-- type = nil
|
||||
-- end
|
||||
elseif macro_x == 11 then --just after krakens, but dock is here too, so there's a choice
|
||||
elseif macro_x == 12 and macro_y < 1 then
|
||||
type = Surfaces.enum.ISLAND
|
||||
subtype = Surfaces.Island.enum.SWAMP
|
||||
elseif macro_x == 16 then
|
||||
|
@ -89,6 +89,10 @@ function Public.parrot_overstay_tip()
|
||||
local memory = Memory.get_crew_memory()
|
||||
Common.parrot_speak(memory.force, 'We\'ve been here quite a while! Check the evo...')
|
||||
end
|
||||
function Public.parrot_nightdamage_tip()
|
||||
local memory = Memory.get_crew_memory()
|
||||
Common.parrot_speak(memory.force, 'Did you know that biters deal more damage at night?')
|
||||
end
|
||||
|
||||
-- function Public.parrot_say_tip()
|
||||
-- local memory = Memory.get_crew_memory()
|
||||
|
@ -44,16 +44,16 @@ function Public.quest_reward()
|
||||
ret = {name = 'iron-plate', count = Math.ceil(2000 * multiplier), display_sprite = '[item=iron-plate]', display_amount = string.format('%.1fk', 2 * multiplier), chat_name = '[item=iron-plate]'}
|
||||
elseif rng <= 0.5 then
|
||||
ret = {name = 'copper-plate', count = Math.ceil(2000 * multiplier), display_sprite = '[item=copper-plate]', display_amount = string.format('%.1fk', 2 * multiplier), chat_name = '[item=copper-plate]'}
|
||||
elseif rng <= 0.7 then
|
||||
elseif rng <= 0.61 then
|
||||
ret = {name = 'solid-fuel', count = Math.ceil(450 * multiplier), display_sprite = '[item=solid-fuel]', display_amount = string.format('%.0f', Math.ceil(450 * multiplier)), chat_name = '[item=solid-fuel]'}
|
||||
elseif rng <= 0.71 then
|
||||
ret = {name = 'modular-armor', count = 1, display_sprite = '[item=modular-armor]', display_amount = '1', chat_name = '[item=modular-armor]'}
|
||||
elseif rng <= 0.8 then
|
||||
elseif rng <= 0.76 then
|
||||
ret = {name = 'piercing-rounds-magazine', count = Math.ceil(250 * multiplier), display_sprite = '[item=piercing-rounds-magazine]', display_amount = string.format('%.0f', Math.ceil(250 * multiplier)), chat_name = '[item=piercing-rounds-magazine]'}
|
||||
elseif rng <= 0.86 then
|
||||
ret = {name = 'steel-plate', count = Math.ceil(380 * multiplier), display_sprite = '[item=steel-plate]', display_amount = string.format('%.0f', 380 * multiplier), chat_name = '[item=steel-plate]'}
|
||||
elseif rng <= 0.9 then
|
||||
elseif rng <= 0.96 then
|
||||
ret = {name = 'raw-fish', count = Math.ceil(450 * (multiplier^(1/2))), display_sprite = '[item=raw-fish]', display_amount = string.format('%.1fk', Math.ceil(0.45 * (multiplier^(1/2)))), chat_name = '[item=raw-fish]'}
|
||||
else
|
||||
ret = {name = 'piercing-rounds-magazine', count = Math.ceil(250 * multiplier), display_sprite = '[item=piercing-rounds-magazine]', display_amount = string.format('%.0f', Math.ceil(250 * multiplier)), chat_name = '[item=piercing-rounds-magazine]'}
|
||||
ret = {name = 'modular-armor', count = 1, display_sprite = '[item=modular-armor]', display_amount = '1', chat_name = '[item=modular-armor]'}
|
||||
end
|
||||
|
||||
return ret
|
||||
|
@ -328,7 +328,7 @@ function Public.spawn_silo_setup()
|
||||
silo.operable = false
|
||||
if i == 1 then
|
||||
silo.auto_launch = true
|
||||
Common.new_healthbar(true, silo, Balance.silo_max_hp, nil, Balance.silo_max_hp, 0.6)
|
||||
Common.new_healthbar(true, silo, Balance.silo_max_hp, nil, Balance.silo_max_hp, 0.6, -2)
|
||||
else
|
||||
silo.destructible = false
|
||||
end
|
||||
@ -399,7 +399,7 @@ function Public.spawn_enemy_boat(type)
|
||||
-- e.destructible = false
|
||||
boat.spawner = e
|
||||
|
||||
Common.new_healthbar(false, e, 350, nil, 350, 0.5)
|
||||
Common.new_healthbar(true, e, 900, nil, 900, 0.5)
|
||||
end
|
||||
|
||||
return enemyboats[#enemyboats]
|
||||
|
@ -254,7 +254,7 @@ function Public.kraken_move(kraken_id, new_p, new_frame)
|
||||
kraken_data.spawner_entity.teleport(new_p_2.x - old_p_2.x, new_p_2.y - old_p_2.y)
|
||||
else
|
||||
kraken_data.spawner_entity = surface.create_entity{name = 'biter-spawner', position = new_p_2, force = memory.enemy_force_name}
|
||||
Common.new_healthbar(true, kraken_data.spawner_entity, kraken_data.max_health, kraken_id)
|
||||
Common.new_healthbar(true, kraken_data.spawner_entity, kraken_data.max_health, kraken_id, kraken_data.max_health, 0.8)
|
||||
end
|
||||
|
||||
if old_frame then --cleanup old tiles
|
||||
|
@ -227,8 +227,8 @@ function Public.destination_on_collide(destination)
|
||||
|
||||
if memory.overworldx == 40*5 then
|
||||
Parrot.parrot_boats_warning()
|
||||
elseif memory.overworldx == 800 then
|
||||
Parrot.parrot_800_tip()
|
||||
-- elseif memory.overworldx == 800 then
|
||||
-- Parrot.parrot_800_tip()
|
||||
end
|
||||
end
|
||||
|
||||
@ -359,6 +359,10 @@ function Public.destination_on_departure(destination)
|
||||
local memory = Memory.get_crew_memory()
|
||||
-- local boat = memory.boat
|
||||
|
||||
if memory.overworldx == 40*5 then
|
||||
Parrot.parrot_nightdamage_tip()
|
||||
end
|
||||
|
||||
if memory.overworldx == 40*9 then
|
||||
Parrot.parrot_kraken_warning()
|
||||
end
|
||||
|
Loading…
x
Reference in New Issue
Block a user