From 5a955bfb00a8965c731b8d5bcbf30e3cbb9be682 Mon Sep 17 00:00:00 2001 From: Deskull Date: Sat, 2 Feb 2019 00:29:23 +0900 Subject: [PATCH] =?utf8?q?[Refactor]=20#37353=20=E3=82=B3=E3=83=A1?= =?utf8?q?=E3=83=B3=E3=83=88=E6=95=B4=E7=90=86=E3=80=82=20/=20Refactor=20c?= =?utf8?q?omments.?= MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit --- src/Makefile.am | 1 + src/spells1.c | 51 --------------------------------------------------- 2 files changed, 1 insertion(+), 51 deletions(-) diff --git a/src/Makefile.am b/src/Makefile.am index 61e64ac8b..869887e1e 100644 --- a/src/Makefile.am +++ b/src/Makefile.am @@ -62,6 +62,7 @@ hengband_SOURCES = \ rumor.h rumor.c \ \ spells1.c spells2.c spells3.c \ + spells-diceroll.c spells-diceroll.h \ spells-object.c spells-object.h \ spells-status.c spells-status.h \ spells-summon.c spells-summon.h \ diff --git a/src/spells1.c b/src/spells1.c index 3a68fe55d..f2312bba7 100644 --- a/src/spells1.c +++ b/src/spells1.c @@ -529,101 +529,58 @@ static bool project_f(MONSTER_IDX who, POSITION r, POSITION y, POSITION x, HIT_P break; } - /* Make doors */ case GF_MAKE_DOOR: { - /* Require a "naked" floor grid */ if (!cave_naked_bold(y, x)) break; - - /* Not on the player */ if (player_bold(y, x)) break; - - /* Create a closed door */ cave_set_feat(y, x, feat_door[DOOR_DOOR].closed); - - /* Observe */ if (c_ptr->info & (CAVE_MARK)) obvious = TRUE; - break; } - /* Make traps */ case GF_MAKE_TRAP: { - /* Place a trap */ place_trap(y, x); - break; } - /* Make doors */ case GF_MAKE_TREE: { - /* Require a "naked" floor grid */ if (!cave_naked_bold(y, x)) break; - - /* Not on the player */ if (player_bold(y, x)) break; - - /* Create a closed door */ cave_set_feat(y, x, feat_tree); - - /* Observe */ if (c_ptr->info & (CAVE_MARK)) obvious = TRUE; - - break; } case GF_MAKE_GLYPH: { - /* Require a "naked" floor grid */ if (!cave_naked_bold(y, x)) break; - - /* Create a glyph */ c_ptr->info |= CAVE_OBJECT; c_ptr->mimic = feat_glyph; - note_spot(y, x); - lite_spot(y, x); - break; } case GF_STONE_WALL: { - /* Require a "naked" floor grid */ if (!cave_naked_bold(y, x)) break; - - /* Not on the player */ if (player_bold(y, x)) break; - - /* Place a wall */ cave_set_feat(y, x, feat_granite); - break; } - case GF_LAVA_FLOW: { - /* Ignore permanent grid */ if (have_flag(f_ptr->flags, FF_PERMANENT)) break; - - /* Shallow Lava */ if (dam == 1) { - /* Ignore grid without enough space */ if (!have_flag(f_ptr->flags, FF_FLOOR)) break; - - /* Place a shallow lava */ cave_set_feat(y, x, feat_shallow_lava); } - /* Deep Lava */ else if (dam) { - /* Place a deep lava */ cave_set_feat(y, x, feat_deep_lava); } break; @@ -631,22 +588,14 @@ static bool project_f(MONSTER_IDX who, POSITION r, POSITION y, POSITION x, HIT_P case GF_WATER_FLOW: { - /* Ignore permanent grid */ if (have_flag(f_ptr->flags, FF_PERMANENT)) break; - - /* Shallow Water */ if (dam == 1) { - /* Ignore grid without enough space */ if (!have_flag(f_ptr->flags, FF_FLOOR)) break; - - /* Place a shallow water */ cave_set_feat(y, x, feat_shallow_water); } - /* Deep Water */ else if (dam) { - /* Place a deep water */ cave_set_feat(y, x, feat_deep_water); } break; -- 2.11.0