-
Notifications
You must be signed in to change notification settings - Fork 0
/
aoda.lua
67 lines (64 loc) · 2.19 KB
/
aoda.lua
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
register_blueprint "runtime_darkness"
{
flags = { EF_NOPICKUP },
callbacks = {
on_enter_level = [=[
function ( self, entity, reenter )
local l = world:get_level()
-- low light
l.level_info.light_range = 4
l.level_info.low_light = true
-- disable "reveal" in terminals
for e in l:entities() do
if world:get_id( e ) == "terminal" then
local reveal = e:child("terminal_recon")
reveal = reveal:child("terminal_reveal")
world:destroy( reveal )
end
end
end
]=],
on_move = [=[
function ( self, entity )
local level = world:get_level()
local size = level:get_size()
for i=0,size.x-1 do
for j=0,size.y-1 do
if level:is_explored(coord(i,j)) then
-- make each coordinate unexplored
level:set_explored(coord(i,j), false)
end
end
end
end
]=],
},
}
register_blueprint "challenge_darkness"
{
text = {
name = "Angel of Darkness",
desc = "{!MEGA CHALLENGE PACK MOD}\n\"No matter how fast light travels, it finds the darkness has always got there first, and is waiting for it.\" Your vision radius is reduced, your minimap is useless and enemies comes back from the dead. Good luck!\n\nRating : {RHARD}",
rating = "HARD",
abbr = "AoDa",
letter = "D",
},
challenge = {
type = "challenge",
},
callbacks = {
on_create_entity = [[
function( self, entity, alive )
if alive and entity.data and entity.data.nightmare then
-- enemies are tainted
entity:attach( "nightmare_mark" )
end
end
]],
on_create_player = [[
function( self, player )
player:attach( "runtime_darkness" )
end
]],
},
}