*/
#include "angband.h"
+#include "mutation.h"
+#include "quest.h"
+#include "avatar.h"
+#include "player-status.h"
+#include "spells-status.h"
+#include "realm-hex.h"
+#include "object-hook.h"
+#include "wild.h"
+#include "spells-floor.h"
+#include "player-move.h"
/*!
* @brief プレイヤーの継続行動を設定する。
}
case ACTION_REST:
{
- resting = 0;
+ p_ptr->resting = 0;
break;
}
case ACTION_LEARN:
case ACTION_HAYAGAKE:
{
msg_print(_("足が重くなった。", "You are no longer walking extremely fast."));
- p_ptr->energy_use = 100;
+ take_turn(p_ptr, 100);
break;
}
case ACTION_SPELL:
p_ptr->action = typ;
/* If we are requested other action, stop singing */
- if (prev_typ == ACTION_SING) stop_singing();
+ if (prev_typ == ACTION_SING) stop_singing(p_ptr);
if (prev_typ == ACTION_SPELL) stop_hex_spell();
switch (p_ptr->action)
p_ptr->special_defense = 0L;
while(p_ptr->energy_need < 0) p_ptr->energy_need += ENERGY_NEED();
- world_player = FALSE;
+ p_ptr->timewalk = FALSE;
if (prace_is_(RACE_DEMON) && (p_ptr->lev > 44)) p_ptr->oppose_fire = 1;
if ((p_ptr->pclass == CLASS_NINJA) && (p_ptr->lev > 44)) p_ptr->oppose_pois = 1;
bool set_mimic(TIME_EFFECT v, IDX p, bool do_dec)
{
bool notice = FALSE;
-
- /* Hack -- Force good values */
v = (v > 10000) ? 10000 : (v < 0) ? 0 : v;
if (p_ptr->is_dead) return FALSE;
p_ptr->tim_mimic = v;
/* Nothing to notice */
- if (!notice)
- return (FALSE);
+ if (!notice) return (FALSE);
if (disturb_state) disturb(FALSE, TRUE);
- /* Redraw title */
p_ptr->redraw |= (PR_BASIC | PR_STATUS);
p_ptr->update |= (PU_BONUS | PU_HP);
bool set_blind(TIME_EFFECT v)
{
bool notice = FALSE;
-
- /* Hack -- Force good values */
v = (v > 10000) ? 10000 : (v < 0) ? 0 : v;
if (p_ptr->is_dead) return FALSE;
/* Use the value */
p_ptr->blind = v;
-
- /* Redraw status bar */
p_ptr->redraw |= (PR_STATUS);
/* Nothing to notice */
if (!notice) return (FALSE);
-
if (disturb_state) disturb(FALSE, FALSE);
/* Fully update the visuals */
p_ptr->update |= (PU_UN_VIEW | PU_UN_LITE | PU_VIEW | PU_LITE | PU_MONSTERS | PU_MON_LITE);
-
p_ptr->redraw |= (PR_MAP);
-
p_ptr->window |= (PW_OVERHEAD | PW_DUNGEON);
handle_stuff();
return (TRUE);
bool set_confused(TIME_EFFECT v)
{
bool notice = FALSE;
-
- /* Hack -- Force good values */
v = (v > 10000) ? 10000 : (v < 0) ? 0 : v;
if (p_ptr->is_dead) return FALSE;
/* Use the value */
p_ptr->confused = v;
-
- /* Redraw status bar */
p_ptr->redraw |= (PR_STATUS);
/* Nothing to notice */
bool set_poisoned(TIME_EFFECT v)
{
bool notice = FALSE;
-
- /* Hack -- Force good values */
v = (v > 10000) ? 10000 : (v < 0) ? 0 : v;
if (p_ptr->is_dead) return FALSE;
/* Use the value */
p_ptr->poisoned = v;
-
- /* Redraw status bar */
p_ptr->redraw |= (PR_STATUS);
/* Nothing to notice */
bool set_afraid(TIME_EFFECT v)
{
bool notice = FALSE;
-
- /* Hack -- Force good values */
v = (v > 10000) ? 10000 : (v < 0) ? 0 : v;
if (p_ptr->is_dead) return FALSE;
/* Use the value */
p_ptr->afraid = v;
-
- /* Redraw status bar */
p_ptr->redraw |= (PR_STATUS);
/* Nothing to notice */
bool set_paralyzed(TIME_EFFECT v)
{
bool notice = FALSE;
-
- /* Hack -- Force good values */
v = (v > 10000) ? 10000 : (v < 0) ? 0 : v;
if (p_ptr->is_dead) return FALSE;
/* Use the value */
p_ptr->paralyzed = v;
-
- /* Redraw status bar */
p_ptr->redraw |= (PR_STATUS);
/* Nothing to notice */
bool set_image(TIME_EFFECT v)
{
bool notice = FALSE;
-
- /* Hack -- Force good values */
v = (v > 10000) ? 10000 : (v < 0) ? 0 : v;
if (p_ptr->is_dead) return FALSE;
+ if (p_ptr->pseikaku == SEIKAKU_CHARGEMAN) v = 0;
/* Open */
/* Use the value */
p_ptr->image = v;
-
- /* Redraw status bar */
p_ptr->redraw |= (PR_STATUS);
/* Nothing to notice */
if (disturb_state) disturb(FALSE, TRUE);
- p_ptr->redraw |= (PR_MAP);
-
- /* Update the health bar */
- p_ptr->redraw |= (PR_HEALTH | PR_UHEALTH);
+ p_ptr->redraw |= (PR_MAP | PR_HEALTH | PR_UHEALTH);
p_ptr->update |= (PU_MONSTERS);
-
p_ptr->window |= (PW_OVERHEAD | PW_DUNGEON);
handle_stuff();
return (TRUE);
bool set_fast(TIME_EFFECT v, bool do_dec)
{
bool notice = FALSE;
-
- /* Hack -- Force good values */
v = (v > 10000) ? 10000 : (v < 0) ? 0 : v;
if (p_ptr->is_dead) return FALSE;
bool set_lightspeed(TIME_EFFECT v, bool do_dec)
{
bool notice = FALSE;
-
- /* Hack -- Force good values */
v = (v > 10000) ? 10000 : (v < 0) ? 0 : v;
if (p_ptr->is_dead) return FALSE;
bool set_slow(TIME_EFFECT v, bool do_dec)
{
bool notice = FALSE;
-
- /* Hack -- Force good values */
v = (v > 10000) ? 10000 : (v < 0) ? 0 : v;
if (p_ptr->is_dead) return FALSE;
bool set_shield(TIME_EFFECT v, bool do_dec)
{
bool notice = FALSE;
-
- /* Hack -- Force good values */
v = (v > 10000) ? 10000 : (v < 0) ? 0 : v;
if (p_ptr->is_dead) return FALSE;
/* Use the value */
p_ptr->shield = v;
-
- /* Redraw status bar */
p_ptr->redraw |= (PR_STATUS);
/* Nothing to notice */
bool set_tsubureru(TIME_EFFECT v, bool do_dec)
{
bool notice = FALSE;
-
- /* Hack -- Force good values */
v = (v > 10000) ? 10000 : (v < 0) ? 0 : v;
if (p_ptr->is_dead) return FALSE;
/* Use the value */
p_ptr->tsubureru = v;
-
- /* Redraw status bar */
p_ptr->redraw |= (PR_STATUS);
/* Nothing to notice */
bool set_magicdef(TIME_EFFECT v, bool do_dec)
{
bool notice = FALSE;
-
- /* Hack -- Force good values */
v = (v > 10000) ? 10000 : (v < 0) ? 0 : v;
if (p_ptr->is_dead) return FALSE;
/* Use the value */
p_ptr->magicdef = v;
-
- /* Redraw status bar */
p_ptr->redraw |= (PR_STATUS);
/* Nothing to notice */
bool set_blessed(TIME_EFFECT v, bool do_dec)
{
bool notice = FALSE;
-
- /* Hack -- Force good values */
v = (v > 10000) ? 10000 : (v < 0) ? 0 : v;
if (p_ptr->is_dead) return FALSE;
/* Use the value */
p_ptr->blessed = v;
-
- /* Redraw status bar */
p_ptr->redraw |= (PR_STATUS);
/* Nothing to notice */
bool set_hero(TIME_EFFECT v, bool do_dec)
{
bool notice = FALSE;
-
- /* Hack -- Force good values */
v = (v > 10000) ? 10000 : (v < 0) ? 0 : v;
if (p_ptr->is_dead) return FALSE;
/* Use the value */
p_ptr->hero = v;
-
- /* Redraw status bar */
p_ptr->redraw |= (PR_STATUS);
/* Nothing to notice */
bool set_shero(TIME_EFFECT v, bool do_dec)
{
bool notice = FALSE;
-
- /* Hack -- Force good values */
v = (v > 10000) ? 10000 : (v < 0) ? 0 : v;
if (p_ptr->is_dead) return FALSE;
/* Use the value */
p_ptr->shero = v;
-
- /* Redraw status bar */
p_ptr->redraw |= (PR_STATUS);
/* Nothing to notice */
bool set_protevil(TIME_EFFECT v, bool do_dec)
{
bool notice = FALSE;
-
- /* Hack -- Force good values */
v = (v > 10000) ? 10000 : (v < 0) ? 0 : v;
if (p_ptr->is_dead) return FALSE;
/* Use the value */
p_ptr->protevil = v;
-
- /* Redraw status bar */
p_ptr->redraw |= (PR_STATUS);
/* Nothing to notice */
bool set_wraith_form(TIME_EFFECT v, bool do_dec)
{
bool notice = FALSE;
-
- /* Hack -- Force good values */
v = (v > 10000) ? 10000 : (v < 0) ? 0 : v;
if (p_ptr->is_dead) return FALSE;
}
else if (!p_ptr->wraith_form)
{
- msg_print(_("物質界を離れて幽鬼のような存在になった!", "You leave the physical world and turn into a wraith-being!"));
+ msg_print(_("物質界を離れて幽鬼のような存在になった!", "You leave the physical world and current_world_ptr->game_turn into a wraith-being!"));
notice = TRUE;
chg_virtue(V_UNLIFE, 3);
chg_virtue(V_HONOUR, -2);
/* Use the value */
p_ptr->wraith_form = v;
-
- /* Redraw status bar */
p_ptr->redraw |= (PR_STATUS);
/* Nothing to notice */
bool set_invuln(TIME_EFFECT v, bool do_dec)
{
bool notice = FALSE;
-
- /* Hack -- Force good values */
v = (v > 10000) ? 10000 : (v < 0) ? 0 : v;
if (p_ptr->is_dead) return FALSE;
/* Use the value */
p_ptr->invuln = v;
-
- /* Redraw status bar */
p_ptr->redraw |= (PR_STATUS);
/* Nothing to notice */
bool set_tim_esp(TIME_EFFECT v, bool do_dec)
{
bool notice = FALSE;
-
- /* Hack -- Force good values */
v = (v > 10000) ? 10000 : (v < 0) ? 0 : v;
if (p_ptr->is_dead) return FALSE;
/* Use the value */
p_ptr->tim_esp = v;
-
- /* Redraw status bar */
p_ptr->redraw |= (PR_STATUS);
/* Nothing to notice */
bool set_tim_invis(TIME_EFFECT v, bool do_dec)
{
bool notice = FALSE;
-
- /* Hack -- Force good values */
v = (v > 10000) ? 10000 : (v < 0) ? 0 : v;
if (p_ptr->is_dead) return FALSE;
/* Use the value */
p_ptr->tim_invis = v;
-
- /* Redraw status bar */
p_ptr->redraw |= (PR_STATUS);
/* Nothing to notice */
bool set_tim_infra(TIME_EFFECT v, bool do_dec)
{
bool notice = FALSE;
-
- /* Hack -- Force good values */
v = (v > 10000) ? 10000 : (v < 0) ? 0 : v;
if (p_ptr->is_dead) return FALSE;
/* Use the value */
p_ptr->tim_infra = v;
-
- /* Redraw status bar */
p_ptr->redraw |= (PR_STATUS);
/* Nothing to notice */
bool set_tim_regen(TIME_EFFECT v, bool do_dec)
{
bool notice = FALSE;
-
- /* Hack -- Force good values */
v = (v > 10000) ? 10000 : (v < 0) ? 0 : v;
if (p_ptr->is_dead) return FALSE;
/* Use the value */
p_ptr->tim_regen = v;
-
- /* Redraw status bar */
p_ptr->redraw |= (PR_STATUS);
/* Nothing to notice */
bool set_tim_stealth(TIME_EFFECT v, bool do_dec)
{
bool notice = FALSE;
-
- /* Hack -- Force good values */
v = (v > 10000) ? 10000 : (v < 0) ? 0 : v;
if (p_ptr->is_dead) return FALSE;
/* Use the value */
p_ptr->tim_stealth = v;
-
- /* Redraw status bar */
p_ptr->redraw |= (PR_STATUS);
/* Nothing to notice */
{
if (!(p_ptr->special_defense & NINJA_S_STEALTH))
{
- if (cave[p_ptr->y][p_ptr->x].info & CAVE_MNLT)
+ if (current_floor_ptr->grid_array[p_ptr->y][p_ptr->x].info & CAVE_MNLT)
{
msg_print(_("敵の目から薄い影の中に覆い隠された。", "You are mantled in weak shadow from ordinary eyes."));
p_ptr->monlite = p_ptr->old_monlite = TRUE;
/* Nothing to notice */
if (!notice) return (FALSE);
-
- /* Redraw status bar */
p_ptr->redraw |= (PR_STATUS);
if (disturb_state) disturb(FALSE, FALSE);
bool set_tim_levitation(TIME_EFFECT v, bool do_dec)
{
bool notice = FALSE;
-
- /* Hack -- Force good values */
v = (v > 10000) ? 10000 : (v < 0) ? 0 : v;
if (p_ptr->is_dead) return FALSE;
/* Use the value */
p_ptr->tim_levitation = v;
-
- /* Redraw status bar */
p_ptr->redraw |= (PR_STATUS);
/* Nothing to notice */
bool set_tim_sh_touki(TIME_EFFECT v, bool do_dec)
{
bool notice = FALSE;
-
- /* Hack -- Force good values */
v = (v > 10000) ? 10000 : (v < 0) ? 0 : v;
if (p_ptr->is_dead) return FALSE;
/* Use the value */
p_ptr->tim_sh_touki = v;
-
- /* Redraw status bar */
p_ptr->redraw |= (PR_STATUS);
/* Nothing to notice */
bool set_tim_sh_fire(TIME_EFFECT v, bool do_dec)
{
bool notice = FALSE;
-
- /* Hack -- Force good values */
v = (v > 10000) ? 10000 : (v < 0) ? 0 : v;
if (p_ptr->is_dead) return FALSE;
/* Use the value */
p_ptr->tim_sh_fire = v;
-
- /* Redraw status bar */
p_ptr->redraw |= (PR_STATUS);
/* Nothing to notice */
bool set_tim_sh_holy(TIME_EFFECT v, bool do_dec)
{
bool notice = FALSE;
-
- /* Hack -- Force good values */
v = (v > 10000) ? 10000 : (v < 0) ? 0 : v;
if (p_ptr->is_dead) return FALSE;
/* Use the value */
p_ptr->tim_sh_holy = v;
-
- /* Redraw status bar */
p_ptr->redraw |= (PR_STATUS);
/* Nothing to notice */
bool set_tim_eyeeye(TIME_EFFECT v, bool do_dec)
{
bool notice = FALSE;
-
- /* Hack -- Force good values */
v = (v > 10000) ? 10000 : (v < 0) ? 0 : v;
if (p_ptr->is_dead) return FALSE;
/* Use the value */
p_ptr->tim_eyeeye = v;
-
- /* Redraw status bar */
p_ptr->redraw |= (PR_STATUS);
/* Nothing to notice */
bool set_resist_magic(TIME_EFFECT v, bool do_dec)
{
bool notice = FALSE;
-
- /* Hack -- Force good values */
v = (v > 10000) ? 10000 : (v < 0) ? 0 : v;
if (p_ptr->is_dead) return FALSE;
/* Use the value */
p_ptr->resist_magic = v;
-
- /* Redraw status bar */
p_ptr->redraw |= (PR_STATUS);
/* Nothing to notice */
bool set_tim_reflect(TIME_EFFECT v, bool do_dec)
{
bool notice = FALSE;
-
- /* Hack -- Force good values */
v = (v > 10000) ? 10000 : (v < 0) ? 0 : v;
if (p_ptr->is_dead) return FALSE;
/* Use the value */
p_ptr->tim_reflect = v;
-
- /* Redraw status bar */
p_ptr->redraw |= (PR_STATUS);
/* Nothing to notice */
bool set_multishadow(TIME_EFFECT v, bool do_dec)
{
bool notice = FALSE;
-
- /* Hack -- Force good values */
v = (v > 10000) ? 10000 : (v < 0) ? 0 : v;
if (p_ptr->is_dead) return FALSE;
/* Use the value */
p_ptr->multishadow = v;
-
- /* Redraw status bar */
p_ptr->redraw |= (PR_STATUS);
/* Nothing to notice */
bool set_dustrobe(TIME_EFFECT v, bool do_dec)
{
bool notice = FALSE;
-
- /* Hack -- Force good values */
v = (v > 10000) ? 10000 : (v < 0) ? 0 : v;
if (p_ptr->is_dead) return FALSE;
/* Use the value */
p_ptr->dustrobe = v;
-
- /* Redraw status bar */
p_ptr->redraw |= (PR_STATUS);
/* Nothing to notice */
bool set_kabenuke(TIME_EFFECT v, bool do_dec)
{
bool notice = FALSE;
-
- /* Hack -- Force good values */
v = (v > 10000) ? 10000 : (v < 0) ? 0 : v;
if (p_ptr->is_dead) return FALSE;
/* Use the value */
p_ptr->kabenuke = v;
-
- /* Redraw status bar */
p_ptr->redraw |= (PR_STATUS);
/* Nothing to notice */
bool set_tsuyoshi(TIME_EFFECT v, bool do_dec)
{
bool notice = FALSE;
-
- /* Hack -- Force good values */
v = (v > 10000) ? 10000 : (v < 0) ? 0 : v;
if (p_ptr->is_dead) return FALSE;
/* Use the value */
p_ptr->tsuyoshi = v;
-
- /* Redraw status bar */
p_ptr->redraw |= (PR_STATUS);
/* Nothing to notice */
*/
bool set_ele_attack(u32b attack_type, TIME_EFFECT v)
{
- /* Hack -- Force good values */
v = (v > 10000) ? 10000 : (v < 0) ? 0 : v;
/* Clear all elemental attacks (only one is allowed at a time). */
/* Set duration. */
p_ptr->ele_attack = v;
- /* Message. */
#ifdef JP
msg_format("%sで攻撃できるようになった!",
((attack_type == ATTACK_ACID) ? "酸" :
}
if (disturb_state) disturb(FALSE, FALSE);
-
- /* Redraw status bar */
p_ptr->redraw |= (PR_STATUS);
p_ptr->update |= (PU_BONUS);
*/
bool set_ele_immune(u32b immune_type, TIME_EFFECT v)
{
- /* Hack -- Force good values */
v = (v > 10000) ? 10000 : (v < 0) ? 0 : v;
/* Clear all elemental attacks (only one is allowed at a time). */
/* Set duration. */
p_ptr->ele_immune = v;
- /* Message. */
-#ifdef JP
- msg_format("%sの攻撃を受けつけなくなった!",
- ((immune_type == DEFENSE_ACID) ? "酸" :
- ((immune_type == DEFENSE_ELEC) ? "電撃" :
- ((immune_type == DEFENSE_FIRE) ? "火炎" :
- ((immune_type == DEFENSE_COLD) ? "冷気" :
- ((immune_type == DEFENSE_POIS) ? "毒" :
- "(なし)"))))));
-#else
- msg_format("For a while, You are immune to %s",
- ((immune_type == DEFENSE_ACID) ? "acid!" :
- ((immune_type == DEFENSE_ELEC) ? "electricity!" :
- ((immune_type == DEFENSE_FIRE) ? "fire!" :
- ((immune_type == DEFENSE_COLD) ? "cold!" :
- ((immune_type == DEFENSE_POIS) ? "poison!" :
- "do nothing special."))))));
-#endif
+ msg_format(_("%sの攻撃を受けつけなくなった!", "For a while, You are immune to %s"),
+ ((immune_type == DEFENSE_ACID) ? _("酸", "acid!") :
+ ((immune_type == DEFENSE_ELEC) ? _("電撃", "electricity!") :
+ ((immune_type == DEFENSE_FIRE) ? _("火炎", "fire!") :
+ ((immune_type == DEFENSE_COLD) ? _("冷気", "cold!") :
+ ((immune_type == DEFENSE_POIS) ? _("毒", "poison!") :
+ _("(なし)", "do nothing special.")))))));
}
if (disturb_state) disturb(FALSE, FALSE);
-
- /* Redraw status bar */
p_ptr->redraw |= (PR_STATUS);
-
p_ptr->update |= (PU_BONUS);
handle_stuff();
bool set_oppose_acid(TIME_EFFECT v, bool do_dec)
{
bool notice = FALSE;
-
- /* Hack -- Force good values */
v = (v > 10000) ? 10000 : (v < 0) ? 0 : v;
if (p_ptr->is_dead) return FALSE;
/* Nothing to notice */
if (!notice) return (FALSE);
-
- /* Redraw status bar */
p_ptr->redraw |= (PR_STATUS);
if (disturb_state) disturb(FALSE, FALSE);
bool set_oppose_elec(TIME_EFFECT v, bool do_dec)
{
bool notice = FALSE;
-
- /* Hack -- Force good values */
v = (v > 10000) ? 10000 : (v < 0) ? 0 : v;
if (p_ptr->is_dead) return FALSE;
/* Nothing to notice */
if (!notice) return (FALSE);
-
- /* Redraw status bar */
p_ptr->redraw |= (PR_STATUS);
if (disturb_state) disturb(FALSE, FALSE);
bool set_oppose_fire(TIME_EFFECT v, bool do_dec)
{
bool notice = FALSE;
-
- /* Hack -- Force good values */
v = (v > 10000) ? 10000 : (v < 0) ? 0 : v;
if (p_ptr->is_dead) return FALSE;
/* Nothing to notice */
if (!notice) return (FALSE);
-
- /* Redraw status bar */
p_ptr->redraw |= (PR_STATUS);
if (disturb_state) disturb(FALSE, FALSE);
bool set_oppose_cold(TIME_EFFECT v, bool do_dec)
{
bool notice = FALSE;
-
- /* Hack -- Force good values */
v = (v > 10000) ? 10000 : (v < 0) ? 0 : v;
if (p_ptr->is_dead) return FALSE;
/* Nothing to notice */
if (!notice) return (FALSE);
-
- /* Redraw status bar */
p_ptr->redraw |= (PR_STATUS);
if (disturb_state) disturb(FALSE, FALSE);
bool set_oppose_pois(TIME_EFFECT v, bool do_dec)
{
bool notice = FALSE;
-
- /* Hack -- Force good values */
v = (v > 10000) ? 10000 : (v < 0) ? 0 : v;
if ((p_ptr->pclass == CLASS_NINJA) && (p_ptr->lev > 44)) v = 1;
/* Nothing to notice */
if (!notice) return (FALSE);
-
- /* Redraw status bar */
p_ptr->redraw |= (PR_STATUS);
if (disturb_state) disturb(FALSE, FALSE);
{
int old_aux, new_aux;
bool notice = FALSE;
-
-
- /* Hack -- Force good values */
v = (v > 10000) ? 10000 : (v < 0) ? 0 : v;
if (p_ptr->is_dead) return FALSE;
-
if (prace_is_(RACE_GOLEM) || ((p_ptr->pclass == CLASS_BERSERKER) && (p_ptr->lev > 34))) v = 0;
/* Knocked out */
{
int old_aux, new_aux;
bool notice = FALSE;
-
- /* Hack -- Force good values */
v = (v > 10000) ? 10000 : (v < 0) ? 0 : v;
if (p_ptr->is_dead) return FALSE;
int old_aux, new_aux;
bool notice = FALSE;
-
- /* Hack -- Force good values */
v = (v > 20000) ? 20000 : (v < 0) ? 0 : v;
/* Fainting / Starving */
{
/* Approximate gain value */
gain = (((p_ptr->stat_max_max[stat]) - value) / 2 + 3) / 2;
-
- /* Paranoia */
if (gain < 1) gain = 1;
/* Apply the bonus */
/* and one-half of the stat bonus times the percentage, with a */
/* minimum damage of half the percentage. -CWS */
loss = (((cur-18) / 2 + 1) / 2 + 1);
-
- /* Paranoia */
if (loss < 1) loss = 1;
/* Randomize the loss */
p_ptr->stat_cur[stat] = cur;
p_ptr->stat_max[stat] = max;
- /* Redisplay the stats later */
p_ptr->redraw |= (PR_STATS);
p_ptr->update |= (PU_BONUS);
}
/* Restore if needed */
if (p_ptr->stat_cur[stat] != p_ptr->stat_max[stat])
{
- /* Restore */
p_ptr->stat_cur[stat] = p_ptr->stat_max[stat];
p_ptr->update |= (PU_BONUS);
-
- /* Redisplay the stats later */
p_ptr->redraw |= (PR_STATS);
/* Success */
o_ptr->ident &= ~(IDENT_SENSE);
}
p_ptr->update |= (PU_BONUS);
-
- /* Combine / Reorder the pack (later) */
p_ptr->update |= (PU_COMBINE | PU_REORDER);
p_ptr->window |= (PW_INVEN | PW_EQUIP | PW_PLAYER);
#ifdef JP
msg_format("あなたは%s%sに変化した!", effect_msg, title);
#else
- msg_format("You turn into %s %s%s!", (!effect_msg[0] && is_a_vowel(title[0]) ? "an" : "a"), effect_msg, title);
+ msg_format("You current_world_ptr->game_turn into %s %s%s!", (!effect_msg[0] && is_a_vowel(title[0]) ? "an" : "a"), effect_msg, title);
#endif
chg_virtue(V_CHANCE, 2);
else
p_ptr->hitdie = rp_ptr->r_mhp + cp_ptr->c_mhp + ap_ptr->a_mhp;
- do_cmd_rerate(FALSE);
+ roll_hitdice(p_ptr, 0L);
/* The experience level may be modified */
check_experience();
power -= 10;
get_max_stats();
- do_cmd_rerate(FALSE);
+ roll_hitdice(p_ptr, 0L);
}
while ((power > randint0(15)) && one_in_(3))
{
power -= 7;
- (void)gain_random_mutation(0);
+ (void)gain_mutation(p_ptr, 0);
}
if (power > randint0(5))
/* Note: earlier deductions may have left power < 0 already. */
while (power > 0)
{
- mutate_player();
+ status_shuffle();
power--;
}
}
char tmp[1024];
int warning = (p_ptr->mhp * hitpoint_warn / 10);
-
- /* Paranoia */
if (p_ptr->is_dead) return 0;
if (p_ptr->sutemi) damage *= 2;
disturb(TRUE, TRUE);
if (auto_more)
{
- now_damaged = TRUE;
+ p_ptr->now_damaged = TRUE;
}
}
chg_virtue(V_SACRIFICE, 10);
handle_stuff();
-
- /* Leaving */
p_ptr->leaving = TRUE;
/* Note death */
}
else
{
- QUEST_IDX q_idx = quest_number(dun_level);
+ QUEST_IDX q_idx = quest_number(current_floor_ptr->dun_level);
bool seppuku = streq(hit_from, "Seppuku");
bool winning_seppuku = p_ptr->total_winner && seppuku;
if (p_ptr->inside_arena)
strcpy(buf,_("アリーナ", "in the Arena"));
- else if (!dun_level)
+ else if (!current_floor_ptr->dun_level)
strcpy(buf,_("地上", "on the surface"));
else if (q_idx && (is_fixed_quest_idx(q_idx) &&
!((q_idx == QUEST_OBERON) || (q_idx == QUEST_SERPENT))))
strcpy(buf,_("クエスト", "in a quest"));
else
- sprintf(buf,_("%d階", "level %d"), (int)dun_level);
+ sprintf(buf,_("%d階", "level %d"), (int)current_floor_ptr->dun_level);
sprintf(tmp, _("%sで%sに殺された。", "killed by %s %s."), buf, p_ptr->died_from);
do_cmd_write_nikki(NIKKI_BUNSHOU, 0, tmp);
if (auto_more)
{
/* stop auto_more even if DAMAGE_USELIFE */
- now_damaged = TRUE;
+ p_ptr->now_damaged = TRUE;
}
msg_print(_("*** 警告:低ヒット・ポイント! ***", "*** LOW HITPOINT WARNING! ***"));
if (value > 100000L)
exp += (value - 100000L) / 4 * level;
}
- if ((((i == INVEN_RARM) || (i == INVEN_LARM)) && (buki_motteruka(i))) || (i == INVEN_BOW)) total_exp += exp / 48;
+ if ((((i == INVEN_RARM) || (i == INVEN_LARM)) && (has_melee_weapon(i))) || (i == INVEN_BOW)) total_exp += exp / 48;
else total_exp += exp / 16;
if (i == INVEN_BODY) total_exp += exp / 32;
}
bool set_ultimate_res(TIME_EFFECT v, bool do_dec)
{
bool notice = FALSE;
-
- /* Hack -- Force good values */
v = (v > 10000) ? 10000 : (v < 0) ? 0 : v;
if (p_ptr->is_dead) return FALSE;
/* Use the value */
p_ptr->ult_res = v;
-
- /* Redraw status bar */
p_ptr->redraw |= (PR_STATUS);
/* Nothing to notice */
bool set_tim_res_nether(TIME_EFFECT v, bool do_dec)
{
bool notice = FALSE;
-
- /* Hack -- Force good values */
v = (v > 10000) ? 10000 : (v < 0) ? 0 : v;
if (p_ptr->is_dead) return FALSE;
/* Use the value */
p_ptr->tim_res_nether = v;
-
- /* Redraw status bar */
p_ptr->redraw |= (PR_STATUS);
/* Nothing to notice */
bool set_tim_res_time(TIME_EFFECT v, bool do_dec)
{
bool notice = FALSE;
-
- /* Hack -- Force good values */
v = (v > 10000) ? 10000 : (v < 0) ? 0 : v;
if (p_ptr->is_dead) return FALSE;
/* Use the value */
p_ptr->tim_res_time = v;
-
- /* Redraw status bar */
p_ptr->redraw |= (PR_STATUS);
/* Nothing to notice */
char choice;
- if (!buki_motteruka(INVEN_RARM) && !buki_motteruka(INVEN_LARM))
+ if (!has_melee_weapon(INVEN_RARM) && !has_melee_weapon(INVEN_LARM))
{
msg_format(_("武器を持たないと魔法剣は使えない。", "You cannot use temporary branding with no weapon."));
return FALSE;