diff options
author | j-p-e-g <j-p-e-g@c06c8d41-db1a-0410-9941-cceddc491573> | 2007-08-15 21:32:33 +0000 |
---|---|---|
committer | j-p-e-g <j-p-e-g@c06c8d41-db1a-0410-9941-cceddc491573> | 2007-08-15 21:32:33 +0000 |
commit | 054c713cec71c3010b1ac3eb0848f2b601db982f (patch) | |
tree | da7a575a718b842b7ea15bb8ffc59efdccc2ff95 /crawl-ref/source/item_use.cc | |
parent | 54f595ca30391a4e95ae1f46706d9c7cc5a6b6a8 (diff) | |
download | crawl-ref-054c713cec71c3010b1ac3eb0848f2b601db982f.tar.gz crawl-ref-054c713cec71c3010b1ac3eb0848f2b601db982f.zip |
More stuff for the tutorial:
- Enhanced handling of spellbooks and artefacts.
- Feature descriptions now cover altars.
- Added monster descriptions (out of depth and brands).
Also:
- space-only inscription counts as no inscription
- ring of teleportation autoID's if no teleport randart
In my last commit I forgot to mention that the
descriptions were suggested by Richard Gould, and
I'd like to give credit where credit is due. :)
git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@2005 c06c8d41-db1a-0410-9941-cceddc491573
Diffstat (limited to 'crawl-ref/source/item_use.cc')
-rw-r--r-- | crawl-ref/source/item_use.cc | 19 |
1 files changed, 18 insertions, 1 deletions
diff --git a/crawl-ref/source/item_use.cc b/crawl-ref/source/item_use.cc index eeab91d2cc..73a9300e2d 100644 --- a/crawl-ref/source/item_use.cc +++ b/crawl-ref/source/item_use.cc @@ -2232,7 +2232,6 @@ void jewellery_wear_effects(item_def &item) case RING_SUSTENANCE: case RING_SLAYING: case RING_SEE_INVISIBLE: - case RING_TELEPORTATION: case RING_WIZARDRY: case RING_REGENERATION: case RING_TELEPORT_CONTROL: @@ -2286,6 +2285,15 @@ void jewellery_wear_effects(item_def &item) ident = ID_KNOWN_TYPE; break; + case RING_TELEPORTATION: + if (!scan_randarts( RAP_CAN_TELEPORT )) + { + mpr("You feel slightly jumpy."); + ident = ID_KNOWN_TYPE; + break; + } + break; + case AMU_RAGE: mpr("You feel a brief urge to hack something to bits."); ident = ID_KNOWN_TYPE; @@ -2899,6 +2907,15 @@ void inscribe_item() mpr( "Inscribe with what? ", MSGCH_PROMPT ); if (!cancelable_get_line(buf, sizeof buf)) { + // strip spaces from the end + for (int i = strlen(buf) - 1; i >= 0; i--) + { + if (isspace( buf[i] )) + buf[i] = 0; + else + break; + } + you.inv[item_slot].inscription = std::string(buf); you.wield_change = true; } |