OSDN Git Service

[Refactor] #37353 コメント整理。 / Refactor comments.
authorDeskull <deskull@users.sourceforge.jp>
Fri, 1 Feb 2019 15:29:23 +0000 (00:29 +0900)
committerDeskull <deskull@users.sourceforge.jp>
Fri, 1 Feb 2019 15:29:23 +0000 (00:29 +0900)
src/Makefile.am
src/spells1.c

index 61e64ac..869887e 100644 (file)
@@ -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 \
index 3a68fe5..f2312bb 100644 (file)
@@ -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;