summaryrefslogtreecommitdiffstats
path: root/crawl-ref/source
diff options
context:
space:
mode:
authorj-p-e-g <j-p-e-g@c06c8d41-db1a-0410-9941-cceddc491573>2009-01-11 17:10:51 +0000
committerj-p-e-g <j-p-e-g@c06c8d41-db1a-0410-9941-cceddc491573>2009-01-11 17:10:51 +0000
commit6ff6324e1225d17c1911efda0853ae032546cb91 (patch)
tree959c7c66cca51b742fe489dca270ad307c6f5424 /crawl-ref/source
parentf6e92f4f5ed27ac7309f7382b4f04395bf1ad07e (diff)
downloadcrawl-ref-6ff6324e1225d17c1911efda0853ae032546cb91.tar.gz
crawl-ref-6ff6324e1225d17c1911efda0853ae032546cb91.zip
Fix 2496474: Bardings melding into centaurs.
Fix 2496520: Quivered weapons getting displayed as melded. Also, summoned monsters can no longer be affected by vampiric draining (spell or brand, vampire bite was already disallowed). git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@8413 c06c8d41-db1a-0410-9941-cceddc491573
Diffstat (limited to 'crawl-ref/source')
-rw-r--r--crawl-ref/source/fight.cc1
-rw-r--r--crawl-ref/source/itemname.cc5
-rw-r--r--crawl-ref/source/output.cc7
-rw-r--r--crawl-ref/source/player.cc8
-rw-r--r--crawl-ref/source/spells2.cc2
-rw-r--r--crawl-ref/source/tilereg.cc4
-rw-r--r--crawl-ref/source/transfor.cc5
7 files changed, 23 insertions, 9 deletions
diff --git a/crawl-ref/source/fight.cc b/crawl-ref/source/fight.cc
index a567395a12..e9d72d135c 100644
--- a/crawl-ref/source/fight.cc
+++ b/crawl-ref/source/fight.cc
@@ -1847,6 +1847,7 @@ bool melee_attack::player_monattk_hit_effects(bool mondied)
&& you.equip[EQ_WEAPON] != -1)
{
if (defender->holiness() == MH_NATURAL
+ && !mons_is_summoned(def)
&& damage_done > 0
&& you.hp < you.hp_max
&& !one_chance_in(5))
diff --git a/crawl-ref/source/itemname.cc b/crawl-ref/source/itemname.cc
index ee55efb22b..38c5eb159d 100644
--- a/crawl-ref/source/itemname.cc
+++ b/crawl-ref/source/itemname.cc
@@ -232,8 +232,11 @@ std::string item_def::name(description_level_type descrip,
ASSERT( this->link != -1 );
equipped = true;
- if (!you_tran_can_wear(*this) && you.equip[EQ_WEAPON] != this->link)
+ if (!you_tran_can_wear(*this) && you.equip[EQ_WEAPON] != this->link
+ && this->link != you.m_quiver->get_fire_item())
+ {
buff << " (melded)";
+ }
else if (this->link == you.equip[EQ_WEAPON])
{
if (this->base_type == OBJ_WEAPONS || item_is_staff(*this))
diff --git a/crawl-ref/source/output.cc b/crawl-ref/source/output.cc
index 9517081582..325b5654bd 100644
--- a/crawl-ref/source/output.cc
+++ b/crawl-ref/source/output.cc
@@ -1728,11 +1728,12 @@ static void _print_overview_screen_equip(column_composer& cols,
{
const int item_idx = you.equip[e_order[i]];
const item_def& item = you.inv[item_idx];
+ const bool not_melded = player_wearing_slot(e_order[i]);
// Colour melded equipment dark grey.
const char* colname =
- player_wearing_slot(e_order[i]) ?
- colour_to_str(item.colour).c_str() : "darkgrey";
+ not_melded ? colour_to_str(item.colour).c_str()
+ : "darkgrey";
const char equip_char = index_to_letter(item_idx);
@@ -1741,7 +1742,7 @@ static void _print_overview_screen_equip(column_composer& cols,
slot,
equip_char,
colname,
- !player_wearing_slot(e_order[i]) ? "melded " : "",
+ not_melded ? "" : "melded ",
item.name(DESC_PLAIN, true).substr(0,42).c_str(),
colname);
equip_chars.push_back(equip_char);
diff --git a/crawl-ref/source/player.cc b/crawl-ref/source/player.cc
index d35261d001..8c265ec690 100644
--- a/crawl-ref/source/player.cc
+++ b/crawl-ref/source/player.cc
@@ -655,9 +655,15 @@ bool you_tran_can_wear(const item_def &item)
return you_tran_can_wear(jewellery_is_amulet(item) ? EQ_AMULET
: EQ_LEFT_RING);
case OBJ_ARMOUR:
- if (item.sub_type == ARM_CAP)
+ if (item.sub_type == ARM_NAGA_BARDING)
+ return (you.species == SP_NAGA && you_tran_can_wear(EQ_BOOTS));
+ else if (item.sub_type == ARM_CENTAUR_BARDING)
+ return (you.species == SP_CENTAUR && you_tran_can_wear(EQ_BOOTS));
+
+ if (item.sub_type == ARM_CAP || item.sub_type == ARM_WIZARD_HAT)
{
const int transform = you.attribute[ATTR_TRANSFORMATION];
+ // All but these transformations can wear hats/caps.
return (transform != TRAN_BAT && transform != TRAN_AIR);
}
return you_tran_can_wear(get_armour_slot(item), true);
diff --git a/crawl-ref/source/spells2.cc b/crawl-ref/source/spells2.cc
index 55deaf7c8a..896c25c864 100644
--- a/crawl-ref/source/spells2.cc
+++ b/crawl-ref/source/spells2.cc
@@ -791,7 +791,7 @@ bool vampiric_drain(int pow, const dist &vmove)
return (false);
}
- if (mons_res_negative_energy(monster))
+ if (mons_res_negative_energy(monster) || mons_is_summoned(monster))
{
canned_msg(MSG_NOTHING_HAPPENS);
return (false);
diff --git a/crawl-ref/source/tilereg.cc b/crawl-ref/source/tilereg.cc
index 700f1caeed..cc4f543043 100644
--- a/crawl-ref/source/tilereg.cc
+++ b/crawl-ref/source/tilereg.cc
@@ -1399,9 +1399,9 @@ int InventoryRegion::handle_mouse(MouseEvent &event)
redraw_screen();
}
}
- else
+ else // in inventory
{
- describe_item(you.inv[idx]);
+ describe_item(you.inv[idx], true);
redraw_screen();
}
return CK_MOUSE_CMD;
diff --git a/crawl-ref/source/transfor.cc b/crawl-ref/source/transfor.cc
index 678b7b49ed..2737cdecf5 100644
--- a/crawl-ref/source/transfor.cc
+++ b/crawl-ref/source/transfor.cc
@@ -177,8 +177,11 @@ static bool _unmeld_equipment(std::set<equipment_type> melded)
break;
case EQ_BOOTS:
- if (you.mutation[MUT_HOOVES] || you.mutation[MUT_TALONS])
+ if (you.inv[arm].sub_type == ARM_BOOTS // i.e. not barding
+ && (you.mutation[MUT_HOOVES] || you.mutation[MUT_TALONS]))
+ {
force_remove = true;
+ }
break;
case EQ_SHIELD: