#include "system/object-type-definition.h"
#include "system/player-type-definition.h"
#include "timed-effect/player-confusion.h"
+#include "timed-effect/player-fear.h"
#include "timed-effect/player-hallucination.h"
#include "timed-effect/player-stun.h"
#include "timed-effect/timed-effects.h"
}
}
- if (player_ptr->fearful) {
+ if (effects->fear()->is_fearful()) {
if (m_ptr->ml) {
msg_format(_("恐くて%sを攻撃できない!", "You are too fearful to attack %s!"), m_name);
} else {
#include "system/player-type-definition.h"
#include "timed-effect/player-confusion.h"
#include "timed-effect/player-cut.h"
+#include "timed-effect/player-fear.h"
#include "timed-effect/player-hallucination.h"
#include "timed-effect/player-paralysis.h"
#include "timed-effect/player-stun.h"
(void)bss.mod_confusion(-1);
}
- if (player_ptr->fearful) {
+ if (effects->fear()->is_fearful()) {
(void)bss.mod_afraidness(-1);
}
#include "system/player-type-definition.h"
#include "timed-effect/player-confusion.h"
#include "timed-effect/player-cut.h"
+#include "timed-effect/player-fear.h"
#include "timed-effect/player-hallucination.h"
#include "timed-effect/player-paralysis.h"
#include "timed-effect/player-stun.h"
auto effects = player_ptr->effects();
player_ptr->fast = rd_s16b();
player_ptr->slow = rd_s16b();
- player_ptr->fearful = rd_s16b();
+ effects->fear()->set(rd_s16b());
effects->cut()->set(rd_s16b());
effects->stun()->set(rd_s16b());
player_ptr->poisoned = rd_s16b();
#include "system/player-type-definition.h"
#include "term/screen-processor.h"
#include "timed-effect/player-cut.h"
+#include "timed-effect/player-fear.h"
#include "timed-effect/player-stun.h"
#include "timed-effect/timed-effects.h"
#include "util/bit-flags-calculator.h"
return false;
}
- if (player_ptr->fearful) {
+ if (effects->fear()->is_fearful()) {
msg_print(_("体が震えて構えられない!", "You are trembling with fear!"));
return false;
}
#include "term/screen-processor.h"
#include "timed-effect/player-confusion.h"
#include "timed-effect/player-cut.h"
+#include "timed-effect/player-fear.h"
#include "timed-effect/player-hallucination.h"
#include "timed-effect/player-stun.h"
#include "timed-effect/timed-effects.h"
self_ptr->info[self_ptr->line++] = _("あなたは混乱している。", "You are confused.");
}
- if (player_ptr->fearful) {
+ if (effects->fear()->is_fearful()) {
self_ptr->info[self_ptr->line++] = _("あなたは恐怖に侵されている。", "You are terrified.");
}
info[i++] = _("あなたは混乱している", "You are confused");
}
- if (player_ptr->fearful) {
- info2[i] = report_magics_aux(player_ptr->fearful);
+ if (effects->fear()->is_fearful()) {
+ info2[i] = report_magics_aux(effects->fear()->current());
info[i++] = _("あなたは恐怖に侵されている", "You are terrified");
}
#include "system/player-type-definition.h"
#include "timed-effect/player-confusion.h"
#include "timed-effect/player-cut.h"
+#include "timed-effect/player-fear.h"
#include "timed-effect/player-hallucination.h"
#include "timed-effect/player-paralysis.h"
#include "timed-effect/player-stun.h"
wr_s16b(player_ptr->enchant_energy_need);
wr_s16b(player_ptr->fast);
wr_s16b(player_ptr->slow);
- wr_s16b(player_ptr->fearful);
+ wr_s16b(effects->fear()->current());
wr_s16b(effects->cut()->current());
wr_s16b(effects->stun()->current());
wr_s16b(player_ptr->poisoned);
#include "system/player-type-definition.h"
#include "timed-effect/player-confusion.h"
#include "timed-effect/player-cut.h"
+#include "timed-effect/player-fear.h"
#include "timed-effect/player-hallucination.h"
#include "timed-effect/player-paralysis.h"
#include "timed-effect/player-stun.h"
return false;
}
+ auto fear = this->player_ptr->effects()->fear();
if (v > 0) {
- if (!this->player_ptr->fearful) {
+ if (!fear->is_fearful()) {
msg_print(_("何もかも恐くなってきた!", "You are terrified!"));
if (PlayerClass(this->player_ptr).lose_balance()) {
msg_print(_("型が崩れた。", "You lose your stance."));
chg_virtue(this->player_ptr, V_VALOUR, -1);
}
} else {
- if (this->player_ptr->fearful) {
+ if (fear->is_fearful()) {
msg_print(_("やっと恐怖を振り払った。", "You feel bolder now."));
notice = true;
}
}
- this->player_ptr->fearful = v;
+ fear->set(v);
this->player_ptr->redraw |= PR_STATUS;
if (!notice) {
return false;
bool BadStatusSetter::mod_afraidness(const TIME_EFFECT tmp_v)
{
- return this->afraidness(this->player_ptr->fearful + tmp_v);
+ return this->afraidness(this->player_ptr->effects()->fear()->current() + tmp_v);
}
/*!
#include "system/player-type-definition.h"
#include "timed-effect/player-confusion.h"
#include "timed-effect/player-cut.h"
+#include "timed-effect/player-fear.h"
#include "timed-effect/player-hallucination.h"
#include "timed-effect/player-paralysis.h"
#include "timed-effect/player-stun.h"
player_ptr->blind = 0; /* Timed -- Blindness */
effects->paralysis()->reset();
effects->confusion()->reset();
- player_ptr->fearful = 0; /* Timed -- Fear */
+ effects->fear()->reset();
effects->hallucination()->reset();
player_ptr->poisoned = 0; /* Timed -- Poisoned */
effects->cut()->reset();
#include "market/arena-info-table.h"
#include "timed-effect/player-confusion.h"
#include "timed-effect/player-cut.h"
+#include "timed-effect/player-fear.h"
#include "timed-effect/player-hallucination.h"
#include "timed-effect/player-paralysis.h"
#include "timed-effect/player-stun.h"
is_fully_healthy &= !this->blind;
is_fully_healthy &= !effects->confusion()->is_confused();
is_fully_healthy &= !this->poisoned;
- is_fully_healthy &= !this->fearful;
+ is_fully_healthy &= !effects->fear()->is_fearful();
is_fully_healthy &= !effects->stun()->is_stunned();
is_fully_healthy &= !effects->cut()->is_cut();
is_fully_healthy &= !this->slow;
TIME_EFFECT fast{}; /* Timed -- Fast */
TIME_EFFECT slow{}; /* Timed -- Slow */
TIME_EFFECT blind{}; /* Timed -- Blindness */
- TIME_EFFECT fearful{}; /* Timed -- Fear */
TIME_EFFECT poisoned{}; /* Timed -- Poisoned */
TIME_EFFECT protevil{}; /* Timed -- Protection */
#include "term/term-color-types.h"
#include "timed-effect/player-confusion.h"
#include "timed-effect/player-cut.h"
+#include "timed-effect/player-fear.h"
#include "timed-effect/player-hallucination.h"
#include "timed-effect/player-paralysis.h"
#include "timed-effect/player-stun.h"
ADD_BAR_FLAG(BAR_ALTER);
}
- if (player_ptr->fearful) {
+ if (effects->fear()->is_fearful()) {
ADD_BAR_FLAG(BAR_AFRAID);
}