summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorj-p-e-g <j-p-e-g@c06c8d41-db1a-0410-9941-cceddc491573>2008-10-11 17:27:07 +0000
committerj-p-e-g <j-p-e-g@c06c8d41-db1a-0410-9941-cceddc491573>2008-10-11 17:27:07 +0000
commitd202b326dc267f90d667bc97e1ea14dea2acebe8 (patch)
tree01a5fbb640787c5e1abad905d77e76e761448c0b
parentcfa399b13fcb495a5e55b2557c75665b048ff14a (diff)
downloadcrawl-ref-d202b326dc267f90d667bc97e1ea14dea2acebe8.tar.gz
crawl-ref-d202b326dc267f90d667bc97e1ea14dea2acebe8.zip
* Fix some bugs for the autoexclusion I forgot to commit last weekend.
* Mermaids now call nearby aquatic monsters (i.e. other merfolk and fish). * A few more songs for the Singing Sword. git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@7216 c06c8d41-db1a-0410-9941-cceddc491573
-rw-r--r--crawl-ref/settings/init.txt3
-rw-r--r--crawl-ref/source/dat/database/wpnnoise.txt20
-rw-r--r--crawl-ref/source/items.cc2
-rw-r--r--crawl-ref/source/monstuff.cc23
-rw-r--r--crawl-ref/source/randart.cc2
-rw-r--r--crawl-ref/source/view.cc13
-rw-r--r--crawl-ref/source/view.h3
7 files changed, 54 insertions, 12 deletions
diff --git a/crawl-ref/settings/init.txt b/crawl-ref/settings/init.txt
index 1220add8d1..2ce44b1be2 100644
--- a/crawl-ref/settings/init.txt
+++ b/crawl-ref/settings/init.txt
@@ -161,7 +161,8 @@ trap_item_brand = reverse
# explore_greedy = false
# explore_stop = items,greedy_items,stairs,shops,altars,gates
# explore_improved = true
-auto_exclude = oklob plant,silver statue,orange crystal statue
+auto_exclude = oklob plant,silver statue,orange crystal statue,ice statue
+auto_exclude = curse skull
# tc_reachable = blue
# tc_dangerous = cyan
diff --git a/crawl-ref/source/dat/database/wpnnoise.txt b/crawl-ref/source/dat/database/wpnnoise.txt
index 8604c18e7d..e1d32f4744 100644
--- a/crawl-ref/source/dat/database/wpnnoise.txt
+++ b/crawl-ref/source/dat/database/wpnnoise.txt
@@ -266,7 +266,7 @@ speaking
@The_weapon@ wails, "I am too young to rust!"
-@The_weapon@ comments about your taste in music.
+@The_weapon@ comments on your taste in music.
@The_weapon@ complains about your lack of musical enthusiasm.
@@ -324,6 +324,8 @@ real_song
# Queen
@The_weapon@ happily sings, "... another one bites the dust!"
+@The_weapon@ sings, "We are the champions of the world!"
+
# Monty Python
@The_weapon@ @sings_or_whistles@, "Always look on the bright side of death ..."
@@ -349,7 +351,7 @@ real_song
@The_weapon@ sings, "Let it be, let it be..."
-# ?
+# Spice Girls
@The_weapon@ sings, "Ain't no stopping us now ..."
# drinking song
@@ -379,6 +381,18 @@ real_song
# The Carpenters
@The_weapon@ sings, "Sing, sing a song, sing out loud, sing out strong..."
+# The Fugees
+@The_weapon@ sings, "Killing me softly with this song..."
+
+# Or was it the lion?
+@The_weapon@ sings, "In the dungeon the dragon sleeps tonight."
+
+# Eminem
+@The_weapon@ sings, "Sing for the laughter, sing for the tears..."
+
+# Bonnie Tyler
+@The_weapon@ sings, "I need a hero!"
+
# end Singing Sword
%%%%
############################################################
@@ -541,8 +555,6 @@ weapon_noises
@Your_weapon@ goes tick-tock.
-@Your_weapon@ starts beeping.
-
@Your_weapon@ laughs crazily.
@Your_weapon@ burps!
diff --git a/crawl-ref/source/items.cc b/crawl-ref/source/items.cc
index 8475a11b17..3c909be853 100644
--- a/crawl-ref/source/items.cc
+++ b/crawl-ref/source/items.cc
@@ -1426,6 +1426,8 @@ int move_item_to_player( int obj, int quant_got, bool quiet )
if (item_is_stationary(mitm[obj]))
{
mpr("You cannot pick up the net that holds you!");
+ // Fake a successful pickup (return 1), so we can continue to pick up
+ // anything that might be on this square.
return (1);
}
diff --git a/crawl-ref/source/monstuff.cc b/crawl-ref/source/monstuff.cc
index 2af65b8093..1f0c4d66d7 100644
--- a/crawl-ref/source/monstuff.cc
+++ b/crawl-ref/source/monstuff.cc
@@ -2026,8 +2026,13 @@ void behaviour_event(monsters *mon, int event, int src,
case ME_DISTURB:
// Assumes disturbed by noise...
if (mons_is_sleeping(mon))
+ {
mon->behaviour = BEH_WANDER;
+ if (mons_near(mon))
+ remove_auto_exclude(mon, true);
+ }
+
// A bit of code to make Project Noise actually do
// something again. Basically, dumb monsters and
// monsters who aren't otherwise occupied will at
@@ -2058,6 +2063,9 @@ void behaviour_event(monsters *mon, int event, int src,
mon->foe = src;
+ if (mons_is_sleeping(mon) && mons_near(mon))
+ remove_auto_exclude(mon, true);
+
if (!mons_is_cornered(mon))
mon->behaviour = BEH_SEEK;
@@ -2078,6 +2086,9 @@ void behaviour_event(monsters *mon, int event, int src,
if (mons_friendly(mon) && mon->is_patrolling())
break;
+ if (mons_is_sleeping(mon) && mons_near(mon))
+ remove_auto_exclude(mon, true);
+
// Will alert monster to <src> and turn them
// against them, unless they have a current foe.
// It won't turn friends hostile either.
@@ -2089,6 +2100,15 @@ void behaviour_event(monsters *mon, int event, int src,
if (mon->foe == MHITNOT)
mon->foe = src;
+
+ if (src_pos != coord_def()
+ && (mon->foe == MHITNOT || mons_is_wandering(mon)))
+ {
+ if (mon->is_patrolling())
+ break;
+
+ mon->target = src_pos;
+ }
break;
case ME_SCARE:
@@ -4215,8 +4235,11 @@ static bool _handle_special_ability(monsters *monster, bolt & beem)
int walls = num_feats_between(you.pos(), monster->pos(),
DNGN_UNSEEN, DNGN_MAXWALL);
+ noisy(12, monster->pos(), NULL, true);
+
if (walls > 0)
{
+ // Since when do transparent walls block sound? (jpeg)
simple_monster_message(monster, " appears to sing, but you "
"can't hear her.");
break;
diff --git a/crawl-ref/source/randart.cc b/crawl-ref/source/randart.cc
index e983d41389..53e6cf0546 100644
--- a/crawl-ref/source/randart.cc
+++ b/crawl-ref/source/randart.cc
@@ -1510,7 +1510,7 @@ bool make_item_fixed_artefact( item_def &item, bool in_abyss, int which )
item.base_type = OBJ_WEAPONS;
item.sub_type = WPN_LONG_SWORD;
item.plus = 7;
- item.plus2 = 6;
+ item.plus2 = 7;
break;
case SPWPN_WRATH_OF_TROG:
diff --git a/crawl-ref/source/view.cc b/crawl-ref/source/view.cc
index 8c2dc69d5c..feded73c45 100644
--- a/crawl-ref/source/view.cc
+++ b/crawl-ref/source/view.cc
@@ -1188,9 +1188,6 @@ void monster_grid(bool do_updates)
|| mons_is_wandering(monster))
&& check_awaken(monster))
{
- if (mons_near(monster))
- remove_auto_exclude(monster, true);
-
behaviour_event( monster, ME_ALERT, MHITYOU );
handle_monster_shouts(monster);
}
@@ -1565,7 +1562,7 @@ void cloud_grid(void)
// player is appropriate.
//
// Returns true if the PC heard the noise.
-bool noisy(int loudness, const coord_def& where, const char *msg)
+bool noisy(int loudness, const coord_def& where, const char *msg, bool mermaid)
{
bool ret = false;
@@ -1584,7 +1581,7 @@ bool noisy(int loudness, const coord_def& where, const char *msg)
you.check_awaken(dist - player_distance);
- if (loudness >= 20 && you.duration[DUR_BEHELD])
+ if (!mermaid && loudness >= 20 && you.duration[DUR_BEHELD])
{
mprf("For a moment, you cannot hear the mermaid%s!",
you.beheld_by.size() == 1? "" : "s");
@@ -1610,6 +1607,12 @@ bool noisy(int loudness, const coord_def& where, const char *msg)
// will be jumping on top of them.
if (where == you.pos())
behaviour_event( monster, ME_ALERT, MHITYOU );
+ else if (mermaid && mons_habitat(monster) == HT_WATER
+ && !mons_friendly(monster))
+ {
+ // Mermaids call (hostile) aquatic monsters.
+ behaviour_event( monster, ME_ALERT, MHITNOT, where );
+ }
else
behaviour_event( monster, ME_DISTURB, MHITNOT, where );
}
diff --git a/crawl-ref/source/view.h b/crawl-ref/source/view.h
index 1e0c6e47fc..51e0a6c02d 100644
--- a/crawl-ref/source/view.h
+++ b/crawl-ref/source/view.h
@@ -101,7 +101,8 @@ bool magic_mapping(int map_radius, int proportion, bool suppress_msg,
* called from: acr - effects - it_use2 - it_use3 - item_use - spell -
* spells - spells3 - spells4
* *********************************************************************** */
-bool noisy(int loudness, const coord_def& where, const char *msg = NULL);
+bool noisy(int loudness, const coord_def& where, const char *msg = NULL,
+ bool mermaid = false);
void blood_smell( int strength, const coord_def& where);
void handle_monster_shouts(monsters* monster, bool force = false);