summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--lib/mods/theme/scpt/gods_new.lua63
-rw-r--r--src/xtra2.c88
2 files changed, 88 insertions, 63 deletions
diff --git a/lib/mods/theme/scpt/gods_new.lua b/lib/mods/theme/scpt/gods_new.lua
index 1ce90ce4..3d01ec87 100644
--- a/lib/mods/theme/scpt/gods_new.lua
+++ b/lib/mods/theme/scpt/gods_new.lua
@@ -51,68 +51,5 @@ GOD_MANDOS = add_god
},
["hooks"] =
{
- [HOOK_MONSTER_DEATH] = function(m_idx)
- if (player.pgod == GOD_MANDOS) then
- m_ptr = monster(m_idx)
- if
- (m_ptr.r_idx == test_monster_name("Vampire")) or
- (m_ptr.r_idx == test_monster_name("Master vampire")) or
- (m_ptr.r_idx == test_monster_name("Oriental vampire")) or
- (m_ptr.r_idx == test_monster_name("Vampire lord")) or
- (m_ptr.r_idx == test_monster_name("Vampire orc")) or
- (m_ptr.r_idx == test_monster_name("Vampire yeek")) or
- (m_ptr.r_idx == test_monster_name("Vampire ogre")) or
- (m_ptr.r_idx == test_monster_name("Vampire troll")) or
- (m_ptr.r_idx == test_monster_name("Vampire dwarf")) or
- (m_ptr.r_idx == test_monster_name("Vampire gnome")) or
- (m_ptr.r_idx == test_monster_name("Elder vampire")) then
- -- He really likes it if you kill Vampires (but not the adventurer kind :P)
- set_grace(player.grace + 50)
- end
-
- if
- (m_ptr.r_idx == test_monster_name("Vampire elf")) or
- (m_ptr.r_idx == test_monster_name("Thuringwethil, the Vampire Messenger")) then
- -- He *loves* it if you kill vampire Elves
- -- He will also thank you extra kindly if you kill Thuringwethil
- set_grace(player.grace + 200)
- end
-
- if
- (m_ptr.r_idx == test_monster_name("Dark elf")) or
- (m_ptr.r_idx == test_monster_name("Dark elven druid")) or
- (m_ptr.r_idx == test_monster_name("Eol, the Dark Elf")) or
- (m_ptr.r_idx == test_monster_name("Maeglin, the Traitor of Gondolin")) or
- (m_ptr.r_idx == test_monster_name("Dark elven mage")) or
- (m_ptr.r_idx == test_monster_name("Dark elven warrior")) or
- (m_ptr.r_idx == test_monster_name("Dark elven priest")) or
- (m_ptr.r_idx == test_monster_name("Dark elven lord")) or
- (m_ptr.r_idx == test_monster_name("Dark elven warlock")) or
- (m_ptr.r_idx == test_monster_name("Dark elven sorcerer")) then
- -- He doesn't like it if you kill normal Elves (means more work for him :P)
- set_grace(player.grace - 20)
- end
- if
- (m_ptr.r_idx == test_monster_name("Glorfindel of Rivendell")) or
- (m_ptr.r_idx == test_monster_name("Finrod Felagund")) or
- (m_ptr.r_idx == test_monster_name("Thranduil, King of the Wood Elves")) or
- (m_ptr.r_idx == test_monster_name("Aquatic elven warrior")) or
- (m_ptr.r_idx == test_monster_name("Aquatic elven mage")) or
- (m_ptr.r_idx == test_monster_name("High-elven ranger")) or
- (m_ptr.r_idx == test_monster_name("Elven archer")) then
- -- He hates it if you kill coaligned Elves
- set_grace(player.grace - 200)
- end
- if
- (m_ptr.r_idx == test_monster_name("Child spirit")) or
- (m_ptr.r_idx == test_monster_name("Young spirit")) or
- (m_ptr.r_idx == test_monster_name("Mature spirit")) or
- (m_ptr.r_idx == test_monster_name("Experienced spirit")) or
- (m_ptr.r_idx == test_monster_name("Wise spirit")) then
- -- He *hates* it if you kill the coaligned Spirits
- set_grace(player.grace - 1000)
- end
- end
- end
}
}
diff --git a/src/xtra2.c b/src/xtra2.c
index 8d1f1867..7958827b 100644
--- a/src/xtra2.c
+++ b/src/xtra2.c
@@ -2439,6 +2439,94 @@ static void monster_death_gods(int m_idx, monster_type *m_ptr)
inc_piety(GOD_ALL, -500);
}
}
+
+ if (p_ptr->pgod == GOD_MANDOS)
+ {
+ cptr MINOR_BONUS_RACES[] = {
+ "Vampire",
+ "Master vampire",
+ "Oriental vampire",
+ "Vampire lord",
+ "Vampire orc",
+ "Vampire yeek",
+ "Vampire ogre",
+ "Vampire troll",
+ "Vampire dwarf",
+ "Vampire gnome",
+ "Elder vampire",
+ NULL,
+ };
+ cptr MAJOR_BONUS_RACES[] = {
+ "Vampire elf",
+ "Thuringwethil, the Vampire Messenger",
+ NULL,
+ };
+ cptr MINOR_PENALTY[] = {
+ "Dark elf",
+ "Dark elven druid",
+ "Eol, the Dark Elf",
+ "Maeglin, the Traitor of Gondolin",
+ "Dark elven mage",
+ "Dark elven warrior",
+ "Dark elven priest",
+ "Dark elven lord",
+ "Dark elven warlock",
+ "Dark elven sorcerer",
+ NULL,
+ };
+ cptr MEDIUM_PENALTY[] = {
+ "Glorfindel of Rivendell",
+ "Finrod Felagund",
+ "Thranduil, King of the Wood Elves",
+ "Aquatic elven warrior",
+ "Aquatic elven mage",
+ "High-elven ranger",
+ "Elven archer",
+ NULL,
+ };
+ cptr MAJOR_PENALTY[] = {
+ "Child spirit",
+ "Young spirit",
+ "Mature spirit",
+ "Experienced spirit",
+ "Wise spirit",
+ NULL,
+ };
+
+ if (monster_race_in_list_p(m_ptr, MINOR_BONUS_RACES))
+ {
+ /* He really likes it if you kill Vampires
+ * (but not the adventurer kind :P) */
+ inc_piety(GOD_ALL, 50);
+ }
+
+ if (monster_race_in_list_p(m_ptr, MAJOR_BONUS_RACES))
+ {
+ /* He *loves* it if you kill vampire Elves. He
+ * will also thank you extra kindly if you
+ * kill Thuringwethil */
+ inc_piety(GOD_ALL, 200);
+ }
+
+ if (monster_race_in_list_p(m_ptr, MINOR_PENALTY))
+ {
+ /* He doesn't like it if you kill normal Elves
+ * (means more work for him :P) */
+ inc_piety(GOD_ALL, -20);
+ }
+
+ if (monster_race_in_list_p(m_ptr, MEDIUM_PENALTY))
+ {
+ /* He hates it if you kill coaligned Elves */
+ inc_piety(GOD_ALL, -200);
+ }
+
+ if (monster_race_in_list_p(m_ptr, MAJOR_PENALTY))
+ {
+ /* He *hates* it if you kill the coaligned Spirits */
+ inc_piety(GOD_ALL, -1000);
+ }
+ }
}
/*