summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--lib/mods/theme/scpt/gods.lua10
-rw-r--r--lib/mods/theme/scpt/init.lua3
-rw-r--r--lib/scpt/gods.lua10
-rw-r--r--lib/scpt/init.lua3
-rw-r--r--src/skills.c8
5 files changed, 8 insertions, 26 deletions
diff --git a/lib/mods/theme/scpt/gods.lua b/lib/mods/theme/scpt/gods.lua
deleted file mode 100644
index f76a3d6a..00000000
--- a/lib/mods/theme/scpt/gods.lua
+++ /dev/null
@@ -1,10 +0,0 @@
-add_hooks
-{
- [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,
-}
diff --git a/lib/mods/theme/scpt/init.lua b/lib/mods/theme/scpt/init.lua
index 715f6dc5..300dc66b 100644
--- a/lib/mods/theme/scpt/init.lua
+++ b/lib/mods/theme/scpt/init.lua
@@ -14,9 +14,6 @@ tome_dofile("stores.lua")
-- Add the mkey activations
tome_dofile("mkeys.lua")
--- Add god stuff
-tome_dofile("gods.lua")
-
-- Add the schools of magic
tome_dofile("spells.lua")
diff --git a/lib/scpt/gods.lua b/lib/scpt/gods.lua
deleted file mode 100644
index f76a3d6a..00000000
--- a/lib/scpt/gods.lua
+++ /dev/null
@@ -1,10 +0,0 @@
-add_hooks
-{
- [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,
-}
diff --git a/lib/scpt/init.lua b/lib/scpt/init.lua
index ef85b5e9..fa066d7f 100644
--- a/lib/scpt/init.lua
+++ b/lib/scpt/init.lua
@@ -17,9 +17,6 @@ tome_dofile("mkeys.lua")
-- Add the schools of magic
tome_dofile("spells.lua")
--- Add god stuff
-tome_dofile("gods.lua")
-
-- Add some quests
tome_dofile("library.lua")
diff --git a/src/skills.c b/src/skills.c
index 9890e96d..253eff3f 100644
--- a/src/skills.c
+++ b/src/skills.c
@@ -366,6 +366,14 @@ void recalc_skills(bool_ init)
msg_format("You have gained %d new thaumaturgy spells.", thaum_gain);
}
+ /* Antimagic means you don't believe in gods. */
+ if ((p_ptr->pgod != GOD_NONE) &&
+ (s_info[SKILL_ANTIMAGIC].value > 0))
+ {
+ msg_print("You no longer believe.");
+ abandon_god(GOD_ALL);
+ }
+
process_hooks(HOOK_RECALC_SKILLS, "()");
/* Update stuffs */