#include "spell-kind/spells-teleport.h"
#include "spell/summon-types.h"
#include "status/bad-status-setter.h"
+#include "status/buff-setter.h"
#include "system/floor-type-definition.h"
#include "util/bit-flags-calculator.h"
#include "util/quarks.h"
#define TRC_P_FLAG_MASK \
(TRC_TELEPORT_SELF | TRC_CHAINSWORD | TRC_TY_CURSE | TRC_DRAIN_EXP | TRC_ADD_L_CURSE | TRC_ADD_H_CURSE | TRC_CALL_ANIMAL | TRC_CALL_DEMON \
- | TRC_CALL_DRAGON | TRC_COWARDICE | TRC_TELEPORT | TRC_DRAIN_HP | TRC_DRAIN_MANA | TRC_CALL_UNDEAD)
+ | TRC_CALL_DRAGON | TRC_COWARDICE | TRC_TELEPORT | TRC_DRAIN_HP | TRC_DRAIN_MANA | TRC_CALL_UNDEAD | TRC_BERS_RAGE)
static bool is_specific_curse(BIT_FLAGS flag)
{
return (flag == TRC_ADD_L_CURSE) || (flag == TRC_ADD_H_CURSE) || (flag == TRC_DRAIN_HP) || (flag == TRC_DRAIN_MANA) || (flag == TRC_CALL_ANIMAL)
|| (flag == TRC_CALL_DEMON) || (flag == TRC_CALL_DRAGON) || (flag == TRC_CALL_UNDEAD) || (flag == TRC_COWARDICE) || (flag == TRC_LOW_MELEE)
- || (flag == TRC_LOW_AC) || (flag == TRC_HARD_SPELL) || (flag == TRC_FAST_DIGEST) || (flag == TRC_SLOW_REGEN);
+ || (flag == TRC_LOW_AC) || (flag == TRC_HARD_SPELL) || (flag == TRC_FAST_DIGEST) || (flag == TRC_SLOW_REGEN || flag == TRC_BERS_RAGE);
}
static void choise_cursed_item(player_type *creature_ptr, BIT_FLAGS flag, object_type *o_ptr, int *choices, int *number, int item_num)
case TRC_SLOW_REGEN:
cf = TR_SLOW_REGEN;
break;
+ case TRC_BERS_RAGE:
+ cf = TR_BERS_RAGE;
+ break;
default:
break;
}
set_afraid(creature_ptr, creature_ptr->afraid + 13 + randint1(26));
}
+/*!
+ * @brief 装備による狂戦士化の発作を引き起こす
+ * @param creature_ptr プレイヤー情報への参照ポインタ
+ */
+static void curse_berserk_rage(player_type *creature_ptr)
+{
+ if (((creature_ptr->cursed & TRC_BERS_RAGE) == 0) || !one_in_(1500))
+ return;
+
+ disturb(creature_ptr, FALSE, TRUE);
+ msg_print(_("ウガァァア!", "RAAAAGHH!"));
+ msg_print(_("激怒の発作に襲われた!", "You feel a fit of rage coming over you!"));
+ (void)set_shero(creature_ptr, 10 + randint1(creature_ptr->lev), FALSE);
+ (void)set_afraid(creature_ptr, 0);
+}
+
static void curse_drain_hp(player_type *creature_ptr)
{
if (((creature_ptr->cursed & TRC_DRAIN_HP) == 0) || !one_in_(666))
multiply_high_curse(creature_ptr);
curse_call_monster(creature_ptr);
curse_cowardice(creature_ptr);
+ curse_berserk_rage(creature_ptr);
if ((creature_ptr->cursed & TRC_TELEPORT) && one_in_(200) && !creature_ptr->anti_tele) {
disturb(creature_ptr, FALSE, TRUE);
teleport_player(creature_ptr, 40, TELEPORT_PASSIVE);
return has_invuln_arrow(creature_ptr);
case TR_DARK_SOURCE:
case TR_SUPPORTIVE:
+ case TR_BERS_RAGE:
return check_equipment_flags(creature_ptr, tr_flag);
case TR_FLAG_MAX:
creature_ptr->cursed |= TRC_FAST_DIGEST;
if (has_flag(flgs, TR_SLOW_REGEN))
creature_ptr->cursed |= TRC_SLOW_REGEN;
+ if (has_flag(flgs, TR_BERS_RAGE))
+ creature_ptr->cursed |= TRC_BERS_RAGE;
creature_ptr->cursed |= (o_ptr->curse_flags & (0xFFFFFFF0L));
if (o_ptr->name1 == ART_CHAINSWORD)