Skip to content

DeathDamage

Examples

Example

<DeathDamage>
  <Shape>
    Circular
  </Shape>
  <Range>
    20
  </Range>
  <FriendlyFire>
    false
  </FriendlyFire>
  <Damage>
    <Hack>
      0.0
    </Hack>
    <Pierce>
      10.0
    </Pierce>
    <Crush>
      50.0
    </Crush>
  </Damage>
</DeathDamage>

XML Elements

The following elements can be used within this component:

DeathDamage

Shape

Shape of the splash damage, can be circular.

Type: text

Path: DeathDamage/Shape

Range

Size of the area affected by the splash.

Type: non-negative decimal

Path: DeathDamage/Range

FriendlyFire

Whether the splash damage can hurt non enemy units.

Type: boolean (true or false)

Path: DeathDamage/FriendlyFire

Damage

Path: DeathDamage/Damage

{DamageType}

One or more elements describing damage types

Type: non-negative decimal

Path: DeathDamage/Damage/{DamageType}

Capture

Capture points value

Type: non-negative decimal

Path: DeathDamage/Capture

ApplyStatus

Effects like poisoning or burning a unit.

Path: DeathDamage/ApplyStatus

{ApplyStatusType}

The name must have a matching JSON file in data/status_effects.

Path: DeathDamage/ApplyStatus/{ApplyStatusType}

Duration

The duration of the status while the effect occurs.

Type: non-negative decimal

Path: DeathDamage/ApplyStatus/{ApplyStatusType}/Duration

Interval

Interval between the occurrences of the effect.

Type: non-negative decimal

Path: DeathDamage/ApplyStatus/{ApplyStatusType}/Interval

Damage

Path: DeathDamage/ApplyStatus/{ApplyStatusType}/Damage

{DamageType}

One or more elements describing damage types

Type: non-negative decimal

Path: DeathDamage/ApplyStatus/{ApplyStatusType}/Damage/{DamageType}

Capture

Capture points value

Type: non-negative decimal

Path: DeathDamage/ApplyStatus/{ApplyStatusType}/Capture

Modifiers

List of modifiers.

Path: DeathDamage/ApplyStatus/{ApplyStatusType}/Modifiers

Paths

Space separated value paths to modify.

Type: text

Path: DeathDamage/ApplyStatus/{ApplyStatusType}/Modifiers/Paths

Affects

An array of classes to affect.

Type: text

Path: DeathDamage/ApplyStatus/{ApplyStatusType}/Modifiers/Affects

Add

Type: decimal (e.g. -10.0 or 0.0 or 2.5)

Path: DeathDamage/ApplyStatus/{ApplyStatusType}/Modifiers/Add

Multiply

Type: decimal (e.g. -10.0 or 0.0 or 2.5)

Path: DeathDamage/ApplyStatus/{ApplyStatusType}/Modifiers/Multiply

Replace

Type: text

Path: DeathDamage/ApplyStatus/{ApplyStatusType}/Modifiers/Replace

Stackability

Defines how this status effect stacks, i.e. how subsequent status effects of the same kind are handled. Choices are: “Ignore”, which means a new one is ignored, “Extend”, which means the duration of a new one is added to the already active status effect, “Replace”, which means the currently active status effect is removed and the new one is put in place and “Stack”, which means that the status effect can be added multiple times.

Path: DeathDamage/ApplyStatus/{ApplyStatusType}/Stackability

Bonuses

Path: DeathDamage/Bonuses

Civ

If an entity has this civ then the bonus is applied

Type: text

Path: DeathDamage/Bonuses/Civ

Classes

If an entity has all these classes then the bonus is applied

Type: text

Path: DeathDamage/Bonuses/Classes

Multiplier

The effect strength is multiplied by this

Type: non-negative decimal

Path: DeathDamage/Bonuses/Multiplier

RELAX NG Grammar

<define name="component.DeathDamage">
  <element name="DeathDamage">
    <interleave>
      <element name="Shape"/>
      <element name="Range">
        <ref name="nonNegativeDecimal"/>
      </element>
      <element name="FriendlyFire">
        <data type="boolean"/>
      </element>
      <oneOrMore>
        <choice>
          <element name="Damage">
            <oneOrMore>
              <element>
                <anyName/>
                <ref name="nonNegativeDecimal"/>
              </element>
            </oneOrMore>
          </element>
          <element name="Capture">
            <ref name="nonNegativeDecimal"/>
          </element>
          <element name="ApplyStatus">
            <oneOrMore>
              <element>
                <anyName/>
                <interleave>
                  <optional>
                    <element name="Duration">
                      <ref name="nonNegativeDecimal"/>
                    </element>
                  </optional>
                  <optional>
                    <interleave>
                      <element name="Interval">
                        <ref name="nonNegativeDecimal"/>
                      </element>
                      <oneOrMore>
                        <choice>
                          <element name="Damage">
                            <oneOrMore>
                              <element>
                                <anyName/>
                                <ref name="nonNegativeDecimal"/>
                              </element>
                            </oneOrMore>
                          </element>
                          <element name="Capture">
                            <ref name="nonNegativeDecimal"/>
                          </element>
                        </choice>
                      </oneOrMore>
                    </interleave>
                  </optional>
                  <optional>
                    <element name="Modifiers">
                      <oneOrMore>
                        <element>
                          <anyName/>
                          <interleave>
                            <element name="Paths">
                              <attribute name="datatype">
                                <value>
                                </value>
                              </attribute>
                              <text/>
                            </element>
                            <element name="Affects">
                              <attribute name="datatype">
                                <value>
                                </value>
                              </attribute>
                              <text/>
                            </element>
                            <choice>
                              <element name="Add">
                                <data type="decimal"/>
                              </element>
                              <element name="Multiply">
                                <data type="decimal"/>
                              </element>
                              <element name="Replace"/>
                            </choice>
                          </interleave>
                        </element>
                      </oneOrMore>
                    </element>
                  </optional>
                  <element name="Stackability">
                    <choice>
                      <value>
                      </value>
                      <value>
                      </value>
                      <value>
                      </value>
                      <value>
                      </value>
                    </choice>
                  </element>
                </interleave>
              </element>
            </oneOrMore>
          </element>
        </choice>
      </oneOrMore>
      <optional>
        <element name="Bonuses">
          <zeroOrMore>
            <element>
              <anyName/>
              <interleave>
                <optional>
                  <element name="Civ"/>
                </optional>
                <element name="Classes"/>
                <element name="Multiplier">
                  <ref name="nonNegativeDecimal"/>
                </element>
              </interleave>
            </element>
          </zeroOrMore>
        </element>
      </optional>
    </interleave>
  </element>
</define>