変愚蛮怒のメインリポジトリです
Revision | deb63f3e3cd637e370b252fbc26ec7f91ff2e637 (tree) |
---|---|
Time | 2019-06-27 00:10:33 |
Author | deskull <deskull@user...> |
Commiter | deskull |
[Refactor] #38997 do_inc_stat() に player_type * 引数を追加.
@@ -1748,7 +1748,7 @@ bool activate_artifact(object_type *o_ptr) | ||
1748 | 1748 | if (get_check(_("本当に使いますか?", "Are you sure?!"))) |
1749 | 1749 | { |
1750 | 1750 | msg_print(_("村正が震えた...", "The Muramasa pulsates...")); |
1751 | - do_inc_stat(A_STR); | |
1751 | + do_inc_stat(p_ptr, A_STR); | |
1752 | 1752 | if (one_in_(2)) |
1753 | 1753 | { |
1754 | 1754 | msg_print(_("村正は壊れた!", "The Muramasa is destroyed!")); |
@@ -369,36 +369,36 @@ void exe_quaff_potion(INVENTORY_IDX item) | ||
369 | 369 | break; |
370 | 370 | |
371 | 371 | case SV_POTION_INC_STR: |
372 | - if (do_inc_stat(A_STR)) ident = TRUE; | |
372 | + if (do_inc_stat(p_ptr, A_STR)) ident = TRUE; | |
373 | 373 | break; |
374 | 374 | |
375 | 375 | case SV_POTION_INC_INT: |
376 | - if (do_inc_stat(A_INT)) ident = TRUE; | |
376 | + if (do_inc_stat(p_ptr, A_INT)) ident = TRUE; | |
377 | 377 | break; |
378 | 378 | |
379 | 379 | case SV_POTION_INC_WIS: |
380 | - if (do_inc_stat(A_WIS)) ident = TRUE; | |
380 | + if (do_inc_stat(p_ptr, A_WIS)) ident = TRUE; | |
381 | 381 | break; |
382 | 382 | |
383 | 383 | case SV_POTION_INC_DEX: |
384 | - if (do_inc_stat(A_DEX)) ident = TRUE; | |
384 | + if (do_inc_stat(p_ptr, A_DEX)) ident = TRUE; | |
385 | 385 | break; |
386 | 386 | |
387 | 387 | case SV_POTION_INC_CON: |
388 | - if (do_inc_stat(A_CON)) ident = TRUE; | |
388 | + if (do_inc_stat(p_ptr, A_CON)) ident = TRUE; | |
389 | 389 | break; |
390 | 390 | |
391 | 391 | case SV_POTION_INC_CHR: |
392 | - if (do_inc_stat(A_CHR)) ident = TRUE; | |
392 | + if (do_inc_stat(p_ptr, A_CHR)) ident = TRUE; | |
393 | 393 | break; |
394 | 394 | |
395 | 395 | case SV_POTION_AUGMENTATION: |
396 | - if (do_inc_stat(A_STR)) ident = TRUE; | |
397 | - if (do_inc_stat(A_INT)) ident = TRUE; | |
398 | - if (do_inc_stat(A_WIS)) ident = TRUE; | |
399 | - if (do_inc_stat(A_DEX)) ident = TRUE; | |
400 | - if (do_inc_stat(A_CON)) ident = TRUE; | |
401 | - if (do_inc_stat(A_CHR)) ident = TRUE; | |
396 | + if (do_inc_stat(p_ptr, A_STR)) ident = TRUE; | |
397 | + if (do_inc_stat(p_ptr, A_INT)) ident = TRUE; | |
398 | + if (do_inc_stat(p_ptr, A_WIS)) ident = TRUE; | |
399 | + if (do_inc_stat(p_ptr, A_DEX)) ident = TRUE; | |
400 | + if (do_inc_stat(p_ptr, A_CON)) ident = TRUE; | |
401 | + if (do_inc_stat(p_ptr, A_CHR)) ident = TRUE; | |
402 | 402 | break; |
403 | 403 | |
404 | 404 | case SV_POTION_ENLIGHTENMENT: |
@@ -415,8 +415,8 @@ void exe_quaff_potion(INVENTORY_IDX item) | ||
415 | 415 | chg_virtue(V_ENLIGHTEN, 2); |
416 | 416 | msg_print(NULL); |
417 | 417 | wiz_lite(FALSE); |
418 | - (void)do_inc_stat(A_INT); | |
419 | - (void)do_inc_stat(A_WIS); | |
418 | + (void)do_inc_stat(p_ptr, A_INT); | |
419 | + (void)do_inc_stat(p_ptr, A_WIS); | |
420 | 420 | (void)detect_traps(DETECT_RAD_DEFAULT, TRUE); |
421 | 421 | (void)detect_doors(DETECT_RAD_DEFAULT); |
422 | 422 | (void)detect_stairs(DETECT_RAD_DEFAULT); |
@@ -417,9 +417,9 @@ void gain_level_reward(int chosen_reward) | ||
417 | 417 | msg_print(_("「留まるのだ、下僕よ。余が汝の肉体を鍛えん。」", "'Stay, mortal, and let me mold thee.'")); |
418 | 418 | |
419 | 419 | if (one_in_(3) && !(chaos_stats[p_ptr->chaos_patron] < 0)) |
420 | - do_inc_stat(chaos_stats[p_ptr->chaos_patron]); | |
420 | + do_inc_stat(p_ptr, chaos_stats[p_ptr->chaos_patron]); | |
421 | 421 | else |
422 | - do_inc_stat(randint0(6)); | |
422 | + do_inc_stat(p_ptr, randint0(6)); | |
423 | 423 | reward = _("能力値が上がった。", "increasing a stat"); |
424 | 424 | break; |
425 | 425 |
@@ -465,7 +465,7 @@ void gain_level_reward(int chosen_reward) | ||
465 | 465 | |
466 | 466 | for (dummy = 0; dummy < A_MAX; dummy++) |
467 | 467 | { |
468 | - (void)do_inc_stat(dummy); | |
468 | + (void)do_inc_stat(p_ptr, dummy); | |
469 | 469 | } |
470 | 470 | reward = _("全能力値が上がった。", "increasing all stats"); |
471 | 471 | break; |
@@ -3570,15 +3570,15 @@ bool do_res_stat(player_type *creature_ptr, int stat) | ||
3570 | 3570 | /* |
3571 | 3571 | * Gain a "point" in a stat |
3572 | 3572 | */ |
3573 | -bool do_inc_stat(int stat) | |
3573 | +bool do_inc_stat(player_type *creature_ptr, int stat) | |
3574 | 3574 | { |
3575 | 3575 | bool res; |
3576 | 3576 | |
3577 | 3577 | /* Restore strength */ |
3578 | - res = res_stat(p_ptr, stat); | |
3578 | + res = res_stat(creature_ptr, stat); | |
3579 | 3579 | |
3580 | 3580 | /* Attempt to increase */ |
3581 | - if (inc_stat(p_ptr, stat)) | |
3581 | + if (inc_stat(creature_ptr, stat)) | |
3582 | 3582 | { |
3583 | 3583 | if (stat == A_WIS) |
3584 | 3584 | { |
@@ -63,7 +63,7 @@ extern bool res_stat(player_type *creature_ptr, int stat); | ||
63 | 63 | extern bool hp_player(player_type *creature_ptr, int num); |
64 | 64 | extern bool do_dec_stat(player_type *creature_ptr, int stat); |
65 | 65 | extern bool do_res_stat(player_type *creature_ptr, int stat); |
66 | -extern bool do_inc_stat(int stat); | |
66 | +extern bool do_inc_stat(player_type *creature_ptr, int stat); | |
67 | 67 | extern bool restore_level(void); |
68 | 68 | extern bool lose_all_info(void); |
69 | 69 | extern void gain_exp_64(s32b amount, u32b amount_frac); |
@@ -5598,11 +5598,11 @@ void check_experience(void) | ||
5598 | 5598 | prt("", n + 2, 14); |
5599 | 5599 | if (get_check(_("よろしいですか?", "Are you sure? "))) break; |
5600 | 5600 | } |
5601 | - do_inc_stat(choice - 'a'); | |
5601 | + do_inc_stat(p_ptr, choice - 'a'); | |
5602 | 5602 | screen_load(); |
5603 | 5603 | } |
5604 | 5604 | else if (!(p_ptr->max_plv % 2)) |
5605 | - do_inc_stat(randint0(6)); | |
5605 | + do_inc_stat(p_ptr, randint0(6)); | |
5606 | 5606 | } |
5607 | 5607 | |
5608 | 5608 | if (level_mutation) |