summaryrefslogtreecommitdiffstats
path: root/crawl-ref
diff options
context:
space:
mode:
authorj-p-e-g <j-p-e-g@c06c8d41-db1a-0410-9941-cceddc491573>2008-05-25 12:40:22 +0000
committerj-p-e-g <j-p-e-g@c06c8d41-db1a-0410-9941-cceddc491573>2008-05-25 12:40:22 +0000
commit440734626b1e63e9e97a8f1b3d4b08d72a3b7b18 (patch)
tree8528753c935ba90b1e183bb8584a289c880e748c /crawl-ref
parentfd7dc681f01391fac151867b2d9152d7795c6e76 (diff)
downloadcrawl-ref-440734626b1e63e9e97a8f1b3d4b08d72a3b7b18.tar.gz
crawl-ref-440734626b1e63e9e97a8f1b3d4b08d72a3b7b18.zip
Allow Troggies to autopickup manuals, and change the message when
gaining the "Book Burn" ability (only when you first join Trog) to explicitly refer to spellbooks. I like the alliteration in the ability name, so kept that as is. git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@5232 c06c8d41-db1a-0410-9941-cceddc491573
Diffstat (limited to 'crawl-ref')
-rw-r--r--crawl-ref/source/clua.cc7
-rw-r--r--crawl-ref/source/dat/lua/pickup.lua5
-rw-r--r--crawl-ref/source/monstuff.cc11
-rw-r--r--crawl-ref/source/religion.cc2
4 files changed, 17 insertions, 8 deletions
diff --git a/crawl-ref/source/clua.cc b/crawl-ref/source/clua.cc
index b957150e22..1b80f2f498 100644
--- a/crawl-ref/source/clua.cc
+++ b/crawl-ref/source/clua.cc
@@ -1227,6 +1227,13 @@ static int l_item_subtype(lua_State *ls)
else if (item->sub_type == POT_CURE_MUTATION)
s = "cure mutation";
}
+ else if (item->base_type == OBJ_BOOKS)
+ {
+ if (item->sub_type == BOOK_MANUAL)
+ s = "manual";
+ else
+ s = "spellbook";
+ }
if (s)
lua_pushstring(ls, s);
diff --git a/crawl-ref/source/dat/lua/pickup.lua b/crawl-ref/source/dat/lua/pickup.lua
index feae944ac4..c6dea23373 100644
--- a/crawl-ref/source/dat/lua/pickup.lua
+++ b/crawl-ref/source/dat/lua/pickup.lua
@@ -100,8 +100,9 @@ function ch_autopickup(it)
return food.can_eat(it, false)
end
- if item.class(it) == "Books" and you.god() == "Trog"
- then return false
+ if item.class(it) == "Books" and item.subtype(it) == "spellbook"
+ and you.god() == "Trog" then
+ return false
end
if item.class(it) == "Jewellery" then
diff --git a/crawl-ref/source/monstuff.cc b/crawl-ref/source/monstuff.cc
index 2dd9f49472..14092f9840 100644
--- a/crawl-ref/source/monstuff.cc
+++ b/crawl-ref/source/monstuff.cc
@@ -898,8 +898,8 @@ void monster_die(monsters *monster, killer_type killer, int i, bool silent)
// killing triggers tutorial lesson
_tutorial_inspect_kill();
- // prevent summoned creatures from being good kills
- if (bad_kill || (!created_friendly && gives_xp))
+ // Prevent summoned creatures from being good kills.
+ if (bad_kill || !created_friendly && gives_xp)
{
if (mons_holiness(monster) == MH_NATURAL)
{
@@ -932,7 +932,7 @@ void monster_die(monsters *monster, killer_type killer, int i, bool silent)
monster->hit_dice, true, monster);
}
- // jmf: Trog hates wizards
+ // jmf: Trog hates wizards.
if (mons_is_magic_user(monster))
{
did_god_conduct(DID_KILL_WIZARD,
@@ -972,7 +972,8 @@ void monster_die(monsters *monster, killer_type killer, int i, bool silent)
}
if (!created_friendly && gives_xp
- && (you.religion == GOD_MAKHLEB || you.religion == GOD_VEHUMET
+ && (you.religion == GOD_MAKHLEB
+ || you.religion == GOD_VEHUMET
|| you.religion == GOD_SHINING_ONE
&& mons_is_evil_or_unholy(monster))
&& !player_under_penance()
@@ -1057,7 +1058,7 @@ void monster_die(monsters *monster, killer_type killer, int i, bool silent)
else if (you.religion == GOD_VEHUMET
|| you.religion == GOD_MAKHLEB
|| you.religion == GOD_SHINING_ONE
- || (!anon && testbits(menv[i].flags, MF_GOD_GIFT)))
+ || !anon && testbits(menv[i].flags, MF_GOD_GIFT))
{
// Yes, we are splitting undead pets from the others
// as a way to focus Necromancy vs Summoning (ignoring
diff --git a/crawl-ref/source/religion.cc b/crawl-ref/source/religion.cc
index 4fe18bfc17..4b44211074 100644
--- a/crawl-ref/source/religion.cc
+++ b/crawl-ref/source/religion.cc
@@ -4969,7 +4969,7 @@ void god_pitch(god_type which_god)
if (_magic_users_attitude_change())
mpr("Your magic-using allies forsake you.", MSGCH_MONSTER_ENCHANT);
- mpr("You can now call upon Trog to burn books in your surroundings.",
+ mpr("You can now call upon Trog to burn spellbooks in your surroundings.",
MSGCH_GOD);
}