• R/O
  • HTTP
  • SSH
  • HTTPS

hengband: Commit

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


Commit MetaInfo

Revision350dedf62d3efd6416d698838d6bd62b83449dd1 (tree)
Time2019-06-29 18:55:56
Authordeskull <deskull@user...>
Commiterdeskull

Log Message

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

Change Summary

Incremental Difference

--- a/src/mspells4.c
+++ b/src/mspells4.c
@@ -199,7 +199,7 @@ void spell_RF4_DISPEL(MONSTER_IDX m_idx, MONSTER_IDX t_idx, int TARGET_TYPE)
199199
200200 if (TARGET_TYPE == MONSTER_TO_PLAYER)
201201 {
202- dispel_player();
202+ dispel_player(p_ptr);
203203 if (p_ptr->riding) dispel_monster_status(p_ptr->riding);
204204
205205 if ((p_ptr->pseikaku == SEIKAKU_COMBAT) || (p_ptr->inventory_list[INVEN_BOW].name1 == ART_CRIMSON))
@@ -214,7 +214,7 @@ void spell_RF4_DISPEL(MONSTER_IDX m_idx, MONSTER_IDX t_idx, int TARGET_TYPE)
214214 }
215215 else if (TARGET_TYPE == MONSTER_TO_MONSTER)
216216 {
217- if (t_idx == p_ptr->riding) dispel_player();
217+ if (t_idx == p_ptr->riding) dispel_player(p_ptr);
218218 dispel_monster_status(t_idx);
219219 }
220220 }
--- a/src/player-effects.c
+++ b/src/player-effects.c
@@ -288,68 +288,68 @@ void reset_tim_flags(player_type *creature_ptr)
288288 * @brief プレイヤーに魔力消去効果を与える。
289289 * @return なし
290290 */
291-void dispel_player(void)
291+void dispel_player(player_type *creature_ptr)
292292 {
293- (void)set_fast(p_ptr, 0, TRUE);
294- (void)set_lightspeed(p_ptr, 0, TRUE);
295- (void)set_slow(p_ptr, 0, TRUE);
296- (void)set_shield(p_ptr, 0, TRUE);
297- (void)set_blessed(p_ptr, 0, TRUE);
298- (void)set_tsuyoshi(p_ptr, 0, TRUE);
299- (void)set_hero(p_ptr, 0, TRUE);
300- (void)set_shero(p_ptr, 0, TRUE);
301- (void)set_protevil(p_ptr, 0, TRUE);
302- (void)set_invuln(p_ptr, 0, TRUE);
303- (void)set_wraith_form(p_ptr, 0, TRUE);
304- (void)set_kabenuke(p_ptr, 0, TRUE);
305- (void)set_tim_res_nether(p_ptr, 0, TRUE);
306- (void)set_tim_res_time(p_ptr, 0, TRUE);
293+ (void)set_fast(creature_ptr, 0, TRUE);
294+ (void)set_lightspeed(creature_ptr, 0, TRUE);
295+ (void)set_slow(creature_ptr, 0, TRUE);
296+ (void)set_shield(creature_ptr, 0, TRUE);
297+ (void)set_blessed(creature_ptr, 0, TRUE);
298+ (void)set_tsuyoshi(creature_ptr, 0, TRUE);
299+ (void)set_hero(creature_ptr, 0, TRUE);
300+ (void)set_shero(creature_ptr, 0, TRUE);
301+ (void)set_protevil(creature_ptr, 0, TRUE);
302+ (void)set_invuln(creature_ptr, 0, TRUE);
303+ (void)set_wraith_form(creature_ptr, 0, TRUE);
304+ (void)set_kabenuke(creature_ptr, 0, TRUE);
305+ (void)set_tim_res_nether(creature_ptr, 0, TRUE);
306+ (void)set_tim_res_time(creature_ptr, 0, TRUE);
307307 /* by henkma */
308- (void)set_tim_reflect(p_ptr, 0,TRUE);
309- (void)set_multishadow(p_ptr, 0,TRUE);
310- (void)set_dustrobe(p_ptr, 0,TRUE);
311-
312- (void)set_tim_invis(p_ptr, 0, TRUE);
313- (void)set_tim_infra(p_ptr, 0, TRUE);
314- (void)set_tim_esp(p_ptr, 0, TRUE);
315- (void)set_tim_regen(p_ptr, 0, TRUE);
316- (void)set_tim_stealth(p_ptr, 0, TRUE);
317- (void)set_tim_levitation(p_ptr, 0, TRUE);
318- (void)set_tim_sh_touki(p_ptr, 0, TRUE);
319- (void)set_tim_sh_fire(p_ptr, 0, TRUE);
320- (void)set_tim_sh_holy(p_ptr, 0, TRUE);
321- (void)set_tim_eyeeye(p_ptr, 0, TRUE);
322- (void)set_magicdef(p_ptr, 0, TRUE);
323- (void)set_resist_magic(p_ptr, 0, TRUE);
324- (void)set_oppose_acid(p_ptr, 0, TRUE);
325- (void)set_oppose_elec(p_ptr, 0, TRUE);
326- (void)set_oppose_fire(p_ptr, 0, TRUE);
327- (void)set_oppose_cold(p_ptr, 0, TRUE);
328- (void)set_oppose_pois(p_ptr, 0, TRUE);
329- (void)set_ultimate_res(p_ptr, 0, TRUE);
330- (void)set_mimic(p_ptr, 0, 0, TRUE);
331- (void)set_ele_attack(p_ptr, 0, 0);
332- (void)set_ele_immune(p_ptr, 0, 0);
308+ (void)set_tim_reflect(creature_ptr, 0,TRUE);
309+ (void)set_multishadow(creature_ptr, 0,TRUE);
310+ (void)set_dustrobe(creature_ptr, 0,TRUE);
311+
312+ (void)set_tim_invis(creature_ptr, 0, TRUE);
313+ (void)set_tim_infra(creature_ptr, 0, TRUE);
314+ (void)set_tim_esp(creature_ptr, 0, TRUE);
315+ (void)set_tim_regen(creature_ptr, 0, TRUE);
316+ (void)set_tim_stealth(creature_ptr, 0, TRUE);
317+ (void)set_tim_levitation(creature_ptr, 0, TRUE);
318+ (void)set_tim_sh_touki(creature_ptr, 0, TRUE);
319+ (void)set_tim_sh_fire(creature_ptr, 0, TRUE);
320+ (void)set_tim_sh_holy(creature_ptr, 0, TRUE);
321+ (void)set_tim_eyeeye(creature_ptr, 0, TRUE);
322+ (void)set_magicdef(creature_ptr, 0, TRUE);
323+ (void)set_resist_magic(creature_ptr, 0, TRUE);
324+ (void)set_oppose_acid(creature_ptr, 0, TRUE);
325+ (void)set_oppose_elec(creature_ptr, 0, TRUE);
326+ (void)set_oppose_fire(creature_ptr, 0, TRUE);
327+ (void)set_oppose_cold(creature_ptr, 0, TRUE);
328+ (void)set_oppose_pois(creature_ptr, 0, TRUE);
329+ (void)set_ultimate_res(creature_ptr, 0, TRUE);
330+ (void)set_mimic(creature_ptr, 0, 0, TRUE);
331+ (void)set_ele_attack(creature_ptr, 0, 0);
332+ (void)set_ele_immune(creature_ptr, 0, 0);
333333
334334 /* Cancel glowing hands */
335- if (p_ptr->special_attack & ATTACK_CONFUSE)
335+ if (creature_ptr->special_attack & ATTACK_CONFUSE)
336336 {
337- p_ptr->special_attack &= ~(ATTACK_CONFUSE);
337+ creature_ptr->special_attack &= ~(ATTACK_CONFUSE);
338338 msg_print(_("手の輝きがなくなった。", "Your hands stop glowing."));
339339 }
340340
341341 if (music_singing_any() || hex_spelling_any())
342342 {
343343 concptr str = (music_singing_any()) ? _("歌", "singing") : _("呪文", "spelling");
344- INTERUPTING_SONG_EFFECT(p_ptr) = SINGING_SONG_EFFECT(p_ptr);
345- SINGING_SONG_EFFECT(p_ptr) = MUSIC_NONE;
344+ INTERUPTING_SONG_EFFECT(creature_ptr) = SINGING_SONG_EFFECT(creature_ptr);
345+ SINGING_SONG_EFFECT(creature_ptr) = MUSIC_NONE;
346346 msg_format(_("%sが途切れた。", "Your %s is interrupted."), str);
347347
348- p_ptr->action = ACTION_NONE;
349- p_ptr->update |= (PU_BONUS | PU_HP | PU_MONSTERS);
350- p_ptr->redraw |= (PR_MAP | PR_STATUS | PR_STATE);
351- p_ptr->window |= (PW_OVERHEAD | PW_DUNGEON);
352- p_ptr->energy_need += ENERGY_NEED();
348+ creature_ptr->action = ACTION_NONE;
349+ creature_ptr->update |= (PU_BONUS | PU_HP | PU_MONSTERS);
350+ creature_ptr->redraw |= (PR_MAP | PR_STATUS | PR_STATE);
351+ creature_ptr->window |= (PW_OVERHEAD | PW_DUNGEON);
352+ creature_ptr->energy_need += ENERGY_NEED();
353353 }
354354 }
355355
--- a/src/player-effects.h
+++ b/src/player-effects.h
@@ -13,7 +13,7 @@ struct kamae
1313
1414 extern void set_action(ACTION_IDX typ);
1515 extern void reset_tim_flags(player_type *creature_ptr);
16-extern void dispel_player(void);
16+extern void dispel_player(player_type *creature_ptr);
1717 extern bool set_mimic(player_type *creature_ptr, TIME_EFFECT v, IDX p, bool do_dec);
1818 extern bool set_blind(player_type *creature_ptr, TIME_EFFECT v);
1919 extern bool set_confused(player_type *creature_ptr, TIME_EFFECT v);
Show on old repository browser