summaryrefslogtreecommitdiffstats
path: root/crawl-ref
diff options
context:
space:
mode:
authorj-p-e-g <j-p-e-g@c06c8d41-db1a-0410-9941-cceddc491573>2009-04-09 19:45:50 +0000
committerj-p-e-g <j-p-e-g@c06c8d41-db1a-0410-9941-cceddc491573>2009-04-09 19:45:50 +0000
commit917bef7c3d30bd12dec1e817fda60d708f7e99a1 (patch)
treec34138f813fb5dc353124a7f4627ff68eeba033b /crawl-ref
parent534738993b475aa21e603c82bb9d03ff92361646 (diff)
downloadcrawl-ref-917bef7c3d30bd12dec1e817fda60d708f7e99a1.tar.gz
crawl-ref-917bef7c3d30bd12dec1e817fda60d708f7e99a1.zip
* Allow 'Ctrl-T' as tutorial trigger (currently 'T').
* Allow choice of deck for Stack Five like for the other abilities. * Include revision in chardump. git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@9592 c06c8d41-db1a-0410-9941-cceddc491573
Diffstat (limited to 'crawl-ref')
-rw-r--r--crawl-ref/source/chardump.cc6
-rw-r--r--crawl-ref/source/dat/database/FAQ.txt28
-rw-r--r--crawl-ref/source/decks.cc19
-rw-r--r--crawl-ref/source/newgame.cc9
-rw-r--r--crawl-ref/source/xom.cc21
5 files changed, 47 insertions, 36 deletions
diff --git a/crawl-ref/source/chardump.cc b/crawl-ref/source/chardump.cc
index 06881f394a..4ed7d4b4f3 100644
--- a/crawl-ref/source/chardump.cc
+++ b/crawl-ref/source/chardump.cc
@@ -181,7 +181,11 @@ bool dump_char(const std::string &fname, bool show_prices, bool full_id,
static void _sdump_header(dump_params &par)
{
- par.text += " " CRAWL " version " VERSION " character file.\n\n";
+ par.text += " " CRAWL " version " VERSION;
+#ifdef DISPLAY_BUILD_REVISION
+ par.text += " r" + number_to_string(svn_revision());
+#endif
+ par.text += " character file.\n\n";
}
static void _sdump_stats(dump_params &par)
diff --git a/crawl-ref/source/dat/database/FAQ.txt b/crawl-ref/source/dat/database/FAQ.txt
index 25283ebfc3..bdcbc48647 100644
--- a/crawl-ref/source/dat/database/FAQ.txt
+++ b/crawl-ref/source/dat/database/FAQ.txt
@@ -83,21 +83,22 @@ How can I avoid dying all the time? Can you give me some playing tips?
A:survival
A: If you've got trouble even reaching the Temple, you might want to try
-out the Tutorial for some general playing hints. (To do this, press 'T' in
-the character selection menu.) Also, there are easy playing combinations
-and more challenging ones (marked in dark grey on the selection screen).
-If you are new to Crawl, sticking to the easier ones is advisable. In
-general, treat each new monster you meet with utmost caution and keep an
-eye on your hit points and magic.
+out the Tutorial for some general playing hints. (To do this, press
+'Ctrl-T' in the character selection menu.)
+Also, there are easy playing combinations and more challenging ones
+(marked in dark grey on the selection screen). If you are new to Crawl,
+sticking to the easier ones is advisable. In general, treat each new
+monster you meet with utmost caution and keep an eye on your hit points
+and magic.
For specific hints dealing with a particular character, you can press '#'
in-game to create a "dump" in your morgue folder that you can then post on
the rec.games.roguelike.misc group or in the Something Awful forum, so
other players can comment on your equipment, skills or spell selection.
Please try to trim your dump by removing stuff unnecessary for this task
-(such as the extensive Vanquished list). If you join the ##crawl channel of
-the freenode IRC, you will find helpful souls who will even watch you and
-give hints should you play on one of the public servers.
+(such as the extensive Vanquished list). If you join the ##crawl channel
+of the freenode IRC, you will find helpful souls who will even watch you
+and give hints should you play on one of the public servers.
%%%%
Q:cheating
@@ -105,10 +106,11 @@ Is there a cheating mode to Crawl where I can play without dying?
%%%%
A:cheating
-A: Not a cheating mode, exactly, but if your build supports it you can play
-in wizard mode (access with '&') where you are prompted whenever you're
-about to die, and have access to a number of nifty commands to create
-equipment, travel to distant branches, or fiddle with your stats or skills.
+A: Not a cheating mode, exactly, but if your build supports it you can
+play in wizard mode (access with '&') where you are prompted whenever
+you're about to die, and have access to a number of nifty commands to
+create equipment, travel to distant branches, or fiddle with your stats
+or skills.
Note that wizard mode games will never appear on the highscore list.
Many players reckon long-time use of wizard mode to be detrimental to your
diff --git a/crawl-ref/source/decks.cc b/crawl-ref/source/decks.cc
index 058a6b2494..c8233f0139 100644
--- a/crawl-ref/source/decks.cc
+++ b/crawl-ref/source/decks.cc
@@ -440,11 +440,6 @@ static void _push_top_card(item_def& deck, card_type card,
flags.push_back((char) _flags);
}
-static bool _wielding_deck()
-{
- return (you.weapon() && is_deck(*you.weapon()));
-}
-
static void _remember_drawn_card(item_def& deck, card_type card, bool allow_id)
{
ASSERT( is_deck(deck) );
@@ -453,11 +448,8 @@ static void _remember_drawn_card(item_def& deck, card_type card, bool allow_id)
drawn.push_back( static_cast<char>(card) );
// Once you've drawn two cards, you know the deck.
- if (allow_id &&
- (drawn.size() >= 2 || origin_is_god_gift(deck)))
- {
+ if (allow_id && (drawn.size() >= 2 || origin_is_god_gift(deck)))
_deck_ident(deck);
- }
}
const std::vector<card_type> get_drawn_cards(const item_def& deck)
@@ -963,14 +955,14 @@ static void _describe_cards(std::vector<card_type> cards)
// Return false if the operation was failed/aborted along the way.
bool deck_stack()
{
- cursor_control con(false);
- if (!_wielding_deck())
+ const int slot = _choose_inventory_deck("Stack which deck?");
+ if (slot == -1)
{
- mpr("You aren't wielding a deck!");
crawl_state.zero_turns_taken();
return (false);
}
- item_def& deck(*you.weapon());
+
+ item_def& deck(you.inv[slot]);
if (_check_buggy_deck(deck))
return (false);
@@ -982,6 +974,7 @@ bool deck_stack()
return (false);
}
+ _deck_ident(deck);
const int num_cards = cards_in_deck(deck);
const int num_to_stack = (num_cards < 5 ? num_cards : 5);
diff --git a/crawl-ref/source/newgame.cc b/crawl-ref/source/newgame.cc
index 4f02c1060a..96a0c42bff 100644
--- a/crawl-ref/source/newgame.cc
+++ b/crawl-ref/source/newgame.cc
@@ -3217,7 +3217,7 @@ static void _enter_player_name(bool blankOK)
formatted_string::parse_string(
" If you've never been here before, you might want to try out" EOL
" the Dungeon Crawl tutorial. To do this, press "
- "<white>T</white> on the next" EOL
+ "<white>Ctrl-T</white> on the next" EOL
" screen.").display();
}
else
@@ -3794,7 +3794,7 @@ spec_query:
textcolor( WHITE );
cprintf("You must be new here!");
}
- cprintf(" (Press T to enter a tutorial.)");
+ cprintf(" (Press Ctrl-T to enter a tutorial.)");
cprintf(EOL EOL);
textcolor( CYAN );
cprintf("You can be: "
@@ -3950,7 +3950,7 @@ spec_query:
// These are handled specially as they _could_ be set
// using Options.race or prev_race.
- if (keyn == 'T') // easy to set in init.txt
+ if (keyn == CONTROL('T') || keyn == 'T') // easy to set in init.txt
return !pick_tutorial();
bool good_randrace = (keyn == '+');
@@ -4044,7 +4044,7 @@ job_query:
textcolor( WHITE );
cprintf("You must be new here!");
}
- cprintf(" (Press T to enter a tutorial.)");
+ cprintf(" (Press Ctrl-T to enter a tutorial.)");
cprintf(EOL EOL);
textcolor( CYAN );
@@ -4160,6 +4160,7 @@ job_query:
return (false);
}
case 'T':
+ case CONTROL('T'):
return pick_tutorial();
case '#':
good_random = true;
diff --git a/crawl-ref/source/xom.cc b/crawl-ref/source/xom.cc
index 66745cc71c..56c89f4bf2 100644
--- a/crawl-ref/source/xom.cc
+++ b/crawl-ref/source/xom.cc
@@ -188,6 +188,7 @@ static void _xom_is_stimulated(int maxinterestingness,
interestingness = std::min(255, interestingness);
+#define DEBUG_XOM
#if defined(DEBUG_RELIGION) || defined(DEBUG_GIFTS) || defined(DEBUG_XOM)
mprf(MSGCH_DIAGNOSTICS,
"Xom: gift_timeout: %d, maxinterestingness = %d, interestingness = %d",
@@ -362,10 +363,13 @@ static int _exploration_estimate(bool seen_only = false)
return (seen);
}
-static bool _spell_requires_weapon(const spell_type spell)
+static bool _spell_weapon_check(const spell_type spell)
{
switch (spell)
{
+ case SPELL_TUKIMAS_DANCE:
+ // Requires a wielded weapon.
+ return player_weapon_wielded();
case SPELL_TUKIMAS_VORPAL_BLADE:
case SPELL_MAXWELLS_SILVER_HAMMER:
case SPELL_FIRE_BRAND:
@@ -374,10 +378,17 @@ static bool _spell_requires_weapon(const spell_type spell)
case SPELL_LETHAL_INFUSION:
case SPELL_EXCRUCIATING_WOUNDS:
case SPELL_WARP_BRAND:
- case SPELL_TUKIMAS_DANCE:
- return (true);
+ {
+ if (!player_weapon_wielded())
+ return (false);
+
+ // The wielded weapon must be a non-branded non-launcher non-artefact!
+ const item_def& weapon = *you.weapon();
+ return (!is_artefact(weapon) && !is_range_weapon(weapon)
+ && get_weapon_brand(weapon) == SPWPN_NORMAL);
+ }
default:
- return (false);
+ return (true);
}
}
@@ -429,7 +440,7 @@ static bool _xom_makes_you_cast_random_spell(int sever, int tension)
// Don't attempt to cast spells that are guaranteed to fail.
// You may still get results such as "The spell fizzles" or
// "Nothing appears to happen", but those should be rarer now.
- if (_spell_requires_weapon(spell) && !player_weapon_wielded())
+ if (!_spell_weapon_check(spell))
return (false);
}
else