Factorio Prototype DocsVersion 1.1.107

Resistance :: struct Example code

Resistances to certain types of attacks from enemy, and physical damage. See Damage.

Properties

type :: DamageTypeID
decrease optional :: float

The flat resistance to the given damage type. [...]

The flat resistance to the given damage type. [...]

percent optional :: float

The percentage resistance to the given damage type. [...]

The percentage resistance to the given damage type. [...]

Properties

type :: DamageTypeID

decrease :: float optional

Default: 0

The flat resistance to the given damage type. (Higher is better)

percent :: float optional

Default: 0

The percentage resistance to the given damage type. (Higher is better)

Example

resistances =
{
  {
    type = "physical",
    decrease = 6,
    percent = 30
  },
  {
    type = "explosion",
    decrease = 20,
    percent = 30
  },
  {
    type = "acid",
    decrease = 3,
    percent = 30
  },
  {
    type = "fire",
    decrease = 0,
    percent = 30
  }
}

Prototypes

Types