From eaeaf76609a894e52f12dbbd35597aebbabb113a Mon Sep 17 00:00:00 2001 From: Bardur Arantsson Date: Wed, 11 Apr 2012 18:37:18 +0200 Subject: Lua: Gods: Move "become atheist when gaining Anti-magic" to C --- src/skills.c | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'src/skills.c') 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 */ -- cgit v1.2.3