diff options
author | j-p-e-g <j-p-e-g@c06c8d41-db1a-0410-9941-cceddc491573> | 2008-12-08 21:53:05 +0000 |
---|---|---|
committer | j-p-e-g <j-p-e-g@c06c8d41-db1a-0410-9941-cceddc491573> | 2008-12-08 21:53:05 +0000 |
commit | 7cc66e61e50963ba90a5db8db19cf75890d3c733 (patch) | |
tree | fa2ee702c472095c0c3c2326fd7920d02875e29a /crawl-ref/source/delay.cc | |
parent | 8cbb227becdc172839b901aedf972022dc73118d (diff) | |
download | crawl-ref-7cc66e61e50963ba90a5db8db19cf75890d3c733.tar.gz crawl-ref-7cc66e61e50963ba90a5db8db19cf75890d3c733.zip |
Apply more commits into 0.4 branch, again mostly by Haran:
6950, 6954, 6959, 6962, 6963, 6965, 6968, 6970 (partly), 6997, 6998,
7001, 7061, 7065, 7071, 7132 (partly), 7174, 7186, 7213, 7233, 7268,
7268, 7293, 7319, 7339, 7358, 7393 (partly)
* Tweak a few monster flags.
* Fix autoswapping jewellery taking longer than manual swapping.
* Fix crash when attempting to create nonexisting monster in wizmode.
* Make ego armour descriptions follow abbreviation guidelines.
* Fixed buggy monster movement away from the player.
* Disabled traps in the Abyss.
* Fixed a few other minor bugs, and improves messaging.
git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/branches/stone_soup-0.4@7788 c06c8d41-db1a-0410-9941-cceddc491573
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. |