summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorj-p-e-g <j-p-e-g@c06c8d41-db1a-0410-9941-cceddc491573>2009-05-31 09:53:38 +0000
committerj-p-e-g <j-p-e-g@c06c8d41-db1a-0410-9941-cceddc491573>2009-05-31 09:53:38 +0000
commitd68fa20efb1e6b6040cfdd52d307aa7f5073a6a8 (patch)
tree81d826a009c4b8e8f1e650d0f5038be952229317
parent02e7394788cbf2791604f7f9ef4e1b7c2869824f (diff)
downloadcrawl-ref-d68fa20efb1e6b6040cfdd52d307aa7f5073a6a8.tar.gz
crawl-ref-d68fa20efb1e6b6040cfdd52d307aa7f5073a6a8.zip
Add an 0.5-only option to remind players that wands are now evoked, with
the message displayed at most once per gaming session and only if you have wands in inventory and haven't evoked one before using 'Z' to cast a spell. git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/branches/stone_soup-0.5@9858 c06c8d41-db1a-0410-9941-cceddc491573
-rw-r--r--crawl-ref/docs/changes.stone_soup1
-rw-r--r--crawl-ref/settings/init.txt2
-rw-r--r--crawl-ref/source/acr.cc26
-rw-r--r--crawl-ref/source/externs.h1
-rw-r--r--crawl-ref/source/initfile.cc2
-rw-r--r--crawl-ref/source/it_use3.cc1
-rw-r--r--crawl-ref/source/monstuff.cc13
7 files changed, 42 insertions, 4 deletions
diff --git a/crawl-ref/docs/changes.stone_soup b/crawl-ref/docs/changes.stone_soup
index 07c6b5e5e5..678acc8e14 100644
--- a/crawl-ref/docs/changes.stone_soup
+++ b/crawl-ref/docs/changes.stone_soup
@@ -170,6 +170,7 @@ Tiles
* Support for full screen mode and for small resolutions (800x480).
* Graphical menu improvements: some menus are clickable and show icons.
* Mouse clicks on the map when unsafe travel one square in that direction.
+* Mouse-over item/monster descriptions.
* Added new and improved tiles: Pandemonium lords, draconians, randart books.
* Monster tiles include health bars.
* Added type-specific icons for jewellery, shops, and weapon brands.
diff --git a/crawl-ref/settings/init.txt b/crawl-ref/settings/init.txt
index e130ff0925..aece9eed8a 100644
--- a/crawl-ref/settings/init.txt
+++ b/crawl-ref/settings/init.txt
@@ -17,6 +17,8 @@
# always_confirm_butcher = true
# target_unshifted_dirs = true
+# Set the following to false to get rid of the "evoke wands" reminder.
+# zap_evoke_reminder = false
# Crawl Init file
#
diff --git a/crawl-ref/source/acr.cc b/crawl-ref/source/acr.cc
index d7b74d716b..a70ac3a84c 100644
--- a/crawl-ref/source/acr.cc
+++ b/crawl-ref/source/acr.cc
@@ -1668,6 +1668,32 @@ void process_command( command_type cmd )
break;
}
+ if (cmd == CMD_FORCE_CAST_SPELL && Options.zap_evoke_reminder)
+ {
+ bool has_wands = false;
+ for (int i = 0; i < ENDOFPACK; i++)
+ {
+ item_def &obj(you.inv[i]);
+
+ if (!is_valid_item( obj ))
+ continue;
+
+ if (obj.base_type == OBJ_WANDS)
+ {
+ has_wands = true;
+ break;
+ }
+ }
+
+ if (has_wands)
+ {
+ mpr("If you want to use a wand, you need to press <w>V</w> to "
+ "evoke it.");
+ more();
+ Options.zap_evoke_reminder = false;
+ }
+ }
+
// Randart weapons.
if (scan_randarts(RAP_PREVENT_SPELLCASTING))
{
diff --git a/crawl-ref/source/externs.h b/crawl-ref/source/externs.h
index e24e96cc73..d2d3280581 100644
--- a/crawl-ref/source/externs.h
+++ b/crawl-ref/source/externs.h
@@ -2180,6 +2180,7 @@ public:
bool rest_wait_both; // Stop resting only when both HP and MP are
// fully restored.
+ bool zap_evoke_reminder; // reminder that wands need to be e(V)oked
#ifdef WIZARD
// Parameters for fight simulations.
diff --git a/crawl-ref/source/initfile.cc b/crawl-ref/source/initfile.cc
index 30e77385b6..d11c2e974c 100644
--- a/crawl-ref/source/initfile.cc
+++ b/crawl-ref/source/initfile.cc
@@ -993,6 +993,7 @@ void game_options::reset_options()
mon_glyph_overrides.clear();
rest_wait_both = false;
+ zap_evoke_reminder = true;
// Map each category to itself. The user can override in init.txt
kill_map[KC_YOU] = KC_YOU;
@@ -2938,6 +2939,7 @@ void game_options::read_option_line(const std::string &str, bool runscript)
}
}
else BOOL_OPTION(rest_wait_both);
+ else BOOL_OPTION(zap_evoke_reminder);
else if (key == "dump_message_count")
{
// Capping is implicit
diff --git a/crawl-ref/source/it_use3.cc b/crawl-ref/source/it_use3.cc
index b1723620c9..8d77442321 100644
--- a/crawl-ref/source/it_use3.cc
+++ b/crawl-ref/source/it_use3.cc
@@ -830,6 +830,7 @@ bool evoke_item(int slot)
{
case OBJ_WANDS:
zap_wand(slot);
+ Options.zap_evoke_reminder = false;
return (true);
case OBJ_WEAPONS:
diff --git a/crawl-ref/source/monstuff.cc b/crawl-ref/source/monstuff.cc
index 3ac56ae4e0..577c88f392 100644
--- a/crawl-ref/source/monstuff.cc
+++ b/crawl-ref/source/monstuff.cc
@@ -3125,8 +3125,13 @@ static void _mons_indicate_level_exit(const monsters *mon)
dir == CMD_GO_DOWNSTAIRS ? "goes down"
: "takes").c_str());
}
- else if (is_shaft && mons_flies(mon))
- simple_monster_message(mon, " goes down the shaft.");
+ else if (is_shaft)
+ {
+ if (mons_flies(mon))
+ simple_monster_message(mon, " goes down the shaft.");
+ else
+ simple_monster_message(mon, " jumps into the shaft.");
+ }
}
void make_mons_leave_level(monsters *mon)
@@ -7940,8 +7945,8 @@ static bool _is_trap_safe(const monsters *monster, const coord_def& where,
if (trap.type == TRAP_SHAFT && monster->will_trigger_shaft())
{
- if ((mons_is_fleeing(monster) || mons_is_pacified(monster))
- && intel >= I_NORMAL)
+ if (mons_is_fleeing(monster) && intel >= I_NORMAL
+ || mons_is_pacified(monster))
{
return (true);
}