You've already forked ComfyFactorio
mirror of
https://github.com/ComfyFactory/ComfyFactorio.git
synced 2025-11-23 22:22:34 +02:00
Minor changes
Buff oil at starter zones for Mtn Add SA spells for RPG Fix enemy health/attack speed boosting
This commit is contained in:
@@ -2435,14 +2435,10 @@ function Public.increase_enemy_damage_and_health()
|
||||
if this.enemies_boosted then
|
||||
return
|
||||
end
|
||||
|
||||
this.enemies_boosted = true
|
||||
|
||||
if this.rounds_survived == 1 then
|
||||
Event.raise(CustomEvents.events.on_biters_evolved, { force = game.forces.enemy, health_increase = true })
|
||||
Event.raise(CustomEvents.events.on_biters_evolved, { force = game.forces.aggressors })
|
||||
Event.raise(CustomEvents.events.on_biters_evolved, { force = game.forces.aggressors_frenzy })
|
||||
else
|
||||
|
||||
if this.rounds_survived > 1 then
|
||||
for _ = 1, this.rounds_survived do
|
||||
Event.raise(CustomEvents.events.on_biters_evolved, { force = game.forces.enemy, health_increase = true })
|
||||
Event.raise(CustomEvents.events.on_biters_evolved, { force = game.forces.aggressors })
|
||||
|
||||
@@ -4802,7 +4802,7 @@ local function zone_forest_1(x, y, data, void_or_lab, adjusted_zones)
|
||||
if small_caves > 0.31 then
|
||||
tiles[#tiles + 1] = { name = 'brown-refined-concrete', position = p }
|
||||
if random(1, 450) == 1 then
|
||||
entities[#entities + 1] = { name = 'crude-oil', position = p, amount = get_oil_amount(p) }
|
||||
entities[#entities + 1] = { name = 'crude-oil', position = p, amount = (get_oil_amount(p) * 5) }
|
||||
end
|
||||
if random(1, 96) == 1 then
|
||||
Biters.wave_defense_set_worm_raffle(abs(p.y) * worm_level_modifier)
|
||||
@@ -4944,7 +4944,7 @@ local function zone_1(x, y, data, void_or_lab, adjusted_zones)
|
||||
if no_rocks < 0.34 and no_rocks > 0.14 then
|
||||
tiles[#tiles + 1] = { name = adjusted_zones.tiles_raffle and adjusted_zones.tiles_raffle[random(1, #adjusted_zones.tiles_raffle)] or 'brown-refined-concrete', position = p }
|
||||
if random(1, 450) == 1 then
|
||||
entities[#entities + 1] = { name = 'crude-oil', position = p, amount = get_oil_amount(p) }
|
||||
entities[#entities + 1] = { name = 'crude-oil', position = p, amount = (get_oil_amount(p) * 5) }
|
||||
end
|
||||
if random(1, 96) == 1 then
|
||||
entities[#entities + 1] =
|
||||
|
||||
@@ -14,6 +14,81 @@ local states =
|
||||
['support'] = 'poison-capsule-smoke'
|
||||
}
|
||||
|
||||
local trees_raffle =
|
||||
{
|
||||
'dry-tree',
|
||||
'tree-01',
|
||||
'tree-02-red',
|
||||
'tree-04',
|
||||
'tree-08-brown'
|
||||
}
|
||||
|
||||
if script.active_mods['space-age'] then
|
||||
trees_raffle =
|
||||
{
|
||||
'stingfrond',
|
||||
'teflilly',
|
||||
'boompuff',
|
||||
'sunnycomb',
|
||||
'lickmaw',
|
||||
'teflilly',
|
||||
'hairyclubnub',
|
||||
'funneltrunk',
|
||||
'slipstack',
|
||||
'cuttlepop',
|
||||
'dry-tree',
|
||||
'tree-01',
|
||||
'tree-02-red',
|
||||
'tree-04',
|
||||
'tree-05',
|
||||
'tree-08-brown'
|
||||
}
|
||||
end
|
||||
|
||||
local rock_raffle =
|
||||
{
|
||||
'big-sand-rock',
|
||||
'big-sand-rock',
|
||||
'big-rock',
|
||||
'big-rock',
|
||||
'big-rock',
|
||||
'big-rock',
|
||||
'big-rock',
|
||||
'big-rock',
|
||||
'big-rock',
|
||||
'big-rock',
|
||||
'huge-rock'
|
||||
}
|
||||
|
||||
if script.active_mods['space-age'] then
|
||||
rock_raffle =
|
||||
{
|
||||
'big-sand-rock',
|
||||
'big-sand-rock',
|
||||
'big-rock',
|
||||
'big-rock',
|
||||
'big-rock',
|
||||
'big-rock',
|
||||
'big-rock',
|
||||
'big-rock',
|
||||
'big-rock',
|
||||
'big-rock',
|
||||
'huge-rock',
|
||||
'big-volcanic-rock',
|
||||
'huge-volcanic-rock',
|
||||
'big-volcanic-rock',
|
||||
'huge-volcanic-rock',
|
||||
'copper-stromatolite',
|
||||
'iron-stromatolite',
|
||||
'copper-stromatolite',
|
||||
'iron-stromatolite',
|
||||
'lithium-iceberg-big',
|
||||
'lithium-iceberg-huge',
|
||||
'lithium-iceberg-big',
|
||||
'lithium-iceberg-huge',
|
||||
}
|
||||
end
|
||||
|
||||
local repeat_sound_token
|
||||
|
||||
local repair_buildings =
|
||||
@@ -279,8 +354,8 @@ local function create_entity(data)
|
||||
Public.set_last_spell_cast(player, position)
|
||||
|
||||
if self.biter then
|
||||
if surface.can_place_entity { name = self.entityName, position = position } then
|
||||
local e = surface.create_entity({ name = self.entityName, position = position, force = force })
|
||||
if surface.can_place_entity { name = self.entity_name, position = position } then
|
||||
local e = surface.create_entity({ name = self.entity_name, position = position, force = force })
|
||||
tame_unit_effects(player, e)
|
||||
Public.remove_mana(player, self.mana_cost)
|
||||
return true
|
||||
@@ -290,16 +365,21 @@ local function create_entity(data)
|
||||
end
|
||||
end
|
||||
|
||||
local entity_name = self.entity_name
|
||||
|
||||
if self.aoe then
|
||||
if self.raffle then
|
||||
entity_name = self.raffle[random(1, #self.raffle)]
|
||||
end
|
||||
local has_cast = false
|
||||
for x = 1, -1, -1 do
|
||||
for y = 1, -1, -1 do
|
||||
local pos = { x = position.x + x, y = position.y + y }
|
||||
if surface.can_place_entity { name = self.entityName, position = pos } then
|
||||
if surface.can_place_entity { name = entity_name, position = pos } then
|
||||
if self.mana_cost > rpg_t.mana then
|
||||
break
|
||||
end
|
||||
local e = surface.create_entity({ name = self.entityName, position = pos, force = force })
|
||||
local e = surface.create_entity({ name = entity_name, position = pos, force = force })
|
||||
has_cast = true
|
||||
e.direction = player.character.direction
|
||||
Public.remove_mana(player, self.mana_cost)
|
||||
@@ -314,8 +394,8 @@ local function create_entity(data)
|
||||
return false
|
||||
end
|
||||
else
|
||||
if surface.can_place_entity { name = self.entityName, position = position } then
|
||||
local e = surface.create_entity({ name = self.entityName, position = position, force = force })
|
||||
if surface.can_place_entity { name = self.entity_name, position = position } then
|
||||
local e = surface.create_entity({ name = self.entity_name, position = position, force = force })
|
||||
e.direction = player.character.direction
|
||||
Public.remove_mana(player, self.mana_cost)
|
||||
else
|
||||
@@ -548,15 +628,18 @@ spells[#spells + 1] =
|
||||
{
|
||||
name = { 'entity-name.tree' },
|
||||
entityName = 'tree-05',
|
||||
level = 20,
|
||||
raffle = trees_raffle,
|
||||
level = 40,
|
||||
type = 'entity',
|
||||
mana_cost = 90,
|
||||
mana_cost = 200,
|
||||
cooldown = 300,
|
||||
aoe = true,
|
||||
enabled = true,
|
||||
enforce_cooldown = true,
|
||||
sprite = 'entity/tree-05',
|
||||
tooltip = 'Spawns some trees',
|
||||
callback = function (data)
|
||||
Public.register_cooldown_for_spell(data.player)
|
||||
return create_entity(data)
|
||||
end
|
||||
}
|
||||
@@ -564,15 +647,18 @@ spells[#spells + 1] =
|
||||
{
|
||||
name = { 'entity-name.big-sand-rock' },
|
||||
entityName = 'big-sand-rock',
|
||||
raffle = rock_raffle,
|
||||
level = 60,
|
||||
type = 'entity',
|
||||
mana_cost = 120,
|
||||
mana_cost = 200,
|
||||
cooldown = 300,
|
||||
aoe = true,
|
||||
enabled = true,
|
||||
enforce_cooldown = true,
|
||||
sprite = 'entity/big-sand-rock',
|
||||
tooltip = 'Spawns some sandy rocks',
|
||||
callback = function (data)
|
||||
Public.register_cooldown_for_spell(data.player)
|
||||
return create_entity(data)
|
||||
end
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user