}
load = FALSE;
- if (creature_ptr->lightspeed) {
- (void)set_lightspeed(creature_ptr, creature_ptr->lightspeed - 1, TRUE);
- }
+ if (creature_ptr->lightspeed)
+ set_lightspeed(creature_ptr, creature_ptr->lightspeed - 1, TRUE);
if ((creature_ptr->pclass == CLASS_FORCETRAINER) && get_current_ki(creature_ptr)) {
if (get_current_ki(creature_ptr) < 40)
#include "mind/mind-force-trainer.h"
#include "cmd-action/cmd-pet.h"
+#include "core/stuff-handler.h"
+#include "game-option/disturbance-options.h"
+#include "player/avatar.h"
+#include "player/player-move.h"
#include "view/display-messages.h"
/*!
creature_ptr->redraw |= (PR_MANA);
return TRUE;
}
+
+/*!
+ * @brief 光速移動の継続時間をセットする / Set "lightspeed", notice observable changes
+ * @param v 継続時間
+ * @param do_dec 現在の継続時間より長い値のみ上書きする
+ * @return なし
+ */
+void set_lightspeed(player_type *creature_ptr, TIME_EFFECT v, bool do_dec)
+{
+ bool notice = FALSE;
+ v = (v > 10000) ? 10000 : (v < 0) ? 0 : v;
+
+ if (creature_ptr->is_dead)
+ return;
+
+ if (creature_ptr->wild_mode)
+ v = 0;
+
+ if (v) {
+ if (creature_ptr->lightspeed && !do_dec) {
+ if (creature_ptr->lightspeed > v)
+ return;
+ } else if (!creature_ptr->lightspeed) {
+ msg_print(_("非常に素早く動けるようになった!", "You feel yourself moving extremely fast!"));
+ notice = TRUE;
+ chg_virtue(creature_ptr, V_PATIENCE, -1);
+ chg_virtue(creature_ptr, V_DILIGENCE, 1);
+ }
+ } else {
+ if (creature_ptr->lightspeed) {
+ msg_print(_("動きの素早さがなくなったようだ。", "You feel yourself slow down."));
+ notice = TRUE;
+ }
+ }
+
+ creature_ptr->lightspeed = v;
+
+ if (!notice)
+ return;
+
+ if (disturb_state)
+ disturb(creature_ptr, FALSE, FALSE);
+ creature_ptr->update |= (PU_BONUS);
+ handle_stuff(creature_ptr);
+}
MAGIC_NUM1 get_current_ki(player_type *caster_ptr);
void set_current_ki(player_type *caster_ptr, bool is_reset, MAGIC_NUM1 ki);
bool clear_mind(player_type *creature_ptr);
+void set_lightspeed(player_type *creature_ptr, TIME_EFFECT v, bool do_dec);
#include "io/save.h"
#include "locale/vowel-checker.h"
#include "mind/stances-table.h"
+#include "mind/mind-force-trainer.h"
#include "mind/mind-sniper.h"
#include "monster/monster-status.h"
#include "mutation/mutation.h"
void dispel_player(player_type *creature_ptr)
{
(void)set_fast(creature_ptr, 0, TRUE);
- (void)set_lightspeed(creature_ptr, 0, TRUE);
+ set_lightspeed(creature_ptr, 0, TRUE);
(void)set_slow(creature_ptr, 0, TRUE);
(void)set_shield(creature_ptr, 0, TRUE);
(void)set_blessed(creature_ptr, 0, TRUE);
}
/*!
- * @brief 光速移動の継続時間をセットする / Set "lightspeed", notice observable changes
- * @param v 継続時間
- * @param do_dec 現在の継続時間より長い値のみ上書きする
- * @return ステータスに影響を及ぼす変化があった場合TRUEを返す。
- */
-bool set_lightspeed(player_type *creature_ptr, TIME_EFFECT v, bool do_dec)
-{
- bool notice = FALSE;
- v = (v > 10000) ? 10000 : (v < 0) ? 0 : v;
-
- if (creature_ptr->is_dead)
- return FALSE;
-
- if (creature_ptr->wild_mode)
- v = 0;
-
- if (v) {
- if (creature_ptr->lightspeed && !do_dec) {
- if (creature_ptr->lightspeed > v)
- return FALSE;
- } else if (!creature_ptr->lightspeed) {
- msg_print(_("非常に素早く動けるようになった!", "You feel yourself moving extremely fast!"));
- notice = TRUE;
- chg_virtue(creature_ptr, V_PATIENCE, -1);
- chg_virtue(creature_ptr, V_DILIGENCE, 1);
- }
- } else {
- if (creature_ptr->lightspeed) {
- msg_print(_("動きの素早さがなくなったようだ。", "You feel yourself slow down."));
- notice = TRUE;
- }
- }
-
- creature_ptr->lightspeed = v;
-
- if (!notice)
- return FALSE;
-
- if (disturb_state)
- disturb(creature_ptr, FALSE, FALSE);
- creature_ptr->update |= (PU_BONUS);
- handle_stuff(creature_ptr);
- return TRUE;
-}
-
-/*!
* @brief 肌石化の継続時間をセットする / Set "shield", notice observable changes
* @param v 継続時間
* @param do_dec 現在の継続時間より長い値のみ上書きする
bool set_tim_infra(player_type *creature_ptr, TIME_EFFECT v, bool do_dec);
bool set_tim_regen(player_type *creature_ptr, TIME_EFFECT v, bool do_dec);
bool set_tim_stealth(player_type *creature_ptr, TIME_EFFECT v, bool do_dec);
-bool set_lightspeed(player_type *creature_ptr, TIME_EFFECT v, bool do_dec);
bool set_tim_levitation(player_type *creature_ptr, TIME_EFFECT v, bool do_dec);
bool set_tim_sh_touki(player_type *creature_ptr, TIME_EFFECT v, bool do_dec);
bool set_tim_sh_fire(player_type *creature_ptr, TIME_EFFECT v, bool do_dec);