Factorio.com|Forums|Wiki|Mod Portal|API Docs

# Factorio Prototype Docs Version 2.0.77

# Resistance - Prototype Docs

## Resistance :: struct Example code

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

## Properties

- default
- sorted

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. [...]

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. Expected range is from 0 to 100, e.g. 50 is 50%. (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
      }
    }

Type used in

- ArmorPrototype::resistances
- EntityWithHealthPrototype::resistances