Themeroom: buried zombies
- add a themeroom with random buried zombifying corpses - disturbing buried zombies makes them revive much faster - lua des.object() now returns the object it created
This commit is contained in:
@@ -93,6 +93,17 @@ themeroom_fills = {
|
|||||||
end });
|
end });
|
||||||
end,
|
end,
|
||||||
|
|
||||||
|
-- Buried zombies
|
||||||
|
function(rm)
|
||||||
|
local zombifiable = { "kobold", "gnome", "orc", "dwarf", "elf", "human", "ettin", "giant" };
|
||||||
|
for i = 1, (rm.width * rm.height) / 2 do
|
||||||
|
shuffle(zombifiable);
|
||||||
|
local o = des.object({ id = "corpse", montype = zombifiable[1], buried = true });
|
||||||
|
o:stop_timer("rot-corpse");
|
||||||
|
o:start_timer("zombify-mon", 1000);
|
||||||
|
end
|
||||||
|
end,
|
||||||
|
|
||||||
-- Massacre
|
-- Massacre
|
||||||
function(rm)
|
function(rm)
|
||||||
local mon = { "apprentice", "warrior", "ninja", "thug",
|
local mon = { "apprentice", "warrior", "ninja", "thug",
|
||||||
|
|||||||
@@ -786,7 +786,8 @@ Example:
|
|||||||
|
|
||||||
=== object
|
=== object
|
||||||
|
|
||||||
Create an object. The table parameter accepts the following:
|
Create an object. Returns the object as an <<Obj>> class.
|
||||||
|
The table parameter accepts the following:
|
||||||
|
|
||||||
[options="header"]
|
[options="header"]
|
||||||
|===
|
|===
|
||||||
@@ -828,6 +829,7 @@ Example:
|
|||||||
des.object({ class = "%" });
|
des.object({ class = "%" });
|
||||||
des.object({ id = "boulder", x = 03, y = 12});
|
des.object({ id = "boulder", x = 03, y = 12});
|
||||||
des.object({ id = "chest", coord = {03, 12}, locked = true, contents = function(obj) des.object("rock"); end });
|
des.object({ id = "chest", coord = {03, 12}, locked = true, contents = function(obj) des.object("rock"); end });
|
||||||
|
local o = des.object();
|
||||||
|
|
||||||
|
|
||||||
=== random_corridors
|
=== random_corridors
|
||||||
|
|||||||
@@ -1605,7 +1605,7 @@ check_buried_zombies(coordxy x, coordxy y)
|
|||||||
&& otmp->oy >= y - 1 && otmp->oy <= y + 1
|
&& otmp->oy >= y - 1 && otmp->oy <= y + 1
|
||||||
&& (t = peek_timer(ZOMBIFY_MON, obj_to_any(otmp))) > 0) {
|
&& (t = peek_timer(ZOMBIFY_MON, obj_to_any(otmp))) > 0) {
|
||||||
t = stop_timer(ZOMBIFY_MON, obj_to_any(otmp));
|
t = stop_timer(ZOMBIFY_MON, obj_to_any(otmp));
|
||||||
(void) start_timer(max(1, t - rn2(10)), TIMER_OBJECT,
|
(void) start_timer(max(1, (t*2/3)), TIMER_OBJECT,
|
||||||
ZOMBIFY_MON, obj_to_any(otmp));
|
ZOMBIFY_MON, obj_to_any(otmp));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -3691,7 +3691,9 @@ lspo_object(lua_State *L)
|
|||||||
|
|
||||||
Free(tmpobj.name.str);
|
Free(tmpobj.name.str);
|
||||||
|
|
||||||
return 0;
|
nhl_push_obj(L, otmp);
|
||||||
|
|
||||||
|
return 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* level_flags("noteleport", "mazelevel", ... ); */
|
/* level_flags("noteleport", "mazelevel", ... ); */
|
||||||
|
|||||||
Reference in New Issue
Block a user