Angband Forums

Angband Forums (http://angband.oook.cz/forum/index.php)
-   Vanilla (http://angband.oook.cz/forum/forumdisplay.php?f=3)
-   -   [3.5.1] Aggravation reveals mimics without giving awareness (http://angband.oook.cz/forum/showthread.php?t=7142)

PowerWyrm January 13, 2015 09:35

[3.5.1] Aggravation reveals mimics without giving awareness
 
Using an aggravating item (for example Zarcuthra) will reveal mimics ("The creeping copper coins wakes up"), but will not give awareness (creeping copper coins will stay a pile of $).

See process_monster():

Code:

                /* Aggravation */
                if (check_state(p_ptr, OF_AGGRAVATE, p_ptr->state.flags)) {
                        /* Wake the monster and notify player */
                        mon_clear_timed(m_ptr, MON_TMD_SLEEP, MON_TMD_FLG_NOTIFY, FALSE);

                        /* Update the health bar */
                        if (m_ptr->ml && !m_ptr->unaware) {
                               
                                /* Hack -- Update the health bar */
                                if (p_ptr->health_who == m_ptr) p_ptr->redraw |= (PR_HEALTH);
                        }

                        /* Efficiency XXX XXX */
                        return;
                }

IMO, the aggravated mimic should wake up silently and stay unaware like non-aggravated ones.

Code:

                /* Aggravation */
                if (check_state(p_ptr, OF_AGGRAVATE, p_ptr->state.flags)) {
                        /* Wake the monster */
                        mon_clear_timed(m_ptr, MON_TMD_SLEEP, MON_TMD_FLG_NOMESSAGE, FALSE);

                        /* Notice the "waking up" */
                        if (m_ptr->ml && !m_ptr->unaware) {
                                /* Dump a message */
                                msg("%s wakes up.", m_name);
                               
                                /* Hack -- Update the health bar (redundant code) */
                                /*if (p_ptr->health_who == m_ptr) p_ptr->redraw |= (PR_HEALTH);*/
                        }

                        /* Efficiency XXX XXX */
                        return;
                }


PowerWyrm January 13, 2015 09:36

Ticket #1833.

PowerWyrm January 13, 2015 09:54

On a side note, the health update in that code is redundant and could be removed, because it's already done in mon_clear_timed().


All times are GMT +1. The time now is 04:51.

Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2020, vBulletin Solutions Inc.