summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorj-p-e-g <j-p-e-g@c06c8d41-db1a-0410-9941-cceddc491573>2008-07-15 20:43:17 +0000
committerj-p-e-g <j-p-e-g@c06c8d41-db1a-0410-9941-cceddc491573>2008-07-15 20:43:17 +0000
commitdc0f066ad0fa14a48e652914b9a27e626f5eded1 (patch)
tree83173474fa7ecc57c9c6bb974445cb47d5d341e0
parentd976570ee5fbcc53481d76b2d55d389908968bd5 (diff)
downloadcrawl-ref-dc0f066ad0fa14a48e652914b9a27e626f5eded1.tar.gz
crawl-ref-dc0f066ad0fa14a48e652914b9a27e626f5eded1.zip
Apply commits r6564 and r6567 to 0.4 trunk.
Also start on changes.stone_soup for 0.4.1. The mapmark.lua fixes are not actually in 0.4 trunk, are they? git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/branches/stone_soup-0.4@6568 c06c8d41-db1a-0410-9941-cceddc491573
-rw-r--r--crawl-ref/docs/changes.stone_soup13
-rw-r--r--crawl-ref/settings/menu_colours.txt8
-rw-r--r--crawl-ref/source/describe.cc51
-rw-r--r--crawl-ref/source/invent.cc3
-rw-r--r--crawl-ref/source/item_use.cc14
-rw-r--r--crawl-ref/source/item_use.h2
-rw-r--r--crawl-ref/source/itemname.cc6
-rw-r--r--crawl-ref/source/transfor.cc18
8 files changed, 78 insertions, 37 deletions
diff --git a/crawl-ref/docs/changes.stone_soup b/crawl-ref/docs/changes.stone_soup
index 1604b5100a..52657fc770 100644
--- a/crawl-ref/docs/changes.stone_soup
+++ b/crawl-ref/docs/changes.stone_soup
@@ -1,3 +1,16 @@
+Stone Soup 0.4.1 (200807??)
+---------------------------
+
+Disclaimer: These are merely the highlights, not an exhaustive list of changes.
+
+* Fixed crashes related to mapmark.lua.
+* Fixed crash when attempting to autoinscribe non-artefacts via '{'.
+* Fixed Crawl looping infinitely upon "good random choice" for Thief/Wanderer
+* Fixed vampire bat jewellery exploit.
+* Fixed kills by hell effects counting as player kills.
+* Fixed friendly pickup toggle being inappropriately disallowed.
+
+
Stone Soup 0.4.0 (20080714)
---------------------------
diff --git a/crawl-ref/settings/menu_colours.txt b/crawl-ref/settings/menu_colours.txt
index f6a2e00982..321c023392 100644
--- a/crawl-ref/settings/menu_colours.txt
+++ b/crawl-ref/settings/menu_colours.txt
@@ -3,7 +3,10 @@
menu := menu_colour
ae := autopickup_exceptions
-# Useless items, overrides all other colours
+# Bad items
+menu = lightred:.*bad_item.*
+
+# Useless items, comes here to override artefacts etc.
menu = darkgrey:.*useless_item.*
: if you.race() == "Spriggan" then
@@ -47,9 +50,6 @@ menu = yellow:.*emergency_item.*
menu = cyan:.*good_item.*
menu = cyan:.*misc.*[lL]antern
-# Bad items
-menu = lightred:.*bad_item.*
-
# Dangerous (but still useful) items
menu = magenta:.*dangerous_item.*
diff --git a/crawl-ref/source/describe.cc b/crawl-ref/source/describe.cc
index 9799d95d9f..18ffe14195 100644
--- a/crawl-ref/source/describe.cc
+++ b/crawl-ref/source/describe.cc
@@ -2064,35 +2064,46 @@ void inscribe_item(item_def &item, bool proper_prompt)
}
}
- std::string prompt = (is_inscribed ? "Add to inscription? "
- : "Inscribe item? ");
+ std::string prompt;
+ int keyin;
+ bool did_prompt = false;
- if (need_autoinscribe || is_inscribed)
+ // Don't prompt for whether to inscribe in the first place if the
+ // player is using '{' - unless autoinscribing or clearing an
+ // existing inscription become an option.
+ if (!proper_prompt || need_autoinscribe || is_inscribed)
{
- prompt += "(You may also ";
- if (need_autoinscribe)
+ prompt = (is_inscribed ? "Add to inscription? "
+ : "Inscribe item? ");
+
+ if (need_autoinscribe || is_inscribed)
{
- prompt += "(a)utoinscribe";
+ prompt += "(You may also ";
+ if (need_autoinscribe)
+ {
+ prompt += "(a)utoinscribe";
+ if (is_inscribed)
+ prompt += ", or ";
+ }
if (is_inscribed)
- prompt += ", or ";
+ prompt += "(c)lear it";
+ prompt += ".) ";
}
- if (is_inscribed)
- prompt += "(c)lear it";
- prompt += ".) ";
- }
- if (proper_prompt)
- mpr(prompt.c_str(), MSGCH_PROMPT);
- else
- {
- prompt = "<cyan>" + prompt + "</cyan>";
- formatted_string::parse_string(prompt).display();
+ if (proper_prompt)
+ mpr(prompt.c_str(), MSGCH_PROMPT);
+ else
+ {
+ prompt = "<cyan>" + prompt + "</cyan>";
+ formatted_string::parse_string(prompt).display();
- if (Options.tutorial_left && wherey() <= get_number_of_lines() - 5)
- tutorial_inscription_info(need_autoinscribe, prompt);
+ if (Options.tutorial_left && wherey() <= get_number_of_lines() - 5)
+ tutorial_inscription_info(need_autoinscribe, prompt);
+ }
+ did_prompt = true;
}
- int keyin = tolower(c_getch());
+ keyin = (did_prompt ? tolower(c_getch()) : 'y');
switch (keyin)
{
case 'c':
diff --git a/crawl-ref/source/invent.cc b/crawl-ref/source/invent.cc
index c2e766f470..bc39a7d3b3 100644
--- a/crawl-ref/source/invent.cc
+++ b/crawl-ref/source/invent.cc
@@ -335,6 +335,8 @@ static std::string _no_selectables_message(int item_selector)
case OSEL_WIELD:
case OBJ_WEAPONS:
return("You aren't carrying any weapons.");
+ case OBJ_ARMOUR:
+ return("You aren't carrying any armour.");
case OSEL_UNIDENT:
return("You don't have any unidentified items.");
case OSEL_MEMORISE:
@@ -342,7 +344,6 @@ static std::string _no_selectables_message(int item_selector)
case OSEL_RECHARGE:
return("You aren't carrying any rechargable items.");
case OSEL_ENCH_ARM:
- case OBJ_ARMOUR:
return("You aren't carrying any armour which can be enchanted "
"further.");
case OBJ_CORPSES:
diff --git a/crawl-ref/source/item_use.cc b/crawl-ref/source/item_use.cc
index cf2efd52d2..e449ce82cd 100644
--- a/crawl-ref/source/item_use.cc
+++ b/crawl-ref/source/item_use.cc
@@ -3171,9 +3171,9 @@ bool puton_ring(int slot, bool prompt_finger)
return (false);
return puton_item(item_slot, prompt_finger);
-} // end puton_ring()
+}
-void jewellery_remove_effects(item_def &item)
+void jewellery_remove_effects(item_def &item, bool mesg)
{
// The ring/amulet must already be removed from you.equip at this point.
@@ -3182,7 +3182,8 @@ void jewellery_remove_effects(item_def &item)
const bool old_showuncursed = Options.show_uncursed;
Options.show_uncursed = false;
- mprf("You remove %s.", item.name(DESC_NOCAP_YOUR).c_str() );
+ if (mesg)
+ mprf("You remove %s.", item.name(DESC_NOCAP_YOUR).c_str() );
Options.show_uncursed = old_showuncursed;
@@ -3251,7 +3252,7 @@ void jewellery_remove_effects(item_def &item)
if (is_random_artefact(item))
unuse_randart(item);
- // must occur after ring is removed -- bwr
+ // Must occur after ring is removed. -- bwr
calc_mp();
}
@@ -4109,9 +4110,10 @@ static bool _handle_enchant_armour( int item_slot )
OSEL_ENCH_ARM, true, true, false );
}
- if (item_slot == -1)
+ if (item_slot == PROMPT_ABORT || item_slot == PROMPT_NOTHING)
{
- canned_msg( MSG_OK );
+ if (item_slot == PROMPT_ABORT)
+ canned_msg( MSG_OK );
return (false);
}
diff --git a/crawl-ref/source/item_use.h b/crawl-ref/source/item_use.h
index 4477979152..4c5fa69d5f 100644
--- a/crawl-ref/source/item_use.h
+++ b/crawl-ref/source/item_use.h
@@ -84,7 +84,7 @@ void examine_object(void);
* called from: acr
* *********************************************************************** */
bool puton_ring(int slot = -1, bool prompt_finger = true);
-
+void jewellery_remove_effects(item_def &item, bool mesg = true);
// last updated 12may2000 {dlb}
/* ***********************************************************************
diff --git a/crawl-ref/source/itemname.cc b/crawl-ref/source/itemname.cc
index 71f15c9565..a8f79190b3 100644
--- a/crawl-ref/source/itemname.cc
+++ b/crawl-ref/source/itemname.cc
@@ -2178,7 +2178,7 @@ bool is_interesting_item( const item_def& item )
}
const std::string iname = menu_colour_item_prefix(item, false)
- + item.name(DESC_PLAIN);
+ + item.name(DESC_PLAIN);
for (unsigned i = 0; i < Options.note_items.size(); ++i)
if (Options.note_items[i].matches(iname))
return (true);
@@ -2437,6 +2437,10 @@ bool is_useless_item(const item_def &item, bool temp)
if (!item_type_known(item))
return (false);
+ // A bad item is always useless.
+ if (is_bad_item(item, temp))
+ return (true);
+
switch (item.sub_type)
{
case POT_BERSERK_RAGE:
diff --git a/crawl-ref/source/transfor.cc b/crawl-ref/source/transfor.cc
index 8e9887071b..77a578a875 100644
--- a/crawl-ref/source/transfor.cc
+++ b/crawl-ref/source/transfor.cc
@@ -22,6 +22,7 @@
#include "delay.h"
#include "it_use2.h"
+#include "item_use.h"
#include "itemprop.h"
#include "items.h"
#include "misc.h"
@@ -99,7 +100,7 @@ bool remove_equipment(std::set<equipment_type> removed)
canned_msg(MSG_EMPTY_HANDED);
}
- // Remove items in order (std::set is a sorted container)
+ // Remove items in order. (std::set is a sorted container)
std::set<equipment_type>::const_iterator iter;
for (iter = removed.begin(); iter != removed.end(); ++iter)
{
@@ -110,12 +111,21 @@ bool remove_equipment(std::set<equipment_type> removed)
mprf("%s falls away.",
you.inv[you.equip[e]].name(DESC_CAP_YOUR).c_str());
- unwear_armour( you.equip[e] );
- you.equip[e] = -1;
+ if (e == EQ_LEFT_RING || e == EQ_RIGHT_RING || e == EQ_AMULET)
+ {
+ item_def &ring = you.inv[you.equip[e]];
+ you.equip[e] = -1;
+ jewellery_remove_effects(ring, false);
+ }
+ else // armour
+ {
+ unwear_armour( you.equip[e] );
+ you.equip[e] = -1;
+ }
}
return (true);
-} // end remove_equipment()
+}
bool remove_one_equip(equipment_type eq)
{