summaryrefslogtreecommitdiff
path: root/lib/mods/theme/scpt/s_varda.lua
blob: f4f46a83b8286d39fdde73555f1415b6f25e1acd (plain)
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
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
-- Spells for Varda school (From Annals of Ea module)

BOOK_VARDA = 64

-- Holy light spell copied from Globe of Light
VARDA_LIGHT_VALINOR = add_spell 
{ 
	["name"] =	"Light of Valinor", 
	["school"] =	{SCHOOL_VARDA}, 
	["level"] =	1, 
	["mana"] =	1, 
	["mana_max"] =	100, 
	["fail"] =	20, 
	["piety"] =	TRUE, 
	["stat"] =	A_WIS, 
	["random"] =	SKILL_SPIRITUALITY, 
	["spell"] =	function() 
		local obvious
		if get_level(VARDA_LIGHT_VALINOR, 50) >= 3 then
			obvious = lite_area(10, 4)
		else
			lite_room(player.py, player.px)
			obvious = TRUE
		end
		if get_level(VARDA_LIGHT_VALINOR, 50) >= 15 then
			obvious = is_obvious(fire_ball(GF_LITE, 0, 10 + get_level(VARDA_LIGHT_VALINOR, 100), 5 + get_level(GLOBELIGHT, 6)), obvious)
		end
		return obvious
	end, 
	["info"] =	function() 
		if get_level(VARDA_LIGHT_VALINOR, 50) >= 15 then
			return "dam "..(10 + get_level(VARDA_LIGHT_VALINOR, 100)).." rad "..(5 + get_level(VARDA_LIGHT_VALINOR, 6))
		else
			return ""
		end
	end, 
	["desc"] =	{ 
		"Lights a room", 
		"At level 3 it starts damaging monsters",
		"At level 15 it starts creating a more powerful kind of light",
	} 
} 

VARDA_CALL_ALMAREN = add_spell 
{ 
	["name"] =	"Call of Almaren", 
	["school"] =	{SCHOOL_VARDA}, 
	["level"] =	10, 
	["mana"] =	5, 
	["mana_max"] =	150, 
	["fail"] =	20, 
	["piety"] =	TRUE, 
	["stat"] =	A_WIS, 
	["random"] =	SKILL_SPIRITUALITY, 
	["spell"] =	function() 
			local power = 5 * player.lev
			if (get_level(VARDA_CALL_ALMAREN) >= 20) then
				dispel_evil(power)
			else
				banish_evil(power)
			end
			return FALSE
	end, 
	["info"] = 	function()
			return ""
	end,
	["desc"] =	{ 
		"Banishes evil beings", 
		"At level 20 it dispels evil beings",
	} 
} 

VARDA_EVENSTAR = add_spell 
{ 
	["name"] =	"Evenstar", 
	["school"] =	{SCHOOL_VARDA}, 
	["level"] =	20, 
	["mana"] =	20, 
	["mana_max"] =	200, 
	["fail"] =	20, 
	["piety"] =	TRUE, 
	["stat"] =	A_WIS, 
	["random"] =	SKILL_SPIRITUALITY, 
	["spell"] =	function() 
			if (get_level(VARDA_EVENSTAR) >= 40) then
				-- Enlightenment
				wiz_lite_extra()
				-- Identify
				identify_pack()
				-- Self knowledge
				self_knowledge()
			else
				wiz_lite_extra()
			end
			return FALSE
	end,
	["info"] = 	function()
			return ""
	end,
	["desc"] =	{ 
		"Maps and lights the whole level.", 
		"At level 40 it maps and lights the whole level,",
		"in addition to letting you know yourself better",
		"and identifying your whole pack.",
	} 
} 

VARDA_STARKINDLER = add_spell 
{ 
	["name"] =	"Star Kindler", 
	["school"] =	{SCHOOL_VARDA}, 
	["level"] =	30, 
	["mana"] =	50, 
	["mana_max"] =	250, 
	["fail"] =	20, 
	["piety"] =	TRUE, 
	["stat"] =	A_WIS, 
	["random"] =	SKILL_SPIRITUALITY, 
	["spell"] =	function() 
			local power = player.lev / 5
			local ret, dir

			ret, dir = get_aim_dir()
			
			if ret == FALSE then return end
			for i = 1, power do
				fire_ball(GF_LITE, dir, 20 + get_level(VARDA_STARKINDLER, 100), 10)
			end
			
			return FALSE
	end,
	["info"] = 	function()
			local power = player.lev / 5
			return "dam "..(20 + get_level(VARDA_STARKINDLER, 100)).." rad 10"
	end,
	["desc"] =	{ 
		"Does multiple bursts of light damage.", 
		"The damage increases with level.",
	} 
}