File: main.lua

package info (click to toggle)
cataclysm-dda 0.C%2Bgit20190228.faafa3a-2
  • links: PTS, VCS
  • area: main
  • in suites: buster
  • size: 181,636 kB
  • sloc: cpp: 256,609; python: 2,621; makefile: 862; sh: 495; perl: 37; xml: 33
file content (9 lines) | stat: -rw-r--r-- 290 bytes parent folder | download
1
2
3
4
5
6
7
8
9
monster_types = game.get_monster_types()

-- double the speed of all monsters whose species is "ZOMBIE"
for _, monster_type in ipairs(monster_types) do
    local mtype = monster_type:obj()
    if mtype:in_species(species_id("ZOMBIE")) then
        mtype.speed = mtype.speed * 2
    end
end