Types/Resistances

From Official Factorio Wiki
Jump to navigation Jump to search

Basics

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

Mandatory properties

type

Type: Types/string

Specification of the type. Name of a Prototype/DamageType.

Optional properties

decrease

Type: Types/float

Default: 0

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

percent

Type: Types/float

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
     }
   }