変愚蛮怒のメインリポジトリです
Revision | c63d1fc0ae49483b09b0bb9b8058cee6559d074e (tree) |
---|---|
Time | 2018-11-17 18:06:40 |
Author | Deskull <deskull@user...> |
Commiter | Deskull |
[Refactor] #37353 コメント整理 / Refactor comments.
@@ -85,7 +85,6 @@ void do_cmd_activate_aux(INVENTORY_IDX item) | ||
85 | 85 | o_ptr = &o_list[0 - item]; |
86 | 86 | } |
87 | 87 | |
88 | - /* Take a turn */ | |
89 | 88 | p_ptr->energy_use = 100; |
90 | 89 | |
91 | 90 | /* Extract the item level */ |
@@ -37,7 +37,6 @@ void do_cmd_eat_food_aux(INVENTORY_IDX item) | ||
37 | 37 | |
38 | 38 | sound(SOUND_EAT); |
39 | 39 | |
40 | - /* Take a turn */ | |
41 | 40 | p_ptr->energy_use = 100; |
42 | 41 | |
43 | 42 | /* Identity not known yet */ |
@@ -402,7 +402,6 @@ void do_cmd_wield(void) | ||
402 | 402 | autopick_alter_item(item, FALSE); |
403 | 403 | } |
404 | 404 | |
405 | - /* Take a turn */ | |
406 | 405 | p_ptr->energy_use = 100; |
407 | 406 | |
408 | 407 | /* Get local object */ |
@@ -898,7 +897,6 @@ void do_cmd_destroy(void) | ||
898 | 897 | object_desc(o_name, o_ptr, 0); |
899 | 898 | o_ptr->number = old_number; |
900 | 899 | |
901 | - /* Take a turn */ | |
902 | 900 | p_ptr->energy_use = 100; |
903 | 901 | |
904 | 902 | /* Artifacts cannot be destroyed */ |
@@ -329,7 +329,6 @@ bool do_riding(bool force) | ||
329 | 329 | |
330 | 330 | if (c_ptr->m_idx) |
331 | 331 | { |
332 | - /* Take a turn */ | |
333 | 332 | p_ptr->energy_use = 100; |
334 | 333 | |
335 | 334 | /* Message */ |
@@ -24,7 +24,6 @@ void do_cmd_quaff_potion_aux(INVENTORY_IDX item) | ||
24 | 24 | object_type forge; |
25 | 25 | object_type *q_ptr; |
26 | 26 | |
27 | - p_ptr->energy_use = 100; /* Take a turn */ | |
28 | 27 | |
29 | 28 | if (world_player) |
30 | 29 | { |
@@ -41,7 +41,6 @@ void do_cmd_read_scroll_aux(INVENTORY_IDX item, bool known) | ||
41 | 41 | } |
42 | 42 | |
43 | 43 | |
44 | - /* Take a turn */ | |
45 | 44 | p_ptr->energy_use = 100; |
46 | 45 | |
47 | 46 | if (world_player) |
@@ -340,7 +340,6 @@ void do_cmd_use_staff_aux(INVENTORY_IDX item) | ||
340 | 340 | } |
341 | 341 | |
342 | 342 | |
343 | - /* Take a turn */ | |
344 | 343 | p_ptr->energy_use = 100; |
345 | 344 | |
346 | 345 | /* Extract the item level */ |
@@ -295,7 +295,6 @@ void do_cmd_zap_rod_aux(INVENTORY_IDX item) | ||
295 | 295 | } |
296 | 296 | |
297 | 297 | |
298 | - /* Take a turn */ | |
299 | 298 | p_ptr->energy_use = 100; |
300 | 299 | |
301 | 300 | /* Extract the item level */ |
@@ -350,7 +350,6 @@ void do_cmd_aim_wand_aux(INVENTORY_IDX item) | ||
350 | 350 | } |
351 | 351 | target_pet = old_target_pet; |
352 | 352 | |
353 | - /* Take a turn */ | |
354 | 353 | p_ptr->energy_use = 100; |
355 | 354 | |
356 | 355 | /* Get the level */ |
@@ -384,8 +384,6 @@ void do_cmd_search(void) | ||
384 | 384 | /* Cancel the arg */ |
385 | 385 | command_arg = 0; |
386 | 386 | } |
387 | - | |
388 | - /* Take a turn */ | |
389 | 387 | p_ptr->energy_use = 100; |
390 | 388 | |
391 | 389 | /* Search */ |
@@ -447,15 +445,10 @@ static OBJECT_IDX chest_check(POSITION y, POSITION x, bool trapped) | ||
447 | 445 | static bool do_cmd_open_chest(POSITION y, POSITION x, OBJECT_IDX o_idx) |
448 | 446 | { |
449 | 447 | int i, j; |
450 | - | |
451 | 448 | bool flag = TRUE; |
452 | - | |
453 | 449 | bool more = FALSE; |
454 | - | |
455 | 450 | object_type *o_ptr = &o_list[o_idx]; |
456 | 451 | |
457 | - | |
458 | - /* Take a turn */ | |
459 | 452 | p_ptr->energy_use = 100; |
460 | 453 | |
461 | 454 | /* Attempt to unlock it */ |
@@ -675,13 +668,9 @@ static bool do_cmd_open_aux(POSITION y, POSITION x) | ||
675 | 668 | |
676 | 669 | /* Get requested grid */ |
677 | 670 | cave_type *c_ptr = &cave[y][x]; |
678 | - | |
679 | 671 | feature_type *f_ptr = &f_info[c_ptr->feat]; |
680 | - | |
681 | 672 | bool more = FALSE; |
682 | 673 | |
683 | - | |
684 | - /* Take a turn */ | |
685 | 674 | p_ptr->energy_use = 100; |
686 | 675 | |
687 | 676 | /* Seeing true feature code (ignore mimic) */ |
@@ -840,7 +829,6 @@ void do_cmd_open(void) | ||
840 | 829 | /* Monster in the way */ |
841 | 830 | else if (c_ptr->m_idx && p_ptr->riding != c_ptr->m_idx) |
842 | 831 | { |
843 | - /* Take a turn */ | |
844 | 832 | p_ptr->energy_use = 100; |
845 | 833 | |
846 | 834 | /* Message */ |
@@ -889,7 +877,6 @@ static bool do_cmd_close_aux(POSITION y, POSITION x) | ||
889 | 877 | FEAT_IDX old_feat = c_ptr->feat; |
890 | 878 | bool more = FALSE; |
891 | 879 | |
892 | - /* Take a turn */ | |
893 | 880 | p_ptr->energy_use = 100; |
894 | 881 | |
895 | 882 | /* Seeing true feature code (ignore mimic) */ |
@@ -1001,7 +988,6 @@ void do_cmd_close(void) | ||
1001 | 988 | /* Monster in the way */ |
1002 | 989 | else if (c_ptr->m_idx) |
1003 | 990 | { |
1004 | - /* Take a turn */ | |
1005 | 991 | p_ptr->energy_use = 100; |
1006 | 992 | |
1007 | 993 | /* Message */ |
@@ -1082,7 +1068,6 @@ static bool do_cmd_tunnel_aux(POSITION y, POSITION x) | ||
1082 | 1068 | /* Verify legality */ |
1083 | 1069 | if (!do_cmd_tunnel_test(y, x)) return (FALSE); |
1084 | 1070 | |
1085 | - /* Take a turn */ | |
1086 | 1071 | p_ptr->energy_use = 100; |
1087 | 1072 | |
1088 | 1073 | /* Get grid */ |
@@ -1260,7 +1245,6 @@ void do_cmd_tunnel(void) | ||
1260 | 1245 | /* A monster is in the way */ |
1261 | 1246 | else if (c_ptr->m_idx) |
1262 | 1247 | { |
1263 | - /* Take a turn */ | |
1264 | 1248 | p_ptr->energy_use = 100; |
1265 | 1249 | |
1266 | 1250 | /* Message */ |
@@ -1400,13 +1384,9 @@ bool easy_open_door(POSITION y, POSITION x) | ||
1400 | 1384 | static bool do_cmd_disarm_chest(POSITION y, POSITION x, OBJECT_IDX o_idx) |
1401 | 1385 | { |
1402 | 1386 | int i, j; |
1403 | - | |
1404 | 1387 | bool more = FALSE; |
1405 | - | |
1406 | 1388 | object_type *o_ptr = &o_list[o_idx]; |
1407 | 1389 | |
1408 | - | |
1409 | - /* Take a turn */ | |
1410 | 1390 | p_ptr->energy_use = 100; |
1411 | 1391 | |
1412 | 1392 | /* Get the "disarm" factor */ |
@@ -1506,15 +1486,12 @@ static bool do_cmd_disarm_aux(POSITION y, POSITION x, DIRECTION dir) | ||
1506 | 1486 | |
1507 | 1487 | /* Extract trap "power" */ |
1508 | 1488 | int power = f_ptr->power; |
1509 | - | |
1510 | 1489 | bool more = FALSE; |
1511 | 1490 | |
1512 | 1491 | /* Get the "disarm" factor */ |
1513 | 1492 | int i = p_ptr->skill_dis; |
1514 | - | |
1515 | 1493 | int j; |
1516 | 1494 | |
1517 | - /* Take a turn */ | |
1518 | 1495 | p_ptr->energy_use = 100; |
1519 | 1496 | |
1520 | 1497 | /* Penalize some conditions */ |
@@ -1732,7 +1709,6 @@ static bool do_cmd_bash_aux(POSITION y, POSITION x, DIRECTION dir) | ||
1732 | 1709 | |
1733 | 1710 | cptr name = f_name + f_info[get_feat_mimic(c_ptr)].name; |
1734 | 1711 | |
1735 | - /* Take a turn */ | |
1736 | 1712 | p_ptr->energy_use = 100; |
1737 | 1713 | |
1738 | 1714 | /* Message */ |
@@ -1866,7 +1842,6 @@ void do_cmd_bash(void) | ||
1866 | 1842 | /* Monster in the way */ |
1867 | 1843 | else if (c_ptr->m_idx) |
1868 | 1844 | { |
1869 | - /* Take a turn */ | |
1870 | 1845 | p_ptr->energy_use = 100; |
1871 | 1846 | |
1872 | 1847 | /* Message */ |
@@ -1948,7 +1923,6 @@ void do_cmd_alter(void) | ||
1948 | 1923 | feat = get_feat_mimic(c_ptr); |
1949 | 1924 | f_ptr = &f_info[feat]; |
1950 | 1925 | |
1951 | - /* Take a turn */ | |
1952 | 1926 | p_ptr->energy_use = 100; |
1953 | 1927 | |
1954 | 1928 | /* Attack monsters */ |
@@ -2093,7 +2067,6 @@ void do_cmd_spike(void) | ||
2093 | 2067 | /* Is a monster in the way? */ |
2094 | 2068 | else if (c_ptr->m_idx) |
2095 | 2069 | { |
2096 | - /* Take a turn */ | |
2097 | 2070 | p_ptr->energy_use = 100; |
2098 | 2071 | |
2099 | 2072 | /* Message */ |
@@ -2106,7 +2079,6 @@ void do_cmd_spike(void) | ||
2106 | 2079 | /* Go for it */ |
2107 | 2080 | else |
2108 | 2081 | { |
2109 | - /* Take a turn */ | |
2110 | 2082 | p_ptr->energy_use = 100; |
2111 | 2083 | |
2112 | 2084 | /* Successful jamming */ |
@@ -2152,7 +2124,6 @@ void do_cmd_walk(bool pickup) | ||
2152 | 2124 | /* Get a "repeated" direction */ |
2153 | 2125 | if (get_rep_dir(&dir, FALSE)) |
2154 | 2126 | { |
2155 | - /* Take a turn */ | |
2156 | 2127 | p_ptr->energy_use = 100; |
2157 | 2128 | |
2158 | 2129 | if ((dir != 5) && (p_ptr->special_defense & KATA_MUSOU)) |
@@ -2257,7 +2228,6 @@ void do_cmd_stay(bool pickup) | ||
2257 | 2228 | command_arg = 0; |
2258 | 2229 | } |
2259 | 2230 | |
2260 | - /* Take a turn */ | |
2261 | 2231 | p_ptr->energy_use = 100; |
2262 | 2232 | |
2263 | 2233 | if (pickup) mpe_mode |= MPE_DO_PICKUP; |
@@ -3677,7 +3647,6 @@ bool do_cmd_throw(int mult, bool boomerang, OBJECT_IDX shuriken) | ||
3677 | 3647 | p_ptr->redraw |= (PR_EQUIPPY); |
3678 | 3648 | } |
3679 | 3649 | |
3680 | - /* Take a turn */ | |
3681 | 3650 | p_ptr->energy_use = 100; |
3682 | 3651 | |
3683 | 3652 | /* Rogue and Ninja gets bonus */ |
@@ -878,7 +878,6 @@ void do_cmd_study(void) | ||
878 | 878 | #endif |
879 | 879 | } |
880 | 880 | |
881 | - /* Take a turn */ | |
882 | 881 | p_ptr->energy_use = 100; |
883 | 882 | |
884 | 883 | switch (mp_ptr->spell_book) |
@@ -1318,7 +1317,6 @@ void do_cmd_cast(void) | ||
1318 | 1317 | } |
1319 | 1318 | } |
1320 | 1319 | |
1321 | - /* Take a turn */ | |
1322 | 1320 | p_ptr->energy_use = 100; |
1323 | 1321 | |
1324 | 1322 |
@@ -719,12 +719,13 @@ | ||
719 | 719 | /* |
720 | 720 | * Indexes of the various "stats" (hard-coded by savefiles, etc). |
721 | 721 | */ |
722 | -#define A_STR 0 | |
723 | -#define A_INT 1 | |
724 | -#define A_WIS 2 | |
725 | -#define A_DEX 3 | |
726 | -#define A_CON 4 | |
727 | -#define A_CHR 5 | |
722 | +#define A_STR 0 | |
723 | +#define A_INT 1 | |
724 | +#define A_WIS 2 | |
725 | +#define A_DEX 3 | |
726 | +#define A_CON 4 | |
727 | +#define A_CHR 5 | |
728 | +#define A_MAX 6 | |
728 | 729 | |
729 | 730 | /* |
730 | 731 | * Player sex constants (hard-coded by save-files, arrays, etc) |
@@ -1466,7 +1466,6 @@ static void process_world_aux_hp_and_sp(void) | ||
1466 | 1466 | take_hit(DAMAGE_NOESCAPE, dam, _("致命傷", "a fatal wound"), -1); |
1467 | 1467 | } |
1468 | 1468 | |
1469 | - | |
1470 | 1469 | /* (Vampires) Take damage from sunlight */ |
1471 | 1470 | if (prace_is_(RACE_VAMPIRE) || (p_ptr->mimic_form == MIMIC_VAMPIRE)) |
1472 | 1471 | { |
@@ -1477,7 +1476,6 @@ static void process_world_aux_hp_and_sp(void) | ||
1477 | 1476 | /* Take damage */ |
1478 | 1477 | msg_print(_("日光があなたのアンデッドの肉体を焼き焦がした!", "The sun's rays scorch your undead flesh!")); |
1479 | 1478 | take_hit(DAMAGE_NOESCAPE, 1, _("日光", "sunlight"), -1); |
1480 | - | |
1481 | 1479 | cave_no_regen = TRUE; |
1482 | 1480 | } |
1483 | 1481 | } |
@@ -1518,11 +1516,10 @@ static void process_world_aux_hp_and_sp(void) | ||
1518 | 1516 | |
1519 | 1517 | if (damage) |
1520 | 1518 | { |
1521 | - if (prace_is_(RACE_ENT)) damage += damage / 3; | |
1522 | - if (p_ptr->resist_fire) damage = damage / 3; | |
1523 | - if (IS_OPPOSE_FIRE()) damage = damage / 3; | |
1524 | - | |
1525 | - if (p_ptr->levitation) damage = damage / 5; | |
1519 | + if(prace_is_(RACE_ENT)) damage += damage / 3; | |
1520 | + if(p_ptr->resist_fire) damage = damage / 3; | |
1521 | + if(IS_OPPOSE_FIRE()) damage = damage / 3; | |
1522 | + if(p_ptr->levitation) damage = damage / 5; | |
1526 | 1523 | |
1527 | 1524 | damage = damage / 100 + (randint0(100) < (damage % 100)); |
1528 | 1525 |
@@ -1595,11 +1592,9 @@ static void process_world_aux_hp_and_sp(void) | ||
1595 | 1592 | */ |
1596 | 1593 | if (!have_flag(f_ptr->flags, FF_MOVE) && !have_flag(f_ptr->flags, FF_CAN_FLY)) |
1597 | 1594 | { |
1598 | - if (!IS_INVULN() && !p_ptr->wraith_form && !p_ptr->kabenuke && | |
1599 | - ((p_ptr->chp > (p_ptr->lev / 5)) || !p_ptr->pass_wall)) | |
1595 | + if (!IS_INVULN() && !p_ptr->wraith_form && !p_ptr->kabenuke && ((p_ptr->chp > (p_ptr->lev / 5)) || !p_ptr->pass_wall)) | |
1600 | 1596 | { |
1601 | 1597 | cptr dam_desc; |
1602 | - | |
1603 | 1598 | cave_no_regen = TRUE; |
1604 | 1599 | |
1605 | 1600 | if (p_ptr->pass_wall) |
@@ -2077,13 +2072,11 @@ static void process_world_aux_mutation(void) | ||
2077 | 2072 | /* No effect on the global map */ |
2078 | 2073 | if (p_ptr->wild_mode) return; |
2079 | 2074 | |
2080 | - | |
2081 | 2075 | if ((p_ptr->muta2 & MUT2_BERS_RAGE) && one_in_(3000)) |
2082 | 2076 | { |
2083 | 2077 | disturb(0, 1); |
2084 | 2078 | msg_print(_("ウガァァア!", "RAAAAGHH!")); |
2085 | 2079 | msg_print(_("激怒の発作に襲われた!", "You feel a fit of rage coming over you!")); |
2086 | - | |
2087 | 2080 | (void)set_shero(10 + randint1(p_ptr->lev), FALSE); |
2088 | 2081 | (void)set_afraid(0); |
2089 | 2082 | } |
@@ -2100,12 +2093,9 @@ static void process_world_aux_mutation(void) | ||
2100 | 2093 | |
2101 | 2094 | if ((p_ptr->muta2 & MUT2_RTELEPORT) && (randint1(5000) == 88)) |
2102 | 2095 | { |
2103 | - if (!p_ptr->resist_nexus && !(p_ptr->muta1 & MUT1_VTELEPORT) && | |
2104 | - !p_ptr->anti_tele) | |
2096 | + if (!p_ptr->resist_nexus && !(p_ptr->muta1 & MUT1_VTELEPORT) && !p_ptr->anti_tele) | |
2105 | 2097 | { |
2106 | 2098 | disturb(0, 1); |
2107 | - | |
2108 | - /* Teleport player */ | |
2109 | 2099 | msg_print(_("あなたの位置は突然ひじょうに不確定になった...", "Your position suddenly seems very uncertain...")); |
2110 | 2100 | msg_print(NULL); |
2111 | 2101 | teleport_player(40, TELEPORT_PASSIVE); |
@@ -2162,9 +2152,7 @@ static void process_world_aux_mutation(void) | ||
2162 | 2152 | if ((p_ptr->muta2 & MUT2_FLATULENT) && (randint1(3000) == 13)) |
2163 | 2153 | { |
2164 | 2154 | disturb(0, 1); |
2165 | - | |
2166 | 2155 | msg_print(_("ブゥーーッ!おっと。", "BRRAAAP! Oops.")); |
2167 | - | |
2168 | 2156 | msg_print(NULL); |
2169 | 2157 | fire_ball(GF_POIS, 0, p_ptr->lev, 3); |
2170 | 2158 | } |
@@ -2183,8 +2171,7 @@ static void process_world_aux_mutation(void) | ||
2183 | 2171 | fire_ball(GF_MANA, dire, p_ptr->lev * 2, 3); |
2184 | 2172 | } |
2185 | 2173 | |
2186 | - if ((p_ptr->muta2 & MUT2_ATT_DEMON) && | |
2187 | - !p_ptr->anti_magic && (randint1(6666) == 666)) | |
2174 | + if ((p_ptr->muta2 & MUT2_ATT_DEMON) && !p_ptr->anti_magic && (randint1(6666) == 666)) | |
2188 | 2175 | { |
2189 | 2176 | bool pet = one_in_(6); |
2190 | 2177 | BIT_FLAGS mode = PM_ALLOW_GROUP; |
@@ -2192,8 +2179,7 @@ static void process_world_aux_mutation(void) | ||
2192 | 2179 | if (pet) mode |= PM_FORCE_PET; |
2193 | 2180 | else mode |= (PM_ALLOW_UNIQUE | PM_NO_PET); |
2194 | 2181 | |
2195 | - if (summon_specific((pet ? -1 : 0), p_ptr->y, p_ptr->x, | |
2196 | - dun_level, SUMMON_DEMON, mode)) | |
2182 | + if (summon_specific((pet ? -1 : 0), p_ptr->y, p_ptr->x, dun_level, SUMMON_DEMON, mode)) | |
2197 | 2183 | { |
2198 | 2184 | msg_print(_("あなたはデーモンを引き寄せた!", "You have attracted a demon!")); |
2199 | 2185 | disturb(0, 1); |
@@ -2336,7 +2322,7 @@ static void process_world_aux_mutation(void) | ||
2336 | 2322 | } |
2337 | 2323 | if ((p_ptr->muta2 & MUT2_WASTING) && one_in_(3000)) |
2338 | 2324 | { |
2339 | - int which_stat = randint0(6); | |
2325 | + int which_stat = randint0(A_MAX); | |
2340 | 2326 | int sustained = FALSE; |
2341 | 2327 | |
2342 | 2328 | switch (which_stat) |
@@ -2592,12 +2578,11 @@ static void process_world_aux_curse(void) | ||
2592 | 2578 | (void)activate_ty_curse(FALSE, &count); |
2593 | 2579 | } |
2594 | 2580 | /* Handle experience draining */ |
2595 | - if (p_ptr->prace != RACE_ANDROID && | |
2596 | - ((p_ptr->cursed & TRC_DRAIN_EXP) && one_in_(4))) | |
2581 | + if (p_ptr->prace != RACE_ANDROID && ((p_ptr->cursed & TRC_DRAIN_EXP) && one_in_(4))) | |
2597 | 2582 | { |
2598 | - p_ptr->exp -= (p_ptr->lev+1)/2; | |
2583 | + p_ptr->exp -= (p_ptr->lev + 1) / 2; | |
2599 | 2584 | if (p_ptr->exp < 0) p_ptr->exp = 0; |
2600 | - p_ptr->max_exp -= (p_ptr->lev+1)/2; | |
2585 | + p_ptr->max_exp -= (p_ptr->lev + 1) / 2; | |
2601 | 2586 | if (p_ptr->max_exp < 0) p_ptr->max_exp = 0; |
2602 | 2587 | check_experience(); |
2603 | 2588 | } |
@@ -4843,9 +4828,9 @@ static void process_player(void) | ||
4843 | 4828 | msg_print(NULL); |
4844 | 4829 | if (r_idx && one_in_(2)) |
4845 | 4830 | { |
4846 | - int y, x; | |
4847 | - y = p_ptr->y+ddy[tsuri_dir]; | |
4848 | - x = p_ptr->x+ddx[tsuri_dir]; | |
4831 | + POSITION y, x; | |
4832 | + y = p_ptr->y + ddy[tsuri_dir]; | |
4833 | + x = p_ptr->x + ddx[tsuri_dir]; | |
4849 | 4834 | if (place_monster_aux(0, y, x, r_idx, PM_NO_KAGE)) |
4850 | 4835 | { |
4851 | 4836 | char m_name[80]; |
@@ -4874,8 +4859,7 @@ static void process_player(void) | ||
4874 | 4859 | /* Check for a key */ |
4875 | 4860 | if (inkey()) |
4876 | 4861 | { |
4877 | - /* Flush input */ | |
4878 | - flush(); | |
4862 | + flush(); /* Flush input */ | |
4879 | 4863 | |
4880 | 4864 | /* Disturb */ |
4881 | 4865 | disturb(0, 1); |
@@ -4938,7 +4922,7 @@ static void process_player(void) | ||
4938 | 4922 | if (MON_MONFEAR(m_ptr)) |
4939 | 4923 | { |
4940 | 4924 | /* Hack -- Recover from fear */ |
4941 | - if (set_monster_monfear(p_ptr->riding, | |
4925 | + if(set_monster_monfear(p_ptr->riding, | |
4942 | 4926 | (randint0(r_ptr->level) < p_ptr->skill_exp[GINOU_RIDING]) ? 0 : (MON_MONFEAR(m_ptr) - 1))) |
4943 | 4927 | { |
4944 | 4928 | char m_name[80]; |
@@ -4964,10 +4948,7 @@ static void process_player(void) | ||
4964 | 4948 | } |
4965 | 4949 | if ((p_ptr->pclass == CLASS_FORCETRAINER) && P_PTR_KI) |
4966 | 4950 | { |
4967 | - if (P_PTR_KI < 40) | |
4968 | - { | |
4969 | - P_PTR_KI = 0; | |
4970 | - } | |
4951 | + if(P_PTR_KI < 40) P_PTR_KI = 0; | |
4971 | 4952 | else P_PTR_KI -= 40; |
4972 | 4953 | p_ptr->update |= (PU_BONUS); |
4973 | 4954 | } |
@@ -4978,7 +4959,6 @@ static void process_player(void) | ||
4978 | 4959 | |
4979 | 4960 | /* Convert the unit (1/2^16) to (1/2^32) */ |
4980 | 4961 | s64b_LSHIFT(cost, cost_frac, 16); |
4981 | - | |
4982 | 4962 | |
4983 | 4963 | if (s64b_cmp(p_ptr->csp, p_ptr->csp_frac, cost, cost_frac) < 0) |
4984 | 4964 | { |
@@ -5033,19 +5013,15 @@ static void process_player(void) | ||
5033 | 5013 | /* Refresh (optional) */ |
5034 | 5014 | if (fresh_before) Term_fresh(); |
5035 | 5015 | |
5036 | - | |
5037 | 5016 | /* Hack -- Pack Overflow */ |
5038 | 5017 | pack_overflow(); |
5039 | 5018 | |
5040 | - | |
5041 | 5019 | /* Hack -- cancel "lurking browse mode" */ |
5042 | 5020 | if (!command_new) command_see = FALSE; |
5043 | 5021 | |
5044 | - | |
5045 | 5022 | /* Assume free turn */ |
5046 | 5023 | p_ptr->energy_use = 0; |
5047 | 5024 | |
5048 | - | |
5049 | 5025 | if (p_ptr->inside_battle) |
5050 | 5026 | { |
5051 | 5027 | /* Place the cursor on the player */ |
@@ -5060,7 +5036,6 @@ static void process_player(void) | ||
5060 | 5036 | /* Paralyzed or Knocked Out */ |
5061 | 5037 | else if (p_ptr->paralyzed || (p_ptr->stun >= 100)) |
5062 | 5038 | { |
5063 | - /* Take a turn */ | |
5064 | 5039 | p_ptr->energy_use = 100; |
5065 | 5040 | } |
5066 | 5041 |
@@ -5079,14 +5054,12 @@ static void process_player(void) | ||
5079 | 5054 | p_ptr->redraw |= (PR_STATE); |
5080 | 5055 | } |
5081 | 5056 | |
5082 | - /* Take a turn */ | |
5083 | 5057 | p_ptr->energy_use = 100; |
5084 | 5058 | } |
5085 | 5059 | |
5086 | 5060 | /* Fishing */ |
5087 | 5061 | else if (p_ptr->action == ACTION_FISH) |
5088 | 5062 | { |
5089 | - /* Take a turn */ | |
5090 | 5063 | p_ptr->energy_use = 100; |
5091 | 5064 | } |
5092 | 5065 |
@@ -372,7 +372,6 @@ void do_cmd_hissatsu(void) | ||
372 | 372 | /* Cast the spell */ |
373 | 373 | if (!do_spell(REALM_HISSATSU, n, SPELL_CAST)) return; |
374 | 374 | |
375 | - /* Take a turn */ | |
376 | 375 | p_ptr->energy_use = 100; |
377 | 376 | |
378 | 377 | /* Use some mana */ |
@@ -479,7 +478,6 @@ void do_cmd_gain_hissatsu(void) | ||
479 | 478 | if (!gain) |
480 | 479 | msg_print(_("何も覚えられなかった。", "You were not able to learn any special attacks.")); |
481 | 480 | |
482 | - /* Take a turn */ | |
483 | 481 | else |
484 | 482 | p_ptr->energy_use = 100; |
485 | 483 |
@@ -1040,7 +1040,6 @@ bool do_cmd_mane(bool baigaesi) | ||
1040 | 1040 | p_ptr->mane_dam[j] = p_ptr->mane_dam[j+1]; |
1041 | 1041 | } |
1042 | 1042 | |
1043 | - /* Take a turn */ | |
1044 | 1043 | p_ptr->energy_use = 100; |
1045 | 1044 | |
1046 | 1045 | /* Window stuff */ |
@@ -2096,7 +2096,6 @@ void do_cmd_mind(void) | ||
2096 | 2096 | } |
2097 | 2097 | |
2098 | 2098 | |
2099 | - /* Take a turn */ | |
2100 | 2099 | p_ptr->energy_use = 100; |
2101 | 2100 | /* teleport from mirror costs small energy */ |
2102 | 2101 | if( on_mirror && p_ptr->pclass == CLASS_MIRROR_MASTER ) |
@@ -2742,7 +2742,6 @@ void process_monster(MONSTER_IDX m_idx) | ||
2742 | 2742 | /* Do not bash the door */ |
2743 | 2743 | may_bash = FALSE; |
2744 | 2744 | |
2745 | - /* Take a turn */ | |
2746 | 2745 | do_turn = TRUE; |
2747 | 2746 | } |
2748 | 2747 |
@@ -2758,7 +2757,6 @@ void process_monster(MONSTER_IDX m_idx) | ||
2758 | 2757 | /* Do not bash the door */ |
2759 | 2758 | may_bash = FALSE; |
2760 | 2759 | |
2761 | - /* Take a turn */ | |
2762 | 2760 | do_turn = TRUE; |
2763 | 2761 | } |
2764 | 2762 | } |
@@ -3026,7 +3024,6 @@ void process_monster(MONSTER_IDX m_idx) | ||
3026 | 3024 | /* Note changes to viewable region */ |
3027 | 3025 | do_view = TRUE; |
3028 | 3026 | |
3029 | - /* Take a turn */ | |
3030 | 3027 | do_turn = TRUE; |
3031 | 3028 | } |
3032 | 3029 |
@@ -3064,7 +3061,6 @@ void process_monster(MONSTER_IDX m_idx) | ||
3064 | 3061 | /* Creature has been allowed move */ |
3065 | 3062 | if (do_move) |
3066 | 3063 | { |
3067 | - /* Take a turn */ | |
3068 | 3064 | do_turn = TRUE; |
3069 | 3065 | |
3070 | 3066 | if (have_flag(f_ptr->flags, FF_TREE)) |
@@ -1590,7 +1590,6 @@ bool do_cmd_cast_learned(void) | ||
1590 | 1590 | } |
1591 | 1591 | } |
1592 | 1592 | |
1593 | - /* Take a turn */ | |
1594 | 1593 | p_ptr->energy_use = 100; |
1595 | 1594 | |
1596 | 1595 | /* Window stuff */ |
@@ -602,7 +602,6 @@ void do_cmd_snipe(void) | ||
602 | 602 | |
603 | 603 | if (!cast) return; |
604 | 604 | #if 0 |
605 | - /* Take a turn */ | |
606 | 605 | p_ptr->energy_use = 100; |
607 | 606 | #endif |
608 | 607 | /* Redraw mana */ |