id: kaiju_stomp
description: Models damage from a Kaijū stomping on a building

argument-types:
  building: lookup('building')
  stomp: nullable(lookup('kaiju_attack'))

before:
  severity: if(is_null(stomp), 0.0, stomp.severity)

when: building.construction = 'timber'
  do:
    resilience: 1

when: building.construction = 'concrete'
  when: building.stories > 18
    do:
      resilience: 5
  default:
    do:
      resilience: 7

when: building.construction = 'steel'
  when: building.stories > 80
    do:
      resilience: 3
  when: building.stories > 55
    do:
      resilience: 5
  default:
    do:
      resilience: 9

default:
  resilience: 4

after:
  damage: (10 - resilience) * severity
