creature_ptr->visit = 1;
creature_ptr->wild_mode = FALSE;
- for (int i = 0; i < 108; i++) {
+ for (int i = 0; i < MAX_SPELLS; i++) {
creature_ptr->magic_num1[i] = 0;
creature_ptr->magic_num2[i] = 0;
}
#include "player/player-status.h"
#include "player/special-defense-types.h"
#include "spell/spells-execution.h"
-#include "spell/spells-util.h"
#include "spell/technic-info-table.h"
#include "system/object-type-definition.h"
#include "term/screen-processor.h"
#include "spell/spells-execution.h"
#include "spell/spell-info.h"
#include "spell/spells-summon.h"
-#include "spell/spells-util.h"
#include "spell/technic-info-table.h"
#include "status/base-status.h"
#include "status/experience.h"
customer_ptr->magic_num1[i] = customer_ptr->magic_num2[i] * EATER_CHARGE;
}
- for (; i < 108; i++)
+ for (; i < MAX_SPELLS; i++)
{
customer_ptr->magic_num1[i] = 0;
}
return sn;
}
- for (i = 0; i < 108; i++)
+ for (i = 0; i < MAX_SPELLS; i++)
{
if (creature_ptr->magic_num2[i]) break;
}
- if (i == 108)
+
+ if (i == MAX_SPELLS)
{
msg_print(_("魔法を覚えていない!", "You don't have any magic!"));
return -1;
*/
#include "system/angband.h"
-#include "spell/spells-util.h"
#include "floor/geometry.h"
+#include "spell/spells-util.h"
/*
* A single "grid" in a Cave
#include "player/player-skill.h"
#include "realm/realm-names-table.h"
#include "spell/spells-execution.h"
-#include "spell/spells-util.h"
#include "spell/technic-info-table.h"
#include "util/angband-files.h"
#include "spell-kind/spells-teleport.h"
#include "spell-realm/spells-hex.h"
#include "spell/spells-status.h"
-#include "spell/spells-util.h"
#include "status/bad-status-setter.h"
#include "status/base-status.h"
#include "status/body-improvement.h"
#include "spell/spells-describer.h"
#include "spell/spells-execution.h"
#include "spell/spells-status.h"
-#include "spell/spells-util.h"
#include "spell/technic-info-table.h"
#include "status/base-status.h"
#include "sv-definition/sv-lite-types.h"
#pragma once
-/* 人畜無害なenumヘッダを先に読み込む */
#include "player/player-classes-types.h"
#include "player/player-race-types.h"
#include "player/player-personalities-types.h"
+#include "spell/spells-util.h"
/*
* Most of the "player" information goes here.
SUB_EXP weapon_exp[5][64]; /* Proficiency of weapons */
SUB_EXP skill_exp[GINOU_MAX]; /* Proficiency of misc. skill */
- MAGIC_NUM1 magic_num1[108]; /*!< Array for non-spellbook type magic */
- MAGIC_NUM2 magic_num2[108]; /*!< 魔道具術師の取り込み済魔道具使用回数 / Flags for non-spellbook type magics */
+ MAGIC_NUM1 magic_num1[MAX_SPELLS]; /*!< Array for non-spellbook type magic */
+ MAGIC_NUM2 magic_num2[MAX_SPELLS]; /*!< 魔道具術師の取り込み済魔道具使用回数 / Flags for non-spellbook type magics */
SPELL_IDX mane_spell[MAX_MANE];
HIT_POINT mane_dam[MAX_MANE];
#include "spell-kind/spells-sight.h"
#include "spell-kind/spells-teleport.h"
#include "spell/spell-types.h"
-#include "spell/spells-util.h"
#include "spell/technic-info-table.h"
#include "term/screen-processor.h"
#include "util/bit-flags-calculator.h"
set_zangband_skill(creature_ptr);
if (z_older_than(10, 3, 14)) {
- for (int i = 0; i < 108; i++)
+ for (int i = 0; i < MAX_SPELLS; i++)
creature_ptr->magic_num1[i] = 0;
- for (int i = 0; i < 108; i++)
+
+ for (int i = 0; i < MAX_SPELLS; i++)
creature_ptr->magic_num2[i] = 0;
} else {
- for (int i = 0; i < 108; i++)
+ for (int i = 0; i < MAX_SPELLS; i++)
rd_s32b(&creature_ptr->magic_num1[i]);
- for (int i = 0; i < 108; i++)
+ for (int i = 0; i < MAX_SPELLS; i++)
rd_byte(&creature_ptr->magic_num2[i]);
if (h_older_than(1, 3, 0, 1)) {
if (creature_ptr->pclass == CLASS_SMITH) {
for (int i = 0; i < GINOU_MAX; i++)
wr_s16b(creature_ptr->skill_exp[i]);
- for (int i = 0; i < 108; i++)
+ for (int i = 0; i < MAX_SPELLS; i++)
wr_s32b(creature_ptr->magic_num1[i]);
- for (int i = 0; i < 108; i++)
+ for (int i = 0; i < MAX_SPELLS; i++)
wr_byte(creature_ptr->magic_num2[i]);
wr_byte((byte)creature_ptr->start_race);
#include "realm/realm-names-table.h"
#include "realm/realm-types.h"
#include "spell/spells-execution.h"
-#include "spell/spells-util.h"
#include "term/screen-processor.h"
#include "term/term-color-types.h"
#include "util/int-char-converter.h"
#pragma once
#define DETECT_RAD_DEFAULT 30
-#define DETECT_RAD_MAP 30
-#define DETECT_RAD_ALL 255
+#define DETECT_RAD_MAP 30
+#define DETECT_RAD_ALL 255
+#define MAX_SPELLS 108
-typedef enum spell_type
-{
- SPELL_NAME = 0,
- SPELL_DESC = 1,
- SPELL_INFO = 2,
- SPELL_CAST = 3,
- SPELL_FAIL = 4,
- SPELL_STOP = 5,
- SPELL_CONT = 6
-} spell_type;
+typedef enum spell_type { SPELL_NAME = 0, SPELL_DESC = 1, SPELL_INFO = 2, SPELL_CAST = 3, SPELL_FAIL = 4, SPELL_STOP = 5, SPELL_CONT = 6 } spell_type;
-typedef enum spell_operation
-{
- SPOP_DISPLAY_MES = 0x0001, // !< スペル処理オプション … メッセージを表示する
- SPOP_NO_UPDATE = 0x0002, // !< スペル処理オプション … ステータス更新を解決後行う
- SPOP_DEBUG = 0x8000 // !< スペル処理オプション … デバッグ処理あり
+typedef enum spell_operation {
+ SPOP_DISPLAY_MES = 0x0001, // !< スペル処理オプション … メッセージを表示する
+ SPOP_NO_UPDATE = 0x0002, // !< スペル処理オプション … ステータス更新を解決後行う
+ SPOP_DEBUG = 0x8000 // !< スペル処理オプション … デバッグ処理あり
} spell_operation;
-typedef enum teleport_flags
-{
- TELEPORT_SPONTANEOUS = 0x0000,
- TELEPORT_NONMAGICAL = 0x0001,
- TELEPORT_PASSIVE = 0x0002,
- TELEPORT_DEC_VALOUR = 0x0004
+typedef enum teleport_flags {
+ TELEPORT_SPONTANEOUS = 0x0000,
+ TELEPORT_NONMAGICAL = 0x0001,
+ TELEPORT_PASSIVE = 0x0002,
+ TELEPORT_DEC_VALOUR = 0x0004
} teleport_flags;
-typedef enum autogenesis_magical_effect
-{
- PROJECT_WHO_UNCTRL_POWER = -1, /*!< 魔法効果の自然発生要因: 名状し難い力の解放 */
- PROJECT_WHO_GLASS_SHARDS = -2 /*!< 魔法効果の自然発生要因: 破壊されたガラス地形の破片 */
+typedef enum autogenesis_magical_effect {
+ PROJECT_WHO_UNCTRL_POWER = -1, /*!< 魔法効果の自然発生要因: 名状し難い力の解放 */
+ PROJECT_WHO_GLASS_SHARDS = -2 /*!< 魔法効果の自然発生要因: 破壊されたガラス地形の破片 */
} autogenesis_magical_effect;
#include "player/player-class.h"
#include "realm/realm-names-table.h"
#include "spell/spells-execution.h"
-#include "spell/spells-util.h"
#include "spell/technic-info-table.h"
#include "term/gameterm.h"
#include "term/screen-processor.h"
#include "spell/spells-object.h"
#include "spell/spells-status.h"
#include "spell/spells-summon.h"
-#include "spell/spells-util.h"
#include "status/experience.h"
#include "system/alloc-entries.h"
#include "system/angband-version.h"