summaryrefslogtreecommitdiff
path: root/lib/mods
diff options
context:
space:
mode:
authorBardur Arantsson <bardur@scientician.net>2012-06-11 19:06:24 +0200
committerBardur Arantsson <bardur@scientician.net>2012-06-19 18:36:19 +0200
commit7833f2577399f212be5c107611f291be1b47ce8f (patch)
tree9b722b62f7e067024a98fc2fb442d151b400dbfc /lib/mods
parentc44efd43a83a5e6b2b696471fd46277cfd860518 (diff)
Lua: Move joke monster code to C
Diffstat (limited to 'lib/mods')
-rw-r--r--lib/mods/theme/scpt/init.lua3
-rw-r--r--lib/mods/theme/scpt/joke.lua31
2 files changed, 0 insertions, 34 deletions
diff --git a/lib/mods/theme/scpt/init.lua b/lib/mods/theme/scpt/init.lua
index 477a5d90..af299f2c 100644
--- a/lib/mods/theme/scpt/init.lua
+++ b/lib/mods/theme/scpt/init.lua
@@ -10,9 +10,6 @@ init_school_books()
-- Post-spell creation initialization
initialize_bookable_spells()
--- Add joke stuff
-tome_dofile("joke.lua")
-
-- Some tests, if the file is not present, this is fine
tome_dofile_anywhere(ANGBAND_DIR_SCPT, "dg_test.lua", FALSE)
diff --git a/lib/mods/theme/scpt/joke.lua b/lib/mods/theme/scpt/joke.lua
deleted file mode 100644
index 2d87b651..00000000
--- a/lib/mods/theme/scpt/joke.lua
+++ /dev/null
@@ -1,31 +0,0 @@
--- Place a monster in a good spot
-function gen_joke_place_monster(r_idx)
- local try = 1000
- local x
- local y
- while try > 0 do
- x = randint(cur_hgt - 4) + 2
- y = randint(cur_wid - 4) + 2
- if not (0 == place_monster_one(y, x, r_idx, 0, FALSE, MSTATUS_ENEMY)) then
- return
- end
- try = try - 1
- end
-end
-
--- Check if a special joke monster can be generated here
-function gen_joke_monsters()
- if joke_monsters == FALSE then
- return
- end
-
- -- Neil
- if (current_dungeon_idx == 20) and (dun_level == 72) then
- neil = test_monster_name("Neil, the Sorceror")
- m_allow_special[neil + 1] = TRUE
- gen_joke_place_monster(neil)
- m_allow_special[neil + 1] = FALSE
- end
-end
-
-add_hook_script(HOOK_LEVEL_END_GEN, "gen_joke_monsters", "gen_joke_monsters")