変愚蛮怒のメインリポジトリです
Revision | 2cb9bf2febfbf934441c53c12b9df6b7138f5e8c (tree) |
---|---|
Zeit | 2019-10-06 19:26:52 |
Autor | deskull <deskull@user...> |
Commiter | deskull |
[Refactor] #38997 restore_all_status() に player_type * 引数を追加. / Add player_type * argument to restore_all_status().
@@ -3972,7 +3972,7 @@ static void bldg_process_command(building_type *bldg, int i) | ||
3972 | 3972 | paid = cure_critical_wounds(p_ptr, 200); |
3973 | 3973 | break; |
3974 | 3974 | case BACT_RESTORE: /* needs work */ |
3975 | - paid = restore_all_status(); | |
3975 | + paid = restore_all_status(p_ptr); | |
3976 | 3976 | break; |
3977 | 3977 | case BACT_ENCHANT_ARROWS: |
3978 | 3978 | item_tester_hook = item_tester_hook_ammo; |
@@ -1267,7 +1267,7 @@ bool activate_artifact(player_type *user_ptr, object_type *o_ptr) | ||
1267 | 1267 | case ACT_REST_ALL: |
1268 | 1268 | { |
1269 | 1269 | msg_print(_("濃緑色に輝いている...", "It glows a deep green...")); |
1270 | - (void)restore_all_status(); | |
1270 | + (void)restore_all_status(user_ptr); | |
1271 | 1271 | (void)restore_level(user_ptr); |
1272 | 1272 | break; |
1273 | 1273 | } |
@@ -220,7 +220,7 @@ void exe_eat_food(player_type *creature_ptr, INVENTORY_IDX item) | ||
220 | 220 | |
221 | 221 | case SV_FOOD_RESTORING: |
222 | 222 | { |
223 | - ident = restore_all_status(); | |
223 | + ident = restore_all_status(creature_ptr); | |
224 | 224 | break; |
225 | 225 | } |
226 | 226 |
@@ -113,7 +113,7 @@ int rod_effect(player_type *creature_ptr, OBJECT_SUBTYPE_VALUE sval, DIRECTION d | ||
113 | 113 | case SV_ROD_RESTORATION: |
114 | 114 | { |
115 | 115 | if(restore_level(creature_ptr)) ident = TRUE; |
116 | - if(restore_all_status()) ident = TRUE; | |
116 | + if(restore_all_status(creature_ptr)) ident = TRUE; | |
117 | 117 | break; |
118 | 118 | } |
119 | 119 |
@@ -707,7 +707,7 @@ static bool pattern_effect(player_type *creature_ptr) | ||
707 | 707 | { |
708 | 708 | case PATTERN_TILE_END: |
709 | 709 | (void)set_image(creature_ptr, 0); |
710 | - (void)restore_all_status(); | |
710 | + (void)restore_all_status(creature_ptr); | |
711 | 711 | (void)restore_level(creature_ptr); |
712 | 712 | (void)cure_critical_wounds(creature_ptr, 1000); |
713 | 713 |
@@ -484,7 +484,7 @@ void gain_level_reward(player_type *creature_ptr, int chosen_reward) | ||
484 | 484 | |
485 | 485 | msg_format(_("%sの声が響き渡った:", "The voice of %s booms out:"), chaos_patrons[creature_ptr->chaos_patron]); |
486 | 486 | (void)restore_level(creature_ptr); |
487 | - (void)restore_all_status(); | |
487 | + (void)restore_all_status(creature_ptr); | |
488 | 488 | (void)true_healing(creature_ptr, 5000); |
489 | 489 | reward = _("体力が回復した。", "healing"); |
490 | 490 | break; |
@@ -684,7 +684,7 @@ static bool exe_racial_power(player_type *creature_ptr, s32b command) | ||
684 | 684 | msg_print(_("あなたは「パターン」を心に描いてその上を歩いた...", "You picture the Pattern in your mind and walk it...")); |
685 | 685 | |
686 | 686 | (void)true_healing(creature_ptr, 0); |
687 | - (void)restore_all_status(); | |
687 | + (void)restore_all_status(creature_ptr); | |
688 | 688 | (void)restore_level(creature_ptr); |
689 | 689 | } |
690 | 690 | break; |
@@ -430,7 +430,7 @@ concptr do_life_spell(player_type *caster_ptr, SPELL_IDX spell, BIT_FLAGS mode) | ||
430 | 430 | { |
431 | 431 | if (cast) |
432 | 432 | { |
433 | - (void)restore_all_status(); | |
433 | + (void)restore_all_status(caster_ptr); | |
434 | 434 | restore_level(caster_ptr); |
435 | 435 | } |
436 | 436 | } |
@@ -867,7 +867,7 @@ concptr do_music_spell(player_type *caster_ptr, SPELL_IDX spell, BIT_FLAGS mode) | ||
867 | 867 | { |
868 | 868 | msg_print(_("暗黒の中に光と美をふりまいた。体が元の活力を取り戻した。", |
869 | 869 | "You strewed light and beauty in the dark as you sing. You feel refreshed.")); |
870 | - (void)restore_all_status(); | |
870 | + (void)restore_all_status(caster_ptr); | |
871 | 871 | (void)restore_level(caster_ptr); |
872 | 872 | } |
873 | 873 | } |
@@ -283,7 +283,7 @@ bool_hack life_stream(player_type *creature_ptr, bool_hack message, bool_hack vi | ||
283 | 283 | (void)set_image(creature_ptr, 0); |
284 | 284 | (void)set_stun(creature_ptr, 0); |
285 | 285 | (void)set_cut(creature_ptr,0); |
286 | - (void)restore_all_status(); | |
286 | + (void)restore_all_status(creature_ptr); | |
287 | 287 | (void)set_shero(creature_ptr, 0, TRUE); |
288 | 288 | handle_stuff(); |
289 | 289 | hp_player(creature_ptr, 5000); |
@@ -392,15 +392,15 @@ bool_hack restore_mana(player_type *creature_ptr, bool_hack magic_eater) | ||
392 | 392 | return ident; |
393 | 393 | } |
394 | 394 | |
395 | -bool restore_all_status(void) | |
395 | +bool restore_all_status(player_type *creature_ptr) | |
396 | 396 | { |
397 | 397 | bool ident = FALSE; |
398 | - if (do_res_stat(p_ptr, A_STR)) ident = TRUE; | |
399 | - if (do_res_stat(p_ptr, A_INT)) ident = TRUE; | |
400 | - if (do_res_stat(p_ptr, A_WIS)) ident = TRUE; | |
401 | - if (do_res_stat(p_ptr, A_DEX)) ident = TRUE; | |
402 | - if (do_res_stat(p_ptr, A_CON)) ident = TRUE; | |
403 | - if (do_res_stat(p_ptr, A_CHR)) ident = TRUE; | |
398 | + if (do_res_stat(creature_ptr, A_STR)) ident = TRUE; | |
399 | + if (do_res_stat(creature_ptr, A_INT)) ident = TRUE; | |
400 | + if (do_res_stat(creature_ptr, A_WIS)) ident = TRUE; | |
401 | + if (do_res_stat(creature_ptr, A_DEX)) ident = TRUE; | |
402 | + if (do_res_stat(creature_ptr, A_CON)) ident = TRUE; | |
403 | + if (do_res_stat(creature_ptr, A_CHR)) ident = TRUE; | |
404 | 404 | return ident; |
405 | 405 | } |
406 | 406 |
@@ -21,7 +21,7 @@ extern bool_hack cure_serious_wounds(player_type *creature_ptr, DICE_NUMBER dice | ||
21 | 21 | extern bool_hack cure_critical_wounds(player_type *creature_ptr, HIT_POINT pow); |
22 | 22 | extern bool_hack true_healing(player_type *creature_ptr, HIT_POINT pow); |
23 | 23 | extern bool_hack restore_mana(player_type *creature_ptr, bool_hack magic_eater); |
24 | -extern bool restore_all_status(void); | |
24 | +extern bool restore_all_status(player_type *creature_ptr); | |
25 | 25 | |
26 | 26 | extern bool fishing(player_type *creature_ptr); |
27 | 27 | extern bool cosmic_cast_off(player_type *creature_ptr, object_type *o_ptr); |