• R/O
  • HTTP
  • SSH
  • HTTPS

hengband: Commit

変愚蛮怒のメインリポジトリです


Commit MetaInfo

Revisiond74783e8a8d93e4327b0465513fa3a597418598a (tree)
Time2019-06-02 21:00:53
Authordeskull <deskull@user...>
Commiterdeskull

Log Message

[Refactor] #37353 prace_is_() を PRACE_IS_() に改名して player-race.h へ移動.

Change Summary

Incremental Difference

--- a/src/cmd-eat.c
+++ b/src/cmd-eat.c
@@ -334,7 +334,7 @@ void do_cmd_eat_food_aux(INVENTORY_IDX item)
334334
335335
336336 /* Food can feed the player */
337- if (prace_is_(RACE_VAMPIRE) || (p_ptr->mimic_form == MIMIC_VAMPIRE))
337+ if (PRACE_IS_(RACE_VAMPIRE) || (p_ptr->mimic_form == MIMIC_VAMPIRE))
338338 {
339339 /* Reduced nutritional benefit */
340340 (void)set_food(p_ptr->food + (o_ptr->pval / 10));
@@ -345,10 +345,10 @@ void do_cmd_eat_food_aux(INVENTORY_IDX item)
345345 msg_print(_("あなたの飢えは新鮮な血によってのみ満たされる!",
346346 "Your hunger can only be satisfied with fresh blood!"));
347347 }
348- else if ((prace_is_(RACE_SKELETON) ||
349- prace_is_(RACE_GOLEM) ||
350- prace_is_(RACE_ZOMBIE) ||
351- prace_is_(RACE_SPECTRE)) &&
348+ else if ((PRACE_IS_(RACE_SKELETON) ||
349+ PRACE_IS_(RACE_GOLEM) ||
350+ PRACE_IS_(RACE_ZOMBIE) ||
351+ PRACE_IS_(RACE_SPECTRE)) &&
352352 (o_ptr->tval == TV_STAFF || o_ptr->tval == TV_WAND))
353353 {
354354 concptr staff;
@@ -421,7 +421,7 @@ void do_cmd_eat_food_aux(INVENTORY_IDX item)
421421 /* Don't eat a staff/wand itself */
422422 return;
423423 }
424- else if ((prace_is_(RACE_DEMON) ||
424+ else if ((PRACE_IS_(RACE_DEMON) ||
425425 (mimic_info[p_ptr->mimic_form].MIMIC_FLAGS & MIMIC_IS_DEMON)) &&
426426 (o_ptr->tval == TV_CORPSE && o_ptr->sval == SV_CORPSE &&
427427 my_strchr("pht", r_info[o_ptr->pval].d_char)))
@@ -432,7 +432,7 @@ void do_cmd_eat_food_aux(INVENTORY_IDX item)
432432 msg_format(_("%sは燃え上り灰になった。精力を吸収した気がする。", "%^s is burnt to ashes. You absorb its vitality!"), o_name);
433433 (void)set_food(PY_FOOD_MAX - 1);
434434 }
435- else if (prace_is_(RACE_SKELETON))
435+ else if (PRACE_IS_(RACE_SKELETON))
436436 {
437437 #if 0
438438 if (o_ptr->tval == TV_SKELETON ||
@@ -461,12 +461,12 @@ void do_cmd_eat_food_aux(INVENTORY_IDX item)
461461 msg_print(_("食べ物がアゴを素通りして落ち、消えた!", "The food falls through your jaws and vanishes!"));
462462 }
463463 }
464- else if (prace_is_(RACE_GOLEM) ||
465- prace_is_(RACE_ZOMBIE) ||
466- prace_is_(RACE_ENT) ||
467- prace_is_(RACE_DEMON) ||
468- prace_is_(RACE_ANDROID) ||
469- prace_is_(RACE_SPECTRE) ||
464+ else if (PRACE_IS_(RACE_GOLEM) ||
465+ PRACE_IS_(RACE_ZOMBIE) ||
466+ PRACE_IS_(RACE_ENT) ||
467+ PRACE_IS_(RACE_DEMON) ||
468+ PRACE_IS_(RACE_ANDROID) ||
469+ PRACE_IS_(RACE_SPECTRE) ||
470470 (mimic_info[p_ptr->mimic_form].MIMIC_FLAGS & MIMIC_IS_NONLIVING))
471471 {
472472 msg_print(_("生者の食物はあなたにとってほとんど栄養にならない。", "The food of mortals is poor sustenance for you."));
--- a/src/cmd-quaff.c
+++ b/src/cmd-quaff.c
@@ -135,11 +135,11 @@ void do_cmd_quaff_potion_aux(INVENTORY_IDX item)
135135 case SV_POTION_SALT_WATER:
136136 msg_print(_("うぇ!思わず吐いてしまった。", "The potion makes you vomit!"));
137137
138- if (!(prace_is_(RACE_GOLEM) ||
139- prace_is_(RACE_ZOMBIE) ||
140- prace_is_(RACE_DEMON) ||
141- prace_is_(RACE_ANDROID) ||
142- prace_is_(RACE_SPECTRE) ||
138+ if (!(PRACE_IS_(RACE_GOLEM) ||
139+ PRACE_IS_(RACE_ZOMBIE) ||
140+ PRACE_IS_(RACE_DEMON) ||
141+ PRACE_IS_(RACE_ANDROID) ||
142+ PRACE_IS_(RACE_SPECTRE) ||
143143 (mimic_info[p_ptr->mimic_form].MIMIC_FLAGS & MIMIC_IS_NONLIVING)))
144144 {
145145 /* Only living creatures get thirsty */
@@ -513,7 +513,7 @@ void do_cmd_quaff_potion_aux(INVENTORY_IDX item)
513513 }
514514 }
515515
516- if (prace_is_(RACE_SKELETON))
516+ if (PRACE_IS_(RACE_SKELETON))
517517 {
518518 msg_print(_("液体の一部はあなたのアゴを素通りして落ちた!", "Some of the fluid falls through your jaws!"));
519519 (void)potion_smash_effect(0, p_ptr->y, p_ptr->x, q_ptr->k_idx);
--- a/src/cmd-usestaff.c
+++ b/src/cmd-usestaff.c
@@ -262,8 +262,8 @@ int staff_effect(OBJECT_SUBTYPE_VALUE sval, bool *use_charge, bool powerful, boo
262262 case SV_STAFF_NOTHING:
263263 {
264264 msg_print(_("何も起らなかった。", "Nothing happen."));
265- if (prace_is_(RACE_SKELETON) || prace_is_(RACE_GOLEM) ||
266- prace_is_(RACE_ZOMBIE) || prace_is_(RACE_SPECTRE))
265+ if (PRACE_IS_(RACE_SKELETON) || PRACE_IS_(RACE_GOLEM) ||
266+ PRACE_IS_(RACE_ZOMBIE) || PRACE_IS_(RACE_SPECTRE))
267267 msg_print(_("もったいない事をしたような気がする。食べ物は大切にしなくては。", "What a waste. It's your food!"));
268268 break;
269269 }
--- a/src/core.c
+++ b/src/core.c
@@ -689,7 +689,7 @@ static bool pattern_effect(void)
689689
690690 if (!pattern_tile(p_ptr->y, p_ptr->x)) return FALSE;
691691
692- if ((prace_is_(RACE_AMBERITE)) &&
692+ if ((PRACE_IS_(RACE_AMBERITE)) &&
693693 (p_ptr->cut > 0) && one_in_(10))
694694 {
695695 wreck_the_pattern();
@@ -730,7 +730,7 @@ static bool pattern_effect(void)
730730 break;
731731
732732 default:
733- if (prace_is_(RACE_AMBERITE) && !one_in_(2))
733+ if (PRACE_IS_(RACE_AMBERITE) && !one_in_(2))
734734 return TRUE;
735735 else if (!IS_INVULN())
736736 take_hit(DAMAGE_NOESCAPE, damroll(1, 3), _("「パターン」を歩いたダメージ", "walking the Pattern"), -1);
@@ -1392,7 +1392,7 @@ static void process_world_aux_hp_and_sp(void)
13921392 }
13931393
13941394 /* (Vampires) Take damage from sunlight */
1395- if (prace_is_(RACE_VAMPIRE) || (p_ptr->mimic_form == MIMIC_VAMPIRE))
1395+ if (PRACE_IS_(RACE_VAMPIRE) || (p_ptr->mimic_form == MIMIC_VAMPIRE))
13961396 {
13971397 if (!current_floor_ptr->dun_level && !p_ptr->resist_lite && !IS_INVULN() && is_daytime())
13981398 {
@@ -1440,7 +1440,7 @@ static void process_world_aux_hp_and_sp(void)
14401440
14411441 if (damage)
14421442 {
1443- if(prace_is_(RACE_ENT)) damage += damage / 3;
1443+ if(PRACE_IS_(RACE_ENT)) damage += damage / 3;
14441444 if(p_ptr->resist_fire) damage = damage / 3;
14451445 if(IS_OPPOSE_FIRE()) damage = damage / 3;
14461446 if(p_ptr->levitation) damage = damage / 5;
@@ -1635,7 +1635,7 @@ static void process_world_aux_hp_and_sp(void)
16351635 if ((r_info[current_floor_ptr->m_list[p_ptr->riding].r_idx].flags2 & RF2_AURA_FIRE) && !p_ptr->immune_fire)
16361636 {
16371637 damage = r_info[current_floor_ptr->m_list[p_ptr->riding].r_idx].level / 2;
1638- if (prace_is_(RACE_ENT)) damage += damage / 3;
1638+ if (PRACE_IS_(RACE_ENT)) damage += damage / 3;
16391639 if (p_ptr->resist_fire) damage = damage / 3;
16401640 if (IS_OPPOSE_FIRE()) damage = damage / 3;
16411641 msg_print(_("熱い!", "It's hot!"));
@@ -1644,7 +1644,7 @@ static void process_world_aux_hp_and_sp(void)
16441644 if ((r_info[current_floor_ptr->m_list[p_ptr->riding].r_idx].flags2 & RF2_AURA_ELEC) && !p_ptr->immune_elec)
16451645 {
16461646 damage = r_info[current_floor_ptr->m_list[p_ptr->riding].r_idx].level / 2;
1647- if (prace_is_(RACE_ANDROID)) damage += damage / 3;
1647+ if (PRACE_IS_(RACE_ANDROID)) damage += damage / 3;
16481648 if (p_ptr->resist_elec) damage = damage / 3;
16491649 if (IS_OPPOSE_ELEC()) damage = damage / 3;
16501650 msg_print(_("痛い!", "It hurts!"));
--- a/src/defines.h
+++ b/src/defines.h
@@ -375,8 +375,6 @@
375375 #define SLF_NO_KILL 0x0002 /* Don't kill temporal files */
376376
377377
378-#define prace_is_(A) (!p_ptr->mimic_form && (p_ptr->prace == A))
379-
380378 /* Sub-alignment flags for neutral monsters */
381379 #define SUB_ALIGN_NEUTRAL 0x0000
382380 #define SUB_ALIGN_EVIL 0x0001
--- a/src/files.c
+++ b/src/files.c
@@ -2742,7 +2742,7 @@ static void tim_player_flags(BIT_FLAGS flgs[TR_FLAG_SIZE])
27422742 if (IS_FAST() || p_ptr->slow)
27432743 add_flag(flgs, TR_SPEED);
27442744
2745- if (IS_OPPOSE_ACID() && !(p_ptr->special_defense & DEFENSE_ACID) && !(prace_is_(RACE_YEEK) && (p_ptr->lev > 19)))
2745+ if (IS_OPPOSE_ACID() && !(p_ptr->special_defense & DEFENSE_ACID) && !(PRACE_IS_(RACE_YEEK) && (p_ptr->lev > 19)))
27462746 add_flag(flgs, TR_RES_ACID);
27472747 if (IS_OPPOSE_ELEC() && !(p_ptr->special_defense & DEFENSE_ELEC))
27482748 add_flag(flgs, TR_RES_ELEC);
@@ -2941,13 +2941,13 @@ static void player_immunity(BIT_FLAGS flgs[TR_FLAG_SIZE])
29412941 for (i = 0; i < TR_FLAG_SIZE; i++)
29422942 flgs[i] = 0L;
29432943
2944- if (prace_is_(RACE_SPECTRE))
2944+ if (PRACE_IS_(RACE_SPECTRE))
29452945 add_flag(flgs, TR_RES_NETHER);
2946- if (p_ptr->mimic_form == MIMIC_VAMPIRE || prace_is_(RACE_VAMPIRE))
2946+ if (p_ptr->mimic_form == MIMIC_VAMPIRE || PRACE_IS_(RACE_VAMPIRE))
29472947 add_flag(flgs, TR_RES_DARK);
29482948 if (p_ptr->mimic_form == MIMIC_DEMON_LORD)
29492949 add_flag(flgs, TR_RES_FIRE);
2950- else if (prace_is_(RACE_YEEK) && p_ptr->lev > 19)
2950+ else if (PRACE_IS_(RACE_YEEK) && p_ptr->lev > 19)
29512951 add_flag(flgs, TR_RES_ACID);
29522952 }
29532953
@@ -3000,11 +3000,11 @@ static void player_vuln_flags(BIT_FLAGS flgs[TR_FLAG_SIZE])
30003000 add_flag(flgs, TR_RES_FIRE);
30013001 add_flag(flgs, TR_RES_COLD);
30023002 }
3003- if (prace_is_(RACE_ANDROID))
3003+ if (PRACE_IS_(RACE_ANDROID))
30043004 add_flag(flgs, TR_RES_ELEC);
3005- if (prace_is_(RACE_ENT))
3005+ if (PRACE_IS_(RACE_ENT))
30063006 add_flag(flgs, TR_RES_FIRE);
3007- if (prace_is_(RACE_VAMPIRE) || prace_is_(RACE_S_FAIRY) ||
3007+ if (PRACE_IS_(RACE_VAMPIRE) || PRACE_IS_(RACE_S_FAIRY) ||
30083008 (p_ptr->mimic_form == MIMIC_VAMPIRE))
30093009 add_flag(flgs, TR_RES_LITE);
30103010 }
@@ -3613,7 +3613,7 @@ static void display_player_stat_info(void)
36133613 if ((p_ptr->stat_max[i] > 18) && (p_ptr->stat_top[i] <= 18))
36143614 e_adj = p_ptr->stat_top[i] - (p_ptr->stat_max[i] - 19) / 10 - 19;
36153615
3616- if (prace_is_(RACE_ENT))
3616+ if (PRACE_IS_(RACE_ENT))
36173617 {
36183618 switch (i)
36193619 {
--- a/src/mspells1.c
+++ b/src/mspells1.c
@@ -261,7 +261,7 @@ static void remove_bad_spells(MONSTER_IDX m_idx, u32b *f4p, u32b *f5p, u32b *f6p
261261
262262 if (smart & (SM_RES_NETH))
263263 {
264- if (prace_is_(RACE_SPECTRE))
264+ if (PRACE_IS_(RACE_SPECTRE))
265265 {
266266 f4 &= ~(RF4_BR_NETH);
267267 f5 &= ~(RF5_BA_NETH);
@@ -283,7 +283,7 @@ static void remove_bad_spells(MONSTER_IDX m_idx, u32b *f4p, u32b *f5p, u32b *f6p
283283
284284 if (smart & (SM_RES_DARK))
285285 {
286- if (prace_is_(RACE_VAMPIRE))
286+ if (PRACE_IS_(RACE_VAMPIRE))
287287 {
288288 f4 &= ~(RF4_BR_DARK);
289289 f5 &= ~(RF5_BA_DARK);
--- a/src/object-hook.c
+++ b/src/object-hook.c
@@ -124,7 +124,7 @@ bool item_tester_hook_eatable(object_type *o_ptr)
124124 if (o_ptr->tval == TV_FOOD) return TRUE;
125125
126126 #if 0
127- if (prace_is_(RACE_SKELETON))
127+ if (PRACE_IS_(RACE_SKELETON))
128128 {
129129 if (o_ptr->tval == TV_SKELETON ||
130130 (o_ptr->tval == TV_CORPSE && o_ptr->sval == SV_SKELETON))
@@ -133,15 +133,15 @@ bool item_tester_hook_eatable(object_type *o_ptr)
133133 else
134134 #endif
135135
136- if (prace_is_(RACE_SKELETON) ||
137- prace_is_(RACE_GOLEM) ||
138- prace_is_(RACE_ZOMBIE) ||
139- prace_is_(RACE_SPECTRE))
136+ if (PRACE_IS_(RACE_SKELETON) ||
137+ PRACE_IS_(RACE_GOLEM) ||
138+ PRACE_IS_(RACE_ZOMBIE) ||
139+ PRACE_IS_(RACE_SPECTRE))
140140 {
141141 if (o_ptr->tval == TV_STAFF || o_ptr->tval == TV_WAND)
142142 return TRUE;
143143 }
144- else if (prace_is_(RACE_DEMON) || (mimic_info[p_ptr->mimic_form].MIMIC_FLAGS & MIMIC_IS_DEMON))
144+ else if (PRACE_IS_(RACE_DEMON) || (mimic_info[p_ptr->mimic_form].MIMIC_FLAGS & MIMIC_IS_DEMON))
145145 {
146146 if (o_ptr->tval == TV_CORPSE &&
147147 o_ptr->sval == SV_CORPSE &&
@@ -266,7 +266,7 @@ bool item_tester_hook_quaff(object_type *o_ptr)
266266 {
267267 if (o_ptr->tval == TV_POTION) return TRUE;
268268
269- if (prace_is_(RACE_ANDROID))
269+ if (PRACE_IS_(RACE_ANDROID))
270270 {
271271 if (o_ptr->tval == TV_FLASK && o_ptr->sval == SV_FLASK_OIL)
272272 return TRUE;
--- a/src/player-damage.c
+++ b/src/player-damage.c
@@ -478,7 +478,7 @@ HIT_POINT elec_dam(HIT_POINT dam, concptr kb_str, int monspell, bool aura)
478478 /* Vulnerability (Ouch!) */
479479 if (p_ptr->muta3 & MUT3_VULN_ELEM) dam *= 2;
480480 if (p_ptr->special_defense & KATA_KOUKIJIN) dam += dam / 3;
481- if (prace_is_(RACE_ANDROID)) dam += dam / 3;
481+ if (PRACE_IS_(RACE_ANDROID)) dam += dam / 3;
482482
483483 /* Resist the damage */
484484 if (p_ptr->resist_elec) dam = (dam + 2) / 3;
@@ -525,7 +525,7 @@ HIT_POINT fire_dam(HIT_POINT dam, concptr kb_str, int monspell, bool aura)
525525
526526 /* Vulnerability (Ouch!) */
527527 if (p_ptr->muta3 & MUT3_VULN_ELEM) dam *= 2;
528- if (prace_is_(RACE_ENT)) dam += dam / 3;
528+ if (PRACE_IS_(RACE_ENT)) dam += dam / 3;
529529 if (p_ptr->special_defense & KATA_KOUKIJIN) dam += dam / 3;
530530
531531 /* Resist the damage */
--- a/src/player-effects.c
+++ b/src/player-effects.c
@@ -265,7 +265,7 @@ void reset_tim_flags(void)
265265 while(p_ptr->energy_need < 0) p_ptr->energy_need += ENERGY_NEED();
266266 p_ptr->timewalk = FALSE;
267267
268- if (prace_is_(RACE_DEMON) && (p_ptr->lev > 44)) p_ptr->oppose_fire = 1;
268+ if (PRACE_IS_(RACE_DEMON) && (p_ptr->lev > 44)) p_ptr->oppose_fire = 1;
269269 if ((p_ptr->pclass == CLASS_NINJA) && (p_ptr->lev > 44)) p_ptr->oppose_pois = 1;
270270 if (p_ptr->pclass == CLASS_BERSERKER) p_ptr->shero = 1;
271271
@@ -2535,7 +2535,7 @@ bool set_oppose_fire(TIME_EFFECT v, bool do_dec)
25352535
25362536 if (p_ptr->is_dead) return FALSE;
25372537
2538- if ((prace_is_(RACE_DEMON) && (p_ptr->lev > 44)) || (p_ptr->mimic_form == MIMIC_DEMON)) v = 1;
2538+ if ((PRACE_IS_(RACE_DEMON) && (p_ptr->lev > 44)) || (p_ptr->mimic_form == MIMIC_DEMON)) v = 1;
25392539 /* Open */
25402540 if (v)
25412541 {
@@ -2685,7 +2685,7 @@ bool set_stun(TIME_EFFECT v)
26852685 v = (v > 10000) ? 10000 : (v < 0) ? 0 : v;
26862686
26872687 if (p_ptr->is_dead) return FALSE;
2688- if (prace_is_(RACE_GOLEM) || ((p_ptr->pclass == CLASS_BERSERKER) && (p_ptr->lev > 34))) v = 0;
2688+ if (PRACE_IS_(RACE_GOLEM) || ((p_ptr->pclass == CLASS_BERSERKER) && (p_ptr->lev > 34))) v = 0;
26892689
26902690 /* Knocked out */
26912691 if (p_ptr->stun > 100)
--- a/src/player-race.h
+++ b/src/player-race.h
@@ -1,5 +1,7 @@
11 #pragma once
22
3+#define PRACE_IS_(A) (!p_ptr->mimic_form && (p_ptr->prace == A))
4+
35 /*
46 * Player race constants (hard-coded by save-files, arrays, etc)
57 */
--- a/src/player-status.c
+++ b/src/player-status.c
@@ -689,8 +689,8 @@ void calc_bonuses(void)
689689 /* Unencumbered Monks become faster every 10 levels */
690690 if (!(heavy_armor()))
691691 {
692- if (!(prace_is_(RACE_KLACKON) ||
693- prace_is_(RACE_SPRITE) ||
692+ if (!(PRACE_IS_(RACE_KLACKON) ||
693+ PRACE_IS_(RACE_SPRITE) ||
694694 (p_ptr->pseikaku == SEIKAKU_MUNCHKIN)))
695695 new_speed += (p_ptr->lev) / 10;
696696
@@ -741,8 +741,8 @@ void calc_bonuses(void)
741741 (!p_ptr->inventory_list[INVEN_LARM].k_idx || p_ptr->hidarite))
742742 {
743743 new_speed += 3;
744- if (!(prace_is_(RACE_KLACKON) ||
745- prace_is_(RACE_SPRITE) ||
744+ if (!(PRACE_IS_(RACE_KLACKON) ||
745+ PRACE_IS_(RACE_SPRITE) ||
746746 (p_ptr->pseikaku == SEIKAKU_MUNCHKIN)))
747747 new_speed += (p_ptr->lev) / 10;
748748 p_ptr->skill_stl += (p_ptr->lev) / 10;
@@ -1706,7 +1706,7 @@ void calc_bonuses(void)
17061706 if (p_ptr->sh_fire) p_ptr->lite = TRUE;
17071707
17081708 /* Golems also get an intrinsic AC bonus */
1709- if (prace_is_(RACE_GOLEM) || prace_is_(RACE_ANDROID))
1709+ if (PRACE_IS_(RACE_GOLEM) || PRACE_IS_(RACE_ANDROID))
17101710 {
17111711 p_ptr->to_a += 10 + (p_ptr->lev * 2 / 5);
17121712 p_ptr->dis_to_a += 10 + (p_ptr->lev * 2 / 5);
@@ -2749,7 +2749,7 @@ void calc_bonuses(void)
27492749 p_ptr->skill_tht += ((cp_ptr->x_thb * p_ptr->lev / 10) + (ap_ptr->a_thb * p_ptr->lev / 50));
27502750
27512751
2752- if ((prace_is_(RACE_S_FAIRY)) && (p_ptr->pseikaku != SEIKAKU_SEXY) && (p_ptr->cursed & TRC_AGGRAVATE))
2752+ if ((PRACE_IS_(RACE_S_FAIRY)) && (p_ptr->pseikaku != SEIKAKU_SEXY) && (p_ptr->cursed & TRC_AGGRAVATE))
27532753 {
27542754 p_ptr->cursed &= ~(TRC_AGGRAVATE);
27552755 p_ptr->skill_stl = MIN(p_ptr->skill_stl - 3, (p_ptr->skill_stl + 2) / 2);
@@ -4311,12 +4311,12 @@ void sanity_blast(monster_type *m_ptr, bool necro)
43114311 r_ptr->r_flags2 |= RF2_ELDRITCH_HORROR;
43124312
43134313 /* Demon characters are unaffected */
4314- if (prace_is_(RACE_IMP) || prace_is_(RACE_DEMON) || (mimic_info[p_ptr->mimic_form].MIMIC_FLAGS & MIMIC_IS_DEMON)) return;
4314+ if (PRACE_IS_(RACE_IMP) || PRACE_IS_(RACE_DEMON) || (mimic_info[p_ptr->mimic_form].MIMIC_FLAGS & MIMIC_IS_DEMON)) return;
43154315 if (p_ptr->wizard) return;
43164316
43174317 /* Undead characters are 50% likely to be unaffected */
4318- if (prace_is_(RACE_SKELETON) || prace_is_(RACE_ZOMBIE)
4319- || prace_is_(RACE_VAMPIRE) || prace_is_(RACE_SPECTRE) ||
4318+ if (PRACE_IS_(RACE_SKELETON) || PRACE_IS_(RACE_ZOMBIE)
4319+ || PRACE_IS_(RACE_VAMPIRE) || PRACE_IS_(RACE_SPECTRE) ||
43204320 (mimic_info[p_ptr->mimic_form].MIMIC_FLAGS & MIMIC_IS_UNDEAD))
43214321 {
43224322 if (saving_throw(25 + p_ptr->lev)) return;
--- a/src/realm-nature.c
+++ b/src/realm-nature.c
@@ -121,7 +121,7 @@ concptr do_nature_spell(SPELL_IDX spell, BIT_FLAGS mode)
121121 {
122122 lite_area(damroll(dice, sides), rad);
123123
124- if ((prace_is_(RACE_VAMPIRE) || (p_ptr->mimic_form == MIMIC_VAMPIRE)) && !p_ptr->resist_lite)
124+ if ((PRACE_IS_(RACE_VAMPIRE) || (p_ptr->mimic_form == MIMIC_VAMPIRE)) && !p_ptr->resist_lite)
125125 {
126126 msg_print(_("日の光があなたの肉体を焦がした!", "The daylight scorches your flesh!"));
127127 take_hit(DAMAGE_NOESCAPE, damroll(2, 2), _("日の光", "daylight"), -1);
@@ -525,7 +525,7 @@ concptr do_nature_spell(SPELL_IDX spell, BIT_FLAGS mode)
525525 chg_virtue(V_ENLIGHTEN, 1);
526526 wiz_lite(FALSE);
527527
528- if ((prace_is_(RACE_VAMPIRE) || (p_ptr->mimic_form == MIMIC_VAMPIRE)) && !p_ptr->resist_lite)
528+ if ((PRACE_IS_(RACE_VAMPIRE) || (p_ptr->mimic_form == MIMIC_VAMPIRE)) && !p_ptr->resist_lite)
529529 {
530530 msg_print(_("日光があなたの肉体を焦がした!", "The sunlight scorches your flesh!"));
531531 take_hit(DAMAGE_NOESCAPE, 50, _("日光", "sunlight"), -1);
--- a/src/selfinfo.c
+++ b/src/selfinfo.c
@@ -1253,7 +1253,7 @@ void self_knowledge(void)
12531253 info[i++] = _("あなたは電撃への耐性を持っている。", "You are resistant to lightning.");
12541254 }
12551255
1256- if (prace_is_(RACE_ANDROID) && !p_ptr->immune_elec)
1256+ if (PRACE_IS_(RACE_ANDROID) && !p_ptr->immune_elec)
12571257 {
12581258 info[i++] = _("あなたは電撃に弱い。", "You are susceptible to damage from lightning.");
12591259 }
@@ -1271,7 +1271,7 @@ void self_knowledge(void)
12711271 info[i++] = _("あなたは火への耐性を持っている。", "You are resistant to fire.");
12721272 }
12731273
1274- if (prace_is_(RACE_ENT) && !p_ptr->immune_fire)
1274+ if (PRACE_IS_(RACE_ENT) && !p_ptr->immune_fire)
12751275 {
12761276 info[i++] = _("あなたは火に弱い。", "You are susceptible to damage from fire.");
12771277 }
@@ -1303,12 +1303,12 @@ void self_knowledge(void)
13031303 info[i++] = _("あなたは閃光への耐性を持っている。", "You are resistant to bright light.");
13041304 }
13051305
1306- if (prace_is_(RACE_VAMPIRE) || prace_is_(RACE_S_FAIRY) || (p_ptr->mimic_form == MIMIC_VAMPIRE))
1306+ if (PRACE_IS_(RACE_VAMPIRE) || PRACE_IS_(RACE_S_FAIRY) || (p_ptr->mimic_form == MIMIC_VAMPIRE))
13071307 {
13081308 info[i++] = _("あなたは閃光に弱い。", "You are susceptible to damage from bright light.");
13091309 }
13101310
1311- if (prace_is_(RACE_VAMPIRE) || (p_ptr->mimic_form == MIMIC_VAMPIRE) || p_ptr->wraith_form)
1311+ if (PRACE_IS_(RACE_VAMPIRE) || (p_ptr->mimic_form == MIMIC_VAMPIRE) || p_ptr->wraith_form)
13121312 {
13131313 info[i++] = _("あなたは暗黒に対する完全なる免疫を持っている。", "You are completely immune to darkness.");
13141314 }
@@ -1342,7 +1342,7 @@ void self_knowledge(void)
13421342 info[i++] = _("あなたは因果混乱の攻撃への耐性を持っている。", "You are resistant to nexus attacks.");
13431343 }
13441344
1345- if (prace_is_(RACE_SPECTRE))
1345+ if (PRACE_IS_(RACE_SPECTRE))
13461346 {
13471347 info[i++] = _("あなたは地獄の力を吸収できる。", "You can drain nether forces.");
13481348 }
--- a/src/spells1.c
+++ b/src/spells1.c
@@ -4272,14 +4272,14 @@ static bool project_p(MONSTER_IDX who, concptr who_name, int r, POSITION y, POSI
42724272 if (fuzzy) msg_print(_("地獄の力で攻撃された!", "You are hit by nether forces!"));
42734273 if (p_ptr->resist_neth)
42744274 {
4275- if (!prace_is_(RACE_SPECTRE))
4275+ if (!PRACE_IS_(RACE_SPECTRE))
42764276 {
42774277 dam *= 6; dam /= (randint1(4) + 7);
42784278 }
42794279 }
42804280 else if (!CHECK_MULTISHADOW()) drain_exp(200 + (p_ptr->exp / 100), 200 + (p_ptr->exp / 1000), 75);
42814281
4282- if (prace_is_(RACE_SPECTRE) && !CHECK_MULTISHADOW())
4282+ if (PRACE_IS_(RACE_SPECTRE) && !CHECK_MULTISHADOW())
42834283 {
42844284 msg_print(_("気分がよくなった。", "You feel invigorated!"));
42854285 hp_player(dam / 4);
@@ -4515,12 +4515,12 @@ static bool project_p(MONSTER_IDX who, concptr who_name, int r, POSITION y, POSI
45154515 (void)set_blind(p_ptr->blind + randint1(5) + 2);
45164516 }
45174517
4518- if (prace_is_(RACE_VAMPIRE) || (p_ptr->mimic_form == MIMIC_VAMPIRE))
4518+ if (PRACE_IS_(RACE_VAMPIRE) || (p_ptr->mimic_form == MIMIC_VAMPIRE))
45194519 {
45204520 if (!CHECK_MULTISHADOW()) msg_print(_("光で肉体が焦がされた!", "The light scorches your flesh!"));
45214521 dam *= 2;
45224522 }
4523- else if (prace_is_(RACE_S_FAIRY))
4523+ else if (PRACE_IS_(RACE_S_FAIRY))
45244524 {
45254525 dam = dam * 4 / 3;
45264526 }
@@ -4550,7 +4550,7 @@ static bool project_p(MONSTER_IDX who, concptr who_name, int r, POSITION y, POSI
45504550 {
45514551 dam *= 4; dam /= (randint1(4) + 7);
45524552
4553- if (prace_is_(RACE_VAMPIRE) || (p_ptr->mimic_form == MIMIC_VAMPIRE) || p_ptr->wraith_form) dam = 0;
4553+ if (PRACE_IS_(RACE_VAMPIRE) || (p_ptr->mimic_form == MIMIC_VAMPIRE) || p_ptr->wraith_form) dam = 0;
45544554 }
45554555 else if (!blind && !p_ptr->resist_blind && !CHECK_MULTISHADOW())
45564556 {
--- a/src/warning.c
+++ b/src/warning.c
@@ -80,7 +80,7 @@ static void spell_damcalc(monster_type *m_ptr, EFFECT_ID typ, HIT_POINT dam, int
8080 {
8181 if (p_ptr->muta3 & MUT3_VULN_ELEM) dam *= 2;
8282 if (p_ptr->special_defense & KATA_KOUKIJIN) dam += dam / 3;
83- if (prace_is_(RACE_ANDROID)) dam += dam / 3;
83+ if (PRACE_IS_(RACE_ANDROID)) dam += dam / 3;
8484 if (p_ptr->resist_elec) dam = (dam + 2) / 3;
8585 if (IS_OPPOSE_ELEC())
8686 dam = (dam + 2) / 3;
@@ -132,7 +132,7 @@ static void spell_damcalc(monster_type *m_ptr, EFFECT_ID typ, HIT_POINT dam, int
132132 else
133133 {
134134 if (p_ptr->muta3 & MUT3_VULN_ELEM) dam *= 2;
135- if (prace_is_(RACE_ENT)) dam += dam / 3;
135+ if (PRACE_IS_(RACE_ENT)) dam += dam / 3;
136136 if (p_ptr->special_defense & KATA_KOUKIJIN) dam += dam / 3;
137137 if (p_ptr->resist_fire) dam = (dam + 2) / 3;
138138 if (IS_OPPOSE_FIRE()) dam = (dam + 2) / 3;
@@ -155,8 +155,8 @@ static void spell_damcalc(monster_type *m_ptr, EFFECT_ID typ, HIT_POINT dam, int
155155
156156 case GF_LITE:
157157 if (p_ptr->resist_lite) dam /= 2; /* Worst case of 4 / (d4 + 7) */
158- if (prace_is_(RACE_VAMPIRE) || (p_ptr->mimic_form == MIMIC_VAMPIRE)) dam *= 2;
159- else if (prace_is_(RACE_S_FAIRY)) dam = dam * 4 / 3;
158+ if (PRACE_IS_(RACE_VAMPIRE) || (p_ptr->mimic_form == MIMIC_VAMPIRE)) dam *= 2;
159+ else if (PRACE_IS_(RACE_S_FAIRY)) dam = dam * 4 / 3;
160160
161161 /*
162162 * Cannot use "ignore_wraith_form" strictly (for "random one damage")
@@ -166,7 +166,7 @@ static void spell_damcalc(monster_type *m_ptr, EFFECT_ID typ, HIT_POINT dam, int
166166 break;
167167
168168 case GF_DARK:
169- if (prace_is_(RACE_VAMPIRE) || (p_ptr->mimic_form == MIMIC_VAMPIRE) || p_ptr->wraith_form)
169+ if (PRACE_IS_(RACE_VAMPIRE) || (p_ptr->mimic_form == MIMIC_VAMPIRE) || p_ptr->wraith_form)
170170 {
171171 dam = 0;
172172 ignore_wraith_form = TRUE;
@@ -191,7 +191,7 @@ static void spell_damcalc(monster_type *m_ptr, EFFECT_ID typ, HIT_POINT dam, int
191191 break;
192192
193193 case GF_NETHER:
194- if (prace_is_(RACE_SPECTRE))
194+ if (PRACE_IS_(RACE_SPECTRE))
195195 {
196196 dam = 0;
197197 ignore_wraith_form = TRUE;
Show on old repository browser