3 #include "system/angband.h"
5 /* 人畜無害なenumヘッダを先に読み込む */
6 #include "player-info/base-status-types.h"
7 #include "player/player-classes-types.h"
8 #include "player/player-personalities-types.h"
9 #include "player/player-race-types.h"
10 #include "spell/spells-util.h"
13 * Most of the "player" information goes here.
15 * This stucture gives us a large collection of player variables.
17 * This structure contains several "blocks" of information.
18 * (1) the "permanent" info
19 * (2) the "variable" info
20 * (3) the "transient" info
22 * All of the "permanent" info, and most of the "variable" info,
23 * is saved in the savefile. The "transient" info is recomputed
24 * whenever anything important changes.
30 #define PY_MAX_EXP 99999999L /*!< プレイヤー経験値の最大値 / Maximum exp */
31 #define PY_MAX_GOLD 999999999L /*!< プレイヤー所持金の最大値 / Maximum gold */
32 #define PY_MAX_LEVEL 50 /*!< プレイヤーレベルの最大値 / Maximum level */
37 #define MAGIC_GLOVE_REDUCE_MANA 0x0001
38 #define MAGIC_FAIL_5PERCENT 0x0002
39 #define MAGIC_GAIN_EXP 0x0004
41 /* no_flowed 判定対象となるスペル */
47 /*!< Empty hand status */
48 enum empty_hand_status {
49 EMPTY_HAND_NONE = 0x0000, /*!<Both hands are used */
50 EMPTY_HAND_LARM = 0x0001, /*!<Left hand is empty */
51 EMPTY_HAND_RARM = 0x0002 /*!<Right hand is empty */
55 * Player sex constants (hard-coded by save-files, arrays, etc)
59 #define MAX_SEXES 2 /*!< 性別の定義最大数 / Maximum number of player "sex" types (see "table.c", etc) */
61 typedef struct floor_type floor_type;
62 typedef struct object_type object_type;
63 typedef struct player_type {
68 floor_type *current_floor_ptr;
69 POSITION oldpy; /* Previous player location -KMW- */
70 POSITION oldpx; /* Previous player location -KMW- */
72 SEX_IDX psex; /* Sex index */
73 player_race_type prace; /* Race index */
74 player_class_type pclass; /* Class index */
75 player_personality_type pseikaku; /* Seikaku index */
76 REALM_IDX realm1; /* First magic realm */
77 REALM_IDX realm2; /* Second magic realm */
78 player_personality_type oops; /* Unused */
80 DICE_SID hitdie; /* Hit dice (sides) */
81 u16b expfact; /* Experience factor
82 * Note: was byte, causing overflow for Amberite
83 * characters (such as Amberite Paladins)
86 s16b age; /* Characters age */
89 s16b sc; /* Social Class */
91 PRICE au; /* Current Gold */
93 EXP max_max_exp; /* Max max experience (only to calculate score) */
94 EXP max_exp; /* Max experience */
95 EXP exp; /* Cur experience */
96 u32b exp_frac; /* Cur exp frac (times 2^16) */
98 PLAYER_LEVEL lev; /* Level */
100 TOWN_IDX town_num; /* Current town number */
101 s16b arena_number; /* monster number in on_defeat_arena_monster -KMW- */
102 bool phase_out; /*!< フェイズアウト状態(闘技場観戦状態などに利用、NPCの処理の対象にならず自身もほとんどの行動ができない) */
104 DUNGEON_IDX dungeon_idx; /* current dungeon index */
105 POSITION wilderness_x; /* Coordinates in the wilderness */
106 POSITION wilderness_y;
109 HIT_POINT mhp; /* Max hit pts */
110 HIT_POINT chp; /* Cur hit pts */
111 u32b chp_frac; /* Cur hit frac (times 2^16) */
112 PERCENTAGE mutant_regenerate_mod;
114 MANA_POINT msp; /* Max mana pts */
115 MANA_POINT csp; /* Cur mana pts */
116 u32b csp_frac; /* Cur mana frac (times 2^16) */
118 s16b max_plv; /* Max Player Level */
120 BASE_STATUS stat_max[A_MAX]; /* Current "maximal" stat values */
121 BASE_STATUS stat_max_max[A_MAX]; /* Maximal "maximal" stat values */
122 BASE_STATUS stat_cur[A_MAX]; /* Current "natural" stat values */
129 TIME_EFFECT fast; /* Timed -- Fast */
130 TIME_EFFECT slow; /* Timed -- Slow */
131 TIME_EFFECT blind; /* Timed -- Blindness */
132 TIME_EFFECT paralyzed; /* Timed -- Paralysis */
133 TIME_EFFECT confused; /* Timed -- Confusion */
134 TIME_EFFECT afraid; /* Timed -- Fear */
135 TIME_EFFECT image; /* Timed -- Hallucination */
136 TIME_EFFECT poisoned; /* Timed -- Poisoned */
137 TIME_EFFECT cut; /* Timed -- Cut */
138 TIME_EFFECT stun; /* Timed -- Stun */
140 TIME_EFFECT protevil; /* Timed -- Protection */
141 TIME_EFFECT invuln; /* Timed -- Invulnerable */
142 TIME_EFFECT ult_res; /* Timed -- Ultimate Resistance */
143 TIME_EFFECT hero; /* Timed -- Heroism */
144 TIME_EFFECT shero; /* Timed -- Super Heroism */
145 TIME_EFFECT shield; /* Timed -- Shield Spell */
146 TIME_EFFECT blessed; /* Timed -- Blessed */
147 TIME_EFFECT tim_invis; /* Timed -- See Invisible */
148 TIME_EFFECT tim_infra; /* Timed -- Infra Vision */
149 TIME_EFFECT tsuyoshi; /* Timed -- Tsuyoshi Special */
150 TIME_EFFECT ele_attack; /* Timed -- Elemental Attack */
151 TIME_EFFECT ele_immune; /* Timed -- Elemental Immune */
153 TIME_EFFECT oppose_acid; /* Timed -- oppose acid */
154 TIME_EFFECT oppose_elec; /* Timed -- oppose lightning */
155 TIME_EFFECT oppose_fire; /* Timed -- oppose heat */
156 TIME_EFFECT oppose_cold; /* Timed -- oppose cold */
157 TIME_EFFECT oppose_pois; /* Timed -- oppose poison */
159 TIME_EFFECT tim_esp; /* Timed ESP */
160 TIME_EFFECT wraith_form; /* Timed wraithform */
162 TIME_EFFECT resist_magic; /* Timed Resist Magic (later) */
163 TIME_EFFECT tim_regen;
164 TIME_EFFECT tim_pass_wall;
165 TIME_EFFECT tim_stealth;
166 TIME_EFFECT tim_levitation;
167 TIME_EFFECT tim_sh_touki;
168 TIME_EFFECT lightspeed;
169 TIME_EFFECT tsubureru;
170 TIME_EFFECT magicdef;
171 TIME_EFFECT tim_res_nether; /* Timed -- Nether resistance */
172 TIME_EFFECT tim_res_time; /* Timed -- Time resistance */
173 MIMIC_RACE_IDX mimic_form;
174 TIME_EFFECT tim_mimic;
175 TIME_EFFECT tim_sh_fire;
176 TIME_EFFECT tim_sh_holy;
177 TIME_EFFECT tim_eyeeye;
179 /* for mirror master */
180 TIME_EFFECT tim_reflect; /* Timed -- Reflect */
181 TIME_EFFECT multishadow; /* Timed -- Multi-shadow */
182 TIME_EFFECT dustrobe; /* Timed -- Robe of dust */
186 #define COMMAND_ARG_REST_UNTIL_DONE -2 /*!<休憩コマンド引数 … 必要な分だけ回復 */
187 #define COMMAND_ARG_REST_FULL_HEALING -1 /*!<休憩コマンド引数 … HPとMPが全回復するまで */
188 GAME_TURN resting; /* Current counter for resting, if any */
190 PATRON_IDX chaos_patron;
192 BIT_FLAGS muta1; /*!< レイシャル型の変異 / "Activatable" mutations must be in MUT1_* */
193 BIT_FLAGS muta2; /*!< 常時効果つきの変異1 / Randomly activating mutations must be MUT2_* */
194 BIT_FLAGS muta3; /*!< 常時効果つきの変異2 / Other mutations will be mainly in MUT3_* */
199 TIME_EFFECT word_recall; /* Word of recall counter */
200 TIME_EFFECT alter_reality; /* Alter reality counter */
201 DUNGEON_IDX recall_dungeon; /* Dungeon set to be recalled */
203 ENERGY energy_need; /* Energy needed for next move */
204 ENERGY enchant_energy_need; /* Energy needed for next upkeep effect */
206 FEED food; /* Current nutrition */
209 * p_ptr->special_attackによるプレイヤーの攻撃状態の定義 / Bit flags for the "p_ptr->special_attack" variable. -LM-
211 * Note: The elemental and poison attacks should be managed using the
212 * function "set_ele_attack", in spell2.c. This provides for timeouts and
213 * prevents the player from getting more than one at a time.
215 BIT_FLAGS special_attack;
217 /* プレイヤーの防御状態の定義 / Bit flags for the "p_ptr->special_defense" variable. -LM- */
218 BIT_FLAGS special_defense;
219 ACTION_IDX action; /* Currently action */
220 BIT_FLAGS spell_learned1; /* bit mask of spells learned */
221 BIT_FLAGS spell_learned2; /* bit mask of spells learned */
222 BIT_FLAGS spell_worked1; /* bit mask of spells tried and worked */
223 BIT_FLAGS spell_worked2; /* bit mask of spells tried and worked */
224 BIT_FLAGS spell_forgotten1; /* bit mask of spells learned but forgotten */
225 BIT_FLAGS spell_forgotten2; /* bit mask of spells learned but forgotten */
226 SPELL_IDX spell_order[64]; /* order spells learned/remembered/forgotten */
228 SUB_EXP spell_exp[64]; /* Proficiency of spells */
229 SUB_EXP weapon_exp[5][64]; /* Proficiency of weapons */
230 SUB_EXP skill_exp[GINOU_MAX]; /* Proficiency of misc. skill */
232 MAGIC_NUM1 magic_num1[MAX_SPELLS]; /*!< Array for non-spellbook type magic */
233 MAGIC_NUM2 magic_num2[MAX_SPELLS]; /*!< 魔道具術師の取り込み済魔道具使用回数 / Flags for non-spellbook type magics */
235 SPELL_IDX mane_spell[MAX_MANE];
236 HIT_POINT mane_dam[MAX_MANE];
240 #define CONCENT_RADAR_THRESHOLD 2
241 #define CONCENT_TELE_THRESHOLD 5
242 s16b concent; /* Sniper's concentration level */
244 HIT_POINT player_hp[PY_MAX_LEVEL];
245 char died_from[80]; /* What killed the player */
246 concptr last_message; /* Last message on death or retirement */
247 char history[4][60]; /* Textual "history" for the Player */
249 u16b panic_save; /* Panic save */
251 bool wait_report_score; /* Waiting to report score */
252 bool is_dead; /* Player is dead */
255 BIT_FLAGS change_floor_mode; /*!<フロア移行処理に関するフラグ / Mode flags for changing floor */
257 bool reset_concent; /* Concentration reset flag */
259 MONSTER_IDX riding; /* Riding on a monster of this index */
261 #define KNOW_STAT 0x01
262 #define KNOW_HPRATE 0x02
263 BIT_FLAGS8 knowledge; /* Knowledge about yourself */
264 BIT_FLAGS visit; /* Visited towns */
266 player_race_type start_race; /* Race at birth */
267 BIT_FLAGS old_race1; /* Record of race changes */
268 BIT_FLAGS old_race2; /* Record of race changes */
269 s16b old_realm; /* Record of realm changes */
271 s16b pet_follow_distance; /* Length of the imaginary "leash" for pets */
272 s16b pet_extra_flags; /* Various flags for controling pets */
274 s16b today_mon; /* Wanted monster */
276 bool dtrap; /* Whether you are on trap-safe grids */
277 FLOOR_IDX floor_id; /* Current floor location */
279 bool autopick_autoregister; /* auto register is in-use or not */
281 byte feeling; /* Most recent dungeon feeling */
282 s32b feeling_turn; /* The turn of the last dungeon feeling */
284 object_type *inventory_list; /* The player's inventory */
285 s16b inven_cnt; /* Number of items in inventory */
286 s16b equip_cnt; /* Number of items in equipment */
288 /*** Temporary fields ***/
290 bool playing; /* True if player is playing */
291 bool leaving; /* True if player is leaving */
293 bool monk_notify_aux;
296 byte exit_bldg; /* Goal obtained in on_defeat_arena_monster? -KMW- */
298 bool leaving_dungeon; /* True if player is leaving the dungeon */
300 bool enter_dungeon; /* Just enter the dungeon */
302 IDX health_who; /* Health bar trackee */
304 MONRACE_IDX monster_race_idx; /* Monster race trackee */
306 KIND_OBJECT_IDX object_kind_idx; /* Object kind trackee */
308 s16b new_spells; /* Number of spells available */
311 s16b old_food_aux; /* Old value of food */
313 bool old_cumber_armor;
314 bool old_cumber_glove;
315 bool old_heavy_wield[2];
316 bool old_heavy_shoot;
317 bool old_icky_wield[2];
318 bool old_riding_wield[2];
319 bool old_riding_ryoute;
323 POSITION old_lite; /* Old radius of lite (if any) */
325 bool cumber_armor; /* Mana draining armor */
326 bool cumber_glove; /* Mana draining gloves */
327 bool heavy_wield[2]; /* Heavy weapon */
328 bool icky_wield[2]; /* Icky weapon */
329 bool riding_wield[2]; /* Riding weapon */
330 bool riding_ryoute; /* Riding weapon */
336 POSITION cur_lite; /* Radius of lite (if any) */
338 BIT_FLAGS update; /* Pending Updates */
339 BIT_FLAGS redraw; /* Normal Redraws */
340 BIT_FLAGS window; /* Window Redraws */
341 s16b stat_use[A_MAX]; /* Current modified stats */
342 s16b stat_top[A_MAX]; /* Maximal modified stats */
347 ALIGNMENT align; /* Good/evil/neutral */
350 DIRECTION fishing_dir;
352 MONSTER_IDX pet_t_m_idx;
353 MONSTER_IDX riding_t_m_idx;
355 /*** Extracted fields ***/
357 s16b running; /* Current counter for running, if any */
358 bool suppress_multi_reward; /*!< 複数レベルアップ時のパトロンからの報酬多重受け取りを防止 */
360 WEIGHT total_weight; /*!< 所持品と装備品の計算総重量 / Total weight being carried */
362 s16b stat_add[A_MAX]; /* Modifiers to stat values */
363 s16b stat_ind[A_MAX]; /* Indexes into stat tables */
367 bool level_up_message;
369 bool immune_acid; /* Immunity to acid */
370 bool immune_elec; /* Immunity to lightning */
371 bool immune_fire; /* Immunity to fire */
372 bool immune_cold; /* Immunity to cold */
374 bool resist_acid; /* Resist acid */
375 bool resist_elec; /* Resist lightning */
376 bool resist_fire; /* Resist fire */
377 bool resist_cold; /* Resist cold */
378 bool resist_pois; /* Resist poison */
380 bool resist_conf; /* Resist confusion */
381 bool resist_sound; /* Resist sound */
382 bool resist_lite; /* Resist light */
383 bool resist_dark; /* Resist darkness */
384 bool resist_chaos; /* Resist chaos */
385 bool resist_disen; /* Resist disenchant */
386 bool resist_shard; /* Resist shards */
387 bool resist_nexus; /* Resist nexus */
388 bool resist_blind; /* Resist blindness */
389 bool resist_neth; /* Resist nether */
390 bool resist_fear; /* Resist fear */
391 bool resist_time; /* Resist time */
392 bool resist_water; /* Resist water */
394 bool reflect; /* Reflect 'bolt' attacks */
395 bool sh_fire; /* Fiery 'immolation' effect */
396 bool sh_elec; /* Electric 'immolation' effect */
397 bool sh_cold; /* Cold 'immolation' effect */
399 bool anti_magic; /* Anti-magic */
400 bool anti_tele; /* Prevent teleportation */
402 bool sustain_str; /* Keep strength */
403 bool sustain_int; /* Keep intelligence */
404 bool sustain_wis; /* Keep wisdom */
405 bool sustain_dex; /* Keep dexterity */
406 bool sustain_con; /* Keep constitution */
407 bool sustain_chr; /* Keep charisma */
409 BIT_FLAGS cursed; /* Player is cursed */
411 bool can_swim; /* No damage falling */
412 bool levitation; /* No damage falling */
413 bool lite; /* Permanent light */
414 bool free_act; /* Never paralyzed */
415 bool see_inv; /* Can see invisible */
416 bool regenerate; /* Regenerate hit pts */
417 bool hold_exp; /* Resist exp draining */
419 bool telepathy; /* Telepathy */
420 BIT_FLAGS esp_animal;
421 BIT_FLAGS esp_undead;
426 BIT_FLAGS esp_dragon;
433 bool slow_digest; /* Slower digestion */
434 bool bless_blade; /* Blessed blade */
435 BIT_FLAGS xtra_might; /* Extra might bow */
436 bool impact[2]; /* Earthquake blows */
437 bool pass_wall; /* Permanent wraithform */
444 bool see_nocto; /* Noctovision */
445 bool invoking_midnight_curse;
447 DICE_NUMBER to_dd[2]; /* Extra dice/sides */
450 HIT_PROB dis_to_h[2]; /*!< 判明している現在の表記上の近接武器命中修正値 / Known bonus to hit (wield) */
451 HIT_PROB dis_to_h_b; /*!< 判明している現在の表記上の射撃武器命中修正値 / Known bonus to hit (bow) */
452 HIT_POINT dis_to_d[2]; /*!< 判明している現在の表記上の近接武器ダメージ修正値 / Known bonus to dam (wield) */
453 ARMOUR_CLASS dis_to_a; /*!< 判明している現在の表記上の装備AC修正値 / Known bonus to ac */
454 ARMOUR_CLASS dis_ac; /*!< 判明している現在の表記上の装備AC基礎値 / Known base ac */
456 s16b to_h[2]; /* Bonus to hit (wield) */
457 s16b to_h_b; /* Bonus to hit (bow) */
458 s16b to_h_m; /* Bonus to hit (misc) */
459 s16b to_d[2]; /* Bonus to dam (wield) */
460 s16b to_d_m; /* Bonus to dam (misc) */
461 ARMOUR_CLASS to_a; /* Bonus to ac */
463 s16b to_m_chance; /* Minusses to cast chance */
467 ARMOUR_CLASS ac; /*!< 装備無しの基本AC / Base ac */
469 ACTION_SKILL_POWER see_infra; /*!< 赤外線視能力の強さ /Infravision range */
470 ACTION_SKILL_POWER skill_dis; /*!< 行動技能値:解除能力 / Skill: Disarming */
471 ACTION_SKILL_POWER skill_dev; /*!< 行動技能値:魔道具使用 / Skill: Magic Devices */
472 ACTION_SKILL_POWER skill_sav; /*!< 行動技能値:魔法防御 / Skill: Saving throw */
473 ACTION_SKILL_POWER skill_stl; /*!< 行動技能値:隠密 / Skill: Stealth factor */
476 * 行動技能値:知覚 / Skill: Searching ability
477 * この値はsearch()による地形の隠し要素発見処理などで混乱、盲目、幻覚、無光源などの
478 * 状態異常がない限り、難易度修正などがないままそのままパーセンテージ値として使われる。
479 * 100以上ならば必ず全てのトラップなどを見つけることが出来る。
481 ACTION_SKILL_POWER skill_srh;
483 ACTION_SKILL_POWER skill_fos; /*!< 行動技能値:探索 / Skill: Searching frequency */
484 ACTION_SKILL_POWER skill_thn; /*!< 行動技能値:打撃命中能力 / Skill: To hit (normal) */
485 ACTION_SKILL_POWER skill_thb; /*!< 行動技能値:射撃命中能力 / Skill: To hit (shooting) */
486 ACTION_SKILL_POWER skill_tht; /*!< 行動技能値:投射命中能力 / Skill: To hit (throwing) */
487 ACTION_SKILL_POWER skill_dig; /*!< 行動技能値:掘削 / Skill: Digging */
489 s16b num_blow[2]; /* Number of blows */
490 s16b num_fire; /* Number of shots */
492 byte tval_xtra; /* (Unused)Correct xtra tval */
493 byte tval_ammo; /* Correct ammo tval */
495 s16b pspeed; /*!< 現在の速度 / Current speed */
497 ENERGY energy_use; /*!< 直近のターンに消費したエネルギー / Energy use this turn */
499 POSITION y; /*!< ダンジョンの現在Y座標 / Player location in dungeon */
500 POSITION x; /*!< ダンジョンの現在X座標 / Player location in dungeon */
501 GAME_TEXT name[32]; /*!< 現在のプレイヤー名 / Current player's character name */
502 char base_name[32]; /*!< Stripped version of "player_name" */
506 extern player_type *p_ptr;
508 extern concptr your_alignment(player_type *creature_ptr);
509 extern int weapon_exp_level(int weapon_exp);
510 extern int riding_exp_level(int riding_exp);
511 extern int spell_exp_level(int spell_exp);
513 extern int calc_weapon_weight_limit(player_type *creature_ptr);
515 extern s16b calc_num_fire(player_type *creature_ptr, object_type *o_ptr);
516 extern void calc_bonuses(player_type *creature_ptr);
517 extern WEIGHT weight_limit(player_type *creature_ptr);
518 extern bool has_melee_weapon(player_type *creature_ptr, int i);
520 extern bool heavy_armor(player_type *creature_ptr);
521 extern void update_creature(player_type *creature_ptr);
522 extern BIT_FLAGS16 empty_hands(player_type *creature_ptr, bool riding_control);
523 extern bool player_has_no_spellbooks(player_type *creature_ptr);
525 extern void take_turn(player_type *creature_ptr, PERCENTAGE need_cost);
526 extern void free_turn(player_type *creature_ptr);
528 extern bool player_place(player_type *creature_ptr, POSITION y, POSITION x);
530 extern void check_experience(player_type *creature_ptr);
531 extern void wreck_the_pattern(player_type *creature_ptr);
532 extern void cnv_stat(int val, char *out_val);
533 extern s16b modify_stat_value(int value, int amount);
534 extern long calc_score(player_type *creature_ptr);
536 extern bool is_blessed(player_type *creature_ptr);
537 extern bool is_time_limit_esp(player_type *creature_ptr);
538 extern bool is_time_limit_stealth(player_type *creature_ptr);
539 extern bool can_two_hands_wielding(player_type *creature_ptr);
540 bool is_fast(player_type *creature_ptr);
541 bool is_invuln(player_type *creature_ptr);
542 bool is_hero(player_type *creature_ptr);
543 bool is_echizen(player_type *creature_ptr);
546 * Player "food" crucial values
548 #define PY_FOOD_MAX 15000 /*!< 食べ過ぎ~満腹の閾値 / Food value (Bloated) */
549 #define PY_FOOD_FULL 10000 /*!< 満腹~平常の閾値 / Food value (Normal) */
550 #define PY_FOOD_ALERT 2000 /*!< 平常~空腹の閾値 / Food value (Hungry) */
551 #define PY_FOOD_WEAK 1000 /*!< 空腹~衰弱の閾値 / Food value (Weak) */
552 #define PY_FOOD_FAINT 500 /*!< 衰弱~衰弱(赤表示/麻痺)の閾値 / Food value (Fainting) */
553 #define PY_FOOD_STARVE 100 /*!< 衰弱(赤表示/麻痺)~飢餓ダメージの閾値 / Food value (Starving) */
556 * Player regeneration constants
558 #define PY_REGEN_NORMAL 197 /* Regen factor*2^16 when full */
559 #define PY_REGEN_WEAK 98 /* Regen factor*2^16 when weak */
560 #define PY_REGEN_FAINT 33 /* Regen factor*2^16 when fainting */
561 #define PY_REGEN_HPBASE 1442 /* Min amount hp regen*2^16 */
562 #define PY_REGEN_MNBASE 524 /* Min amount mana regen*2^16 */
564 extern void cheat_death(player_type *creature_ptr);
566 extern void stop_singing(player_type *creature_ptr);
567 extern void stop_mouth(player_type *caster_ptr);
568 extern PERCENTAGE calculate_upkeep(player_type *creature_ptr);
569 extern bool music_singing(player_type *caster_ptr, int music_songs);
571 #define SINGING_SONG_EFFECT(P_PTR) ((P_PTR)->magic_num1[0])
572 #define INTERUPTING_SONG_EFFECT(P_PTR) ((P_PTR)->magic_num1[1])
573 #define SINGING_COUNT(P_PTR) ((P_PTR)->magic_num1[2])
574 #define SINGING_SONG_ID(P_PTR) ((P_PTR)->magic_num2[0])
575 #define music_singing_any(CREATURE_PTR) (((CREATURE_PTR)->pclass == CLASS_BARD) && (CREATURE_PTR)->magic_num1[0])