• R/O
  • HTTP
  • SSH
  • HTTPS

hengband: Commit

変愚蛮怒のメインリポジトリです


Commit MetaInfo

Revisionaf369f84c95c0188009f6ed48b0d7e1660c91ac5 (tree)
Time2019-07-12 00:00:41
Authordeskull <deskull@user...>
Commiterdeskull

Log Message

[Refactor] #38997 wreck_the_pattern() に player_type * 引数を追加.

Change Summary

Incremental Difference

--- a/src/core.c
+++ b/src/core.c
@@ -698,7 +698,7 @@ static bool pattern_effect(void)
698698 if ((PRACE_IS_(p_ptr, RACE_AMBERITE)) &&
699699 (p_ptr->cut > 0) && one_in_(10))
700700 {
701- wreck_the_pattern();
701+ wreck_the_pattern(p_ptr);
702702 }
703703
704704 pattern_type = f_info[current_floor_ptr->grid_array[p_ptr->y][p_ptr->x].feat].subtype;
--- a/src/player-status.c
+++ b/src/player-status.c
@@ -5162,11 +5162,11 @@ bool player_place(player_type *creature_ptr, POSITION y, POSITION x)
51625162 * @brief 種族アンバライトが出血時パターンの上に乗った際のペナルティ処理
51635163 * @return なし
51645164 */
5165-void wreck_the_pattern(void)
5165+void wreck_the_pattern(player_type *creature_ptr)
51665166 {
51675167 int to_ruin = 0;
51685168 POSITION r_y, r_x;
5169- int pattern_type = f_info[current_floor_ptr->grid_array[p_ptr->y][p_ptr->x].feat].subtype;
5169+ int pattern_type = f_info[current_floor_ptr->grid_array[creature_ptr->y][creature_ptr->x].feat].subtype;
51705170
51715171 if (pattern_type == PATTERN_TILE_WRECKED)
51725172 {
@@ -5177,12 +5177,12 @@ void wreck_the_pattern(void)
51775177 msg_print(_("パターンを血で汚してしまった!", "You bleed on the Pattern!"));
51785178 msg_print(_("何か恐ろしい事が起こった!", "Something terrible happens!"));
51795179
5180- if (!IS_INVULN()) take_hit(p_ptr, DAMAGE_NOESCAPE, damroll(10, 8), _("パターン損壊", "corrupting the Pattern"), -1);
5180+ if (!IS_INVULN()) take_hit(creature_ptr, DAMAGE_NOESCAPE, damroll(10, 8), _("パターン損壊", "corrupting the Pattern"), -1);
51815181 to_ruin = randint1(45) + 35;
51825182
51835183 while (to_ruin--)
51845184 {
5185- scatter(&r_y, &r_x, p_ptr->y, p_ptr->x, 4, 0);
5185+ scatter(&r_y, &r_x, creature_ptr->y, creature_ptr->x, 4, 0);
51865186
51875187 if (pattern_tile(r_y, r_x) &&
51885188 (f_info[current_floor_ptr->grid_array[r_y][r_x].feat].subtype != PATTERN_TILE_WRECKED))
@@ -5191,7 +5191,7 @@ void wreck_the_pattern(void)
51915191 }
51925192 }
51935193
5194- cave_set_feat(p_ptr->y, p_ptr->x, feat_pattern_corrupted);
5194+ cave_set_feat(creature_ptr->y, creature_ptr->x, feat_pattern_corrupted);
51955195 }
51965196
51975197
--- a/src/player-status.h
+++ b/src/player-status.h
@@ -748,7 +748,7 @@ extern bool player_place(player_type *creature_ptr, POSITION y, POSITION x);
748748 extern void sanity_blast(monster_type *m_ptr, bool necro);
749749
750750 extern void check_experience(void);
751-extern void wreck_the_pattern(void);
751+extern void wreck_the_pattern(player_type *creature_ptr);
752752 extern void cnv_stat(int val, char *out_val);
753753 extern s16b modify_stat_value(int value, int amount);
754754 extern long calc_score(void);
Show on old repository browser