if (music_singing_any(user_ptr))
stop_singing(user_ptr);
- if (RealmHex(user_ptr).hex_spelling_any()) {
- (void)RealmHex(user_ptr).stop_hex_spell_all();
+ if (RealmHex(user_ptr).is_spelling_any()) {
+ (void)RealmHex(user_ptr).stop_all_spells();
}
MONSTER_IDX pet_ctr;
stop_singing(creature_ptr);
RealmHex realm_hex(creature_ptr);
- if (realm_hex.hex_spelling_any()) {
- (void)realm_hex.stop_hex_spell_all();
+ if (realm_hex.is_spelling_any()) {
+ (void)realm_hex.stop_all_spells();
}
if (command_arg <= 0) {
return false;
if (caster_ptr->realm1 == REALM_HEX) {
- if (RealmHex(caster_ptr).hex_spell_fully()) {
+ if (RealmHex(caster_ptr).is_using_full_capacity()) {
auto flag = false;
msg_print(_("これ以上新しい呪文を詠唱することはできない。", "Can not cast more spells."));
flush();
if (caster_ptr->lev >= 35) {
- flag = RealmHex(caster_ptr).stop_hex_spell();
+ flag = RealmHex(caster_ptr).stop_one_spell();
}
if (!flag) {
use_realm = tval2realm(o_ptr->tval);
if (use_realm == REALM_HEX) {
- if (RealmHex(caster_ptr).hex_spelling(spell)) {
+ if (RealmHex(caster_ptr).is_spelling_specific(spell)) {
msg_print(_("その呪文はすでに詠唱中だ。", "You are already casting it."));
return false;
}
stop_singing(creature_ptr);
RealmHex realm_hex(creature_ptr);
- if (realm_hex.hex_spelling_any()) {
- (void)realm_hex.stop_hex_spell_all();
+ if (realm_hex.is_spelling_any()) {
+ (void)realm_hex.stop_all_spells();
}
object_type *o_ptr = ref_item(creature_ptr, item);
if (creature_ptr->wild_mode)
return;
- if (!RealmHex(creature_ptr).hex_spelling(HEX_INHAIL) && cmd_limit_arena(creature_ptr))
+ if (!RealmHex(creature_ptr).is_spelling_specific(HEX_INHAIL) && cmd_limit_arena(creature_ptr))
return;
if (creature_ptr->special_defense & (KATA_MUSOU | KATA_KOUKIJIN))
static void aura_shadow_by_monster_attack(player_type *target_ptr, monap_type *monap_ptr)
{
- if (!RealmHex(target_ptr).hex_spelling(HEX_SHADOW_CLOAK) || !monap_ptr->alive || target_ptr->is_dead)
+ if (!RealmHex(target_ptr).is_spelling_specific(HEX_SHADOW_CLOAK) || !monap_ptr->alive || target_ptr->is_dead)
return;
HIT_POINT dam = 1;
flgs.set(TR_BRAND_POIS);
}
- if (RealmHex(attacker_ptr).hex_spelling(HEX_RUNESWORD))
+ if (RealmHex(attacker_ptr).is_spelling_specific(HEX_RUNESWORD))
flgs.set(TR_SLAY_GOOD);
MULTIPLY mult = 10;
auto realm_hex = RealmHex(creature_ptr);
if (!load) {
- realm_hex.check_hex();
+ realm_hex.decrease_mana();
}
if (!load) {
- realm_hex.revenge_spell();
+ realm_hex.continue_revenge();
}
creature_ptr->enchant_energy_need += ENERGY_NEED();
describe_effect_source(target_ptr, ep_ptr, who_name);
switch_effects_player(target_ptr, ep_ptr);
- RealmHex(target_ptr).revenge_store(ep_ptr->get_damage);
- if ((target_ptr->tim_eyeeye || RealmHex(target_ptr).hex_spelling(HEX_EYE_FOR_EYE)) && (ep_ptr->get_damage > 0) && !target_ptr->is_dead && (ep_ptr->who > 0)) {
+ RealmHex(target_ptr).store_vengeful_damage(ep_ptr->get_damage);
+ if ((target_ptr->tim_eyeeye || RealmHex(target_ptr).is_spelling_specific(HEX_EYE_FOR_EYE)) && (ep_ptr->get_damage > 0) && !target_ptr->is_dead && (ep_ptr->who > 0)) {
GAME_TEXT m_name_self[MAX_MONSTER_NAME];
monster_desc(target_ptr, m_name_self, ep_ptr->m_ptr, MD_PRON_VISIBLE | MD_POSSESSIVE | MD_OBJECTIVE);
msg_format(_("攻撃が%s自身を傷つけた!", "The attack of %s has wounded %s!"), ep_ptr->m_name, m_name_self);
creature_ptr->oldpx = creature_ptr->x;
creature_ptr->oldpy = creature_ptr->y;
RealmHex realm_hex(creature_ptr);
- if (realm_hex.hex_spelling_any()) {
- realm_hex.stop_hex_spell_all();
+ if (realm_hex.is_spelling_any()) {
+ realm_hex.stop_all_spells();
}
set_action(creature_ptr, ACTION_NONE);
mindam = calc_expect_crit(owner_ptr, o_ptr->weight, o_ptr->to_h, mindice, owner_ptr->to_h[0], dokubari, impact);
maxdam = calc_expect_crit(owner_ptr, o_ptr->weight, o_ptr->to_h, maxdice, owner_ptr->to_h[0], dokubari, impact);
show_weapon_dmg(r++, col, mindam, maxdam, blow, dmg_bonus, _("会心:", "Critical:"), TERM_L_RED);
- if ((flgs.has(TR_VORPAL) || RealmHex(owner_ptr).hex_spelling(HEX_RUNESWORD))) {
+ if ((flgs.has(TR_VORPAL) || RealmHex(owner_ptr).is_spelling_specific(HEX_RUNESWORD))) {
if ((o_ptr->name1 == ART_VORPAL_BLADE) || (o_ptr->name1 == ART_CHAINSWORD)) {
vorpal_mult = 5;
vorpal_div = 3;
*/
static void eyes_on_eyes(player_type *target_ptr, monap_type *monap_ptr)
{
- if (((target_ptr->tim_eyeeye == 0) && !RealmHex(target_ptr).hex_spelling(HEX_EYE_FOR_EYE)) || (monap_ptr->get_damage == 0) || target_ptr->is_dead)
+ if (((target_ptr->tim_eyeeye == 0) && !RealmHex(target_ptr).is_spelling_specific(HEX_EYE_FOR_EYE)) || (monap_ptr->get_damage == 0) || target_ptr->is_dead)
return;
#ifdef JP
static void postprocess_monster_blows(player_type *target_ptr, monap_type *monap_ptr)
{
- RealmHex(target_ptr).revenge_store(monap_ptr->get_damage);
+ RealmHex(target_ptr).store_vengeful_damage(monap_ptr->get_damage);
eyes_on_eyes(target_ptr, monap_ptr);
musou_counterattack(target_ptr, monap_ptr);
thief_teleport(target_ptr, monap_ptr);
msg_print(_("手の輝きがなくなった。", "Your hands stop glowing."));
}
- if (music_singing_any(creature_ptr) || RealmHex(creature_ptr).hex_spelling_any()) {
+ if (music_singing_any(creature_ptr) || RealmHex(creature_ptr).is_spelling_any()) {
concptr str = (music_singing_any(creature_ptr)) ? _("歌", "singing") : _("呪文", "casting");
set_interrupting_song_effect(creature_ptr, get_singing_song_effect(creature_ptr));
set_singing_song_effect(creature_ptr, MUSIC_NONE);
stop_singing(creature_ptr);
RealmHex realm_hex(creature_ptr);
- if (realm_hex.hex_spelling_any()) {
- (void)realm_hex.stop_hex_spell_all();
+ if (realm_hex.is_spelling_any()) {
+ (void)realm_hex.stop_all_spells();
}
}
if (music_singing_any(user_ptr))
stop_singing(user_ptr);
- if (RealmHex(user_ptr).hex_spelling_any()) {
- (void)RealmHex(user_ptr).stop_hex_spell_all();
+ if (RealmHex(user_ptr).is_spelling_any()) {
+ (void)RealmHex(user_ptr).stop_all_spells();
}
int t = randint0(n);
if (music_singing_any(user_ptr))
stop_singing(user_ptr);
- if (RealmHex(user_ptr).hex_spelling_any()) {
- (void)RealmHex(user_ptr).stop_hex_spell_all();
+ if (RealmHex(user_ptr).is_spelling_any()) {
+ (void)RealmHex(user_ptr).stop_all_spells();
}
msg_print(_("あなたは力強い突風を吹き鳴らした。周囲の敵が震え上っている!", "You wind a mighty blast; your enemies tremble!"));
stop_singing(creature_ptr);
RealmHex realm_hex(creature_ptr);
- if (realm_hex.hex_spelling_any() && !realm_hex.hex_spelling(HEX_INHAIL)) {
- (void)RealmHex(creature_ptr).stop_hex_spell_all();
+ if (realm_hex.is_spelling_any() && !realm_hex.is_spelling_specific(HEX_INHAIL)) {
+ (void)RealmHex(creature_ptr).stop_all_spells();
}
o_ptr = ref_item(creature_ptr, item);
stop_singing(creature_ptr);
RealmHex realm_hex(creature_ptr);
- if (realm_hex.hex_spelling_any() && ((creature_ptr->lev < 35) || realm_hex.hex_spell_fully())) {
- (void)RealmHex(creature_ptr).stop_hex_spell_all();
+ if (realm_hex.is_spelling_any() && ((creature_ptr->lev < 35) || realm_hex.is_using_full_capacity())) {
+ (void)RealmHex(creature_ptr).stop_all_spells();
}
ident = false;
int16_t result = 0;
if (this->owner_ptr->realm1 == REALM_HEX) {
- if (RealmHex(this->owner_ptr).hex_spelling(HEX_BUILDING)) {
+ if (RealmHex(this->owner_ptr).is_spelling_specific(HEX_BUILDING)) {
result += 4;
}
}
int16_t result = 0;
if (this->owner_ptr->realm1 == REALM_HEX) {
- if (RealmHex(this->owner_ptr).hex_spelling(HEX_BUILDING)) {
+ if (RealmHex(this->owner_ptr).is_spelling_specific(HEX_BUILDING)) {
result += 4;
}
}
if (this->owner_ptr->realm1 == REALM_HEX) {
RealmHex realm_hex(this->owner_ptr);
- if (realm_hex.hex_spelling(HEX_XTRA_MIGHT)) {
+ if (realm_hex.is_spelling_specific(HEX_XTRA_MIGHT)) {
result += 4;
}
- if (realm_hex.hex_spelling(HEX_BUILDING)) {
+ if (realm_hex.is_spelling_specific(HEX_BUILDING)) {
result += 4;
}
}
object_type *o_ptr = &attacker_ptr->inventory_list[INVEN_MAIN_HAND + pa_ptr->hand];
if (any_bits(attacker_ptr->special_attack, ATTACK_CONFUSE) || pa_ptr->chaos_effect == CE_CONFUSION || pa_ptr->mode == HISSATSU_CONF
- || RealmHex(attacker_ptr).hex_spelling(HEX_CONFUSION))
+ || RealmHex(attacker_ptr).is_spelling_specific(HEX_CONFUSION))
attack_confuse(attacker_ptr, pa_ptr);
if (pa_ptr->magical_effect == MagicalBrandEffect::STUN)
bool is_blood_sucker = pa_ptr->flags.has(TR_VAMPIRIC);
is_blood_sucker |= pa_ptr->chaos_effect == CE_VAMPIRIC;
is_blood_sucker |= pa_ptr->mode == HISSATSU_DRAIN;
- is_blood_sucker |= RealmHex(attacker_ptr).hex_spelling(HEX_VAMP_BLADE);
+ is_blood_sucker |= RealmHex(attacker_ptr).is_spelling_specific(HEX_VAMP_BLADE);
if (!is_blood_sucker)
return;
int drain_heal = damroll(2, pa_ptr->drain_result / 6);
- if (RealmHex(attacker_ptr).hex_spelling(HEX_VAMP_BLADE))
+ if (RealmHex(attacker_ptr).is_spelling_specific(HEX_VAMP_BLADE))
drain_heal *= 2;
if (cheat_xtra) {
pa_ptr->magical_effect = select_magical_brand_effect(attacker_ptr, pa_ptr);
decide_blood_sucking(attacker_ptr, pa_ptr);
- // process_monk_attackの中でplayer_type->magic_num1[0] を書き換えているので、ここでhex_spelling() の判定をしないとダメ.
- bool vorpal_cut = (pa_ptr->flags.has(TR_VORPAL) || RealmHex(attacker_ptr).hex_spelling(HEX_RUNESWORD)) && (randint1(vorpal_chance * 3 / 2) == 1)
+ // process_monk_attackの中でplayer_type->magic_num1[0] を書き換えているので、ここでis_spelling_specific() の判定をしないとダメ.
+ bool vorpal_cut = (pa_ptr->flags.has(TR_VORPAL) || RealmHex(attacker_ptr).is_spelling_specific(HEX_RUNESWORD)) && (randint1(vorpal_chance * 3 / 2) == 1)
&& !is_zantetsu_nullified;
calc_attack_damage(attacker_ptr, pa_ptr, do_quake, vorpal_cut, vorpal_chance);
apply_damage_bonus(attacker_ptr, pa_ptr);
}
if (this->owner_ptr->realm1 == REALM_HEX) {
- if (RealmHex(this->owner_ptr).hex_spelling(HEX_SHOCK_CLOAK)) {
+ if (RealmHex(this->owner_ptr).is_spelling_specific(HEX_SHOCK_CLOAK)) {
result += 3;
}
}
{
int16_t result = 0;
if (this->owner_ptr->realm1 == REALM_HEX) {
- if (RealmHex(this->owner_ptr).hex_spelling_any())
+ if (RealmHex(this->owner_ptr).is_spelling_any())
result -= (1 + casting_hex_num(this->owner_ptr));
}
if (is_shero(this->owner_ptr)) {
{
BIT_FLAGS result = 0L;
if (creature_ptr->realm1 == REALM_HEX) {
- if (RealmHex(creature_ptr).hex_spelling(HEX_DETECT_EVIL))
+ if (RealmHex(creature_ptr).is_spelling_specific(HEX_DETECT_EVIL))
result |= FLAG_CAUSE_MAGIC_TIME_EFFECT;
}
result |= check_equipment_flags(creature_ptr, TR_ESP_EVIL);
result |= FLAG_CAUSE_BATTLE_FORM;
}
- if (RealmHex(creature_ptr).hex_spelling(HEX_DEMON_AURA) || creature_ptr->ult_res || creature_ptr->tim_sh_fire) {
+ if (RealmHex(creature_ptr).is_spelling_specific(HEX_DEMON_AURA) || creature_ptr->ult_res || creature_ptr->tim_sh_fire) {
result |= FLAG_CAUSE_MAGIC_TIME_EFFECT;
}
if (creature_ptr->muta.has(MUTA::ELEC_TOUC))
result |= FLAG_CAUSE_MUTATION;
- if (RealmHex(creature_ptr).hex_spelling(HEX_SHOCK_CLOAK) || creature_ptr->ult_res) {
+ if (RealmHex(creature_ptr).is_spelling_specific(HEX_SHOCK_CLOAK) || creature_ptr->ult_res) {
result |= FLAG_CAUSE_MAGIC_TIME_EFFECT;
}
result |= FLAG_CAUSE_BATTLE_FORM;
}
- if (creature_ptr->ult_res || RealmHex(creature_ptr).hex_spelling(HEX_ICE_ARMOR)) {
+ if (creature_ptr->ult_res || RealmHex(creature_ptr).is_spelling_specific(HEX_ICE_ARMOR)) {
result |= FLAG_CAUSE_MAGIC_TIME_EFFECT;
}
result |= FLAG_CAUSE_BATTLE_FORM;
}
- if (RealmHex(creature_ptr).hex_spelling(HEX_DEMON_AURA) || creature_ptr->ult_res || creature_ptr->tim_regen) {
+ if (RealmHex(creature_ptr).is_spelling_specific(HEX_DEMON_AURA) || creature_ptr->ult_res || creature_ptr->tim_regen) {
result |= FLAG_CAUSE_MAGIC_TIME_EFFECT;
}
mhp += 30;
if (creature_ptr->tsuyoshi)
mhp += 50;
- if (RealmHex(creature_ptr).hex_spelling(HEX_XTRA_MIGHT))
+ if (RealmHex(creature_ptr).is_spelling_specific(HEX_XTRA_MIGHT))
mhp += 15;
- if (RealmHex(creature_ptr).hex_spelling(HEX_BUILDING))
+ if (RealmHex(creature_ptr).is_spelling_specific(HEX_BUILDING))
mhp += 60;
if (creature_ptr->mhp == mhp)
return;
mul = 4;
}
- if (RealmHex(creature_ptr).hex_spelling(HEX_XTRA_MIGHT) || RealmHex(creature_ptr).hex_spelling(HEX_BUILDING)) {
+ if (RealmHex(creature_ptr).is_spelling_specific(HEX_XTRA_MIGHT) || RealmHex(creature_ptr).is_spelling_specific(HEX_BUILDING)) {
num++;
wgt /= 2;
mul += 2;
}
if (creature_ptr->realm1 == REALM_HEX) {
- if (RealmHex(creature_ptr).hex_spelling(HEX_ICE_ARMOR)) {
+ if (RealmHex(creature_ptr).is_spelling_specific(HEX_ICE_ARMOR)) {
ac += 30;
}
}
if ((creature_ptr->realm1 == REALM_HEX) && o_ptr->is_cursed()) {
- if (RealmHex(creature_ptr).hex_spelling(HEX_RUNESWORD)) {
+ if (RealmHex(creature_ptr).is_spelling_specific(HEX_RUNESWORD)) {
if (o_ptr->curse_flags.has(TRC::CURSED)) {
damage += 5;
}
*/
bool is_blessed(player_type *creature_ptr)
{
- return creature_ptr->blessed || music_singing(creature_ptr, MUSIC_BLESS) || RealmHex(creature_ptr).hex_spelling(HEX_BLESS);
+ return creature_ptr->blessed || music_singing(creature_ptr, MUSIC_BLESS) || RealmHex(creature_ptr).is_spelling_specific(HEX_BLESS);
}
bool is_tim_esp(player_type *creature_ptr)
if (music_singing_any(caster_ptr))
stop_singing(caster_ptr);
- if (RealmHex(caster_ptr).hex_spelling_any()) {
- (void)RealmHex(caster_ptr).stop_hex_spell_all();
+ if (RealmHex(caster_ptr).is_spelling_any()) {
+ (void)RealmHex(caster_ptr).stop_all_spells();
}
}
return sword_dancing(creature_ptr);
case CLASS_HIGH_MAGE:
if (creature_ptr->realm1 == REALM_HEX) {
- auto retval = RealmHex(creature_ptr).stop_hex_spell();
+ auto retval = RealmHex(creature_ptr).stop_one_spell();
if (retval) {
PlayerEnergy(creature_ptr).set_player_turn_energy(10);
}
/*!
* @brief プレイヤーが詠唱中の全呪術を停止する
*/
-bool RealmHex::stop_hex_spell_all()
+bool RealmHex::stop_all_spells()
{
for (auto i = 0; i < 32; i++) {
- if (this->hex_spelling(i)) {
+ if (this->is_spelling_specific(i)) {
exe_spell(this->caster_ptr, REALM_HEX, i, SPELL_STOP);
}
}
/*!
* @brief プレイヤーが詠唱中の呪術から一つを選んで停止する
*/
-bool RealmHex::stop_hex_spell()
+bool RealmHex::stop_one_spell()
{
- if (!RealmHex(this->caster_ptr).hex_spelling_any()) {
+ if (!RealmHex(this->caster_ptr).is_spelling_any()) {
msg_print(_("呪文を詠唱していません。", "You are not casting a spell."));
return false;
}
if ((casting_hex_num(this->caster_ptr) == 1) || (this->caster_ptr->lev < 35)) {
- return this->stop_hex_spell_all();
+ return this->stop_all_spells();
}
char out_val[160];
/* All */
if (*choice == 'l') {
screen_load();
- return this->stop_hex_spell_all();
+ return this->stop_all_spells();
}
if ((*choice < I2A(0)) || (*choice > I2A(casting_hex_num(this->caster_ptr) - 1))) {
term_erase(x, y, 255);
prt(_(" 名前", " Name"), y, x + 5);
for (auto spell = 0; spell < 32; spell++) {
- if (this->hex_spelling(spell)) {
+ if (this->is_spelling_specific(spell)) {
term_erase(x, y + n + 1, 255);
put_str(format("%c) %s", I2A(n), exe_spell(this->caster_ptr, REALM_HEX, spell, SPELL_NAME)), y + n + 1, x + 2);
sp.at(n++) = spell;
/*!
* @brief 一定時間毎に呪術で消費するMPを処理する
*/
-void RealmHex::check_hex()
+void RealmHex::decrease_mana()
{
/* Spells spelled by player */
if (this->caster_ptr->realm1 != REALM_HEX) {
auto need_restart = this->check_restart();
if (this->caster_ptr->anti_magic) {
- this->stop_hex_spell_all();
+ this->stop_all_spells();
return;
}
/* Do any effects of continual spells */
for (auto spell = 0; spell < 32; spell++) {
- if (this->hex_spelling(spell)) {
+ if (this->is_spelling_specific(spell)) {
exe_spell(this->caster_ptr, REALM_HEX, spell, SPELL_CONT);
}
}
auto enough_mana = s64b_cmp(this->caster_ptr->csp, this->caster_ptr->csp_frac, need_mana, need_mana_frac) < 0;
if (!enough_mana) {
- this->stop_hex_spell_all();
+ this->stop_all_spells();
return;
}
{
auto need_mana = 0;
for (auto spell = 0; spell < 32; spell++) {
- if (this->hex_spelling(spell)) {
+ if (this->is_spelling_specific(spell)) {
const auto *s_ptr = &technic_info[REALM_HEX - MIN_TECHNIC][spell];
need_mana += mod_need_mana(this->caster_ptr, s_ptr->smana, spell, REALM_HEX);
}
void RealmHex::gain_exp_from_hex()
{
for (auto spell = 0; spell < 32; spell++) {
- if (!this->hex_spelling(spell)) {
+ if (!this->is_spelling_specific(spell)) {
continue;
}
* @brief プレイヤーの呪術詠唱枠がすでに最大かどうかを返す
* @return すでに全枠を利用しているならTRUEを返す
*/
-bool RealmHex::hex_spell_fully() const
+bool RealmHex::is_using_full_capacity() const
{
auto k_max = (this->caster_ptr->lev / 15) + 1;
k_max = MIN(k_max, MAX_KEEP);
/*!
* @brief 一定ゲームターン毎に復讐処理の残り期間の判定を行う
*/
-void RealmHex::revenge_spell()
+void RealmHex::continue_revenge()
{
if ((this->caster_ptr->realm1 != REALM_HEX) || (hex_revenge_turn(this->caster_ptr) <= 0)) {
return;
* @brief 復讐ダメージの追加を行う
* @param dam 蓄積されるダメージ量
*/
-void RealmHex::revenge_store(HIT_POINT dam)
+void RealmHex::store_vengeful_damage(HIT_POINT dam)
{
if ((this->caster_ptr->realm1 != REALM_HEX) || (hex_revenge_turn(this->caster_ptr) <= 0)) {
return;
{
const auto *m_ptr = &this->caster_ptr->current_floor_ptr->m_list[m_idx];
const auto *r_ptr = &r_info[m_ptr->r_idx];
- return this->hex_spelling(type) && ((this->caster_ptr->lev * 3 / 2) >= randint1(r_ptr->level));
+ return this->is_spelling_specific(type) && ((this->caster_ptr->lev * 3 / 2) >= randint1(r_ptr->level));
}
-bool RealmHex::hex_spelling(int hex) const
+bool RealmHex::is_spelling_specific(int hex) const
{
auto check = static_cast<uint32_t>(this->caster_ptr->magic_num1[0]);
return (this->caster_ptr->realm1 == REALM_HEX) && any_bits(check, 1U << hex);
}
-bool RealmHex::hex_spelling_any() const
+bool RealmHex::is_spelling_any() const
{
return (caster_ptr->realm1 == REALM_HEX) && (caster_ptr->magic_num1[0] != 0);
}
RealmHex(player_type *caster_ptr);
virtual ~RealmHex() = default;
- bool stop_hex_spell();
- void check_hex();
- bool stop_hex_spell_all();
- bool hex_spell_fully() const;
- void revenge_spell();
- void revenge_store(HIT_POINT dam);
+ bool stop_one_spell();
+ void decrease_mana();
+ bool stop_all_spells();
+ bool is_using_full_capacity() const;
+ void continue_revenge();
+ void store_vengeful_damage(HIT_POINT dam);
bool check_hex_barrier(MONSTER_IDX m_idx, realm_hex_type type) const;
- bool hex_spelling(int hex) const;
- bool hex_spelling_any() const;
+ bool is_spelling_specific(int hex) const;
+ bool is_spelling_any() const;
private:
player_type *caster_ptr;
stop_singing(creature_ptr);
if (prev_typ == ACTION_SPELL) {
- (void)RealmHex(creature_ptr).stop_hex_spell();
+ (void)RealmHex(creature_ptr).stop_one_spell();
}
switch (creature_ptr->action) {
reset_concentration(creature_ptr, true);
RealmHex realm_hex(creature_ptr);
- if (realm_hex.hex_spelling_any()) {
- (void)realm_hex.stop_hex_spell_all();
+ if (realm_hex.is_spelling_any()) {
+ (void)realm_hex.stop_all_spells();
}
notice = true;
reset_concentration(creature_ptr, true);
RealmHex realm_hex(creature_ptr);
- if (realm_hex.hex_spelling_any()) {
- (void)realm_hex.stop_hex_spell_all();
+ if (realm_hex.is_spelling_any()) {
+ (void)realm_hex.stop_all_spells();
}
creature_ptr->counter = false;
reset_concentration(creature_ptr, true);
RealmHex realm_hex(creature_ptr);
- if (realm_hex.hex_spelling_any()) {
- (void)realm_hex.stop_hex_spell_all();
+ if (realm_hex.is_spelling_any()) {
+ (void)realm_hex.stop_all_spells();
}
notice = true;
ADD_BAR_FLAG(BAR_EYEEYE);
if (creature_ptr->realm1 == REALM_HEX) {
- if (RealmHex(creature_ptr).hex_spelling(HEX_BLESS))
+ if (RealmHex(creature_ptr).is_spelling_specific(HEX_BLESS))
ADD_BAR_FLAG(BAR_BLESSED);
- if (RealmHex(creature_ptr).hex_spelling(HEX_DEMON_AURA)) {
+ if (RealmHex(creature_ptr).is_spelling_specific(HEX_DEMON_AURA)) {
ADD_BAR_FLAG(BAR_SHFIRE);
ADD_BAR_FLAG(BAR_REGENERATION);
}
- if (RealmHex(creature_ptr).hex_spelling(HEX_XTRA_MIGHT))
+ if (RealmHex(creature_ptr).is_spelling_specific(HEX_XTRA_MIGHT))
ADD_BAR_FLAG(BAR_MIGHT);
- if (RealmHex(creature_ptr).hex_spelling(HEX_DETECT_EVIL))
+ if (RealmHex(creature_ptr).is_spelling_specific(HEX_DETECT_EVIL))
ADD_BAR_FLAG(BAR_ESP_EVIL);
- if (RealmHex(creature_ptr).hex_spelling(HEX_ICE_ARMOR))
+ if (RealmHex(creature_ptr).is_spelling_specific(HEX_ICE_ARMOR))
ADD_BAR_FLAG(BAR_SHCOLD);
- if (RealmHex(creature_ptr).hex_spelling(HEX_RUNESWORD))
+ if (RealmHex(creature_ptr).is_spelling_specific(HEX_RUNESWORD))
ADD_BAR_FLAG(BAR_RUNESWORD);
- if (RealmHex(creature_ptr).hex_spelling(HEX_BUILDING))
+ if (RealmHex(creature_ptr).is_spelling_specific(HEX_BUILDING))
ADD_BAR_FLAG(BAR_BUILD);
- if (RealmHex(creature_ptr).hex_spelling(HEX_ANTI_TELE))
+ if (RealmHex(creature_ptr).is_spelling_specific(HEX_ANTI_TELE))
ADD_BAR_FLAG(BAR_ANTITELE);
- if (RealmHex(creature_ptr).hex_spelling(HEX_SHOCK_CLOAK))
+ if (RealmHex(creature_ptr).is_spelling_specific(HEX_SHOCK_CLOAK))
ADD_BAR_FLAG(BAR_SHELEC);
- if (RealmHex(creature_ptr).hex_spelling(HEX_SHADOW_CLOAK))
+ if (RealmHex(creature_ptr).is_spelling_specific(HEX_SHADOW_CLOAK))
ADD_BAR_FLAG(BAR_SHSHADOW);
- if (RealmHex(creature_ptr).hex_spelling(HEX_CONFUSION))
+ if (RealmHex(creature_ptr).is_spelling_specific(HEX_CONFUSION))
ADD_BAR_FLAG(BAR_ATTKCONF);
- if (RealmHex(creature_ptr).hex_spelling(HEX_EYE_FOR_EYE))
+ if (RealmHex(creature_ptr).is_spelling_specific(HEX_EYE_FOR_EYE))
ADD_BAR_FLAG(BAR_EYEEYE);
- if (RealmHex(creature_ptr).hex_spelling(HEX_ANTI_MULTI))
+ if (RealmHex(creature_ptr).is_spelling_specific(HEX_ANTI_MULTI))
ADD_BAR_FLAG(BAR_ANTIMULTI);
- if (RealmHex(creature_ptr).hex_spelling(HEX_VAMP_BLADE))
+ if (RealmHex(creature_ptr).is_spelling_specific(HEX_VAMP_BLADE))
ADD_BAR_FLAG(BAR_VAMPILIC);
- if (RealmHex(creature_ptr).hex_spelling(HEX_ANTI_MAGIC))
+ if (RealmHex(creature_ptr).is_spelling_specific(HEX_ANTI_MAGIC))
ADD_BAR_FLAG(BAR_ANTIMAGIC);
- if (RealmHex(creature_ptr).hex_spelling(HEX_CURE_LIGHT) || RealmHex(creature_ptr).hex_spelling(HEX_CURE_SERIOUS) || RealmHex(creature_ptr).hex_spelling(HEX_CURE_CRITICAL))
+ if (RealmHex(creature_ptr).is_spelling_specific(HEX_CURE_LIGHT) || RealmHex(creature_ptr).is_spelling_specific(HEX_CURE_SERIOUS) || RealmHex(creature_ptr).is_spelling_specific(HEX_CURE_CRITICAL))
ADD_BAR_FLAG(BAR_CURE);
if (hex_revenge_turn(creature_ptr)) {