[go: up one dir, main page]

File: gods.lua

package info (click to toggle)
tome 2.3.11-ah-2
  • links: PTS, VCS
  • area: non-free
  • in suites: jessie, jessie-kfreebsd
  • size: 18,976 kB
  • ctags: 12,278
  • sloc: ansic: 145,042; sh: 212; makefile: 70
file content (26 lines) | stat: -rw-r--r-- 601 bytes parent folder | download | duplicates (5)
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
add_hooks
{
	[HOOK_FOLLOW_GOD] = function(god, action)
		if action == "ask" then
			if not (god == GOD_MELKOR) then
				local i = INVEN_WIELD
				while i < INVEN_TOTAL do
					-- 13 is ART_POWER
					if player.inventory(i).name1 == 13 then
						msg_print("The One Ring has corrupted you, and you are rejected.")
						return TRUE
					end
					i = i + 1
				end
			end
		end
		return FALSE
	end,
	[HOOK_RECALC_SKILLS] = function()
		if not (player.pgod == GOD_NONE) and (get_skill(SKILL_ANTIMAGIC) > 0) then
			msg_print("You no longer believe.")
			abandon_god(GOD_ALL)
		end
		return FALSE
	end,
}