From: deskull Date: Wed, 6 Mar 2019 04:46:43 +0000 (+0900) Subject: [Refactor] #37353 explosive_rune() to spells-floor.c. X-Git-Url: http://git.osdn.net/view?a=commitdiff_plain;h=eef2063292c05170ca2afa685f3cb8d492c3975d;p=hengband%2Fhengband.git [Refactor] #37353 explosive_rune() to spells-floor.c. --- diff --git a/src/externs.h b/src/externs.h index 64424d388..c0595e9eb 100644 --- a/src/externs.h +++ b/src/externs.h @@ -960,7 +960,6 @@ extern void call_the_(void); extern void fetch(DIRECTION dir, WEIGHT wgt, bool require_los); extern void alter_reality(void); extern bool place_mirror(void); -extern bool explosive_rune(void); extern void identify_pack(void); extern int remove_curse(void); extern int remove_all_curse(void); diff --git a/src/racial.c b/src/racial.c index f125fb995..571e12674 100644 --- a/src/racial.c +++ b/src/racial.c @@ -21,6 +21,7 @@ #include "player-status.h" #include "spells-status.h" #include "spells-object.h" +#include "spells-floor.h" #include "cmd-spell.h" #include "realm-hex.h" diff --git a/src/spells-floor.c b/src/spells-floor.c index 96e203341..835ca3c01 100644 --- a/src/spells-floor.c +++ b/src/spells-floor.c @@ -188,3 +188,28 @@ bool warding_glyph(void) return TRUE; } + + +/*! + * @brief 爆発のルーン設置処理 / + * Leave an "explosive rune" which prevents monster movement + * @return 実際に設置が行われた場合TRUEを返す + */ +bool explosive_rune(void) +{ + if (!cave_clean_bold(p_ptr->y, p_ptr->x)) + { + msg_print(_("床上のアイテムが呪文を跳ね返した。", "The object resists the spell.")); + return FALSE; + } + + /* Create a glyph */ + current_floor_ptr->grid_array[p_ptr->y][p_ptr->x].info |= CAVE_OBJECT; + current_floor_ptr->grid_array[p_ptr->y][p_ptr->x].mimic = feat_explosive_rune; + + note_spot(p_ptr->y, p_ptr->x); + lite_spot(p_ptr->y, p_ptr->x); + + return TRUE; +} + diff --git a/src/spells-floor.h b/src/spells-floor.h index c60431c38..1a698071b 100644 --- a/src/spells-floor.h +++ b/src/spells-floor.h @@ -3,3 +3,4 @@ extern void wiz_lite(bool ninja); extern void wiz_dark(void); extern bool warding_glyph(void); +extern bool explosive_rune(void); diff --git a/src/spells3.c b/src/spells3.c index 461003dc7..f239a60b8 100644 --- a/src/spells3.c +++ b/src/spells3.c @@ -1608,30 +1608,6 @@ bool place_mirror(void) /*! - * @brief 爆発のルーン設置処理 / - * Leave an "explosive rune" which prevents monster movement - * @return 実際に設置が行われた場合TRUEを返す - */ -bool explosive_rune(void) -{ - if (!cave_clean_bold(p_ptr->y, p_ptr->x)) - { - msg_print(_("床上のアイテムが呪文を跳ね返した。", "The object resists the spell.")); - return FALSE; - } - - /* Create a glyph */ - current_floor_ptr->grid_array[p_ptr->y][p_ptr->x].info |= CAVE_OBJECT; - current_floor_ptr->grid_array[p_ptr->y][p_ptr->x].mimic = feat_explosive_rune; - - note_spot(p_ptr->y, p_ptr->x); - lite_spot(p_ptr->y, p_ptr->x); - - return TRUE; -} - - -/*! * @brief 全所持アイテム鑑定処理 / * Identify everything being carried. * Done by a potion of "self knowledge".