#include "player/player-damage.h"
#include "player/player-skill.h"
#include "player/special-defense-types.h"
+#include "spell-kind/spells-teleport.h"
#include "spell-realm/spells-hex.h"
#include "status/action-setter.h"
#include "status/bad-status-setter.h"
spell_hex.store_vengeful_damage(this->get_damage);
spell_hex.eyes_on_eyes(this->m_idx, this->get_damage);
musou_counterattack(this->player_ptr, this);
- if (this->blinked && this->alive) {
- spell_hex.thief_teleport(this->m_idx);
- }
+ this->process_thief_teleport(spell_hex);
auto *r_ptr = &this->m_ptr->get_monrace();
if (this->player_ptr->is_dead && (r_ptr->r_deaths < MAX_SHORT) && !this->player_ptr->current_floor_ptr->inside_arena) {
r_ptr->r_deaths++;
PlayerClass(this->player_ptr).break_samurai_stance({ SamuraiStanceType::IAI });
}
+
+void MonsterAttackPlayer::process_thief_teleport(const SpellHex &spell_hex)
+{
+ if (!this->blinked || !this->alive || this->player_ptr->is_dead) {
+ return;
+ }
+
+ if (spell_hex.check_hex_barrier(this->m_idx, HEX_ANTI_TELE)) {
+ msg_print(_("泥棒は笑って逃げ...ようとしたがバリアに防がれた。", "The thief flees laughing...? But a magic barrier obstructs it."));
+ } else {
+ msg_print(_("泥棒は笑って逃げた!", "The thief flees laughing!"));
+ teleport_away(this->player_ptr, this->m_idx, MAX_PLAYER_SIGHT * 2 + 5, TELEPORT_SPONTANEOUS);
+ }
+}
enum class RaceBlowEffectType;
enum class RaceBlowMethodType;
class PlayerType;
+class SpellHex;
class MonsterEntity;
class ItemEntity;
class MonsterAttackPlayer {
void gain_armor_exp();
void increase_blow_type_seen(const int ap_cnt);
void postprocess_monster_blows();
+ void process_thief_teleport(const SpellHex &spell_hex);
};
#include "player/attack-defense-types.h"
#include "player/player-skill.h"
#include "realm/realm-hex-numbers.h"
-#include "spell-kind/spells-teleport.h"
#include "spell-realm/spells-crusade.h"
#include "spell-realm/spells-song.h"
#include "spell/spell-info.h"
}
}
-void SpellHex::thief_teleport(MONSTER_IDX m_idx)
-{
- if (this->player_ptr->is_dead) {
- return;
- }
-
- if (this->check_hex_barrier(m_idx, HEX_ANTI_TELE)) {
- msg_print(_("泥棒は笑って逃げ...ようとしたがバリアに防がれた。", "The thief flees laughing...? But a magic barrier obstructs it."));
- } else {
- msg_print(_("泥棒は笑って逃げた!", "The thief flees laughing!"));
- teleport_away(this->player_ptr, m_idx, MAX_PLAYER_SIGHT * 2 + 5, TELEPORT_SPONTANEOUS);
- }
-}
-
void SpellHex::set_casting_flag(spell_hex_type type)
{
this->spell_hex_data->casting_spells.set(type);
bool is_spelling_any() const;
void interrupt_spelling();
void eyes_on_eyes(MONSTER_IDX, int dam);
- void thief_teleport(MONSTER_IDX m_idx);
void set_casting_flag(spell_hex_type type);
void reset_casting_flag(spell_hex_type type);
int32_t get_casting_num() const;