summaryrefslogtreecommitdiff
path: root/src/gods.c
diff options
context:
space:
mode:
authorManoj Srivastava <srivasta@debian.org>2020-05-22 19:57:41 -0700
committerManoj Srivastava <srivasta@debian.org>2020-05-22 20:02:19 -0700
commitc3d2579ad8d7eb33059aa8fdbaf5b564411a57f2 (patch)
tree1570cda0676fdcf4171a69a7fe313c1b89a52b0c /src/gods.c
parent986b7742bf244b4073ecca0723615f70be8a1ab6 (diff)
parent4e9b9c402ed95bf9a17fd6d795bc49bb4128a6fa (diff)
Merge branch 'upstream' into debian-cmake-fixes
Diffstat (limited to 'src/gods.c')
-rw-r--r--src/gods.c139
1 files changed, 0 insertions, 139 deletions
diff --git a/src/gods.c b/src/gods.c
deleted file mode 100644
index b8b8fd3a..00000000
--- a/src/gods.c
+++ /dev/null
@@ -1,139 +0,0 @@
-/* File: gods.c */
-
-/* Purpose: Deities code */
-
-/*
- * Copyright (c) 2002 DarkGod
- *
- * This software may be copied and distributed for educational, research, and
- * not for profit purposes provided that this copyright and statement are
- * included in all such copies.
- */
-
-#include "angband.h"
-
-/*
- * Add amt piety is god is god
- */
-void inc_piety(int god, s32b amt)
-{
- s32b old = p_ptr->grace;
-
- if ((god == GOD_ALL) || (god == p_ptr->pgod))
- {
- set_grace(p_ptr->grace + amt);
-
- if(amt > 0 && p_ptr->grace <= old)
- set_grace(300000);
-
- if(amt < 0 && p_ptr->grace >= old)
- set_grace(-300000);
- }
-}
-
-/*
- * Renounce to religion
- */
-void abandon_god(int god)
-{
- if ((god == GOD_ALL) || (god == p_ptr->pgod))
- {
- p_ptr->pgod = GOD_NONE;
- set_grace(0);
- }
-}
-
-/*
- * Get a religion
- */
-void follow_god(int god, bool_ silent)
-{
- /* Poor unbelievers, i'm so mean ... BOUHAHAHA */
- if (get_skill(SKILL_ANTIMAGIC))
- {
- msg_print("Don't be silly; you don't believe in gods.");
- return;
- }
-
- /* Are we allowed ? */
- if (process_hooks(HOOK_FOLLOW_GOD, "(d,s)", god, "ask"))
- return;
-
- if (p_ptr->pgod == GOD_NONE)
- {
- p_ptr->pgod = god;
-
- /* Melkor offer Udun magic */
- GOD(GOD_MELKOR)
- {
- s_info[SKILL_UDUN].hidden = FALSE;
- if (!silent) msg_print("You feel the dark powers of Melkor in you. You can now use the Udun skill.");
- }
-
- /* Anything to be done? */
- process_hooks(HOOK_FOLLOW_GOD, "(d,s)", god, "done");
- }
-}
-
-/*
- * Show religious info.
- */
-bool_ show_god_info(bool_ ext)
-{
- int pgod = p_ptr->pgod;
-
- deity_type *d_ptr;
-
- if (pgod < 0)
- {
- msg_print("You don't worship anyone.");
- msg_print(NULL);
- return FALSE;
- }
- else
- {
- int i;
-
- d_ptr = &deity_info[pgod];
-
- msg_print(NULL);
-
- character_icky = TRUE;
- Term_save();
-
- text_out(format("You worship %s. ", d_ptr->name));
- for (i = 0; (i < 10) && (strcmp(d_ptr->desc[i], "")); i++)
- text_out(d_ptr->desc[i]);
- text_out("\n");
-
- inkey();
-
- Term_load();
- character_icky = FALSE;
- }
-
- return TRUE;
-}
-
-/*
- * Rescale the wisdom value to a 0 <-> max range
- */
-int wisdom_scale(int max)
-{
- int i = p_ptr->stat_ind[A_WIS];
-
- return (i * max) / 37;
-}
-
-/* Find a god by name */
-int find_god(cptr name)
-{
- int i;
-
- for (i = 0; i < max_gods; i++)
- {
- /* The name matches */
- if (streq(deity_info[i].name, name)) return (i);
- }
- return -1;
-}