IndustrialCraft - Reinforced Walls


Add 4 new walls including gates that will withstand even the strongest enemies.

Content
7 months ago
2.0
3.78K
Combat

g Nuking Uranium Wall Damages Player

7 months ago

I've determined that nuking both types of uranium walls causes me as the player damage. Looks like a bug, can you please check it out?

7 months ago

AI analyzing your entity.lua file suggests this is a code defect as well:

The issue where uranium and enriched uranium walls damage you upon being hit with a nuke explosion wave could be related to the attack_reaction behavior defined for the Tier 4 walls (walls with mk_level == 4). Here's a breakdown of potential issues in the provided code:

Key Observations:
Attack Reaction Behavior:

The attack_reaction includes a nested series of target_effects that deal damage of various types (poison, electric, fire, laser, acid, explosion, physical, and impact).
The reaction_modifier is 0.25, which means the reaction is triggered with a 25% probability when the wall is attacked.
Damage Types and Ranges:

The damage range is quite extensive (range = 1000), meaning the reaction can affect entities over a large area.
While the damage values are modified by reflect_modif, they could potentially still apply to the player or other friendly entities if not properly filtered.
Lack of Filtering for Targets:

The attack_reaction does not include any filtering for the target of the reaction. If the player or friendly entities are within the range of the reaction, they might inadvertently take damage.
Explosion Damage:

type = "explosion" might interact unexpectedly with the nuke explosion, causing unintended effects.

7 months ago
(updated 7 months ago)

Bug fix:

local function apply_reaction(entity, mk_level)
if mk_level == 4 then
local dmg_modif = reflect_modif
entity.healing_per_tick = 0.1
entity.attack_reaction = {
{
range = 1000,
reaction_modifier = 0.25,
action = {
{
type = "direct",
force = "enemy", //////////////////////////////This
filter_enabled = true, //////////////////////and this

7 months ago

OK, thanks, I'll add the filters as soon as I have time:

force = "enemy"
filter_enabled = true

7 months ago

Fixed in 1.1.3

New response