summaryrefslogtreecommitdiff
path: root/src/skills.c
diff options
context:
space:
mode:
authorBardur Arantsson <bardur@scientician.net>2012-04-11 18:37:18 +0200
committerBardur Arantsson <bardur@scientician.net>2012-04-11 18:42:23 +0200
commiteaeaf76609a894e52f12dbbd35597aebbabb113a (patch)
tree9fd69b9113c311e3d5974154107fed42313df71c /src/skills.c
parentc4db19005072f39faf67235d180d00eab6a4666f (diff)
Lua: Gods: Move "become atheist when gaining Anti-magic" to C
Diffstat (limited to 'src/skills.c')
-rw-r--r--src/skills.c8
1 files changed, 8 insertions, 0 deletions
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 */