diff options
Diffstat (limited to 'crawl-ref/source/delay.cc')
-rw-r--r-- | crawl-ref/source/delay.cc | 40 |
1 files changed, 16 insertions, 24 deletions
diff --git a/crawl-ref/source/delay.cc b/crawl-ref/source/delay.cc index 5aa664fc53..25d68a68a9 100644 --- a/crawl-ref/source/delay.cc +++ b/crawl-ref/source/delay.cc @@ -974,6 +974,15 @@ void handle_delay( void ) mprf(MSGCH_MULTITURN_ACTION, "You continue bottling blood from " "the corpse."); break; + + case DELAY_JEWELLERY_ON: + case DELAY_WEAPON_SWAP: + // These are 1-turn delays where the time cost is handled + // in _finish_delay(). + // FIXME: get rid of this hack! + you.time_taken = 0; + break; + case DELAY_MEMORISE: mpr("You continue memorising.", MSGCH_MULTITURN_ACTION); break; @@ -1027,15 +1036,15 @@ static void _finish_delay(const delay_queue_item &delay) switch (delay.type) { case DELAY_WEAPON_SWAP: - weapon_switch( delay.parm1 ); + weapon_switch(delay.parm1); break; case DELAY_JEWELLERY_ON: - puton_ring( delay.parm1, false ); + puton_ring(delay.parm1, false); break; case DELAY_ARMOUR_ON: - _armour_wear_effects( delay.parm1 ); + _armour_wear_effects(delay.parm1); break; case DELAY_ARMOUR_OFF: @@ -1043,8 +1052,7 @@ static void _finish_delay(const delay_queue_item &delay) mprf("You finish taking off %s.", you.inv[delay.parm1].name(DESC_NOCAP_YOUR).c_str()); - const equipment_type slot = - get_armour_slot( you.inv[delay.parm1] ); + const equipment_type slot = get_armour_slot(you.inv[delay.parm1]); if (slot == EQ_BODY_ARMOUR) { @@ -1055,28 +1063,12 @@ static void _finish_delay(const delay_queue_item &delay) switch (slot) { case EQ_SHIELD: - if (delay.parm1 == you.equip[EQ_SHIELD]) - you.equip[EQ_SHIELD] = -1; - break; - case EQ_CLOAK: - if (delay.parm1 == you.equip[EQ_CLOAK]) - you.equip[EQ_CLOAK] = -1; - break; - case EQ_HELMET: - if (delay.parm1 == you.equip[EQ_HELMET]) - you.equip[EQ_HELMET] = -1; - break; - case EQ_GLOVES: - if (delay.parm1 == you.equip[EQ_GLOVES]) - you.equip[EQ_GLOVES] = -1; - break; - case EQ_BOOTS: - if (delay.parm1 == you.equip[EQ_BOOTS]) - you.equip[EQ_BOOTS] = -1; + if (delay.parm1 == you.equip[slot]) + you.equip[slot] = -1; break; default: @@ -1743,7 +1735,7 @@ inline static bool _monster_warning(activity_interrupt_type ai, const monsters* mon = static_cast<const monsters*>(at.data); if (!mon->visible()) return (false); - if (at.context == "already seen") + if (at.context == "already seen" || at.context == "uncharm") { // Only say "comes into view" if the monster wasn't in view // during the previous turn. |