|
|
|
@ -5,7 +5,19 @@
|
|
|
|
|
race = $script_args[0]
|
|
|
|
|
|
|
|
|
|
# if the 2nd parameter is 'magma', magma rain for the targets instead of instant death
|
|
|
|
|
magma = ($script_args[1] == 'magma')
|
|
|
|
|
# if it is 'butcher' mark all units for butchering (wont work with hostiles)
|
|
|
|
|
kill_by = $script_args[1]
|
|
|
|
|
|
|
|
|
|
case kill_by
|
|
|
|
|
when 'magma'
|
|
|
|
|
slain = 'burning'
|
|
|
|
|
when 'slaughter', 'butcher'
|
|
|
|
|
slain = 'marked for butcher'
|
|
|
|
|
when nil
|
|
|
|
|
slain = 'slain'
|
|
|
|
|
else
|
|
|
|
|
race = 'help'
|
|
|
|
|
end
|
|
|
|
|
|
|
|
|
|
checkunit = lambda { |u|
|
|
|
|
|
(u.body.blood_count != 0 or u.body.blood_max == 0) and
|
|
|
|
@ -16,12 +28,8 @@ checkunit = lambda { |u|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
slayit = lambda { |u|
|
|
|
|
|
if not magma
|
|
|
|
|
# just make them drop dead
|
|
|
|
|
u.body.blood_count = 0
|
|
|
|
|
# some races dont mind having no blood, ensure they are still taken care of.
|
|
|
|
|
u.animal.vanish_countdown = 2
|
|
|
|
|
else
|
|
|
|
|
case kill_by
|
|
|
|
|
when 'magma'
|
|
|
|
|
# it's getting hot around here
|
|
|
|
|
# !!WARNING!! do not call on a magma-safe creature
|
|
|
|
|
ouh = df.onupdate_register("exterminate ensure #{u.id}", 1) {
|
|
|
|
@ -34,6 +42,14 @@ slayit = lambda { |u|
|
|
|
|
|
df.map_tile_at(x, y, z).spawn_magma(7)
|
|
|
|
|
end
|
|
|
|
|
}
|
|
|
|
|
when 'butcher', 'slaughter'
|
|
|
|
|
# mark for slaughter at butcher's shop
|
|
|
|
|
u.flags2.slaughter = true
|
|
|
|
|
else
|
|
|
|
|
# just make them drop dead
|
|
|
|
|
u.body.blood_count = 0
|
|
|
|
|
# some races dont mind having no blood, ensure they are still taken care of.
|
|
|
|
|
u.animal.vanish_countdown = 2
|
|
|
|
|
end
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
@ -65,10 +81,12 @@ With the special argument 'undead', kill all undead creatures/thralls.
|
|
|
|
|
The targets will bleed out on the next game tick, or if they are immune to that, will vanish in a puff of smoke.
|
|
|
|
|
|
|
|
|
|
The special final argument 'magma' will make magma rain on the targets instead.
|
|
|
|
|
The special final argument 'butcher' will mark the targets for butchering instead.
|
|
|
|
|
|
|
|
|
|
Ex: exterminate gob
|
|
|
|
|
exterminate elve magma
|
|
|
|
|
exterminate him
|
|
|
|
|
exterminate pig butcher
|
|
|
|
|
EOS
|
|
|
|
|
|
|
|
|
|
when 'him', 'her', 'it', 'that'
|
|
|
|
@ -94,7 +112,7 @@ when /^undead/i
|
|
|
|
|
count += 1
|
|
|
|
|
end
|
|
|
|
|
}
|
|
|
|
|
puts "slain #{count} undeads"
|
|
|
|
|
puts "#{slain} #{count} undeads"
|
|
|
|
|
|
|
|
|
|
else
|
|
|
|
|
raw_race = df.match_rawname(race, all_races.keys)
|
|
|
|
@ -112,6 +130,6 @@ else
|
|
|
|
|
count += 1
|
|
|
|
|
end
|
|
|
|
|
}
|
|
|
|
|
puts "slain #{count} #{raw_race}"
|
|
|
|
|
puts "#{slain} #{count} #{raw_race}"
|
|
|
|
|
|
|
|
|
|
end
|
|
|
|
|