• R/O
  • HTTP
  • SSH
  • HTTPS

hengband: Commit

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


Commit MetaInfo

Revision5b656be82b84ef073a36cdab1ae45ba3d90cb06f (tree)
Time2019-03-13 13:50:01
Authordeskull <deskull@user...>
Commiterdeskull

Log Message

[Refactor] #37353 take_turn() への移行途中。 / Refactoring to take_turn().

Change Summary

Incremental Difference

--- a/src/cmd-item.c
+++ b/src/cmd-item.c
@@ -548,12 +548,12 @@ void do_cmd_takeoff(void)
548548 else
549549 {
550550 msg_print(_("装備を外せなかった。", "You couldn't remove the equipment."));
551- p_ptr->energy_use = 50;
551+ take_turn(p_ptr, 50);
552552 return;
553553 }
554554 }
555555
556- p_ptr->energy_use = 50;
556+ take_turn(p_ptr, 50);
557557
558558 /* Take off the item */
559559 (void)inven_takeoff(item, 255);
@@ -600,7 +600,7 @@ void do_cmd_drop(void)
600600 if (amt <= 0) return;
601601 }
602602
603- p_ptr->energy_use = 50;
603+ take_turn(p_ptr, 50);
604604
605605 /* Drop (some of) the item */
606606 inven_drop(item, amt);
@@ -948,7 +948,7 @@ static void do_cmd_refill_lamp(void)
948948 o_ptr = choose_object(&item, q, s, (USE_INVEN | USE_FLOOR));
949949 if (!o_ptr) return;
950950
951- p_ptr->energy_use = 50;
951+ take_turn(p_ptr, 50);
952952
953953 /* Access the lantern */
954954 j_ptr = &inventory[INVEN_LITE];
@@ -1015,7 +1015,7 @@ static void do_cmd_refill_torch(void)
10151015 o_ptr = choose_object(&item, q, s, (USE_INVEN | USE_FLOOR));
10161016 if (!o_ptr) return;
10171017
1018- p_ptr->energy_use = 50;
1018+ take_turn(p_ptr, 50);
10191019
10201020 /* Access the primary torch */
10211021 j_ptr = &inventory[INVEN_LITE];
--- a/src/mind.c
+++ b/src/mind.c
@@ -1982,11 +1982,14 @@ void do_cmd_mind(void)
19821982 }
19831983
19841984
1985- take_turn(p_ptr, 100);
19861985 /* teleport from mirror costs small energy */
1987- if( on_mirror && p_ptr->pclass == CLASS_MIRROR_MASTER )
1986+ if(on_mirror && p_ptr->pclass == CLASS_MIRROR_MASTER)
19881987 {
1989- if( n==3 || n==5 || n==7 || n==16 ) p_ptr->energy_use = 50;
1988+ if( n==3 || n==5 || n==7 || n==16 ) take_turn(p_ptr, 50);
1989+ }
1990+ else
1991+ {
1992+ take_turn(p_ptr, 100);
19901993 }
19911994
19921995 if ((use_mind == MIND_BERSERKER) || (use_mind == MIND_NINJUTSU))
--- a/src/wild.c
+++ b/src/wild.c
@@ -1166,8 +1166,7 @@ bool change_wild_mode(void)
11661166 }
11671167 }
11681168
1169- /* HACK */
1170- p_ptr->energy_use = 1000;
1169+ take_turn(p_ptr, 1000);
11711170
11721171 /* Remember the position */
11731172 p_ptr->oldpx = p_ptr->x;
Show on old repository browser