summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--crawl-ref/source/acr.cc20
-rw-r--r--crawl-ref/source/debug.cc4
-rw-r--r--crawl-ref/source/item_use.cc10
-rw-r--r--crawl-ref/source/itemname.cc22
-rw-r--r--crawl-ref/source/tilereg.cc3
5 files changed, 49 insertions, 10 deletions
diff --git a/crawl-ref/source/acr.cc b/crawl-ref/source/acr.cc
index 7f7aecec0a..bfd881a43f 100644
--- a/crawl-ref/source/acr.cc
+++ b/crawl-ref/source/acr.cc
@@ -2314,7 +2314,7 @@ static void _decrement_durations()
if (_decrement_a_duration(DUR_BRILLIANCE, "You feel a little less clever now."))
modify_stat(STAT_INTELLIGENCE, -5, true, "brilliance running out");
-
+
if (_decrement_a_duration(DUR_BERSERKER, "You are no longer berserk."))
{
//jmf: Guilty for berserking /after/ berserk.
@@ -2363,6 +2363,22 @@ static void _decrement_durations()
int dur = 12 + roll_dice(2, 12);
you.duration[DUR_EXHAUSTED] += dur;
+ // While the amulet of resist slowing does prevent the post-berserk
+ // slowing, exhaustion still ends haste.
+ if (you.duration[DUR_HASTE] > 0 && wearing_amulet(AMU_RESIST_SLOW))
+ {
+ if (you.duration[DUR_HASTE > 6])
+ {
+ you.duration[DUR_HASTE] = 2 + coinflip();
+ mpr("Your extra speed is starting to run out.", MSGCH_DURATION);
+ }
+ else
+ {
+ mpr("You feel yourself slow down.", MSGCH_DURATION);
+ you.duration[DUR_HASTE] = 0;
+ }
+ }
+
// Don't trigger too many tutorial messages.
const bool tut_slow = Options.tutorial_events[TUT_YOU_ENCHANTED];
Options.tutorial_events[TUT_YOU_ENCHANTED] = false;
@@ -2480,10 +2496,12 @@ static void _decrement_durations()
you.duration[DUR_DEATHS_DOOR] = 0;
}
else
+ {
_decrement_a_duration(DUR_DEATHS_DOOR,
"Your life is in your own hands again!",
random2(6),
"Your time is quickly running out!");
+ }
}
if (_decrement_a_duration(DUR_DIVINE_VIGOUR))
diff --git a/crawl-ref/source/debug.cc b/crawl-ref/source/debug.cc
index 3a52d23168..499d0686bf 100644
--- a/crawl-ref/source/debug.cc
+++ b/crawl-ref/source/debug.cc
@@ -1275,8 +1275,8 @@ void wizard_create_spec_object()
}
mitm[thing_created].base_type = OBJ_GOLD;
- mitm[thing_created].sub_type = 0;
- mitm[thing_created].quantity = amount;
+ mitm[thing_created].sub_type = 0;
+ mitm[thing_created].quantity = amount;
}
else if (class_wanted == OBJ_CORPSES)
{
diff --git a/crawl-ref/source/item_use.cc b/crawl-ref/source/item_use.cc
index 954046ad1e..4987daedf9 100644
--- a/crawl-ref/source/item_use.cc
+++ b/crawl-ref/source/item_use.cc
@@ -800,7 +800,10 @@ bool can_wear_armour(const item_def &item, bool verbose, bool ignore_temporary)
else if (sub_type == ARM_CENTAUR_BARDING)
can_wear = (you.species == SP_CENTAUR);
else
- can_wear = (fit_armour_size(item, player_size()) == 0);
+ {
+ can_wear = (fit_armour_size(item,
+ player_size(PSIZE_TORSO, ignore_temporary)) == 0);
+ }
if (!can_wear)
{
@@ -899,7 +902,8 @@ bool can_wear_armour(const item_def &item, bool verbose, bool ignore_temporary)
}
// Giant races and draconians.
- if (player_size(PSIZE_TORSO) >= SIZE_LARGE || player_genus(GENPC_DRACONIAN))
+ if (player_size(PSIZE_TORSO, ignore_temporary) >= SIZE_LARGE
+ || player_genus(GENPC_DRACONIAN))
{
if (sub_type >= ARM_LEATHER_ARMOUR
&& sub_type <= ARM_PLATE_MAIL
@@ -917,7 +921,7 @@ bool can_wear_armour(const item_def &item, bool verbose, bool ignore_temporary)
}
// Tiny races.
- if (player_size(PSIZE_TORSO) <= SIZE_LITTLE)
+ if (player_size(PSIZE_TORSO, ignore_temporary) <= SIZE_LITTLE)
{
if ((sub_type >= ARM_LEATHER_ARMOUR
&& sub_type <= ARM_PLATE_MAIL)
diff --git a/crawl-ref/source/itemname.cc b/crawl-ref/source/itemname.cc
index 827d7f77ab..3e763e905d 100644
--- a/crawl-ref/source/itemname.cc
+++ b/crawl-ref/source/itemname.cc
@@ -2503,10 +2503,11 @@ bool is_useless_item(const item_def &item, bool temp)
switch (item.base_type)
{
case OBJ_WEAPONS:
- if (player_size(PSIZE_BODY) < SIZE_MEDIUM
- && !check_weapon_wieldable_size(item, player_size(PSIZE_BODY)))
+ if (!check_weapon_wieldable_size(item, player_size(PSIZE_BODY, !temp))
+ && !is_throwable(&you, item))
{
- // Weapon is too large to be wielded.
+ // Weapon is too large (or small) to be wielded and cannot be
+ // thrown either.
return (true);
}
@@ -2522,6 +2523,21 @@ bool is_useless_item(const item_def &item, bool temp)
}
return (false);
+ case OBJ_MISSILES:
+ // These are the same checks as in_throwable except we don't take
+ // into account launchers.
+ switch (item.sub_type)
+ {
+ case MI_LARGE_ROCK:
+ return (player_size(PSIZE_BODY, !temp) < SIZE_LARGE
+ || !you.can_throw_large_rocks());
+ case MI_JAVELIN:
+ case MI_THROWING_NET:
+ return (player_size(PSIZE_BODY, !temp) < SIZE_MEDIUM);
+ }
+
+ return (false);
+
case OBJ_ARMOUR:
return (!can_wear_armour(item, false, true));
diff --git a/crawl-ref/source/tilereg.cc b/crawl-ref/source/tilereg.cc
index 8574d1bcfe..2cd1c855b1 100644
--- a/crawl-ref/source/tilereg.cc
+++ b/crawl-ref/source/tilereg.cc
@@ -1875,7 +1875,8 @@ int InventoryRegion::handle_spells_mouse(MouseEvent &event, int item_idx)
{
you.last_clicked_item = item_idx;
tiles.set_need_redraw();
- if (!cast_a_spell(true, spell))
+ // Use Z rather than z, seeing how there are no mouseclick macros.
+ if (!cast_a_spell(false, spell))
flush_input_buffer( FLUSH_ON_FAILURE );
}
else if (Options.tile_display == TDSP_MEMORISE)