diff options
author | Bardur Arantsson <bardur@scientician.net> | 2012-04-10 19:40:52 +0200 |
---|---|---|
committer | Bardur Arantsson <bardur@scientician.net> | 2012-04-10 20:19:20 +0200 |
commit | 2586acc8701593574b52922af7540d3efa83b5b9 (patch) | |
tree | 4d6278fcb241ac03d40c9221f970ab423b1fa382 /src | |
parent | 462adc54506f1555582a60eb35ca077317185f05 (diff) |
Lua: Gods: Move Ulmo's HOOK_PROCESS_WORLD to C
Diffstat (limited to 'src')
-rw-r--r-- | src/dungeon.c | 43 |
1 files changed, 43 insertions, 0 deletions
diff --git a/src/dungeon.c b/src/dungeon.c index ddbd36bf..fa9da194 100644 --- a/src/dungeon.c +++ b/src/dungeon.c @@ -1120,6 +1120,49 @@ static void process_world_gods() } } } + + GOD(GOD_ULMO) + { + if (grace_delay_trigger()) + { + int i; + /* Ulmo likes the Edain (except Easterlings) */ + if (streq(race_name, "Human") || + streq(race_name, "Dunadan") || + streq(race_name, "Druadan") || + streq(race_name, "RohanKnight")) + { + inc_piety(GOD_ALL, 2); + } + else if (streq(race_name, "Easterling") || + streq(race_name, "Demon") || + streq(race_name, "Orc")) + { + /* hated races */ + inc_piety(GOD_ALL, -2); + } + else + { + inc_piety(GOD_ALL, 1); + } + + if (p_ptr->praying) + { + inc_piety(GOD_ALL, -1); + } + + /* Gain 1 point for each trident in inventory */ + for (i = 0; i < INVEN_TOTAL; i++) + { + if ((p_ptr->inventory[i].tval == TV_POLEARM) && + (p_ptr->inventory[i].sval == SV_TRIDENT)) + { + inc_piety(GOD_ALL, 1); + } + } + } + } + } /* |