summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorj-p-e-g <j-p-e-g@c06c8d41-db1a-0410-9941-cceddc491573>2008-08-07 14:22:12 +0000
committerj-p-e-g <j-p-e-g@c06c8d41-db1a-0410-9941-cceddc491573>2008-08-07 14:22:12 +0000
commit3df5b1d3140e461c40fa88ab4f80554b9912372c (patch)
treef672ff0bf434ababdca38a1fa495e79334f37b11
parentb8a2e8112e707f39c40a82055cf496958d7cd094 (diff)
downloadcrawl-ref-3df5b1d3140e461c40fa88ab4f80554b9912372c.tar.gz
crawl-ref-3df5b1d3140e461c40fa88ab4f80554b9912372c.zip
Backport r6743, 6750, 6753, 6771, 6772, 6790 to 0.4.
* Fix 2033984: Monsters being created with both a shield and a 2-hander. * FR 2026227: Make $ list current gold. * Fix assertion failure upon high-scoring death. * Fix 2037146: Make hill giants use MONUSE_STARTING_EQUIPMENT. * Fix 2036429: better spacing on ^ screen. * Replace "Level:" with "Place:" in the HUD. Also start on 0.4.4 change log. git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/branches/stone_soup-0.4@6791 c06c8d41-db1a-0410-9941-cceddc491573
-rw-r--r--crawl-ref/docs/changes.stone_soup16
-rw-r--r--crawl-ref/docs/keybind.txt1
-rw-r--r--crawl-ref/source/acr.cc6
-rw-r--r--crawl-ref/source/cmd-keys.h1
-rw-r--r--crawl-ref/source/describe.cc22
-rw-r--r--crawl-ref/source/enum.h1
-rw-r--r--crawl-ref/source/hiscores.cc2
-rw-r--r--crawl-ref/source/invent.cc3
-rw-r--r--crawl-ref/source/makeitem.cc27
-rw-r--r--crawl-ref/source/mon-data.h2
-rw-r--r--crawl-ref/source/output.cc2
-rw-r--r--crawl-ref/source/player.cc2
-rw-r--r--crawl-ref/source/player.h3
13 files changed, 62 insertions, 26 deletions
diff --git a/crawl-ref/docs/changes.stone_soup b/crawl-ref/docs/changes.stone_soup
index e34f08609d..892cda6ad2 100644
--- a/crawl-ref/docs/changes.stone_soup
+++ b/crawl-ref/docs/changes.stone_soup
@@ -1,3 +1,19 @@
+Stone Soup 0.4.4 (2008????)
+---------------------------
+
+Disclaimer: These are merely the highlights, not an exhaustive list of changes.
+
+* Fixed assertion failure upon high-scoring death.
+* Fixed Crawl spinning in CPU-pegging loop on disconnect on death screen.
+* Fixed time handling in dgl builds.
+* Fixed '{' inscription.
+* Fixed broken spacing on religion screen.
+* Fixed monsters being created with both a shield and wielding a two-hander.
+* Fixed bad names for god-gifted unrandarts.
+* Warn player if interlevel travel intends to take detours.
+* Make multi-corpse sacrifices take 1 turn only.
+* Mark staves of poison and rods of venom as disapproved by TSO.
+
Stone Soup 0.4.3 (20080731)
---------------------------
diff --git a/crawl-ref/docs/keybind.txt b/crawl-ref/docs/keybind.txt
index c8e4ccc27a..1f66def090 100644
--- a/crawl-ref/docs/keybind.txt
+++ b/crawl-ref/docs/keybind.txt
@@ -98,6 +98,7 @@ I CMD_DISPLAY_SPELLS
[ CMD_LIST_ARMOUR
] CMD_LIST_EQUIPMENT
) CMD_LIST_WEAPONS
+$ CMD_LIST_GOLD
\ CMD_DISPLAY_KNOWN_OBJECTS
# CMD_CHARACTER_DUMP
diff --git a/crawl-ref/source/acr.cc b/crawl-ref/source/acr.cc
index 97668ba38a..5c496fafce 100644
--- a/crawl-ref/source/acr.cc
+++ b/crawl-ref/source/acr.cc
@@ -1251,6 +1251,7 @@ static bool _cmd_is_repeatable(command_type cmd, bool is_again = false)
case CMD_LIST_ARMOUR:
case CMD_LIST_JEWELLERY:
case CMD_LIST_EQUIPMENT:
+ case CMD_LIST_GOLD:
case CMD_CHARACTER_DUMP:
case CMD_DISPLAY_COMMANDS:
case CMD_DISPLAY_INVENTORY:
@@ -2439,6 +2440,11 @@ void process_command( command_type cmd )
get_invent(OSEL_EQUIP);
break;
+ case CMD_LIST_GOLD:
+ mprf("You have %d gold piece%s.",
+ you.gold, (you.gold > 1) ? "s" : "");
+ break;
+
case CMD_INSCRIBE_ITEM:
prompt_inscribe_item();
break;
diff --git a/crawl-ref/source/cmd-keys.h b/crawl-ref/source/cmd-keys.h
index 2ca4c401d4..2f8ddcad9d 100644
--- a/crawl-ref/source/cmd-keys.h
+++ b/crawl-ref/source/cmd-keys.h
@@ -71,6 +71,7 @@
{'=', CMD_ADJUST_INVENTORY},
{'?', CMD_DISPLAY_COMMANDS},
{'!', CMD_ANNOTATE_LEVEL},
+{'$', CMD_LIST_GOLD},
{CONTROL('D'), CMD_MACRO_ADD},
{'~', CMD_MACRO_ADD},
#ifdef WIZARD
diff --git a/crawl-ref/source/describe.cc b/crawl-ref/source/describe.cc
index 4af5e1c088..36d5b1b638 100644
--- a/crawl-ref/source/describe.cc
+++ b/crawl-ref/source/describe.cc
@@ -2363,9 +2363,11 @@ void describe_monsters(monsters& mons)
if (mons_is_mimic(mons.type) && mons.type != MONS_GOLD_MIMIC)
body << getLongDescription("mimic");
- else
+ else if (mons.type != MONS_PLAYER_GHOST)
+ {
body << getLongDescription(mons.base_name(DESC_DBNAME, false),
mons.type == MONS_DANCING_WEAPON);
+ }
std::string symbol = "";
symbol += get_monster_data(mons.type)->showchar;
@@ -3131,18 +3133,12 @@ void describe_god( god_type which_god, bool give_title )
// Only give this additional information for worshippers.
if (which_god == you.religion)
{
- if (you.religion == GOD_ZIN
- || you.religion == GOD_SHINING_ONE
- || you.religion == GOD_ELYVILON)
- {
- cgotoxy(1, bottom_line - 1, GOTO_CRT);
- }
- else
- cgotoxy(1, bottom_line - 2, GOTO_CRT);
-
- textcolor(LIGHTGREY);
- cprintf(get_linebreak_string(_religion_help(which_god),
- numcols).c_str());
+ std::string extra = get_linebreak_string(_religion_help(which_god),
+ numcols).c_str();
+ cgotoxy(1, bottom_line - std::count(extra.begin(), extra.end(), '\n')-1,
+ GOTO_CRT);
+ textcolor(LIGHTGREY);
+ cprintf( "%s", extra.c_str() );
}
cgotoxy(1, bottom_line);
diff --git a/crawl-ref/source/enum.h b/crawl-ref/source/enum.h
index 6fb5ba192e..e07ca323ff 100644
--- a/crawl-ref/source/enum.h
+++ b/crawl-ref/source/enum.h
@@ -460,6 +460,7 @@ enum command_type
CMD_LIST_ARMOUR,
CMD_LIST_JEWELLERY,
CMD_LIST_EQUIPMENT,
+ CMD_LIST_GOLD,
CMD_ZAP_WAND,
CMD_CAST_SPELL,
CMD_MEMORISE_SPELL,
diff --git a/crawl-ref/source/hiscores.cc b/crawl-ref/source/hiscores.cc
index 3db813841d..07ce416980 100644
--- a/crawl-ref/source/hiscores.cc
+++ b/crawl-ref/source/hiscores.cc
@@ -431,7 +431,7 @@ static const char *kill_method_names[] =
"wild_magic", "xom", "statue", "rotting", "targeting", "spore",
"tso_smiting", "petrification", "unknown", "something",
"falling_down_stairs", "acid", "curare", "melting", "bleeding",
- "beogh_smiting"
+ "beogh_smiting", "divine_wrath"
};
const char *kill_method_name(kill_method_type kmt)
diff --git a/crawl-ref/source/invent.cc b/crawl-ref/source/invent.cc
index a8320981b7..b33334fe2e 100644
--- a/crawl-ref/source/invent.cc
+++ b/crawl-ref/source/invent.cc
@@ -175,8 +175,9 @@ const int InvEntry::item_freshness() const
void InvEntry::select(int qty)
{
- if ( item && item->quantity < qty )
+ if (item && item->quantity < qty)
qty = item->quantity;
+
MenuEntry::select(qty);
}
diff --git a/crawl-ref/source/makeitem.cc b/crawl-ref/source/makeitem.cc
index c1343719c8..cdb337188e 100644
--- a/crawl-ref/source/makeitem.cc
+++ b/crawl-ref/source/makeitem.cc
@@ -2100,7 +2100,7 @@ static void _generate_armour_item(item_def& item, bool allow_uniques,
set_equip_race(item, _determine_armour_race(item, item_race));
// Dwarven armour is high-quality.
- if ( get_equip_race(item) == ISFLAG_DWARVEN && coinflip() )
+ if (get_equip_race(item) == ISFLAG_DWARVEN && coinflip())
item.plus++;
const bool force_good = (item_level == MAKE_GOOD_ITEM);
@@ -2166,10 +2166,10 @@ static void _generate_armour_item(item_def& item, bool allow_uniques,
// Don't overenchant items. FIXME: should use some kind of
// max_enchantment() function here.
- if ( (item.sub_type >= ARM_CLOAK && item.sub_type <= ARM_BOOTS)
- || is_shield(item) )
+ if (item.sub_type >= ARM_CLOAK && item.sub_type <= ARM_BOOTS
+ || is_shield(item) )
{
- if ( item.plus > 2 )
+ if (item.plus > 2)
item.plus = 2;
}
@@ -3837,7 +3837,7 @@ static void _give_ammo(monsters *mon, int level,
{
qty = 1;
}
-
+
w.quantity = qty;
_give_monster_item(mon, thing_created, false,
&monsters::pickup_throwable_weapon);
@@ -3869,6 +3869,19 @@ static bool make_item_for_monster(
void give_shield(monsters *mon, int level)
{
+ const item_def *main_weap = mon->mslot_item(MSLOT_WEAPON);
+ const item_def *alt_weap = mon->mslot_item(MSLOT_ALT_WEAPON);
+
+ // If the monster is already wielding/carrying a two-handed weapon, it
+ // doesn't get a shield. (Monsters always prefer raw damage to protection!)
+ if (main_weap
+ && hands_reqd(*main_weap, mon->body_size(PSIZE_BODY)) == HANDS_TWO
+ || alt_weap
+ && hands_reqd(*alt_weap, mon->body_size(PSIZE_BODY)) == HANDS_TWO)
+ {
+ return;
+ }
+
switch (mon->type)
{
case MONS_DAEVA:
@@ -3889,8 +3902,8 @@ void give_shield(monsters *mon, int level)
if (one_chance_in(3))
{
make_item_for_monster(mon, OBJ_ARMOUR,
- one_chance_in(3)? ARM_LARGE_SHIELD
- : ARM_SHIELD,
+ one_chance_in(3) ? ARM_LARGE_SHIELD
+ : ARM_SHIELD,
level, MAKE_ITEM_NO_RACE);
}
break;
diff --git a/crawl-ref/source/mon-data.h b/crawl-ref/source/mon-data.h
index 61a4a97b7a..e69bb991d9 100644
--- a/crawl-ref/source/mon-data.h
+++ b/crawl-ref/source/mon-data.h
@@ -1665,7 +1665,7 @@
{ {AT_HIT, AF_PLAIN, 30}, AT_NO_ATK, AT_NO_ATK, AT_NO_ATK },
{ 11, 3, 5, 0 },
3, 4, MST_NO_SPELLS, CE_CONTAMINATED, Z_BIG, S_SHOUT, I_NORMAL,
- HT_LAND, 10, DEFAULT_ENERGY, MONUSE_OPEN_DOORS, SIZE_GIANT,
+ HT_LAND, 10, DEFAULT_ENERGY, MONUSE_STARTING_EQUIPMENT, SIZE_GIANT,
},
{
diff --git a/crawl-ref/source/output.cc b/crawl-ref/source/output.cc
index f33225686d..d779c19fc9 100644
--- a/crawl-ref/source/output.cc
+++ b/crawl-ref/source/output.cc
@@ -918,7 +918,7 @@ void print_stats_level()
ypos++;
cgotoxy(19, ypos, GOTO_STAT);
textcolor(HUD_CAPTION_COLOR);
- cprintf("Level: ");
+ cprintf("Place: ");
textcolor(HUD_VALUE_COLOR);
#if DEBUG_DIAGNOSTICS
diff --git a/crawl-ref/source/player.cc b/crawl-ref/source/player.cc
index b50ea279e6..bf87fa062a 100644
--- a/crawl-ref/source/player.cc
+++ b/crawl-ref/source/player.cc
@@ -4233,7 +4233,7 @@ int player_mental_clarity(bool calc_unid, bool items)
return ((ret > 3) ? 3 : ret);
}
-bool wearing_amulet(char amulet, bool calc_unid)
+bool wearing_amulet(jewellery_type amulet, bool calc_unid)
{
if (amulet == AMU_CONTROLLED_FLIGHT
&& (you.duration[DUR_CONTROLLED_FLIGHT]
diff --git a/crawl-ref/source/player.h b/crawl-ref/source/player.h
index b5c3a0bc39..3e5be17898 100644
--- a/crawl-ref/source/player.h
+++ b/crawl-ref/source/player.h
@@ -15,6 +15,7 @@
#define PLAYER_H
#include "externs.h"
+#include "itemprop.h"
class monsters;
struct item_def;
@@ -74,7 +75,7 @@ int player_wielded_item();
* called from: ability - acr - fight - food - it_use2 - item_use - items -
* misc - mutation - ouch
* *********************************************************************** */
-bool wearing_amulet(char which_am, bool calc_unid = true);
+bool wearing_amulet(jewellery_type which_am, bool calc_unid = true);
/* ***********************************************************************