#include "spell-kind/spells-sight.h"
#include "spell-kind/spells-teleport.h"
#include "spell-kind/spells-world.h"
-#include "effect/attribute-types.h"
#include "spell/spells-status.h"
#include "status/bad-status-setter.h"
#include "status/body-improvement.h"
#include "player/player-status-flags.h"
#include "player/player-status.h"
#include "player/special-defense-types.h"
-#include "effect/attribute-types.h"
#include "status/action-setter.h"
#include "system/floor-type-definition.h"
#include "system/grid-type-definition.h"
#include "spell-kind/spells-sight.h"
#include "spell-kind/spells-teleport.h"
#include "spell-kind/spells-world.h"
-#include "effect/attribute-types.h"
#include "spell/spells-status.h"
#include "spell/spells-summon.h"
#include "spell/summon-types.h"
monap_ptr->alive = false;
return;
}
+
+ struct attribute_table {
+ inventory_slot_type slot;
+ AttributeType type;
+ };
+
+ const int TABLE_SIZE = 4;
+ attribute_table table[TABLE_SIZE] = { { INVEN_HEAD, AttributeType::OLD_CONF }, { INVEN_SUB_HAND, AttributeType::OLD_SLEEP },
+ { INVEN_ARMS, AttributeType::TURN_ALL }, { INVEN_FEET, AttributeType::OLD_SLOW } };
BIT_FLAGS flg = PROJECT_STOP | PROJECT_GRID | PROJECT_ITEM | PROJECT_KILL;
- EFFECT_ID typ[4][2] = { { INVEN_HEAD, (EFFECT_ID)AttributeType::OLD_CONF }, { INVEN_SUB_HAND, (EFFECT_ID)AttributeType::OLD_SLEEP },
- { INVEN_ARMS, (EFFECT_ID)AttributeType::TURN_ALL }, { INVEN_FEET, (EFFECT_ID)AttributeType::OLD_SLOW } };
/* Some cursed armours gives an extra effect */
- for (int j = 0; j < 4; j++) {
- o_armed_ptr = &player_ptr->inventory_list[typ[j][0]];
+ for (int j = 0; j < TABLE_SIZE; j++) {
+ o_armed_ptr = &player_ptr->inventory_list[table[j].slot];
if ((o_armed_ptr->k_idx) && o_armed_ptr->is_cursed() && o_armed_ptr->is_armour())
- project(player_ptr, 0, 0, monap_ptr->m_ptr->fy, monap_ptr->m_ptr->fx, (player_ptr->lev * 2), (AttributeType)typ[j][1], flg);
+ project(player_ptr, 0, 0, monap_ptr->m_ptr->fy, monap_ptr->m_ptr->fx, (player_ptr->lev * 2), table[j].type, flg);
}
}
#pragma once
#include "util/flag-group.h"
-enum class AttributeType : EFFECT_ID {
+enum class AttributeType : int {
NONE = 0,
ELEC = 1, /*!< 魔法効果: 電撃*/
POIS = 2, /*!< 魔法効果: 毒*/
#include "core/player-update-types.h"
#include "dungeon/dungeon-flag-types.h"
#include "dungeon/dungeon.h"
-#include "effect/attribute-types.h"
#include "effect/effect-characteristics.h"
#include "effect/effect-processor.h" // 暫定、後で消す.
#include "floor/cave.h"
#include "effect/effect-item.h"
#include "autopick/autopick.h"
-#include "effect/attribute-types.h"
#include "flavor/flavor-describer.h"
#include "flavor/object-flavor-types.h"
#include "floor/cave.h"
#include "monster/monster-status.h"
#include "player/player-damage.h"
#include "spell-kind/spells-genocide.h"
-#include "effect/attribute-types.h"
#include "system/grid-type-definition.h"
#include "system/monster-race-definition.h"
#include "system/monster-type-definition.h"
* @param num 配置したい数
* @return 規定数通りに生成に成功したらTRUEを返す。
*/
-void alloc_object(PlayerType *player_ptr, dap_type set, EFFECT_ID typ, int num)
+void alloc_object(PlayerType *player_ptr, dap_type set, dungeon_allocation_type typ, int num)
{
POSITION y = 0;
POSITION x = 0;
case ALLOC_TYP_OBJECT:
place_object(player_ptr, y, x, 0L);
break;
+ default:
+ break;
}
}
}
#pragma once
#include "system/angband.h"
-#include "effect/attribute-types.h"
+#include "floor/floor-allocation-types.h"
enum dap_type : int;
class PlayerType;
bool alloc_stairs(PlayerType *player_ptr, FEAT_IDX feat, int num, int walls);
-void alloc_object(PlayerType *player_ptr, dap_type set, EFFECT_ID typ, int num);
+void alloc_object(PlayerType *player_ptr, dap_type set, dungeon_allocation_type typ, int num);
#include "spell-kind/spells-random.h"
#include "spell-kind/spells-sight.h"
#include "spell-kind/spells-teleport.h"
-#include "effect/attribute-types.h"
#include "spell/summon-types.h"
#include "status/bad-status-setter.h"
#include "status/base-status.h"
#include "mspell/mspell-util.h"
#include "pet/pet-util.h"
#include "spell-kind/spells-world.h"
-#include "effect/attribute-types.h"
#include "system/floor-type-definition.h"
#include "system/grid-type-definition.h"
#include "system/monster-race-definition.h"
#include "spell-kind/spells-sight.h"
#include "spell-kind/spells-teleport.h"
#include "spell-kind/spells-world.h"
-#include "effect/attribute-types.h"
#include "status/bad-status-setter.h"
#include "status/base-status.h"
#include "system/floor-type-definition.h"
#include "mspell/mspell-summon.h"
#include "mspell/mspell-util.h"
#include "mspell/mspell-result.h"
-#include "effect/attribute-types.h"
#include "system/player-type-definition.h"
#include "util/enum-converter.h"
#include "mspell/mspell-result.h"
#include "mspell/mspell-util.h"
#include "mspell/mspell-result.h"
-#include "effect/attribute-types.h"
#include "system/player-type-definition.h"
/*!
#include "mspell/mspell-checker.h"
#include "mspell/mspell-util.h"
#include "spell-kind/spells-launcher.h"
-#include "effect/attribute-types.h"
#include "spell/summon-types.h"
#include "system/monster-race-definition.h"
#include "system/player-type-definition.h"
#include "spell-kind/spells-world.h"
#include "spell-realm/spells-hex.h"
#include "spell-realm/spells-song.h"
-#include "effect/attribute-types.h"
#include "spell/spells-object.h"
#include "spell/spells-summon.h"
#include "spell/summon-types.h"
#include "core/disturbance.h"
#include "dungeon/dungeon-flag-types.h"
#include "dungeon/dungeon.h"
-#include "effect/attribute-types.h"
#include "flavor/flavor-describer.h"
#include "flavor/object-flavor-types.h"
#include "floor/cave.h"
#include "spell-kind/spells-launcher.h"
#include "spell-kind/spells-random.h"
#include "spell-kind/spells-sight.h"
-#include "effect/attribute-types.h"
#include "spell/spells-object.h"
#include "spell/spells-status.h"
#include "spell/spells-summon.h"
#include "spell-kind/spells-world.h"
#include "spell-realm/spells-hex.h"
#include "spell-realm/spells-song.h"
-#include "effect/attribute-types.h"
#include "spell/spells-status.h"
#include "status/action-setter.h"
#include "status/bad-status-setter.h"
#include "spell-kind/spells-perception.h"
#include "spell-kind/spells-sight.h"
#include "spell-kind/spells-specific-bolt.h"
-#include "effect/attribute-types.h"
#include "spell/spells-diceroll.h"
#include "spell/spells-object.h"
#include "spell/spells-status.h"
#include "spell-kind/spells-sight.h"
#include "spell-kind/spells-world.h"
#include "spell-realm/spells-song.h"
-#include "effect/attribute-types.h"
#include "spell/spells-status.h"
#include "status/action-setter.h"
#include "status/bad-status-setter.h"
* @note that we restrict the number of "crowded" rooms to reduce the chance of overflowing the monster list during level creation.
* @return 部屋の生成に成功した場合 TRUE を返す。
*/
-static bool room_build(PlayerType *player_ptr, dun_data_type *dd_ptr, EFFECT_ID typ)
+static bool room_build(PlayerType *player_ptr, dun_data_type *dd_ptr, room_type typ)
{
switch (typ) {
case ROOM_T_NORMAL:
while (true) {
remain = false;
for (int i = 0; i < ROOM_T_MAX; i++) {
- int room_type = room_build_order[i];
+ room_type room_type = room_build_order[i];
if (!room_num[room_type])
continue;
case ROOM_T_ARCADE:
room_num[ROOM_T_ARCADE] = 0;
break;
+ default:
+ break;
}
}
};
/*! 部屋の生成処理順 / Build rooms in descending order of difficulty. */
-byte room_build_order[ROOM_T_MAX] = {
+room_type room_build_order[ROOM_T_MAX] = {
ROOM_T_GREATER_VAULT,
ROOM_T_ARCADE,
ROOM_T_RANDOM_VAULT,
} room_info_type;
extern room_info_type room_info_normal[ROOM_T_MAX];
-extern byte room_build_order[ROOM_T_MAX];
+extern room_type room_build_order[ROOM_T_MAX];
#include "spell-realm/spells-crusade.h"
#include "spell-realm/spells-song.h"
#include "spell/spell-info.h"
-#include "effect/attribute-types.h"
#include "spell/spells-execution.h"
#include "spell/technic-info-table.h"
#include "status/action-setter.h"
#include "spell-kind/spells-lite.h"
#include "spell-kind/spells-sight.h"
#include "spell-kind/spells-specific-bolt.h"
-#include "effect/attribute-types.h"
#include "spell/spells-diceroll.h"
#include "spell/spells-status.h"
#include "spell/summon-types.h"
typedef int QUANTITY; /*!< インターフェース上の指定個数 */
-typedef int EFFECT_ID; /*!< 効果属性ID */
-
typedef int16_t ACTION_SKILL_POWER; /*!< 行動技能値 */
enum process_result {