#include "cmd-zaprod.h"
#include "cmd-zapwand.h"
#include "cmd-pet.h"
+#include "floor.h"
#include "floor-events.h"
#include "object-curse.h"
#include "store.h"
+#include "spells-summon.h"
+#include "spells-object.h"
#include "monsterrace-hook.h"
#include "world.h"
+#include "mutation.h"
+#include "quest.h"
+#include "artifact.h"
+#include "avatar.h"
+#include "player-status.h"
static bool load = TRUE; /*!<ロード処理中の分岐フラグ*/
static int wild_regen = 20; /*!<広域マップ移動時の自然回復処理カウンタ(広域マップ1マス毎に20回処理を基本とする)*/
/* Auto-inscription/destroy */
autopick_alter_item(slot, destroy_feeling);
-
- /* Combine / Reorder the pack (later) */
p_ptr->update |= (PU_COMBINE | PU_REORDER);
p_ptr->window |= (PW_INVEN | PW_EQUIP);
/* Ask for level */
if (get_check(_("他の階にテレポートしますか?", "Teleport level? ")))
{
- char ppp[80];
- char tmp_val[160];
+ char ppp[80];
+ char tmp_val[160];
/* Only downward in ironman mode */
if (ironman_downward)
leave_quest_check();
- if (record_stair) do_cmd_write_nikki(NIKKI_PAT_TELE,0,NULL);
+ if (record_stair) do_cmd_write_nikki(NIKKI_PAT_TELE, 0, NULL);
p_ptr->inside_quest = 0;
p_ptr->energy_use = 0;
msg_print(_("パターンを血で汚してしまった!", "You bleed on the Pattern!"));
msg_print(_("何か恐ろしい事が起こった!", "Something terrible happens!"));
- if (!IS_INVULN())
- take_hit(DAMAGE_NOESCAPE, damroll(10, 8), _("パターン損壊", "corrupting the Pattern"), -1);
-
+ if (!IS_INVULN()) take_hit(DAMAGE_NOESCAPE, damroll(10, 8), _("パターン損壊", "corrupting the Pattern"), -1);
to_ruin = randint1(45) + 35;
while (to_ruin--)
(q_ptr->status == QUEST_STATUS_TAKEN))
{
q_ptr->status = QUEST_STATUS_FAILED;
- q_ptr->complev = (byte)p_ptr->lev;
+ q_ptr->complev = p_ptr->lev;
update_playtime();
q_ptr->comptime = playtime;
{
case QUEST_TYPE_TOWER:
quest[QUEST_TOWER1].status = QUEST_STATUS_FAILED;
- quest[QUEST_TOWER1].complev = (byte)p_ptr->lev;
+ quest[QUEST_TOWER1].complev = p_ptr->lev;
break;
case QUEST_TYPE_FIND_ARTIFACT:
a_info[q_ptr->k_idx].gen_flags &= ~(TRG_QUESTITEM);
if(quest[leaving_quest].type == QUEST_TYPE_TOWER)
{
quest[QUEST_TOWER1].status = QUEST_STATUS_FAILED;
- quest[QUEST_TOWER1].complev = (byte)p_ptr->lev;
+ quest[QUEST_TOWER1].complev = p_ptr->lev;
update_playtime();
quest[QUEST_TOWER1].comptime = playtime;
}
{
GAME_TEXT o_name[MAX_NLEN];
- cptr s;
+ concptr s;
/* No inscription */
if (!o_ptr->inscription) return;
INTERUPTING_SONG_EFFECT(p_ptr) = MUSIC_NONE;
msg_print(_("歌を再開した。", "You restart singing."));
p_ptr->action = ACTION_SING;
- p_ptr->update |= (PU_BONUS | PU_HP);
-
- /* Redraw map and status bar */
+ p_ptr->update |= (PU_BONUS | PU_HP | PU_MONSTERS);
p_ptr->redraw |= (PR_MAP | PR_STATUS | PR_STATE);
- p_ptr->update |= (PU_MONSTERS);
-
p_ptr->window |= (PW_OVERHEAD | PW_DUNGEON);
}
}
}
else
{
- cptr name = f_name + f_info[get_feat_mimic(&cave[p_ptr->y][p_ptr->x])].name;
+ concptr name = f_name + f_info[get_feat_mimic(&cave[p_ptr->y][p_ptr->x])].name;
msg_format(_("%sで火傷した!", "The %s burns you!"), name);
take_hit(DAMAGE_NOESCAPE, damage, name, -1);
}
}
else
{
- cptr name = f_name + f_info[get_feat_mimic(&cave[p_ptr->y][p_ptr->x])].name;
+ concptr name = f_name + f_info[get_feat_mimic(&cave[p_ptr->y][p_ptr->x])].name;
msg_format(_("%sに凍えた!", "The %s frostbites you!"), name);
take_hit(DAMAGE_NOESCAPE, damage, name, -1);
}
}
else
{
- cptr name = f_name + f_info[get_feat_mimic(&cave[p_ptr->y][p_ptr->x])].name;
+ concptr name = f_name + f_info[get_feat_mimic(&cave[p_ptr->y][p_ptr->x])].name;
msg_format(_("%sに感電した!", "The %s shocks you!"), name);
take_hit(DAMAGE_NOESCAPE, damage, name, -1);
}
}
else
{
- cptr name = f_name + f_info[get_feat_mimic(&cave[p_ptr->y][p_ptr->x])].name;
+ concptr name = f_name + f_info[get_feat_mimic(&cave[p_ptr->y][p_ptr->x])].name;
msg_format(_("%sに溶かされた!", "The %s melts you!"), name);
take_hit(DAMAGE_NOESCAPE, damage, name, -1);
}
}
else
{
- cptr name = f_name + f_info[get_feat_mimic(&cave[p_ptr->y][p_ptr->x])].name;
+ concptr name = f_name + f_info[get_feat_mimic(&cave[p_ptr->y][p_ptr->x])].name;
msg_format(_("%sに毒された!", "The %s poisons you!"), name);
take_hit(DAMAGE_NOESCAPE, damage, name, -1);
if (p_ptr->resist_pois) (void)set_poisoned(p_ptr->poisoned + 3);
}
if (have_flag(f_ptr->flags, FF_WATER) && have_flag(f_ptr->flags, FF_DEEP) &&
- !p_ptr->levitation && !p_ptr->can_swim)
+ !p_ptr->levitation && !p_ptr->can_swim && !p_ptr->resist_water)
{
if (p_ptr->total_weight > weight_limit())
{
{
if (!IS_INVULN() && !p_ptr->wraith_form && !p_ptr->kabenuke && ((p_ptr->chp > (p_ptr->lev / 5)) || !p_ptr->pass_wall))
{
- cptr dam_desc;
+ concptr dam_desc;
cave_no_regen = TRUE;
if (p_ptr->pass_wall)
take_hit(DAMAGE_NOESCAPE, randint1(p_ptr->wt / 6), _("転倒", "tripping"), -1);
msg_print(NULL);
- if (buki_motteruka(INVEN_RARM))
+ if (has_melee_weapon(INVEN_RARM))
{
slot = INVEN_RARM;
o_ptr = &inventory[INVEN_RARM];
- if (buki_motteruka(INVEN_LARM) && one_in_(2))
+ if (has_melee_weapon(INVEN_LARM) && one_in_(2))
{
o_ptr = &inventory[INVEN_LARM];
slot = INVEN_LARM;
}
}
- else if (buki_motteruka(INVEN_LARM))
+ else if (has_melee_weapon(INVEN_LARM))
{
o_ptr = &inventory[INVEN_LARM];
slot = INVEN_LARM;
/* Process objects on floor */
for (i = 1; i < o_max; i++)
{
- /* Access object */
object_type *o_ptr = &o_list[i];
/* Skip dead objects */
else if (p_ptr->pclass == CLASS_SAMURAI)
do_cmd_gain_hissatsu();
else if (p_ptr->pclass == CLASS_MAGIC_EATER)
- gain_magic();
+ import_magic_device();
else
do_cmd_study();
break;
}
else if (p_ptr->anti_magic && (p_ptr->pclass != CLASS_BERSERKER) && (p_ptr->pclass != CLASS_SMITH))
{
- cptr which_power = _("魔法", "magic");
+ concptr which_power = _("魔法", "magic");
if (p_ptr->pclass == CLASS_MINDCRAFTER)
which_power = _("超能力", "psionic powers");
else if (p_ptr->pclass == CLASS_IMITATOR)
/* Quaff a potion */
case 'q':
{
- if (!p_ptr->wild_mode)
- {
- if (!p_ptr->inside_arena)
- do_cmd_quaff_potion();
- else
- {
- msg_print(_("アリーナが魔法を吸収した!", "The arena absorbs all attempted magic!"));
- msg_print(NULL);
- }
- }
+ do_cmd_quaff_potion();
break;
}
/* Read a scroll */
case 'r':
{
- if (!p_ptr->wild_mode)
- {
- if (!p_ptr->inside_arena)
- do_cmd_read_scroll();
- else
- {
- msg_print(_("アリーナが魔法を吸収した!", "The arena absorbs all attempted magic!"));
- msg_print(NULL);
- }
- }
+ do_cmd_read_scroll();
break;
}
/* Use a staff */
case 'u':
{
- if (!p_ptr->wild_mode)
- {
- if (p_ptr->inside_arena)
- {
- msg_print(_("アリーナが魔法を吸収した!", "The arena absorbs all attempted magic!"));
- msg_print(NULL);
- }
- else if (use_command && !rogue_like_commands)
- {
+ if (use_command && !rogue_like_commands)
do_cmd_use();
- }
else
do_cmd_use_staff();
- }
break;
}
/* Use racial power */
case 'U':
{
- if (!p_ptr->wild_mode) do_cmd_racial_power();
+ do_cmd_racial_power();
break;
}
/* Target monster or location */
case '*':
{
- if (!p_ptr->wild_mode) do_cmd_target();
+ do_cmd_target();
break;
}
/* Repeat level feeling */
case KTRL('F'):
{
- if (!p_ptr->wild_mode) do_cmd_feeling();
+ do_cmd_feeling();
break;
}
/* Process the level */
dungeon(load_game);
-
/* Hack -- prevent "icky" message */
character_xtra = TRUE;
/* Mega-Hack -- Allow player to cheat death */
if ((p_ptr->wizard || cheat_live) && !get_check(_("死にますか? ", "Die? ")))
{
- /* Mark social class, reset age, if needed */
- if (p_ptr->sc) p_ptr->sc = p_ptr->age = 0;
-
- /* Increase age */
- p_ptr->age++;
-
- /* Mark savefile */
- p_ptr->noscore |= 0x0001;
-
- msg_print(_("ウィザードモードに念を送り、死を欺いた。", "You invoke wizard mode and cheat death."));
- msg_print(NULL);
-
- (void)life_stream(FALSE, FALSE);
-
- if (p_ptr->pclass == CLASS_MAGIC_EATER)
- {
- int magic_idx;
- for (magic_idx = 0; magic_idx < EATER_EXT*2; magic_idx++)
- {
- p_ptr->magic_num1[magic_idx] = p_ptr->magic_num2[magic_idx]*EATER_CHARGE;
- }
- for (; magic_idx < EATER_EXT*3; magic_idx++)
- {
- p_ptr->magic_num1[magic_idx] = 0;
- }
- }
-
- /* Restore spell points */
- p_ptr->csp = p_ptr->msp;
- p_ptr->csp_frac = 0;
-
- /* Hack -- cancel recall */
- if (p_ptr->word_recall)
- {
- msg_print(_("張りつめた大気が流れ去った...", "A tension leaves the air around you..."));
- msg_print(NULL);
-
- /* Hack -- Prevent recall */
- p_ptr->word_recall = 0;
- p_ptr->redraw |= (PR_STATUS);
- }
-
- /* Hack -- cancel alter */
- if (p_ptr->alter_reality)
- {
- /* Hack -- Prevent alter */
- p_ptr->alter_reality = 0;
- p_ptr->redraw |= (PR_STATUS);
- }
-
- /* Note cause of death */
- (void)strcpy(p_ptr->died_from, _("死の欺き", "Cheating death"));
-
- /* Do not die */
- p_ptr->is_dead = FALSE;
-
- /* Hack -- Prevent starvation */
- (void)set_food(PY_FOOD_MAX - 1);
-
- dun_level = 0;
- p_ptr->inside_arena = FALSE;
- p_ptr->inside_battle = FALSE;
- leaving_quest = 0;
- p_ptr->inside_quest = 0;
- if (dungeon_type) p_ptr->recall_dungeon = dungeon_type;
- dungeon_type = 0;
- if (lite_town || vanilla_town)
- {
- p_ptr->wilderness_y = 1;
- p_ptr->wilderness_x = 1;
- if (vanilla_town)
- {
- p_ptr->oldpy = 10;
- p_ptr->oldpx = 34;
- }
- else
- {
- p_ptr->oldpy = 33;
- p_ptr->oldpx = 131;
- }
- }
- else
- {
- p_ptr->wilderness_y = 48;
- p_ptr->wilderness_x = 5;
- p_ptr->oldpy = 33;
- p_ptr->oldpx = 131;
- }
-
- /* Leaving */
- p_ptr->wild_mode = FALSE;
- p_ptr->leaving = TRUE;
-
- do_cmd_write_nikki(NIKKI_BUNSHOU, 1,
- _(" しかし、生き返った。",
- " but revived."));
-
- /* Prepare next floor */
- leave_floor();
- wipe_m_list();
+ cheat_death(p_ptr);
}
}
}