#include "system/floor-type-definition.h"
#include "system/player-type-definition.h"
#include "term/screen-processor.h"
-#include "timed-effect/player-blindness.h"
#include "timed-effect/player-confusion.h"
#include "timed-effect/player-hallucination.h"
#include "timed-effect/player-stun.h"
bool cmd_limit_blind(PlayerType *player_ptr)
{
- if (player_ptr->effects()->blindness()->is_blind()) {
+ if (player_ptr->effects()->blindness().is_blind()) {
msg_print(_("目が見えない。", "You can't see anything."));
return true;
}
#include "system/player-type-definition.h"
#include "system/terrain-type-definition.h"
#include "term/screen-processor.h"
-#include "timed-effect/player-blindness.h"
#include "timed-effect/player-confusion.h"
#include "timed-effect/player-hallucination.h"
#include "timed-effect/timed-effects.h"
int i = player_ptr->skill_dis;
const auto effects = player_ptr->effects();
- if (effects->blindness()->is_blind() || no_lite(player_ptr)) {
+ if (effects->blindness().is_blind() || no_lite(player_ptr)) {
i = i / 10;
}
} else if (terrain.power) {
auto power_disarm = player_ptr->skill_dis;
const auto effects = player_ptr->effects();
- if (effects->blindness()->is_blind() || no_lite(player_ptr)) {
+ if (effects->blindness().is_blind() || no_lite(player_ptr)) {
power_disarm = power_disarm / 10;
}
PlayerEnergy(player_ptr).set_player_turn_energy(100);
int i = player_ptr->skill_dis;
const auto effects = player_ptr->effects();
- if (effects->blindness()->is_blind() || no_lite(player_ptr)) {
+ if (effects->blindness().is_blind() || no_lite(player_ptr)) {
i = i / 10;
}
int i = player_ptr->skill_dis;
PlayerEnergy(player_ptr).set_player_turn_energy(100);
auto effects = player_ptr->effects();
- if (effects->blindness()->is_blind() || no_lite(player_ptr)) {
+ if (effects->blindness().is_blind() || no_lite(player_ptr)) {
i = i / 10;
}
#include "system/grid-type-definition.h"
#include "system/monster-entity.h"
#include "system/player-type-definition.h"
-#include "timed-effect/player-blindness.h"
#include "timed-effect/timed-effects.h"
#include "view/display-messages.h"
*/
static DIRECTION travel_test(PlayerType *player_ptr, DIRECTION prev_dir)
{
- const auto blindness = player_ptr->effects()->blindness();
- if (blindness->is_blind() || no_lite(player_ptr)) {
+ const auto &blindness = player_ptr->effects()->blindness();
+ if (blindness.is_blind() || no_lite(player_ptr)) {
msg_print(_("目が見えない!", "You cannot see!"));
return 0;
}
#include "system/angband.h"
#include "system/player-type-definition.h"
#include "system/redrawing-flags-updater.h"
-#include "timed-effect/player-blindness.h"
#include "timed-effect/player-confusion.h"
#include "timed-effect/player-hallucination.h"
#include "timed-effect/player-paralysis.h"
const auto effects = player_ptr->effects();
const auto is_confused = effects->confusion()->is_confused();
- const auto is_blind = effects->blindness()->is_blind();
+ const auto is_blind = effects->blindness().is_blind();
const auto is_stunned = effects->stun()->is_stunned();
const auto is_hallucinated = effects->hallucination()->is_hallucinated();
const auto is_paralyzed = effects->paralysis()->is_paralyzed();
#include "system/terrain-type-definition.h"
#include "target/target-getter.h"
#include "term/screen-processor.h"
-#include "timed-effect/player-blindness.h"
#include "timed-effect/player-confusion.h"
#include "timed-effect/player-hallucination.h"
#include "timed-effect/timed-effects.h"
flag = false;
int i = player_ptr->skill_dis;
const auto effects = player_ptr->effects();
- if (effects->blindness()->is_blind() || no_lite(player_ptr)) {
+ if (effects->blindness().is_blind() || no_lite(player_ptr)) {
i = i / 10;
}
#include "system/redrawing-flags-updater.h"
#include "term/screen-processor.h"
#include "term/z-form.h"
-#include "timed-effect/player-blindness.h"
#include "timed-effect/timed-effects.h"
#include "util/bit-flags-calculator.h"
#include "util/int-char-converter.h"
return false;
}
- if (player_ptr->effects()->blindness()->is_blind() || no_lite(player_ptr)) {
+ if (player_ptr->effects()->blindness().is_blind() || no_lite(player_ptr)) {
if (pc.equals(PlayerClassType::FORCETRAINER)) {
confirm_use_force(player_ptr, false);
} else {
#include "status/temporary-resistance.h"
#include "system/player-type-definition.h"
#include "timed-effect/player-acceleration.h"
-#include "timed-effect/player-blindness.h"
#include "timed-effect/player-confusion.h"
#include "timed-effect/player-cut.h"
#include "timed-effect/player-deceleration.h"
(void)bss.mod_hallucination(-1);
}
- if (effects->blindness()->is_blind()) {
+ if (effects->blindness().is_blind()) {
(void)bss.mod_blindness(-1);
}
#include "system/player-type-definition.h"
#include "system/redrawing-flags-updater.h"
#include "term/screen-processor.h"
-#include "timed-effect/player-blindness.h"
#include "timed-effect/player-confusion.h"
#include "timed-effect/player-cut.h"
#include "timed-effect/player-hallucination.h"
}
const auto effects = player_ptr->effects();
- if (player_ptr->riding && !effects->confusion()->is_confused() && !effects->blindness()->is_blind()) {
+ if (player_ptr->riding && !effects->confusion()->is_confused() && !effects->blindness().is_blind()) {
auto *m_ptr = &player_ptr->current_floor_ptr->m_list[player_ptr->riding];
auto *r_ptr = &m_ptr->get_monrace();
if (m_ptr->is_asleep()) {
#include "system/player-type-definition.h"
#include "system/redrawing-flags-updater.h"
#include "system/terrain-type-definition.h"
-#include "timed-effect/player-blindness.h"
#include "timed-effect/timed-effects.h"
#include "util/bit-flags-calculator.h"
#include "view/display-messages.h"
}
}
- if (player_ptr->effects()->blindness()->is_blind() || !grid.has_los()) {
+ if (player_ptr->effects()->blindness().is_blind() || !grid.has_los()) {
break;
}
cave_alter_feat(player_ptr, y, x, TerrainCharacteristics::TUNNEL);
}
- if (player_ptr->effects()->blindness()->is_blind() || !grid.has_los()) {
+ if (player_ptr->effects()->blindness().is_blind() || !grid.has_los()) {
break;
}
#include "status/buff-setter.h"
#include "system/player-type-definition.h"
#include "timed-effect/player-acceleration.h"
-#include "timed-effect/player-blindness.h"
#include "timed-effect/timed-effects.h"
#include "view/display-messages.h"
void effect_player_old_heal(PlayerType *player_ptr, EffectPlayerType *ep_ptr)
{
- if (player_ptr->effects()->blindness()->is_blind()) {
+ if (player_ptr->effects()->blindness().is_blind()) {
msg_print(_("何らかの攻撃によって気分がよくなった。", "You are hit by something invigorating!"));
}
void effect_player_old_speed(PlayerType *player_ptr, EffectPlayerType *ep_ptr)
{
- if (player_ptr->effects()->blindness()->is_blind()) {
+ if (player_ptr->effects()->blindness().is_blind()) {
msg_print(_("何かで攻撃された!", "You are hit by something!"));
}
void effect_player_old_slow(PlayerType *player_ptr)
{
- if (player_ptr->effects()->blindness()->is_blind()) {
+ if (player_ptr->effects()->blindness().is_blind()) {
msg_print(_("何か遅いもので攻撃された!", "You are hit by something slow!"));
}
return;
}
- if (player_ptr->effects()->blindness()->is_blind()) {
+ if (player_ptr->effects()->blindness().is_blind()) {
msg_print(_("眠ってしまった!", "You fall asleep!"));
}
#include "system/item-entity.h"
#include "system/player-type-definition.h"
#include "system/redrawing-flags-updater.h"
-#include "timed-effect/player-blindness.h"
#include "timed-effect/timed-effects.h"
#include "view/display-messages.h"
#include "world/world.h"
void effect_player_elements(
PlayerType *player_ptr, EffectPlayerType *ep_ptr, std::string_view attack_message, int (*damage_func)(PlayerType *, int, std::string_view, bool))
{
- if (player_ptr->effects()->blindness()->is_blind()) {
+ if (player_ptr->effects()->blindness().is_blind()) {
msg_print(attack_message);
}
void effect_player_poison(PlayerType *player_ptr, EffectPlayerType *ep_ptr)
{
bool double_resist = is_oppose_pois(player_ptr);
- if (player_ptr->effects()->blindness()->is_blind()) {
+ if (player_ptr->effects()->blindness().is_blind()) {
msg_print(_("毒で攻撃された!", "You are hit by poison!"));
}
void effect_player_nuke(PlayerType *player_ptr, EffectPlayerType *ep_ptr)
{
bool double_resist = is_oppose_pois(player_ptr);
- if (player_ptr->effects()->blindness()->is_blind()) {
+ if (player_ptr->effects()->blindness().is_blind()) {
msg_print(_("放射能で攻撃された!", "You are hit by radiation!"));
}
void effect_player_missile(PlayerType *player_ptr, EffectPlayerType *ep_ptr)
{
- if (player_ptr->effects()->blindness()->is_blind()) {
+ if (player_ptr->effects()->blindness().is_blind()) {
msg_print(_("何かで攻撃された!", "You are hit by something!"));
}
void effect_player_holy_fire(PlayerType *player_ptr, EffectPlayerType *ep_ptr)
{
- if (player_ptr->effects()->blindness()->is_blind()) {
+ if (player_ptr->effects()->blindness().is_blind()) {
msg_print(_("何かで攻撃された!", "You are hit by something!"));
}
void effect_player_hell_fire(PlayerType *player_ptr, EffectPlayerType *ep_ptr)
{
- if (player_ptr->effects()->blindness()->is_blind()) {
+ if (player_ptr->effects()->blindness().is_blind()) {
msg_print(_("何かで攻撃された!", "You are hit by something!"));
}
void effect_player_arrow(PlayerType *player_ptr, EffectPlayerType *ep_ptr)
{
- if (player_ptr->effects()->blindness()->is_blind()) {
+ if (player_ptr->effects()->blindness().is_blind()) {
sound(SOUND_SHOOT_HIT);
msg_print(_("何か鋭いもので攻撃された!", "You are hit by something sharp!"));
ep_ptr->get_damage = take_hit(player_ptr, DAMAGE_ATTACK, ep_ptr->dam, ep_ptr->killer);
void effect_player_plasma(PlayerType *player_ptr, EffectPlayerType *ep_ptr)
{
- if (player_ptr->effects()->blindness()->is_blind()) {
+ if (player_ptr->effects()->blindness().is_blind()) {
msg_print(_("何かとても熱いもので攻撃された!", "You are hit by something *HOT*!"));
}
void effect_player_nether(PlayerType *player_ptr, EffectPlayerType *ep_ptr)
{
- if (player_ptr->effects()->blindness()->is_blind()) {
+ if (player_ptr->effects()->blindness().is_blind()) {
msg_print(_("地獄の力で攻撃された!", "You are hit by nether forces!"));
}
*/
void effect_player_water(PlayerType *player_ptr, EffectPlayerType *ep_ptr)
{
- if (player_ptr->effects()->blindness()->is_blind()) {
+ if (player_ptr->effects()->blindness().is_blind()) {
msg_print(_("何か湿ったもので攻撃された!", "You are hit by something wet!"));
}
void effect_player_chaos(PlayerType *player_ptr, EffectPlayerType *ep_ptr)
{
- if (player_ptr->effects()->blindness()->is_blind()) {
+ if (player_ptr->effects()->blindness().is_blind()) {
msg_print(_("無秩序の波動で攻撃された!", "You are hit by a wave of anarchy!"));
}
void effect_player_shards(PlayerType *player_ptr, EffectPlayerType *ep_ptr)
{
- if (player_ptr->effects()->blindness()->is_blind()) {
+ if (player_ptr->effects()->blindness().is_blind()) {
msg_print(_("何か鋭いもので攻撃された!", "You are hit by something sharp!"));
}
void effect_player_sound(PlayerType *player_ptr, EffectPlayerType *ep_ptr)
{
- if (player_ptr->effects()->blindness()->is_blind()) {
+ if (player_ptr->effects()->blindness().is_blind()) {
msg_print(_("轟音で攻撃された!", "You are hit by a loud noise!"));
}
void effect_player_confusion(PlayerType *player_ptr, EffectPlayerType *ep_ptr)
{
- if (player_ptr->effects()->blindness()->is_blind()) {
+ if (player_ptr->effects()->blindness().is_blind()) {
msg_print(_("何か混乱するもので攻撃された!", "You are hit by something puzzling!"));
}
void effect_player_disenchant(PlayerType *player_ptr, EffectPlayerType *ep_ptr)
{
- if (player_ptr->effects()->blindness()->is_blind()) {
+ if (player_ptr->effects()->blindness().is_blind()) {
msg_print(_("何かさえないもので攻撃された!", "You are hit by something static!"));
}
void effect_player_nexus(PlayerType *player_ptr, EffectPlayerType *ep_ptr)
{
- if (player_ptr->effects()->blindness()->is_blind()) {
+ if (player_ptr->effects()->blindness().is_blind()) {
msg_print(_("何か奇妙なもので攻撃された!", "You are hit by something strange!"));
}
void effect_player_force(PlayerType *player_ptr, EffectPlayerType *ep_ptr)
{
- if (player_ptr->effects()->blindness()->is_blind()) {
+ if (player_ptr->effects()->blindness().is_blind()) {
msg_print(_("運動エネルギーで攻撃された!", "You are hit by kinetic force!"));
}
if (!has_resist_sound(player_ptr) && !check_multishadow(player_ptr)) {
void effect_player_rocket(PlayerType *player_ptr, EffectPlayerType *ep_ptr)
{
- if (player_ptr->effects()->blindness()->is_blind()) {
+ if (player_ptr->effects()->blindness().is_blind()) {
msg_print(_("爆発があった!", "There is an explosion!"));
}
void effect_player_inertial(PlayerType *player_ptr, EffectPlayerType *ep_ptr)
{
- if (player_ptr->effects()->blindness()->is_blind()) {
+ if (player_ptr->effects()->blindness().is_blind()) {
msg_print(_("何か遅いもので攻撃された!", "You are hit by something slow!"));
}
void effect_player_lite(PlayerType *player_ptr, EffectPlayerType *ep_ptr)
{
- const auto is_blind = player_ptr->effects()->blindness()->is_blind();
+ const auto is_blind = player_ptr->effects()->blindness().is_blind();
if (is_blind) {
msg_print(_("何かで攻撃された!", "You are hit by something!"));
}
void effect_player_dark(PlayerType *player_ptr, EffectPlayerType *ep_ptr)
{
- const auto is_blind = player_ptr->effects()->blindness()->is_blind();
+ const auto is_blind = player_ptr->effects()->blindness().is_blind();
if (is_blind) {
msg_print(_("何かで攻撃された!", "You are hit by something!"));
}
*/
void effect_player_time(PlayerType *player_ptr, EffectPlayerType *ep_ptr)
{
- if (player_ptr->effects()->blindness()->is_blind()) {
+ if (player_ptr->effects()->blindness().is_blind()) {
msg_print(_("過去からの衝撃に攻撃された!", "You are hit by a blast from the past!"));
}
void effect_player_gravity(PlayerType *player_ptr, EffectPlayerType *ep_ptr)
{
- if (player_ptr->effects()->blindness()->is_blind()) {
+ if (player_ptr->effects()->blindness().is_blind()) {
msg_print(_("何か重いもので攻撃された!", "You are hit by something heavy!"));
}
void effect_player_disintegration(PlayerType *player_ptr, EffectPlayerType *ep_ptr)
{
- if (player_ptr->effects()->blindness()->is_blind()) {
+ if (player_ptr->effects()->blindness().is_blind()) {
msg_print(_("純粋なエネルギーで攻撃された!", "You are hit by pure energy!"));
}
void effect_player_death_ray(PlayerType *player_ptr, EffectPlayerType *ep_ptr)
{
- if (player_ptr->effects()->blindness()->is_blind()) {
+ if (player_ptr->effects()->blindness().is_blind()) {
msg_print(_("何か非常に冷たいもので攻撃された!", "You are hit by something extremely cold!"));
}
void effect_player_mana(PlayerType *player_ptr, EffectPlayerType *ep_ptr)
{
- if (player_ptr->effects()->blindness()->is_blind()) {
+ if (player_ptr->effects()->blindness().is_blind()) {
msg_print(_("魔法のオーラで攻撃された!", "You are hit by an aura of magic!"));
}
void effect_player_psy_spear(PlayerType *player_ptr, EffectPlayerType *ep_ptr)
{
- if (player_ptr->effects()->blindness()->is_blind()) {
+ if (player_ptr->effects()->blindness().is_blind()) {
msg_print(_("エネルギーの塊で攻撃された!", "You are hit by an energy!"));
}
void effect_player_meteor(PlayerType *player_ptr, EffectPlayerType *ep_ptr)
{
- if (player_ptr->effects()->blindness()->is_blind()) {
+ if (player_ptr->effects()->blindness().is_blind()) {
msg_print(_("何かが空からあなたの頭上に落ちてきた!", "Something falls from the sky on you!"));
}
void effect_player_icee(PlayerType *player_ptr, EffectPlayerType *ep_ptr)
{
- if (player_ptr->effects()->blindness()->is_blind()) {
+ if (player_ptr->effects()->blindness().is_blind()) {
msg_print(_("何か鋭く冷たいもので攻撃された!", "You are hit by something sharp and cold!"));
}
void effect_player_void(PlayerType *player_ptr, EffectPlayerType *ep_ptr)
{
- auto effect_mes = player_ptr->effects()->blindness()->is_blind() ? _("何かに身体が引っ張りこまれる!", "Something absorbs you!")
- : _("周辺の空間が歪んだ。", "Sight warps around you.");
+ auto effect_mes = player_ptr->effects()->blindness().is_blind() ? _("何かに身体が引っ張りこまれる!", "Something absorbs you!")
+ : _("周辺の空間が歪んだ。", "Sight warps around you.");
msg_print(effect_mes);
if (!check_multishadow(player_ptr) && !player_ptr->levitation && !player_ptr->anti_tele) {
(void)BadStatusSetter(player_ptr).mod_deceleration(randint0(4) + 4, false);
void effect_player_abyss(PlayerType *player_ptr, EffectPlayerType *ep_ptr)
{
- const auto is_blind = player_ptr->effects()->blindness()->is_blind();
+ const auto is_blind = player_ptr->effects()->blindness().is_blind();
const auto effect_mes = is_blind ? _("身体が沈み込む気がする!", "You feel you are sinking into something!")
: _("深淵があなたを誘い込んでいる!", "You are falling into the abyss!");
msg_print(effect_mes);
#include "system/monster-race-info.h"
#include "system/player-type-definition.h"
#include "target/projection-path-calculator.h"
-#include "timed-effect/player-blindness.h"
#include "timed-effect/timed-effects.h"
#include "util/bit-flags-calculator.h"
#include "util/string-processor.h"
sound(SOUND_REFLECT);
std::string mes;
- if (player_ptr->effects()->blindness()->is_blind()) {
+ if (player_ptr->effects()->blindness().is_blind()) {
mes = _("何かが跳ね返った!", "Something bounces!");
} else if (PlayerClass(player_ptr).samurai_stance_is(SamuraiStanceType::FUUJIN)) {
mes = _("風の如く武器を振るって弾き返した!", "The attack bounces!");
#include "system/monster-race-info.h"
#include "system/player-type-definition.h"
#include "target/projection-path-calculator.h"
-#include "timed-effect/player-blindness.h"
#include "timed-effect/player-hallucination.h"
#include "timed-effect/timed-effects.h"
#include "util/bit-flags-calculator.h"
auto ox = x1;
auto visual = false;
bool see_s_msg = true;
- const auto is_blind = player_ptr->effects()->blindness()->is_blind();
+ const auto is_blind = player_ptr->effects()->blindness().is_blind();
auto &floor = *player_ptr->current_floor_ptr;
for (const auto &[ny, nx] : path_g) {
const Pos2D pos(ny, nx);
#include "system/monster-race-info.h"
#include "system/player-type-definition.h"
#include "system/terrain-type-definition.h"
-#include "timed-effect/player-blindness.h"
#include "timed-effect/timed-effects.h"
#include "util/bit-flags-calculator.h"
#include "view/display-messages.h"
return;
}
- if (!player_ptr->effects()->blindness()->is_blind()) {
+ if (!player_ptr->effects()->blindness().is_blind()) {
msg_print(_("突然階段が塞がれてしまった。", "Suddenly the stairs is blocked!"));
} else {
msg_print(_("ゴトゴトと何か音がした。", "You hear some noises."));
#include "system/monster-entity.h"
#include "system/player-type-definition.h"
#include "target/projection-path-calculator.h"
-#include "timed-effect/player-blindness.h"
#include "timed-effect/timed-effects.h"
#include "util/bit-flags-calculator.h"
bool player_can_see_bold(PlayerType *player_ptr, POSITION y, POSITION x)
{
/* Blind players see nothing */
- if (player_ptr->effects()->blindness()->is_blind()) {
+ if (player_ptr->effects()->blindness().is_blind()) {
return false;
}
#include "system/terrain-type-definition.h"
#include "term/gameterm.h"
#include "term/term-color-types.h"
-#include "timed-effect/player-blindness.h"
#include "timed-effect/timed-effects.h"
#include "util/bit-flags-calculator.h"
#include "util/enum-converter.h"
auto &grid = floor.get_grid(pos);
/* Blind players see nothing */
- if (player_ptr->effects()->blindness()->is_blind()) {
+ if (player_ptr->effects()->blindness().is_blind()) {
return;
}
#include "system/floor-type-definition.h"
#include "system/player-type-definition.h"
#include "timed-effect/player-acceleration.h"
-#include "timed-effect/player-blindness.h"
#include "timed-effect/player-confusion.h"
#include "timed-effect/player-cut.h"
#include "timed-effect/player-deceleration.h"
{
auto effects = player_ptr->effects();
strip_bytes(2); /* Old "rest" */
- effects->blindness()->set(rd_s16b());
+ effects->blindness().set(rd_s16b());
effects->paralysis()->set(rd_s16b());
effects->confusion()->set(rd_s16b());
player_ptr->food = rd_s16b();
#include "system/monster-race-info.h"
#include "system/player-type-definition.h"
#include "system/redrawing-flags-updater.h"
-#include "timed-effect/player-blindness.h"
#include "timed-effect/timed-effects.h"
#include "util/string-processor.h"
#include "view/display-messages.h"
bool is_special_magic = ms_ptr->m_ptr->ml;
is_special_magic &= ms_ptr->maneable;
is_special_magic &= w_ptr->timewalk_m_idx == 0;
- is_special_magic &= !player_ptr->effects()->blindness()->is_blind();
+ is_special_magic &= !player_ptr->effects()->blindness().is_blind();
is_special_magic &= pc.equals(PlayerClassType::IMITATOR);
is_special_magic &= ms_ptr->thrown_spell != MonsterAbilityType::SPECIAL;
if (!is_special_magic) {
#include "target/grid-selector.h"
#include "target/projection-path-calculator.h"
#include "target/target-getter.h"
-#include "timed-effect/player-blindness.h"
#include "timed-effect/timed-effects.h"
#include "util/bit-flags-calculator.h"
#include "view/display-messages.h"
}
if (floor.has_los(pos) && projectable(player_ptr, player_ptr->y, player_ptr->x, y, x)) {
- if (!(player_ptr->effects()->blindness()->is_blind()) && panel_contains(y, x)) {
+ if (!(player_ptr->effects()->blindness().is_blind()) && panel_contains(y, x)) {
print_bolt_pict(player_ptr, y, x, y, x, AttributeType::MANA);
move_cursor_relative(y, x);
term_fresh();
#include "target/projection-path-calculator.h"
#include "target/target-checker.h"
#include "target/target-getter.h"
-#include "timed-effect/player-blindness.h"
#include "timed-effect/player-confusion.h"
#include "timed-effect/player-hallucination.h"
#include "timed-effect/player-paralysis.h"
const auto effects = player_ptr->effects();
const auto is_confused = effects->confusion()->is_confused();
- const auto is_blind = effects->blindness()->is_blind();
+ const auto is_blind = effects->blindness().is_blind();
const auto is_hallucinated = effects->hallucination()->is_hallucinated();
const auto is_paralyzed = effects->paralysis()->is_paralyzed();
if (is_confused || is_blind || is_paralyzed || is_hallucinated) {
#include "system/monster-entity.h"
#include "system/player-type-definition.h"
#include "system/redrawing-flags-updater.h"
-#include "timed-effect/player-blindness.h"
#include "timed-effect/player-paralysis.h"
#include "timed-effect/timed-effects.h"
#include "util/bit-flags-calculator.h"
monap_ptr->o_ptr->fuel = 1;
}
- if (!player_ptr->effects()->blindness()->is_blind()) {
+ if (!player_ptr->effects()->blindness().is_blind()) {
msg_print(_("明かりが暗くなってしまった。", "Your light dims."));
monap_ptr->obvious = true;
}
#include "system/monster-race-info.h"
#include "system/player-type-definition.h"
#include "system/redrawing-flags-updater.h"
-#include "timed-effect/player-blindness.h"
#include "timed-effect/player-hallucination.h"
#include "timed-effect/timed-effects.h"
#include "util/bit-flags-calculator.h"
}
if (is_psy_spear) {
- if (!player_ptr->effects()->blindness()->is_blind() && is_seen(player_ptr, m_ptr)) {
+ if (!player_ptr->effects()->blindness().is_blind() && is_seen(player_ptr, m_ptr)) {
msg_print(_("バリアを切り裂いた!", "The barrier is penetrated!"));
}
#include "system/player-type-definition.h"
#include "system/redrawing-flags-updater.h"
#include "target/projection-path-calculator.h"
-#include "timed-effect/player-blindness.h"
#include "timed-effect/player-hallucination.h"
#include "timed-effect/timed-effects.h"
#include "util/bit-flags-calculator.h"
update_specific_race_telepathy(player_ptr, um_ptr);
}
- if (!player_ptr->current_floor_ptr->has_los({ um_ptr->fy, um_ptr->fx }) || player_ptr->effects()->blindness()->is_blind()) {
+ if (!player_ptr->current_floor_ptr->has_los({ um_ptr->fy, um_ptr->fx }) || player_ptr->effects()->blindness().is_blind()) {
return;
}
#include "system/player-type-definition.h"
#include "system/redrawing-flags-updater.h"
#include "target/projection-path-calculator.h"
-#include "timed-effect/player-blindness.h"
#include "timed-effect/timed-effects.h"
#include "util/string-processor.h"
#include "view/display-messages.h"
static void check_mspell_imitation(PlayerType *player_ptr, msa_type *msa_ptr)
{
- const auto seen = (!player_ptr->effects()->blindness()->is_blind() && msa_ptr->m_ptr->ml);
+ const auto seen = (!player_ptr->effects()->blindness().is_blind() && msa_ptr->m_ptr->ml);
const auto can_imitate = player_ptr->current_floor_ptr->has_los({ msa_ptr->m_ptr->fy, msa_ptr->m_ptr->fx });
PlayerClass pc(player_ptr);
if (!seen || !can_imitate || (w_ptr->timewalk_m_idx != 0) || !pc.equals(PlayerClassType::IMITATOR)) {
#include "system/floor-type-definition.h"
#include "system/monster-entity.h"
#include "system/player-type-definition.h"
-#include "timed-effect/player-blindness.h"
#include "timed-effect/timed-effects.h"
#include "view/display-messages.h"
if (mon_to_player) {
msg_format(_("あなたは渦巻きに飲み込まれた。", "You are engulfed in a whirlpool."));
- } else if (mon_to_mon && known && see_either && !player_ptr->effects()->blindness()->is_blind()) {
+ } else if (mon_to_mon && known && see_either && !player_ptr->effects()->blindness().is_blind()) {
msg_format(_("%s^は渦巻に飲み込まれた。", "%s^ is engulfed in a whirlpool."), t_name.data());
}
return result;
#include "system/floor-type-definition.h"
#include "system/monster-entity.h"
#include "system/player-type-definition.h"
-#include "timed-effect/player-blindness.h"
#include "timed-effect/timed-effects.h"
#include "view/display-messages.h"
const auto t_name = monster_name(player_ptr, t_idx);
if (!spell_RF4_BREATH_special_message(m_ptr->r_idx, GF_TYPE, m_name.data())) {
- if (player_ptr->effects()->blindness()->is_blind()) {
+ if (player_ptr->effects()->blindness().is_blind()) {
if (mon_to_player || (mon_to_mon && known && see_either)) {
msg_format(_("%s^が何かのブレスを吐いた。", "%s^ breathes."), m_name.data());
}
#include "mspell/mspell-result.h"
#include "mspell/mspell-util.h"
#include "system/floor-type-definition.h"
-#include "timed-effect/player-blindness.h"
#include "timed-effect/timed-effects.h"
#include "view/display-messages.h"
if (target_type == MONSTER_TO_PLAYER) {
disturb(player_ptr, true, true);
- if (player_ptr->effects()->blindness()->is_blind()) {
+ if (player_ptr->effects()->blindness().is_blind()) {
msg_format(msg1.data(), m_name.data());
} else {
msg_format(msg2.data(), m_name.data());
#include "system/monster-race-info.h"
#include "system/player-type-definition.h"
#include "system/redrawing-flags-updater.h"
-#include "timed-effect/player-blindness.h"
#include "timed-effect/timed-effects.h"
#include "util/bit-flags-calculator.h"
#include "view/display-messages.h"
const auto m_name = monster_name(player_ptr, m_idx);
disturb(player_ptr, true, true);
- if (player_ptr->effects()->blindness()->is_blind()) {
+ if (player_ptr->effects()->blindness().is_blind()) {
msg_format(_("%s^が何かをつぶやいて邪悪に微笑んだ。", "%s^ mumbles, and then cackles evilly."), m_name.data());
} else {
msg_format(_("%s^が呪文を唱えて邪悪に微笑んだ。", "%s^ casts a spell and cackles evilly."), m_name.data());
#include "system/floor-type-definition.h"
#include "system/monster-entity.h"
#include "system/player-type-definition.h"
-#include "timed-effect/player-blindness.h"
#include "timed-effect/timed-effects.h"
#include "world/world.h"
{
const auto &floor = *player_ptr->current_floor_ptr;
const auto &monster = floor.m_list[m_idx];
- const auto seen = (!player_ptr->effects()->blindness()->is_blind() && monster.ml);
+ const auto seen = (!player_ptr->effects()->blindness().is_blind() && monster.ml);
const auto maneable = floor.has_los({ monster.fy, monster.fx });
return seen && maneable && (w_ptr->timewalk_m_idx == 0);
}
#include "system/monster-race-info.h"
#include "system/player-type-definition.h"
#include "system/redrawing-flags-updater.h"
-#include "timed-effect/player-blindness.h"
#include "timed-effect/timed-effects.h"
#include "view/display-messages.h"
#include <algorithm>
for (k = 0; k < num; k++) {
count += summon_named_creature(player_ptr, m_idx, y, x, MonsterRaceId::GRENADE, mode);
}
- if (player_ptr->effects()->blindness()->is_blind() && count) {
+ if (player_ptr->effects()->blindness().is_blind() && count) {
msg_print(_("多くのものが間近にばらまかれる音がする。", "You hear many things scattered nearby."));
}
#include "system/monster-race-info.h"
#include "system/player-type-definition.h"
#include "system/redrawing-flags-updater.h"
-#include "timed-effect/player-blindness.h"
#include "timed-effect/timed-effects.h"
#include "view/display-messages.h"
const auto m_name = monster_name(player_ptr, m_idx);
disturb(player_ptr, true, true);
- if (player_ptr->effects()->blindness()->is_blind()) {
+ if (player_ptr->effects()->blindness().is_blind()) {
msg_format(msgs.blind, m_name.data());
} else {
msg_format(msgs.not_blind, m_name.data());
MonsterSpellResult spell_RF5_MIND_BLAST(PlayerType *player_ptr, POSITION y, POSITION x, MONSTER_IDX m_idx, MONSTER_IDX t_idx, int target_type)
{
auto *m_ptr = &player_ptr->current_floor_ptr->m_list[m_idx];
- bool seen = (!player_ptr->effects()->blindness()->is_blind() && m_ptr->ml);
+ bool seen = (!player_ptr->effects()->blindness().is_blind() && m_ptr->ml);
const auto m_name = monster_name(player_ptr, m_idx);
const auto t_name = monster_name(player_ptr, t_idx);
MonsterSpellResult spell_RF5_BRAIN_SMASH(PlayerType *player_ptr, POSITION y, POSITION x, MONSTER_IDX m_idx, MONSTER_IDX t_idx, int target_type)
{
auto *m_ptr = &player_ptr->current_floor_ptr->m_list[m_idx];
- bool seen = (!player_ptr->effects()->blindness()->is_blind() && m_ptr->ml);
+ bool seen = (!player_ptr->effects()->blindness().is_blind() && m_ptr->ml);
const auto m_name = monster_name(player_ptr, m_idx);
const auto t_name = monster_name(player_ptr, t_idx);
_("%s^が自分の体に念を送った。", format("%%s^ concentrates on %s body.", m_poss.data())),
_("%s^が自分の体に念を送った。", format("%%s^ concentrates on %s body.", m_poss.data())));
- monspell_message_base(player_ptr, m_idx, t_idx, msg, player_ptr->effects()->blindness()->is_blind(), target_type);
+ monspell_message_base(player_ptr, m_idx, t_idx, msg, player_ptr->effects()->blindness().is_blind(), target_type);
if (set_monster_fast(player_ptr, m_idx, m_ptr->get_remaining_acceleration() + 100)) {
if (target_type == MONSTER_TO_PLAYER || (target_type == MONSTER_TO_MONSTER && see_m)) {
auto *floor_ptr = player_ptr->current_floor_ptr;
auto *m_ptr = &floor_ptr->m_list[m_idx];
DEPTH rlev = monster_level_idx(floor_ptr, m_idx);
- const auto is_blind = player_ptr->effects()->blindness()->is_blind();
+ const auto is_blind = player_ptr->effects()->blindness().is_blind();
const auto seen = (!is_blind && m_ptr->ml);
const auto m_poss = monster_desc(player_ptr, m_ptr, MD_PRON_VISIBLE | MD_POSSESSIVE);
MonsterSpellResult spell_RF6_INVULNER(PlayerType *player_ptr, MONSTER_IDX m_idx, MONSTER_IDX t_idx, int target_type)
{
auto *m_ptr = &player_ptr->current_floor_ptr->m_list[m_idx];
- bool seen = (!player_ptr->effects()->blindness()->is_blind() && m_ptr->ml);
+ bool seen = (!player_ptr->effects()->blindness().is_blind() && m_ptr->ml);
mspell_cast_msg msg(_("%s^が何かを力強くつぶやいた。", "%s^ mumbles powerfully."),
_("%s^が何かを力強くつぶやいた。", "%s^ mumbles powerfully."), _("%sは無傷の球の呪文を唱えた。", "%s^ casts a Globe of Invulnerability."),
_("%sは無傷の球の呪文を唱えた。", "%s^ casts a Globe of Invulnerability."));
#include "system/monster-entity.h"
#include "system/monster-race-info.h"
#include "system/player-type-definition.h"
-#include "timed-effect/player-blindness.h"
#include "timed-effect/timed-effects.h"
#include "util/bit-flags-calculator.h"
#include "view/display-messages.h"
summon_disturb(player_ptr, target_type, known, see_either);
- if (player_ptr->effects()->blindness()->is_blind()) {
+ if (player_ptr->effects()->blindness().is_blind()) {
if (mon_to_player) {
msg_format(_("%s^が何かをつぶやいた。", "%s^ mumbles."), m_name);
}
break;
}
- if (player_ptr->effects()->blindness()->is_blind() && count && (target_type == MONSTER_TO_PLAYER)) {
+ if (player_ptr->effects()->blindness().is_blind() && count && (target_type == MONSTER_TO_PLAYER)) {
msg_print(_("多くのものが間近に現れた音がする。", "You hear many things appear nearby."));
}
count += summon_cyber(player_ptr, m_idx, y, x);
}
- if (player_ptr->effects()->blindness()->is_blind() && count && mon_to_player) {
+ if (player_ptr->effects()->blindness().is_blind() && count && mon_to_player) {
msg_print(_("重厚な足音が近くで聞こえる。", "You hear heavy steps nearby."));
}
}
}
- if (player_ptr->effects()->blindness()->is_blind() && count && mon_to_player) {
+ if (player_ptr->effects()->blindness().is_blind() && count && mon_to_player) {
msg_print(_("何かが間近に現れた音がする。", "You hear something appear nearby."));
}
}
}
- if (player_ptr->effects()->blindness()->is_blind() && count && mon_to_player) {
+ if (player_ptr->effects()->blindness().is_blind() && count && mon_to_player) {
msg_print(_("多くのものが間近に現れた音がする。", "You hear many things appear nearby."));
}
count += summon_specific(player_ptr, m_idx, y, x, rlev, SUMMON_ANT, PM_ALLOW_GROUP);
}
- if (player_ptr->effects()->blindness()->is_blind() && count && mon_to_player) {
+ if (player_ptr->effects()->blindness().is_blind() && count && mon_to_player) {
msg_print(_("多くのものが間近に現れた音がする。", "You hear many things appear nearby."));
}
count += summon_specific(player_ptr, m_idx, y, x, rlev, SUMMON_SPIDER, PM_ALLOW_GROUP);
}
- if (player_ptr->effects()->blindness()->is_blind() && count && mon_to_player) {
+ if (player_ptr->effects()->blindness().is_blind() && count && mon_to_player) {
msg_print(_("多くのものが間近に現れた音がする。", "You hear many things appear nearby."));
}
count += summon_specific(player_ptr, m_idx, y, x, rlev, SUMMON_HOUND, PM_ALLOW_GROUP);
}
- if (player_ptr->effects()->blindness()->is_blind() && count && mon_to_player) {
+ if (player_ptr->effects()->blindness().is_blind() && count && mon_to_player) {
msg_print(_("多くのものが間近に現れた音がする。", "You hear many things appear nearby."));
}
count += summon_specific(player_ptr, m_idx, y, x, rlev, SUMMON_HYDRA, PM_ALLOW_GROUP);
}
- if (player_ptr->effects()->blindness()->is_blind() && count && mon_to_player) {
+ if (player_ptr->effects()->blindness().is_blind() && count && mon_to_player) {
msg_print(_("多くのものが間近に現れた音がする。", "You hear many things appear nearby."));
}
count += summon_specific(player_ptr, m_idx, y, x, rlev, SUMMON_ANGEL, PM_ALLOW_GROUP);
}
- const auto is_blind = player_ptr->effects()->blindness()->is_blind();
+ const auto is_blind = player_ptr->effects()->blindness().is_blind();
if (count < 2) {
if (is_blind && count) {
msg_print(_("何かが間近に現れた音がする。", "You hear something appear nearby."));
count += summon_specific(player_ptr, m_idx, y, x, rlev, SUMMON_DEMON, PM_ALLOW_GROUP);
}
- if (player_ptr->effects()->blindness()->is_blind() && count) {
+ if (player_ptr->effects()->blindness().is_blind() && count) {
msg_print(_("何かが間近に現れた音がする。", "You hear something appear nearby."));
}
count += summon_specific(player_ptr, m_idx, y, x, rlev, SUMMON_UNDEAD, PM_ALLOW_GROUP);
}
- if (player_ptr->effects()->blindness()->is_blind() && count) {
+ if (player_ptr->effects()->blindness().is_blind() && count) {
msg_print(_("何かが間近に現れた音がする。", "You hear something appear nearby."));
}
count += summon_specific(player_ptr, m_idx, y, x, rlev, SUMMON_DRAGON, (PM_ALLOW_GROUP | monster_u_mode(floor_ptr, m_idx)));
}
- if (player_ptr->effects()->blindness()->is_blind() && count) {
+ if (player_ptr->effects()->blindness().is_blind() && count) {
msg_print(_("何かが間近に現れた音がする。", "You hear something appear nearby."));
}
}
}
- if (player_ptr->effects()->blindness()->is_blind() && count && mon_to_player) {
+ if (player_ptr->effects()->blindness().is_blind() && count && mon_to_player) {
msg_print(_("間近で何か多くのものが這い回る音が聞こえる。", "You hear many creepy things appear nearby."));
}
}
}
- if (player_ptr->effects()->blindness()->is_blind() && count && mon_to_player) {
+ if (player_ptr->effects()->blindness().is_blind() && count && mon_to_player) {
msg_print(_("多くの力強いものが間近に現れた音が聞こえる。", "You hear many powerful things appear nearby."));
}
count += summon_specific(player_ptr, m_idx, y, x, rlev, SUMMON_AMBERITES, (PM_ALLOW_GROUP | PM_ALLOW_UNIQUE));
}
- if (player_ptr->effects()->blindness()->is_blind() && count && mon_to_player) {
+ if (player_ptr->effects()->blindness().is_blind() && count && mon_to_player) {
msg_print(_("何者かが次元を超えて現れた気配がした。", "You feel shadow shifting by immortal beings."));
}
count += summon_specific(player_ptr, m_idx, y, x, rlev, non_unique_type, (PM_ALLOW_GROUP | PM_ALLOW_UNIQUE));
}
- if (player_ptr->effects()->blindness()->is_blind() && count && mon_to_player) {
+ if (player_ptr->effects()->blindness().is_blind() && count && mon_to_player) {
msg_format(_("多くの%sが間近に現れた音が聞こえる。", "You hear many %s appear nearby."),
uniques_are_summoned ? _("力強いもの", "powerful things") : _("もの", "things"));
}
count += summon_specific(player_ptr, m_idx, y, x, rlev, SUMMON_DEAD_UNIQUE, (PM_ALLOW_GROUP | PM_ALLOW_UNIQUE | PM_CLONE));
}
- if (player_ptr->effects()->blindness()->is_blind() && count && mon_to_player) {
+ if (player_ptr->effects()->blindness().is_blind() && count && mon_to_player) {
msg_format(_("多くの力強いものが間近に蘇った音が聞こえる。", "You hear many powerful things animate nearby."));
}
#include "system/floor-type-definition.h"
#include "system/monster-entity.h"
#include "system/player-type-definition.h"
-#include "timed-effect/player-blindness.h"
#include "timed-effect/timed-effects.h"
#include "view/display-messages.h"
bool monspell_message(PlayerType *player_ptr, MONSTER_IDX m_idx, MONSTER_IDX t_idx, const mspell_cast_msg_blind &msgs, int target_type)
{
mspell_cast_msg mcm(msgs.blind, msgs.blind, msgs.to_player, msgs.to_mons);
- const auto is_blind = player_ptr->effects()->blindness()->is_blind();
+ const auto is_blind = player_ptr->effects()->blindness().is_blind();
return monspell_message_base(player_ptr, m_idx, t_idx, mcm, is_blind, target_type);
}
void simple_monspell_message(PlayerType *player_ptr, MONSTER_IDX m_idx, MONSTER_IDX t_idx, const mspell_cast_msg_simple &msgs, int target_type)
{
mspell_cast_msg mcm(msgs.to_player, msgs.to_mons, msgs.to_player, msgs.to_mons);
- const auto is_blind = player_ptr->effects()->blindness()->is_blind();
+ const auto is_blind = player_ptr->effects()->blindness().is_blind();
monspell_message_base(player_ptr, m_idx, t_idx, mcm, is_blind, target_type);
}
#include "spell/summon-types.h"
#include "system/monster-race-info.h"
#include "system/player-type-definition.h"
-#include "timed-effect/player-blindness.h"
#include "timed-effect/timed-effects.h"
#include "view/display-messages.h"
POSITION cx = x;
const auto m_name = monster_name(player_ptr, m_idx);
- if (player_ptr->effects()->blindness()->is_blind()) {
+ if (player_ptr->effects()->blindness().is_blind()) {
msg_format(_("%s^が何かをつぶやいた。", "%s^ mumbles."), m_name.data());
} else {
msg_format(_("%s^が魔法で幽鬼戦隊を召喚した!", "%s^ magically summons rangers of Nazgul!"), m_name.data());
#include "target/target-checker.h"
#include "target/target-getter.h"
#include "term/screen-processor.h"
-#include "timed-effect/player-blindness.h"
#include "timed-effect/player-hallucination.h"
#include "timed-effect/timed-effects.h"
#include "util/bit-flags-calculator.h"
void ObjectThrowEntity::display_boomerang_throw()
{
- const auto is_blind = this->player_ptr->effects()->blindness()->is_blind();
+ const auto is_blind = this->player_ptr->effects()->blindness().is_blind();
if ((this->back_chance > 37) && !is_blind && (this->i_idx >= 0)) {
msg_format(_("%sが手元に返ってきた。", "%s comes back to you."), this->o2_name.data());
this->come_back = true;
#include "system/item-entity.h"
#include "system/player-type-definition.h"
#include "system/redrawing-flags-updater.h"
-#include "timed-effect/player-blindness.h"
#include "timed-effect/timed-effects.h"
#include "view/display-messages.h"
#include "world/world.h"
rfu.set_flag(SubWindowRedrawingFlag::EQUIPMENT);
}
- if (player_ptr->effects()->blindness()->is_blind()) {
+ if (player_ptr->effects()->blindness().is_blind()) {
if (o_ptr->fuel == 0) {
o_ptr->fuel++;
}
#include "system/monster-race-info.h"
#include "system/player-type-definition.h"
#include "target/projection-path-calculator.h"
-#include "timed-effect/player-blindness.h"
#include "timed-effect/timed-effects.h"
#include "util/bit-flags-calculator.h"
#include "view/display-messages.h"
break;
case AttributeType::MONSTER_SHOOT:
- if (!player_ptr->effects()->blindness()->is_blind() && (has_invuln_arrow(player_ptr))) {
+ if (!player_ptr->effects()->blindness().is_blind() && (has_invuln_arrow(player_ptr))) {
dam = 0;
ignore_wraith_form = true;
}
#include "system/item-entity.h"
#include "system/player-type-definition.h"
#include "system/redrawing-flags-updater.h"
-#include "timed-effect/player-blindness.h"
#include "timed-effect/timed-effects.h"
#include "util/bit-flags-calculator.h"
switch (this->get_samurai_stance()) {
case SamuraiStanceType::FUUJIN:
- if (!this->player_ptr->effects()->blindness()->is_blind()) {
+ if (!this->player_ptr->effects()->blindness().is_blind()) {
flags.set(TR_REFLECT);
}
break;
#include "term/gameterm.h"
#include "term/screen-processor.h"
#include "term/z-form.h"
-#include "timed-effect/player-blindness.h"
#include "timed-effect/player-confusion.h"
#include "timed-effect/player-cut.h"
#include "timed-effect/player-fear.h"
static void set_bad_status_info(PlayerType *player_ptr, self_info_type *self_ptr)
{
auto effects = player_ptr->effects();
- if (effects->blindness()->is_blind()) {
+ if (effects->blindness().is_blind()) {
self_ptr->info_list.emplace_back(_("あなたは目が見えない。", "You cannot see."));
}
concptr info[128];
int info2[128];
const auto effects = player_ptr->effects();
- const auto blindness = effects->blindness();
- if (blindness->is_blind()) {
- info2[i] = report_magics_aux(blindness->current());
+ const auto &blindness = effects->blindness();
+ if (blindness.is_blind()) {
+ info2[i] = report_magics_aux(blindness.current());
info[i++] = _("あなたは目が見えない", "You cannot see");
}
#include "system/redrawing-flags-updater.h"
#include "system/terrain-type-definition.h"
#include "target/target-checker.h"
-#include "timed-effect/player-blindness.h"
#include "timed-effect/player-confusion.h"
#include "timed-effect/player-hallucination.h"
#include "timed-effect/timed-effects.h"
{
PERCENTAGE chance = player_ptr->skill_srh;
const auto effects = player_ptr->effects();
- if (effects->blindness()->is_blind() || no_lite(player_ptr)) {
+ if (effects->blindness().is_blind() || no_lite(player_ptr)) {
chance = chance / 10;
}
SubWindowRedrawingFlag::DUNGEON,
};
rfu.set_flags(flags_swrf);
- if ((!player_ptr->effects()->blindness()->is_blind() && !no_lite(player_ptr)) || !is_trap(player_ptr, grid_new.feat)) {
+ if ((!player_ptr->effects()->blindness().is_blind() && !no_lite(player_ptr)) || !is_trap(player_ptr, grid_new.feat)) {
grid_new.info &= ~(CAVE_UNSAFE);
}
#include "system/monster-entity.h"
#include "system/monster-race-info.h"
#include "system/player-type-definition.h"
-#include "timed-effect/player-blindness.h"
#include "timed-effect/timed-effects.h"
#include "util/bit-flags-calculator.h"
#include "util/string-processor.h"
BIT_FLAGS has_invuln_arrow(PlayerType *player_ptr)
{
- if (player_ptr->effects()->blindness()->is_blind()) {
+ if (player_ptr->effects()->blindness().is_blind()) {
return 0;
}
#include "system/floor-type-definition.h"
#include "system/player-type-definition.h"
#include "timed-effect/player-acceleration.h"
-#include "timed-effect/player-blindness.h"
#include "timed-effect/player-confusion.h"
#include "timed-effect/player-cut.h"
#include "timed-effect/player-deceleration.h"
auto effects = player_ptr->effects();
wr_s16b(0); /* old "rest" */
- wr_s16b(effects->blindness()->current());
+ wr_s16b(effects->blindness().current());
wr_s16b(effects->paralysis()->current());
wr_s16b(effects->confusion()->current());
wr_s16b(player_ptr->food);
#include "target/grid-selector.h"
#include "target/projection-path-calculator.h"
#include "target/target-checker.h"
-#include "timed-effect/player-blindness.h"
#include "timed-effect/player-hallucination.h"
#include "timed-effect/timed-effects.h"
#include "util/bit-flags-calculator.h"
const auto &[oy, ox] = *(path_g_ite == path_g.begin() ? path_g.begin() : path_g_ite - 1);
const auto &[ny, nx] = *path_g_ite;
- if (delay_factor > 0 && !this->player_ptr->effects()->blindness()->is_blind()) {
+ if (delay_factor > 0 && !this->player_ptr->effects()->blindness().is_blind()) {
if (panel_contains(ny, nx) && floor.has_los({ ny, nx })) {
print_bolt_pict(this->player_ptr, oy, ox, ny, nx, typ);
move_cursor_relative(ny, nx);
#include "system/player-type-definition.h"
#include "system/terrain-type-definition.h"
#include "target/projection-path-calculator.h"
-#include "timed-effect/player-blindness.h"
#include "timed-effect/timed-effects.h"
#include "util/bit-flags-calculator.h"
#include "util/point-2d.h"
*/
bool starlight(PlayerType *player_ptr, bool magic)
{
- if (!player_ptr->effects()->blindness()->is_blind() && !magic) {
+ if (!player_ptr->effects()->blindness().is_blind() && !magic) {
msg_print(_("杖の先が明るく輝いた...", "The end of the staff glows brightly..."));
}
return false;
}
- if (!player_ptr->effects()->blindness()->is_blind()) {
+ if (!player_ptr->effects()->blindness().is_blind()) {
msg_print(_("白い光が辺りを覆った。", "You are surrounded by a white light."));
}
*/
bool unlite_area(PlayerType *player_ptr, int dam, POSITION rad)
{
- if (!player_ptr->effects()->blindness()->is_blind()) {
+ if (!player_ptr->effects()->blindness().is_blind()) {
msg_print(_("暗闇が辺りを覆った。", "Darkness surrounds you."));
}
#include "system/angband-exceptions.h"
#include "system/player-type-definition.h"
#include "system/redrawing-flags-updater.h"
-#include "timed-effect/player-blindness.h"
#include "timed-effect/player-confusion.h"
#include "timed-effect/player-cut.h"
#include "timed-effect/player-deceleration.h"
}
PlayerRace pr(this->player_ptr);
- const auto blindness = this->player_ptr->effects()->blindness();
- const auto is_blind = blindness->is_blind();
+ auto &blindness = this->player_ptr->effects()->blindness();
+ const auto is_blind = blindness.is_blind();
if (v > 0) {
if (!is_blind) {
if (pr.equals(PlayerRaceType::ANDROID)) {
}
}
- blindness->set(v);
+ blindness.set(v);
auto &rfu = RedrawingFlagsUpdater::get_instance();
rfu.set_flag(MainWindowRedrawingFlag::TIMED_EFFECT);
if (!notice) {
bool BadStatusSetter::mod_blindness(const TIME_EFFECT tmp_v)
{
- return this->set_blindness(this->player_ptr->effects()->blindness()->current() + tmp_v);
+ return this->set_blindness(this->player_ptr->effects()->blindness().current() + tmp_v);
}
/*!
#include "system/player-type-definition.h"
#include "system/redrawing-flags-updater.h"
#include "timed-effect/player-acceleration.h"
-#include "timed-effect/player-blindness.h"
#include "timed-effect/player-confusion.h"
#include "timed-effect/player-cut.h"
#include "timed-effect/player-deceleration.h"
effects->acceleration()->reset();
player_ptr->lightspeed = 0;
effects->deceleration()->reset();
- effects->blindness()->reset();
+ effects->blindness().reset();
effects->paralysis()->reset();
effects->confusion()->reset();
effects->fear()->reset();
#include "market/arena-info-table.h"
#include "system/angband-exceptions.h"
#include "system/redrawing-flags-updater.h"
-#include "timed-effect/player-blindness.h"
#include "timed-effect/player-confusion.h"
#include "timed-effect/player-cut.h"
#include "timed-effect/player-deceleration.h"
auto effects = this->effects();
auto is_fully_healthy = this->chp == this->mhp;
is_fully_healthy &= this->csp >= this->msp;
- is_fully_healthy &= !effects->blindness()->is_blind();
+ is_fully_healthy &= !effects->blindness().is_blind();
is_fully_healthy &= !effects->confusion()->is_confused();
is_fully_healthy &= !effects->poison()->is_poisoned();
is_fully_healthy &= !effects->fear()->is_fearful();
class PlayerBlindness {
public:
PlayerBlindness() = default;
+ ~PlayerBlindness() = default;
+ PlayerBlindness(const PlayerBlindness &) = delete;
+ PlayerBlindness(PlayerBlindness &&) = delete;
+ PlayerBlindness &operator=(const PlayerBlindness &) = delete;
+ PlayerBlindness &operator=(PlayerBlindness &&) = delete;
short current() const;
bool is_blind() const;
#include "timed-effect/timed-effects.h"
#include "timed-effect/player-acceleration.h"
-#include "timed-effect/player-blindness.h"
#include "timed-effect/player-confusion.h"
#include "timed-effect/player-cut.h"
#include "timed-effect/player-deceleration.h"
#include "timed-effect/player-stun.h"
TimedEffects::TimedEffects()
- : player_blindness(std::make_shared<PlayerBlindness>())
- , player_confusion(std::make_shared<PlayerConfusion>())
+ : player_confusion(std::make_shared<PlayerConfusion>())
, player_cut(std::make_shared<PlayerCut>())
, player_fear(std::make_shared<PlayerFear>())
, player_hallucination(std::make_shared<PlayerHallucination>())
{
}
-std::shared_ptr<PlayerBlindness> TimedEffects::blindness() const
+PlayerBlindness &TimedEffects::blindness()
+{
+ return this->player_blindness;
+}
+
+const PlayerBlindness &TimedEffects::blindness() const
{
return this->player_blindness;
}
#pragma once
+#include "timed-effect/player-blindness.h"
#include <memory>
class PlayerAcceleration;
-class PlayerBlindness;
class PlayerConfusion;
class PlayerDeceleration;
class PlayerFear;
class TimedEffects {
public:
TimedEffects();
- virtual ~TimedEffects() = default;
+ ~TimedEffects() = default;
+ TimedEffects(const TimedEffects &) = delete;
+ TimedEffects(TimedEffects &&) = delete;
+ TimedEffects &operator=(const TimedEffects &) = delete;
+ TimedEffects &operator=(TimedEffects &&) = delete;
- std::shared_ptr<PlayerBlindness> blindness() const;
+ PlayerBlindness &blindness();
+ const PlayerBlindness &blindness() const;
std::shared_ptr<PlayerConfusion> confusion() const;
std::shared_ptr<PlayerCut> cut() const;
std::shared_ptr<PlayerFear> fear() const;
std::shared_ptr<PlayerPoison> poison() const;
private:
- std::shared_ptr<PlayerBlindness> player_blindness;
+ PlayerBlindness player_blindness{};
std::shared_ptr<PlayerConfusion> player_confusion;
std::shared_ptr<PlayerCut> player_cut;
std::shared_ptr<PlayerFear> player_fear;
#include "system/player-type-definition.h"
#include "system/terrain-type-definition.h"
#include "term/term-color-types.h"
-#include "timed-effect/player-blindness.h"
#include "timed-effect/player-hallucination.h"
#include "timed-effect/timed-effects.h"
#include "util/bit-flags-calculator.h"
auto is_visible = any_bits(grid.info, (CAVE_MARK | CAVE_LITE | CAVE_MNLT));
auto is_glowing = match_bits(grid.info, CAVE_GLOW | CAVE_MNDK, CAVE_GLOW);
auto can_view = grid.is_view() && (is_glowing || player_ptr->see_nocto);
- const auto is_blind = player_ptr->effects()->blindness()->is_blind();
+ const auto is_blind = player_ptr->effects()->blindness().is_blind();
if (!is_blind && (is_visible || can_view)) {
symbol_config = terrain_mimic_ptr->symbol_configs[F_LIT_STANDARD];
if (player_ptr->wild_mode) {
} else {
if (grid.is_mark() && is_revealed_wall(floor, pos)) {
symbol_config = terrain_mimic_ptr->symbol_configs[F_LIT_STANDARD];
- const auto is_blind = player_ptr->effects()->blindness()->is_blind();
+ const auto is_blind = player_ptr->effects()->blindness().is_blind();
if (player_ptr->wild_mode) {
if (view_granite_lite && (is_blind || !w_ptr->is_daytime())) {
symbol_config = terrain_mimic_ptr->symbol_configs[F_LIT_DARK];
#include "term/screen-processor.h"
#include "term/term-color-types.h"
#include "term/z-form.h"
-#include "timed-effect/player-blindness.h"
#include "timed-effect/player-confusion.h"
#include "timed-effect/player-cut.h"
#include "timed-effect/player-deceleration.h"
ADD_BAR_FLAG(BAR_HALLUCINATION);
}
- if (player_ptr->effects()->blindness()->is_blind()) {
+ if (player_ptr->effects()->blindness().is_blind()) {
ADD_BAR_FLAG(BAR_BLINDNESS);
}