• R/O
  • HTTP
  • SSH
  • HTTPS

hengband: Commit

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


Commit MetaInfo

Revision91dce7ffd8f076873471ff14966994e48a5759d9 (tree)
Time2019-06-29 19:31:17
Authordeskull <deskull@user...>
Commiterdeskull

Log Message

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

Change Summary

Incremental Difference

--- a/src/cmd-quaff.c
+++ b/src/cmd-quaff.c
@@ -470,7 +470,7 @@ void exe_quaff_potion(INVENTORY_IDX item)
470470 roll_hitdice(p_ptr, 0L);
471471 get_max_stats();
472472 p_ptr->update |= PU_BONUS;
473- lose_all_mutations();
473+ lose_all_mutations(p_ptr);
474474 ident = TRUE;
475475 break;
476476
@@ -495,7 +495,7 @@ void exe_quaff_potion(INVENTORY_IDX item)
495495 case SV_POTION_POLYMORPH:
496496 if ((p_ptr->muta1 || p_ptr->muta2 || p_ptr->muta3) && one_in_(23))
497497 {
498- lose_all_mutations();
498+ lose_all_mutations(p_ptr);
499499 }
500500 else
501501 {
--- a/src/mutation.c
+++ b/src/mutation.c
@@ -1501,16 +1501,16 @@ bool lose_mutation(MUTATION_IDX choose_mut)
15011501 }
15021502 }
15031503
1504-void lose_all_mutations(void)
1504+void lose_all_mutations(player_type *creature_ptr)
15051505 {
1506- if (p_ptr->muta1 || p_ptr->muta2 || p_ptr->muta3)
1506+ if (creature_ptr->muta1 || creature_ptr->muta2 || creature_ptr->muta3)
15071507 {
15081508 chg_virtue(V_CHANCE, -5);
15091509 msg_print(_("全ての突然変異が治った。", "You are cured of all mutations."));
1510- p_ptr->muta1 = p_ptr->muta2 = p_ptr->muta3 = 0;
1511- p_ptr->update |= PU_BONUS;
1510+ creature_ptr->muta1 = creature_ptr->muta2 = creature_ptr->muta3 = 0;
1511+ creature_ptr->update |= PU_BONUS;
15121512 handle_stuff();
1513- p_ptr->mutant_regenerate_mod = calc_mutant_regenerate_mod();
1513+ creature_ptr->mutant_regenerate_mod = calc_mutant_regenerate_mod();
15141514 }
15151515 }
15161516
--- a/src/mutation.h
+++ b/src/mutation.h
@@ -1,7 +1,7 @@
11 /* mutation.c */
22 extern bool gain_mutation(player_type *creature_ptr, MUTATION_IDX choose_mut);
33 extern bool lose_mutation(MUTATION_IDX choose_mut);
4-extern void lose_all_mutations(void);
4+extern void lose_all_mutations(player_type *creature_ptr);
55 extern void dump_mutations(FILE *OutFile);
66 extern void do_cmd_knowledge_mutations(void);
77 extern int calc_mutant_regenerate_mod(void);
--- a/src/spells2.c
+++ b/src/spells2.c
@@ -3815,7 +3815,7 @@ void cast_shuffle(void)
38153815 {
38163816 msg_print(_("《審判》だ。", "It's the Judgement."));
38173817 roll_hitdice(p_ptr, 0L);
3818- lose_all_mutations();
3818+ lose_all_mutations(p_ptr);
38193819 }
38203820 else if (die < 120)
38213821 {
Show on old repository browser