OSDN Git Service

[Refactor] #38997 explosive_rune() に floor_type * と座標引数を追加. / Add floor_type * and...
authordeskull <deskull@users.sourceforge.jp>
Mon, 4 Nov 2019 07:39:24 +0000 (16:39 +0900)
committerdeskull <deskull@users.sourceforge.jp>
Mon, 4 Nov 2019 07:39:24 +0000 (16:39 +0900)
src/cmd/cmd-activate.c
src/mind.c
src/racial.c
src/realm-sorcery.c
src/spells-floor.c
src/spells-floor.h

index 087c8cd..c563b1a 100644 (file)
@@ -1479,7 +1479,7 @@ bool activate_artifact(player_type *user_ptr, object_type *o_ptr)
        case ACT_RUNE_EXPLO:
        {
                msg_print(_("明るい赤色に輝いている...", "It glows bright red..."));
-               explosive_rune();
+               explosive_rune(user_ptr->current_floor_ptr, user_ptr->y, user_ptr->x);
                break;
        }
 
index 94a528d..599e134 100644 (file)
@@ -1712,7 +1712,7 @@ static bool cast_ninja_spell(player_type *caster_ptr, int spell)
                (void)teleport_swap(dir);
                break;
        case 15:
-               explosive_rune();
+               explosive_rune(caster_ptr->current_floor_ptr, caster_ptr->y, caster_ptr->x);
                break;
        case 16:
                (void)set_kabenuke(caster_ptr, randint1(plev/2) + plev/2, FALSE);
index 28eadd4..969adb6 100644 (file)
@@ -696,7 +696,7 @@ static bool exe_racial_power(player_type *creature_ptr, s32b command)
 
                case RACE_HALF_OGRE:
                        msg_print(_("爆発のルーンを慎重に仕掛けた...", "You carefully set an explosive rune..."));
-                       explosive_rune();
+                       explosive_rune(creature_ptr->current_floor_ptr, creature_ptr->y, creature_ptr->x);
                        break;
 
                case RACE_HALF_GIANT:
index 1428e13..1b1b2e3 100644 (file)
@@ -444,7 +444,7 @@ concptr do_sorcery_spell(player_type *caster_ptr, SPELL_IDX spell, BIT_FLAGS mod
 
                        if (cast)
                        {
-                               explosive_rune();
+                               explosive_rune(caster_ptr->current_floor_ptr, caster_ptr->y, caster_ptr->x);
                        }
                }
                break;
index d21baa8..f04b190 100644 (file)
@@ -214,20 +214,20 @@ bool warding_glyph(player_type *caster_ptr)
  * Leave an "explosive rune" which prevents monster movement
  * @return 実際に設置が行われた場合TRUEを返す
  */
-bool explosive_rune(void)
+bool explosive_rune(floor_type *floor_ptr, POSITION y, POSITION x)
 {
-       if (!cave_clean_bold(p_ptr->y, p_ptr->x))
+       if (!cave_clean_bold(y, x))
        {
                msg_print(_("床上のアイテムが呪文を跳ね返した。", "The object resists the spell."));
                return FALSE;
        }
 
        /* Create a glyph */
-       p_ptr->current_floor_ptr->grid_array[p_ptr->y][p_ptr->x].info |= CAVE_OBJECT;
-       p_ptr->current_floor_ptr->grid_array[p_ptr->y][p_ptr->x].mimic = feat_explosive_rune;
+       floor_ptr->grid_array[y][x].info |= CAVE_OBJECT;
+       floor_ptr->grid_array[y][x].mimic = feat_explosive_rune;
 
-       note_spot(p_ptr->y, p_ptr->x);
-       lite_spot(p_ptr->y, p_ptr->x);
+       note_spot(y, x);
+       lite_spot(y, x);
 
        return TRUE;
 }
index 4aaa18b..3c5744e 100644 (file)
@@ -3,7 +3,7 @@
 extern void wiz_lite(player_type *caster_ptr, bool ninja);
 extern void wiz_dark(player_type *caster_ptr);
 extern bool warding_glyph(player_type *caster_ptr);
-extern bool explosive_rune(void);
+extern bool explosive_rune(floor_type *floor_ptr, POSITION y, POSITION x);
 extern bool place_mirror(player_type *caster_ptr);
 extern void stair_creation(player_type *caster_ptr);
 extern void map_area(POSITION range);