• R/O
  • HTTP
  • SSH
  • HTTPS

hengband: Commit

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


Commit MetaInfo

Revisionbcd4948ef691f5a6542b0dd97ad02d9874cfe5f1 (tree)
Time2019-03-13 23:02:44
Authordeskull <deskull@user...>
Commiterdeskull

Log Message

[Refactor] #37353 型の置換。 / Type replacement. (PERCENTAGE)

Change Summary

Incremental Difference

--- a/src/artifact.c
+++ b/src/artifact.c
@@ -241,7 +241,7 @@ void one_ability(object_type *o_ptr)
241241 void one_activation(object_type *o_ptr)
242242 {
243243 int type = 0;
244- int chance = 0;
244+ PERCENTAGE chance = 0;
245245
246246 while (randint1(100) >= chance)
247247 {
--- a/src/mane.c
+++ b/src/mane.c
@@ -89,9 +89,9 @@ static int get_mane_power(int *sn, bool baigaesi)
8989 int num = 0;
9090 TERM_LEN y = 1;
9191 TERM_LEN x = 18;
92- int minfail = 0;
92+ PERCENTAGE minfail = 0;
9393 PLAYER_LEVEL plev = p_ptr->lev;
94- int chance = 0;
94+ PERCENTAGE chance = 0;
9595 int ask;
9696 char choice;
9797 char out_val[160];
@@ -909,9 +909,9 @@ static bool use_mane(int spell)
909909 */
910910 bool do_cmd_mane(bool baigaesi)
911911 {
912- int n = 0, j;
913- int chance;
914- int minfail = 0;
912+ int n = 0, j;
913+ PERCENTAGE chance;
914+ PERCENTAGE minfail = 0;
915915 PLAYER_LEVEL plev = p_ptr->lev;
916916 monster_power spell;
917917 bool cast;
--- a/src/mind.c
+++ b/src/mind.c
@@ -680,9 +680,9 @@ static bool_hack get_mind_power(SPELL_IDX *sn, bool only_browse)
680680 int num = 0;
681681 TERM_LEN y = 1;
682682 TERM_LEN x = 10;
683- int minfail = 0;
683+ PERCENTAGE minfail = 0;
684684 PLAYER_LEVEL plev = p_ptr->lev;
685- int chance = 0;
685+ PERCENTAGE chance = 0;
686686 int ask = TRUE;
687687 char choice;
688688 char out_val[160];
@@ -1753,8 +1753,8 @@ void do_cmd_mind(void)
17531753 {
17541754 SPELL_IDX n = 0;
17551755 int b = 0;
1756- int chance;
1757- int minfail = 0;
1756+ PERCENTAGE chance;
1757+ PERCENTAGE minfail = 0;
17581758 PLAYER_LEVEL plev = p_ptr->lev;
17591759 int old_csp = p_ptr->csp;
17601760 mind_type spell;
@@ -1953,24 +1953,24 @@ void do_cmd_mind(void)
19531953 switch(use_mind)
19541954 {
19551955 case MIND_MINDCRAFTER:
1956- /* Cast the spell */
1956+
19571957 cast = cast_mindcrafter_spell(n);
19581958 break;
19591959 case MIND_KI:
1960- /* Cast the spell */
1960+
19611961 cast = cast_force_spell(n);
19621962 break;
19631963 case MIND_BERSERKER:
1964- /* Cast the spell */
1964+
19651965 cast = cast_berserk_spell(n);
19661966 break;
19671967 case MIND_MIRROR_MASTER:
1968- /* Cast the spell */
1968+
19691969 if( is_mirror_grid(&current_floor_ptr->grid_array[p_ptr->y][p_ptr->x]) )on_mirror = TRUE;
19701970 cast = cast_mirror_spell(n);
19711971 break;
19721972 case MIND_NINJUTSU:
1973- /* Cast the spell */
1973+
19741974 cast = cast_ninja_spell(n);
19751975 break;
19761976 default:
--- a/src/monster1.c
+++ b/src/monster1.c
@@ -2975,7 +2975,7 @@ void monster_death(MONSTER_IDX m_idx, bool drop_item)
29752975 if (drop_chosen_item)
29762976 {
29772977 ARTIFACT_IDX a_idx = 0;
2978- int chance = 0;
2978+ PERCENTAGE chance = 0;
29792979
29802980 for (i = 0; i < 4; i++)
29812981 {
--- a/src/spells2.c
+++ b/src/spells2.c
@@ -2210,7 +2210,7 @@ static void cave_temp_room_lite(void)
22102210 /* Process affected monsters */
22112211 if (g_ptr->m_idx)
22122212 {
2213- int chance = 25;
2213+ PERCENTAGE chance = 25;
22142214 monster_type *m_ptr = &current_floor_ptr->m_list[g_ptr->m_idx];
22152215 monster_race *r_ptr = &r_info[m_ptr->r_idx];
22162216 update_monster(g_ptr->m_idx, FALSE);
--- a/src/spells3.c
+++ b/src/spells3.c
@@ -2652,9 +2652,9 @@ void display_spell_list(void)
26522652 (p_ptr->pclass == CLASS_MIRROR_MASTER) ||
26532653 (p_ptr->pclass == CLASS_FORCETRAINER))
26542654 {
2655- int minfail = 0;
2655+ PERCENTAGE minfail = 0;
26562656 PLAYER_LEVEL plev = p_ptr->lev;
2657- int chance = 0;
2657+ PERCENTAGE chance = 0;
26582658 mind_type spell;
26592659 char comment[80];
26602660 char psi_desc[80];
Show on old repository browser