#include "object-enchant/trc-types.h"
#include "pet/pet-fall-off.h"
#include "player-info/avatar.h"
+#include "player/player-status-flags.h"
#include "status/bad-status-setter.h"
#include "spell/spells-diceroll.h"
#include "system/floor-type-definition.h"
if (one_in_(4))
em_ptr->m_ptr->mflag2 |= MFLAG2_NOPET;
- } else if (caster_ptr->cursed & TRC_AGGRAVATE) {
+ } else if (has_aggravate(caster_ptr)) {
em_ptr->note = _("はあなたに敵意を抱いている!", " hates you too much!");
if (one_in_(4))
em_ptr->m_ptr->mflag2 |= MFLAG2_NOPET;
em_ptr->obvious = FALSE;
if (one_in_(4))
em_ptr->m_ptr->mflag2 |= MFLAG2_NOPET;
- } else if (caster_ptr->cursed & TRC_AGGRAVATE) {
+ } else if (has_aggravate(caster_ptr)) {
em_ptr->note = _("はあなたに敵意を抱いている!", " hates you too much!");
if (one_in_(4))
em_ptr->m_ptr->mflag2 |= MFLAG2_NOPET;
em_ptr->obvious = FALSE;
if (one_in_(4))
em_ptr->m_ptr->mflag2 |= MFLAG2_NOPET;
- } else if (caster_ptr->cursed & TRC_AGGRAVATE) {
+ } else if (has_aggravate(caster_ptr)) {
em_ptr->note = _("はあなたに敵意を抱いている!", " hates you too much!");
if (one_in_(4))
em_ptr->m_ptr->mflag2 |= MFLAG2_NOPET;
em_ptr->obvious = FALSE;
if (one_in_(4))
em_ptr->m_ptr->mflag2 |= MFLAG2_NOPET;
- } else if (caster_ptr->cursed & TRC_AGGRAVATE) {
+ } else if (has_aggravate(caster_ptr)) {
em_ptr->note = _("はあなたに敵意を抱いている!", " hates you too much!");
if (one_in_(4))
em_ptr->m_ptr->mflag2 |= MFLAG2_NOPET;
em_ptr->obvious = FALSE;
if (one_in_(4))
em_ptr->m_ptr->mflag2 |= MFLAG2_NOPET;
- } else if (caster_ptr->cursed & TRC_AGGRAVATE) {
+ } else if (has_aggravate(caster_ptr)) {
em_ptr->note = _("はあなたに敵意を抱いている!", " hates you too much!");
if (one_in_(4))
em_ptr->m_ptr->mflag2 |= MFLAG2_NOPET;
}
if ((em_ptr->r_ptr->flags1 & RF1_QUESTOR) || (em_ptr->r_ptr->flags1 & RF1_UNIQUE) || (em_ptr->m_ptr->mflag2 & MFLAG2_NOPET)
- || (caster_ptr->cursed & TRC_AGGRAVATE) || ((em_ptr->r_ptr->level + 10) > randint1(em_ptr->dam))) {
+ || has_aggravate(caster_ptr) || ((em_ptr->r_ptr->level + 10) > randint1(em_ptr->dam))) {
if (one_in_(4))
em_ptr->m_ptr->mflag2 |= MFLAG2_NOPET;
int tmp = attacker_ptr->lev * 6 + (attacker_ptr->skill_stl + 10) * 4;
if (attacker_ptr->monlite && (pa_ptr->mode != HISSATSU_NYUSIN))
tmp /= 3;
- if (attacker_ptr->cursed & TRC_AGGRAVATE)
+ if (has_aggravate(attacker_ptr))
tmp /= 2;
if (r_ptr->level > (attacker_ptr->lev * attacker_ptr->lev / 20 + 10))
tmp /= 3;
if (target_ptr->monlite)
tmp /= 3;
- if (target_ptr->cursed & TRC_AGGRAVATE)
+ if (has_aggravate(target_ptr))
tmp /= 2;
if (r_ptr->level > (target_ptr->lev * target_ptr->lev / 20 + 10))
if (!monster_csleep_remaining(m_ptr))
return TRUE;
- if ((target_ptr->cursed & TRC_AGGRAVATE) == 0)
+ if (has_aggravate(target_ptr))
return FALSE;
(void)set_monster_csleep(target_ptr, m_idx, 0);
monster_type *m_ptr = &target_ptr->current_floor_ptr->m_list[m_idx];
monster_race *r_ptr = &r_info[m_ptr->r_idx];
bool gets_angry = FALSE;
- if (is_friendly(m_ptr) && (target_ptr->cursed & TRC_AGGRAVATE))
+ if (is_friendly(m_ptr) && has_aggravate(target_ptr))
gets_angry = TRUE;
if (is_pet(m_ptr)
if (m_ptr->cdis <= (is_pet(m_ptr) ? (r_ptr->aaf > MAX_SIGHT ? MAX_SIGHT : r_ptr->aaf) : r_ptr->aaf))
return TRUE;
- if ((m_ptr->cdis <= MAX_SIGHT || target_ptr->phase_out) && (player_has_los_bold(target_ptr, m_ptr->fy, m_ptr->fx) || (target_ptr->cursed & TRC_AGGRAVATE)))
+ if ((m_ptr->cdis <= MAX_SIGHT || target_ptr->phase_out) && (player_has_los_bold(target_ptr, m_ptr->fy, m_ptr->fx) || has_aggravate(target_ptr)))
return TRUE;
if (m_ptr->target_y)
#include "player-info/self-info-util.h"
#include "player-info/weapon-effect-info.h"
#include "player/attack-defense-types.h"
+#include "player/player-status-flags.h"
#include "term/screen-processor.h"
#include "view/display-self-info.h"
if (creature_ptr->cursed & TRC_TY_CURSE)
self_ptr->info[self_ptr->line++] = _("あなたは邪悪な怨念に包まれている。", "You carry an ancient foul curse.");
- if (creature_ptr->cursed & TRC_AGGRAVATE)
+ if (has_aggravate(creature_ptr))
self_ptr->info[self_ptr->line++] = _("あなたはモンスターを怒らせている。", "You aggravate monsters.");
if (creature_ptr->cursed & TRC_DRAIN_EXP)
if (creature_ptr->cursed & TRC_TELEPORT)
creature_ptr->cursed &= ~(TRC_TELEPORT_SELF);
-
- if ((is_specific_player_race(creature_ptr, RACE_S_FAIRY)) && (creature_ptr->pseikaku != PERSONALITY_SEXY) && (creature_ptr->cursed & TRC_AGGRAVATE)) {
- creature_ptr->cursed &= ~(TRC_AGGRAVATE);
- }
}
BIT_FLAGS has_impact(player_type *creature_ptr)
}
bool has_good_luck(player_type *creature_ptr) { return (creature_ptr->pseikaku == PERSONALITY_LUCKY) || (creature_ptr->muta3 & MUT3_GOOD_LUCK); }
+
+BIT_FLAGS has_aggravate(player_type *creature_ptr)
+{
+ if (creature_ptr->cursed & TRC_AGGRAVATE) {
+ if ((is_specific_player_race(creature_ptr, RACE_S_FAIRY)) && (creature_ptr->pseikaku != PERSONALITY_SEXY)) {
+ return AGGRAVATE_S_FAIRY;
+ }
+ return AGGRAVATE_NORMAL;
+ }
+
+ return AGGRAVATE_NONE;
+}
+
FLAG_CAUSE_MAX = 18
};
+enum status_aggravate {
+ AGGRAVATE_NONE = 0x00000000L,
+ AGGRAVATE_NORMAL = 0x00000001L,
+ AGGRAVATE_S_FAIRY = 0x00000002L,
+};
+
bool has_pass_wall(player_type *creature_ptr);
bool has_kill_wall(player_type *creature_ptr);
BIT_FLAGS has_xtra_might(player_type *creature_ptr);
bool has_icky_wield_weapon(player_type *creature_ptr, int i);
bool has_riding_wield_weapon(player_type *creature_ptr, int i);
bool has_good_luck(player_type *creature_ptr);
+BIT_FLAGS has_aggravate(player_type *creature_ptr);
if (hex_spelling_any(creature_ptr))
pow -= (1 + casting_hex_num(creature_ptr));
}
- if ((is_specific_player_race(creature_ptr, RACE_S_FAIRY)) && (creature_ptr->pseikaku != PERSONALITY_SEXY) && (creature_ptr->cursed & TRC_AGGRAVATE)) {
+ if (has_aggravate(creature_ptr) == AGGRAVATE_S_FAIRY) {
pow = MIN(pow - 3, (pow + 2) / 2);
}