if ((have_flag(flgs, TR_SLAY_ANIMAL)) &&
(r_ptr->flags3 & RF3_ANIMAL))
{
- if (m_ptr->ml && is_original_ap(m_ptr))
+ if (is_original_ap_and_seen(m_ptr))
{
r_ptr->r_flags3 |= RF3_ANIMAL;
}
if ((have_flag(flgs, TR_KILL_ANIMAL)) &&
(r_ptr->flags3 & RF3_ANIMAL))
{
- if (m_ptr->ml && is_original_ap(m_ptr))
+ if (is_original_ap_and_seen(m_ptr))
{
r_ptr->r_flags3 |= RF3_ANIMAL;
}
if ((have_flag(flgs, TR_SLAY_EVIL)) &&
(r_ptr->flags3 & RF3_EVIL))
{
- if (m_ptr->ml && is_original_ap(m_ptr))
+ if (is_original_ap_and_seen(m_ptr))
{
r_ptr->r_flags3 |= RF3_EVIL;
}
if ((have_flag(flgs, TR_KILL_EVIL)) &&
(r_ptr->flags3 & RF3_EVIL))
{
- if (m_ptr->ml && is_original_ap(m_ptr))
+ if (is_original_ap_and_seen(m_ptr))
{
r_ptr->r_flags3 |= RF3_EVIL;
}
if ((have_flag(flgs, TR_SLAY_HUMAN)) &&
(r_ptr->flags2 & RF2_HUMAN))
{
- if (m_ptr->ml && is_original_ap(m_ptr))
+ if (is_original_ap_and_seen(m_ptr))
{
r_ptr->r_flags2 |= RF2_HUMAN;
}
if ((have_flag(flgs, TR_KILL_HUMAN)) &&
(r_ptr->flags2 & RF2_HUMAN))
{
- if (m_ptr->ml && is_original_ap(m_ptr))
+ if (is_original_ap_and_seen(m_ptr))
{
r_ptr->r_flags2 |= RF2_HUMAN;
}
if ((have_flag(flgs, TR_SLAY_UNDEAD)) &&
(r_ptr->flags3 & RF3_UNDEAD))
{
- if (m_ptr->ml && is_original_ap(m_ptr))
+ if (is_original_ap_and_seen(m_ptr))
{
r_ptr->r_flags3 |= RF3_UNDEAD;
}
if ((have_flag(flgs, TR_KILL_UNDEAD)) &&
(r_ptr->flags3 & RF3_UNDEAD))
{
- if (m_ptr->ml && is_original_ap(m_ptr))
+ if (is_original_ap_and_seen(m_ptr))
{
r_ptr->r_flags3 |= RF3_UNDEAD;
}
if ((have_flag(flgs, TR_SLAY_DEMON)) &&
(r_ptr->flags3 & RF3_DEMON))
{
- if (m_ptr->ml && is_original_ap(m_ptr))
+ if (is_original_ap_and_seen(m_ptr))
{
r_ptr->r_flags3 |= RF3_DEMON;
}
if ((have_flag(flgs, TR_KILL_DEMON)) &&
(r_ptr->flags3 & RF3_DEMON))
{
- if (m_ptr->ml && is_original_ap(m_ptr))
+ if (is_original_ap_and_seen(m_ptr))
{
r_ptr->r_flags3 |= RF3_DEMON;
}
if ((have_flag(flgs, TR_SLAY_ORC)) &&
(r_ptr->flags3 & RF3_ORC))
{
- if (m_ptr->ml && is_original_ap(m_ptr))
+ if (is_original_ap_and_seen(m_ptr))
{
r_ptr->r_flags3 |= RF3_ORC;
}
if ((have_flag(flgs, TR_KILL_ORC)) &&
(r_ptr->flags3 & RF3_ORC))
{
- if (m_ptr->ml && is_original_ap(m_ptr))
+ if (is_original_ap_and_seen(m_ptr))
{
r_ptr->r_flags3 |= RF3_ORC;
}
if ((have_flag(flgs, TR_SLAY_TROLL)) &&
(r_ptr->flags3 & RF3_TROLL))
{
- if (m_ptr->ml && is_original_ap(m_ptr))
+ if (is_original_ap_and_seen(m_ptr))
{
r_ptr->r_flags3 |= RF3_TROLL;
}
if ((have_flag(flgs, TR_KILL_TROLL)) &&
(r_ptr->flags3 & RF3_TROLL))
{
- if (m_ptr->ml && is_original_ap(m_ptr))
+ if (is_original_ap_and_seen(m_ptr))
{
r_ptr->r_flags3 |= RF3_TROLL;
}
if ((have_flag(flgs, TR_SLAY_GIANT)) &&
(r_ptr->flags3 & RF3_GIANT))
{
- if (m_ptr->ml && is_original_ap(m_ptr))
+ if (is_original_ap_and_seen(m_ptr))
{
r_ptr->r_flags3 |= RF3_GIANT;
}
if ((have_flag(flgs, TR_KILL_GIANT)) &&
(r_ptr->flags3 & RF3_GIANT))
{
- if (m_ptr->ml && is_original_ap(m_ptr))
+ if (is_original_ap_and_seen(m_ptr))
{
r_ptr->r_flags3 |= RF3_GIANT;
}
if ((have_flag(flgs, TR_SLAY_DRAGON)) &&
(r_ptr->flags3 & RF3_DRAGON))
{
- if (m_ptr->ml && is_original_ap(m_ptr))
+ if (is_original_ap_and_seen(m_ptr))
{
r_ptr->r_flags3 |= RF3_DRAGON;
}
if ((have_flag(flgs, TR_KILL_DRAGON)) &&
(r_ptr->flags3 & RF3_DRAGON))
{
- if (m_ptr->ml && is_original_ap(m_ptr))
+ if (is_original_ap_and_seen(m_ptr))
{
r_ptr->r_flags3 |= RF3_DRAGON;
}
/* Notice immunity */
if (r_ptr->flagsr & RFR_EFF_IM_ACID_MASK)
{
- if (m_ptr->ml && is_original_ap(m_ptr))
+ if (is_original_ap_and_seen(m_ptr))
{
r_ptr->r_flagsr |= (r_ptr->flagsr & RFR_EFF_IM_ACID_MASK);
}
/* Notice immunity */
if (r_ptr->flagsr & RFR_EFF_IM_ELEC_MASK)
{
- if (m_ptr->ml && is_original_ap(m_ptr))
+ if (is_original_ap_and_seen(m_ptr))
{
r_ptr->r_flagsr |= (r_ptr->flagsr & RFR_EFF_IM_ELEC_MASK);
}
/* Notice immunity */
if (r_ptr->flagsr & RFR_EFF_IM_FIRE_MASK)
{
- if (m_ptr->ml && is_original_ap(m_ptr))
+ if (is_original_ap_and_seen(m_ptr))
{
r_ptr->r_flagsr |= (r_ptr->flagsr & RFR_EFF_IM_FIRE_MASK);
}
if (r_ptr->flags3 & RF3_HURT_FIRE)
{
if (mult < 70) mult = 70;
- if (m_ptr->ml && is_original_ap(m_ptr))
+ if (is_original_ap_and_seen(m_ptr))
{
r_ptr->r_flags3 |= RF3_HURT_FIRE;
}
if (r_ptr->flags3 & RF3_HURT_FIRE)
{
if (mult < 50) mult = 50;
- if (m_ptr->ml && is_original_ap(m_ptr))
+ if (is_original_ap_and_seen(m_ptr))
{
r_ptr->r_flags3 |= RF3_HURT_FIRE;
}
/* Notice immunity */
if (r_ptr->flagsr & RFR_EFF_IM_COLD_MASK)
{
- if (m_ptr->ml && is_original_ap(m_ptr))
+ if (is_original_ap_and_seen(m_ptr))
{
r_ptr->r_flagsr |= (r_ptr->flagsr & RFR_EFF_IM_COLD_MASK);
}
if (r_ptr->flags3 & RF3_HURT_COLD)
{
if (mult < 70) mult = 70;
- if (m_ptr->ml && is_original_ap(m_ptr))
+ if (is_original_ap_and_seen(m_ptr))
{
r_ptr->r_flags3 |= RF3_HURT_COLD;
}
if (r_ptr->flags3 & RF3_HURT_COLD)
{
if (mult < 50) mult = 50;
- if (m_ptr->ml && is_original_ap(m_ptr))
+ if (is_original_ap_and_seen(m_ptr))
{
r_ptr->r_flags3 |= RF3_HURT_COLD;
}
/* Notice immunity */
if (r_ptr->flagsr & RFR_EFF_IM_POIS_MASK)
{
- if (m_ptr->ml && is_original_ap(m_ptr))
+ if (is_original_ap_and_seen(m_ptr))
{
r_ptr->r_flagsr |= (r_ptr->flagsr & RFR_EFF_IM_POIS_MASK);
}
{
if (r_ptr->flags3 & RF3_UNDEAD)
{
- if (m_ptr->ml && is_original_ap(m_ptr))
+ if (is_original_ap_and_seen(m_ptr))
{
r_ptr->r_flags3 |= RF3_UNDEAD;
}
}
if ((mode == HISSATSU_HAGAN) && (r_ptr->flags3 & RF3_HURT_ROCK))
{
- if (m_ptr->ml && is_original_ap(m_ptr))
+ if (is_original_ap_and_seen(m_ptr))
{
r_ptr->r_flags3 |= RF3_HURT_ROCK;
}
if (!chest_traps[o_ptr->pval]) continue;
/* Identify once */
- if (!object_known_p(o_ptr))
+ if (!object_is_known(o_ptr))
{
/* Message */
#ifdef JP
* Note that we ONLY handle things that can be picked up.
* See "move_player()" for handling of other things.
*/
-void carry(int pickup)
+void carry(bool pickup)
{
cave_type *c_ptr = &cave[py][px];
}
/* Describe the object */
else if (!pickup)
-
{
#ifdef JP
msg_format("%s¤¬¤¢¤ë¡£", o_name);
/* Get the cave grid */
cave_type *c_ptr = &cave[y][x];
-
- int trap_feat = c_ptr->feat;
+ feature_type *f_ptr = &f_info[c_ptr->feat];
+ int trap_feat_type = have_flag(f_ptr->flags, FF_TRAP) ? f_ptr->subtype : NOT_TRAP;
#ifdef JP
cptr name = "¥È¥é¥Ã¥×";
cave_alter_feat(y, x, FF_HIT_TRAP);
/* Analyze XXX XXX XXX */
- switch (trap_feat)
+ switch (trap_feat_type)
{
- case FEAT_TRAP_TRAPDOOR:
+ case TRAP_TRAPDOOR:
{
- if (p_ptr->ffall)
+ if (p_ptr->levitation)
{
#ifdef JP
- msg_print("Í¸Í¤òÈô¤Ó±Û¤¨¤¿¡£");
+ msg_print("Íî¤Ȥ·¸Í¤òÈô¤Ó±Û¤¨¤¿¡£");
#else
msg_print("You fly over a trap door.");
#endif
else
{
#ifdef JP
- msg_print("Í¸Í¤ËÍî¤Á¤¿¡ª");
+ msg_print("Íî¤Ȥ·¸Í¤ËÍî¤Á¤¿¡ª");
if ((p_ptr->pseikaku == SEIKAKU_COMBAT) || (inventory[INVEN_BOW].name1 == ART_CRIMSON))
msg_print("¤¯¤Ã¤½¡Á¡ª");
#else
sound(SOUND_FALL);
dam = damroll(2, 8);
#ifdef JP
- name = "Í¸Í";
+ name = "Íî¤Ȥ·¸Í";
#else
name = "a trap door";
#endif
do_cmd_save_game(TRUE);
#ifdef JP
- do_cmd_write_nikki(NIKKI_BUNSHOU, 0, "Í¸Í¤ËÍî¤Á¤¿");
+ do_cmd_write_nikki(NIKKI_BUNSHOU, 0, "Íî¤Ȥ·¸Í¤ËÍî¤Á¤¿");
#else
do_cmd_write_nikki(NIKKI_BUNSHOU, 0, "You have fallen through a trap door!");
#endif
break;
}
- case FEAT_TRAP_PIT:
+ case TRAP_PIT:
{
- if (p_ptr->ffall)
+ if (p_ptr->levitation)
{
#ifdef JP
- msg_print("Í·ê¤òÈô¤Ó±Û¤¨¤¿¡£");
+ msg_print("Íî¤Ȥ··ê¤òÈô¤Ó±Û¤¨¤¿¡£");
#else
msg_print("You fly over a pit trap.");
#endif
else
{
#ifdef JP
- msg_print("Í·ê¤ËÍî¤Á¤Æ¤·¤Þ¤Ã¤¿¡ª");
+ msg_print("Íî¤Ȥ··ê¤ËÍî¤Á¤Æ¤·¤Þ¤Ã¤¿¡ª");
#else
msg_print("You have fallen into a pit!");
#endif
dam = damroll(2, 6);
#ifdef JP
- name = "Í·ê";
+ name = "Íî¤Ȥ··ê";
#else
name = "a pit trap";
#endif
break;
}
- case FEAT_TRAP_SPIKED_PIT:
+ case TRAP_SPIKED_PIT:
{
- if (p_ptr->ffall)
+ if (p_ptr->levitation)
{
#ifdef JP
- msg_print("¥È¥²¤Î¤¢¤ëÍ·ê¤òÈô¤Ó±Û¤¨¤¿¡£");
+ msg_print("¥È¥²¤Î¤¢¤ëÍî¤Ȥ··ê¤òÈô¤Ó±Û¤¨¤¿¡£");
#else
msg_print("You fly over a spiked pit.");
#endif
else
{
#ifdef JP
- msg_print("¥¹¥Ñ¥¤¥¯¤¬Éߤ«¤ì¤¿Í·ê¤ËÍî¤Á¤Æ¤·¤Þ¤Ã¤¿¡ª");
+ msg_print("¥¹¥Ñ¥¤¥¯¤¬Éߤ«¤ì¤¿Íî¤È¤··ê¤ËÍî¤Á¤Æ¤·¤Þ¤Ã¤¿¡ª");
#else
msg_print("You fall into a spiked pit!");
#endif
/* Base damage */
#ifdef JP
- name = "Í·ê";
+ name = "Íî¤Ȥ··ê";
#else
name = "a pit trap";
#endif
#ifdef JP
- name = "¥È¥²¤Î¤¢¤ëÍ·ê";
+ name = "¥È¥²¤Î¤¢¤ëÍî¤Ȥ··ê";
#else
name = "a spiked pit";
#endif
break;
}
- case FEAT_TRAP_POISON_PIT:
+ case TRAP_POISON_PIT:
{
- if (p_ptr->ffall)
+ if (p_ptr->levitation)
{
#ifdef JP
- msg_print("¥È¥²¤Î¤¢¤ëÍ·ê¤òÈô¤Ó±Û¤¨¤¿¡£");
+ msg_print("¥È¥²¤Î¤¢¤ëÍî¤Ȥ··ê¤òÈô¤Ó±Û¤¨¤¿¡£");
#else
msg_print("You fly over a spiked pit.");
#endif
else
{
#ifdef JP
- msg_print("¥¹¥Ñ¥¤¥¯¤¬Éߤ«¤ì¤¿Í·ê¤ËÍî¤Á¤Æ¤·¤Þ¤Ã¤¿¡ª");
+ msg_print("¥¹¥Ñ¥¤¥¯¤¬Éߤ«¤ì¤¿Íî¤Ȥ··ê¤ËÍî¤Á¤Æ¤·¤Þ¤Ã¤¿¡ª");
#else
msg_print("You fall into a spiked pit!");
#endif
dam = damroll(2, 6);
#ifdef JP
- name = "Í·ê";
+ name = "Íî¤Ȥ··ê";
#else
name = "a pit trap";
#endif
#ifdef JP
- name = "¥È¥²¤Î¤¢¤ëÍ·ê";
+ name = "¥È¥²¤Î¤¢¤ëÍî¤Ȥ··ê";
#else
name = "a spiked pit";
#endif
break;
}
- case FEAT_TRAP_TY_CURSE:
+ case TRAP_TY_CURSE:
{
#ifdef JP
msg_print("²¿¤«¤¬¥Ô¥«¥Ã¤È¸÷¤Ã¤¿¡ª");
break;
}
- case FEAT_TRAP_TELEPORT:
+ case TRAP_TELEPORT:
{
#ifdef JP
msg_print("¥Æ¥ì¥Ý¡¼¥È¡¦¥È¥é¥Ã¥×¤Ë¤Ò¤Ã¤«¤«¤Ã¤¿¡ª");
msg_print("You hit a teleport trap!");
#endif
- teleport_player(100);
+ teleport_player(100, TELEPORT_PASSIVE);
break;
}
- case FEAT_TRAP_FIRE:
+ case TRAP_FIRE:
{
#ifdef JP
msg_print("±ê¤ËÊñ¤Þ¤ì¤¿¡ª");
break;
}
- case FEAT_TRAP_ACID:
+ case TRAP_ACID:
{
#ifdef JP
msg_print("»À¤¬¿á¤¤«¤±¤é¤ì¤¿¡ª");
break;
}
- case FEAT_TRAP_SLOW:
+ case TRAP_SLOW:
{
if (check_hit(125))
{
break;
}
- case FEAT_TRAP_LOSE_STR:
+ case TRAP_LOSE_STR:
{
if (check_hit(125))
{
break;
}
- case FEAT_TRAP_LOSE_DEX:
+ case TRAP_LOSE_DEX:
{
if (check_hit(125))
{
break;
}
- case FEAT_TRAP_LOSE_CON:
+ case TRAP_LOSE_CON:
{
if (check_hit(125))
{
break;
}
- case FEAT_TRAP_BLIND:
+ case TRAP_BLIND:
{
#ifdef JP
msg_print("¹õ¤¤¥¬¥¹¤ËÊñ¤ß¹þ¤Þ¤ì¤¿¡ª");
break;
}
- case FEAT_TRAP_CONFUSE:
+ case TRAP_CONFUSE:
{
#ifdef JP
msg_print("¤¤é¤á¤¯¥¬¥¹¤ËÊñ¤ß¹þ¤Þ¤ì¤¿¡ª");
break;
}
- case FEAT_TRAP_POISON:
+ case TRAP_POISON:
{
#ifdef JP
msg_print("»É·ãŪ¤ÊÎп§¤Î¥¬¥¹¤ËÊñ¤ß¹þ¤Þ¤ì¤¿¡ª");
break;
}
- case FEAT_TRAP_SLEEP:
+ case TRAP_SLEEP:
{
#ifdef JP
msg_print("´ñ̯¤ÊÇò¤¤Ì¸¤ËÊñ¤Þ¤ì¤¿¡ª");
break;
}
- case FEAT_TRAP_TRAPS:
+ case TRAP_TRAPS:
{
#ifdef JP
msg_print("¤Þ¤Ð¤æ¤¤Á®¸÷¤¬Áö¤Ã¤¿¡ª");
break;
}
- case FEAT_TRAP_ALARM:
+ case TRAP_ALARM:
{
#ifdef JP
msg_print("¤±¤¿¤¿¤Þ¤·¤¤²»¤¬ÌĤê¶Á¤¤¤¿¡ª");
break;
}
- case FEAT_TRAP_OPEN:
+ case TRAP_OPEN:
{
#ifdef JP
msg_print("Âç²»¶Á¤È¶¦¤Ë¤Þ¤ï¤ê¤ÎÊɤ¬Êø¤ì¤¿¡ª");
break;
}
- case FEAT_TRAP_ARMAGEDDON:
+ case TRAP_ARMAGEDDON:
{
static int levs[10] = {0, 0, 20, 10, 5, 3, 2, 1, 1, 1};
int evil_idx = 0, good_idx = 0;
break;
}
- case FEAT_TRAP_PIRANHA:
+ case TRAP_PIRANHA:
{
#ifdef JP
msg_print("ÆÍÁ³Êɤ«¤é¿å¤¬°î¤ì½Ð¤·¤¿¡ª¥Ô¥é¥Ë¥¢¤¬¤¤¤ë¡ª");
msg_print("You are suddenly very hot!");
#endif
-
if (prace_is_(RACE_ENT)) aura_damage += aura_damage / 3;
if (IS_OPPOSE_FIRE()) aura_damage = (aura_damage + 2) / 3;
if (p_ptr->resist_fire) aura_damage = (aura_damage + 2) / 3;
take_hit(DAMAGE_NOESCAPE, aura_damage, aura_dam, -1);
- if (m_ptr->ml && is_original_ap(m_ptr)) r_ptr->r_flags2 |= RF2_AURA_FIRE;
+ if (is_original_ap_and_seen(m_ptr)) r_ptr->r_flags2 |= RF2_AURA_FIRE;
handle_stuff();
}
}
msg_print("You are suddenly very cold!");
#endif
-
if (IS_OPPOSE_COLD()) aura_damage = (aura_damage + 2) / 3;
if (p_ptr->resist_cold) aura_damage = (aura_damage + 2) / 3;
take_hit(DAMAGE_NOESCAPE, aura_damage, aura_dam, -1);
- if (m_ptr->ml && is_original_ap(m_ptr)) r_ptr->r_flags3 |= RF3_AURA_COLD;
+ if (is_original_ap_and_seen(m_ptr)) r_ptr->r_flags3 |= RF3_AURA_COLD;
handle_stuff();
}
}
#endif
take_hit(DAMAGE_NOESCAPE, aura_damage, aura_dam, -1);
- if (m_ptr->ml && is_original_ap(m_ptr)) r_ptr->r_flags2 |= RF2_AURA_ELEC;
+ if (is_original_ap_and_seen(m_ptr)) r_ptr->r_flags2 |= RF2_AURA_ELEC;
handle_stuff();
}
}
monster_type *m_ptr = &m_list[c_ptr->m_idx];
monster_race *r_ptr = &r_info[m_ptr->r_idx];
- object_type *o_ptr;
+ /* Access the weapon */
+ object_type *o_ptr = &inventory[INVEN_RARM + hand];
char m_name[80];
if (p_ptr->monlite && (mode != HISSATSU_NYUSIN)) tmp /= 3;
if (p_ptr->cursed & TRC_AGGRAVATE) tmp /= 2;
if (r_ptr->level > (p_ptr->lev * p_ptr->lev / 20 + 10)) tmp /= 3;
- if (m_ptr->csleep && m_ptr->ml)
+ if (MON_CSLEEP(m_ptr) && m_ptr->ml)
{
/* Can't backstab creatures that we can't see, right? */
backstab = TRUE;
{
fuiuchi = TRUE;
}
- else if (m_ptr->monfear && m_ptr->ml)
+ else if (MON_MONFEAR(m_ptr) && m_ptr->ml)
{
stab_fleeing = TRUE;
}
case CLASS_MONK:
case CLASS_FORCETRAINER:
case CLASS_BERSERKER:
- if (empty_hands(TRUE) & EMPTY_HAND_RARM) monk_attack = TRUE;
+ if ((empty_hands(TRUE) & EMPTY_HAND_RARM) && !p_ptr->riding) monk_attack = TRUE;
break;
}
- if (!buki_motteruka(INVEN_RARM) && !buki_motteruka(INVEN_LARM))
+ if (!o_ptr->k_idx) /* Empty hand */
{
if ((r_ptr->level + 10) > p_ptr->lev)
{
}
}
}
- else
+ else if (object_is_melee_weapon(o_ptr))
{
if ((r_ptr->level + 10) > p_ptr->lev)
{
}
/* Disturb the monster */
- m_ptr->csleep = 0;
- if (r_ptr->flags7 & RF7_HAS_LD_MASK) p_ptr->update |= (PU_MON_LITE);
+ (void)set_monster_csleep(c_ptr->m_idx, 0);
/* Extract monster name (or "it") */
monster_desc(m_name, m_ptr, 0);
- /* Access the weapon */
- o_ptr = &inventory[INVEN_RARM+hand];
-
/* Calculate the "attack quality" */
bonus = p_ptr->to_h[hand] + o_ptr->to_h;
chance = (p_ptr->skill_thn + (bonus * BTH_PLUS_ADJ));
{
if (p_ptr->lev > randint1(r_ptr->level + resist_stun + 10))
{
+ if (set_monster_stunned(c_ptr->m_idx, stun_effect + MON_STUNNED(m_ptr)))
+ {
#ifdef JP
- if (m_ptr->stunned) msg_format("%^s¤Ï¤µ¤é¤Ë¥Õ¥é¥Õ¥é¤Ë¤Ê¤Ã¤¿¡£", m_name);
- else msg_format("%^s¤Ï¥Õ¥é¥Õ¥é¤Ë¤Ê¤Ã¤¿¡£", m_name);
+ msg_format("%^s¤Ï¥Õ¥é¥Õ¥é¤Ë¤Ê¤Ã¤¿¡£", m_name);
#else
- if (m_ptr->stunned) msg_format("%^s is more stunned.", m_name);
- else msg_format("%^s is stunned.", m_name);
+ msg_format("%^s is stunned.", m_name);
#endif
-
- m_ptr->stunned += stun_effect;
+ }
+ else
+ {
+#ifdef JP
+ msg_format("%^s¤Ï¤µ¤é¤Ë¥Õ¥é¥Õ¥é¤Ë¤Ê¤Ã¤¿¡£", m_name);
+#else
+ msg_format("%^s is more stunned.", m_name);
+#endif
+ }
}
}
}
if (!(r_ptr->flags3 & (RF3_NO_STUN)))
{
/* Get stunned */
- if (m_ptr->stunned)
+ if (MON_STUNNED(m_ptr))
{
#ifdef JP
msg_format("%s¤Ï¤Ò¤É¤¯¤â¤¦¤í¤¦¤È¤·¤¿¡£", m_name);
}
/* Apply stun */
- m_ptr->stunned = (tmp < 200) ? tmp : 200;
+ (void)set_monster_stunned(c_ptr->m_idx, MON_STUNNED(m_ptr) + tmp);
}
else
{
}
m_ptr->maxhp -= (k+7)/8;
if (m_ptr->hp > m_ptr->maxhp) m_ptr->hp = m_ptr->maxhp;
+ if (m_ptr->maxhp < 1) m_ptr->maxhp = 1;
weak = TRUE;
}
can_drain = FALSE;
/* Confuse the monster */
if (r_ptr->flags3 & RF3_NO_CONF)
{
- if (m_ptr->ml && is_original_ap(m_ptr))
- {
- r_ptr->r_flags3 |= RF3_NO_CONF;
- }
+ if (is_original_ap_and_seen(m_ptr)) r_ptr->r_flags3 |= RF3_NO_CONF;
#ifdef JP
msg_format("%^s¤Ë¤Ï¸ú²Ì¤¬¤Ê¤«¤Ã¤¿¡£", m_name);
msg_format("%^s appears confused.", m_name);
#endif
- m_ptr->confused += 10 + randint0(p_ptr->lev) / 5;
+ (void)set_monster_confused(c_ptr->m_idx, MON_CONFUSED(m_ptr) + 10 + randint0(p_ptr->lev) / 5);
}
}
{
if (r_ptr->flags1 & RF1_UNIQUE)
{
- if (m_ptr->ml && is_original_ap(m_ptr)) r_ptr->r_flagsr |= RFR_RES_TELE;
+ if (is_original_ap_and_seen(m_ptr)) r_ptr->r_flagsr |= RFR_RES_TELE;
#ifdef JP
msg_format("%^s¤Ë¤Ï¸ú²Ì¤¬¤Ê¤«¤Ã¤¿¡£", m_name);
#else
}
else if (r_ptr->level > randint1(100))
{
- if (m_ptr->ml && is_original_ap(m_ptr)) r_ptr->r_flagsr |= RFR_RES_TELE;
+ if (is_original_ap_and_seen(m_ptr)) r_ptr->r_flagsr |= RFR_RES_TELE;
#ifdef JP
msg_format("%^s¤ÏÄñ¹³ÎϤò»ý¤Ã¤Æ¤¤¤ë¡ª", m_name);
#else
msg_format("%^s disappears!", m_name);
#endif
- teleport_away(c_ptr->m_idx, 50, FALSE);
+ teleport_away(c_ptr->m_idx, 50, TELEPORT_PASSIVE);
num = num_blow + 1; /* Can't hit it anymore! */
*mdeath = TRUE;
}
msg_format("%^s changes!", m_name);
#endif
-
- /* Hack -- Get new monster */
- m_ptr = &m_list[c_ptr->m_idx];
-
- /* Oops, we need a different name... */
- monster_desc(m_name, m_ptr, 0);
-
- /* Hack -- Get new race */
- r_ptr = &r_info[m_ptr->r_idx];
-
*fear = FALSE;
weak = FALSE;
}
#else
msg_format("%^s is unaffected.", m_name);
#endif
-
}
+
+ /* Hack -- Get new monster */
+ m_ptr = &m_list[c_ptr->m_idx];
+
+ /* Oops, we need a different name... */
+ monster_desc(m_name, m_ptr, 0);
+
+ /* Hack -- Get new race */
+ r_ptr = &r_info[m_ptr->r_idx];
}
}
else if (o_ptr->name1 == ART_G_HAMMER)
energy_use = 100;
- if (m_ptr->csleep) /* It is not honorable etc to attack helpless victims */
+ if (!p_ptr->migite && !p_ptr->hidarite &&
+ !(p_ptr->muta2 & (MUT2_HORNS | MUT2_BEAK | MUT2_SCOR_TAIL | MUT2_TRUNK | MUT2_TENTACLES)))
{
- if (!(r_ptr->flags3 & RF3_EVIL) || one_in_(5)) chg_virtue(V_COMPASSION, -1);
- if (!(r_ptr->flags3 & RF3_EVIL) || one_in_(5)) chg_virtue(V_HONOUR, -1);
+#ifdef JP
+ msg_format("%s¹¶·â¤Ç¤¤Ê¤¤¡£", (empty_hands(FALSE) == EMPTY_HAND_NONE) ? "ξ¼ê¤¬¤Õ¤µ¤¬¤Ã¤Æ" : "");
+#else
+ msg_print("You cannot do attacking.");
+#endif
+ return FALSE;
}
/* Extract monster name (or "it") */
monster_desc(m_name, m_ptr, 0);
- /* Auto-Recall if possible and visible */
- if (m_ptr->ml) monster_race_track(m_ptr->ap_r_idx);
+ if (m_ptr->ml)
+ {
+ /* Auto-Recall if possible and visible */
+ monster_race_track(m_ptr->ap_r_idx);
- /* Track a new monster */
- if (m_ptr->ml) health_track(c_ptr->m_idx);
+ /* Track a new monster */
+ health_track(c_ptr->m_idx);
+ }
if ((r_ptr->flags1 & RF1_FEMALE) &&
!(p_ptr->stun || p_ptr->confused || p_ptr->image || !m_ptr->ml))
/* Message */
if (m_ptr->ml)
#ifdef JP
- msg_format("¶²¤¯¤Æ%s¤ò¹¶·â¤Ç¤¤Ê¤¤¡ª", m_name);
+ msg_format("¶²¤¯¤Æ%s¤ò¹¶·â¤Ç¤¤Ê¤¤¡ª", m_name);
#else
msg_format("You are too afraid to attack %s!", m_name);
#endif
#endif
/* Disturb the monster */
- m_ptr->csleep = 0;
- if (r_ptr->flags7 & RF7_HAS_LD_MASK) p_ptr->update |= (PU_MON_LITE);
+ (void)set_monster_csleep(c_ptr->m_idx, 0);
/* Done */
return FALSE;
}
+ if (MON_CSLEEP(m_ptr)) /* It is not honorable etc to attack helpless victims */
+ {
+ if (!(r_ptr->flags3 & RF3_EVIL) || one_in_(5)) chg_virtue(V_COMPASSION, -1);
+ if (!(r_ptr->flags3 & RF3_EVIL) || one_in_(5)) chg_virtue(V_HONOUR, -1);
+ }
+
if (p_ptr->migite && p_ptr->hidarite)
{
if ((p_ptr->skill_exp[GINOU_NITOURYU] < s_info[p_ptr->pclass].s_max[GINOU_NITOURYU]) && ((p_ptr->skill_exp[GINOU_NITOURYU] - 1000) / 200 < r_ptr->level))
if (!is_pattern_tile_cur && !is_pattern_tile_new) return TRUE;
- pattern_type_cur = is_pattern_tile_cur ? cur_f_ptr->power : NOT_PATTERN_TILE;
- pattern_type_new = is_pattern_tile_new ? new_f_ptr->power : NOT_PATTERN_TILE;
+ pattern_type_cur = is_pattern_tile_cur ? cur_f_ptr->subtype : NOT_PATTERN_TILE;
+ pattern_type_new = is_pattern_tile_new ? new_f_ptr->subtype : NOT_PATTERN_TILE;
if (pattern_type_new == PATTERN_TILE_START)
{
}
/* "CAN" flags */
- if (have_flag(f_ptr->flags, FF_CAN_FLY) && p_ptr->ffall) return TRUE;
+ if (have_flag(f_ptr->flags, FF_CAN_FLY) && p_ptr->levitation) return TRUE;
if (have_flag(f_ptr->flags, FF_CAN_SWIM) && p_ptr->can_swim) return TRUE;
if (have_flag(f_ptr->flags, FF_CAN_PASS) && p_ptr->pass_wall) return TRUE;
}
-void move_player_effect(int do_pickup, bool break_trap)
+/*
+ * Move the player
+ */
+bool move_player_effect(int ny, int nx, u32b mpe_mode)
{
- cave_type *c_ptr = &cave[py][px];
+ cave_type *c_ptr = &cave[ny][nx];
feature_type *f_ptr = &f_info[c_ptr->feat];
- /* Check for new panel (redraw map) */
- verify_panel();
+ if (!(mpe_mode & MPE_STAYING))
+ {
+ int oy = py;
+ int ox = px;
+ cave_type *oc_ptr = &cave[oy][ox];
+ int om_idx = oc_ptr->m_idx;
+ int nm_idx = c_ptr->m_idx;
- /* Update stuff */
- p_ptr->update |= (PU_VIEW | PU_LITE | PU_FLOW | PU_MON_LITE);
+ /* Move the player */
+ py = ny;
+ px = nx;
- /* Update the monsters */
- p_ptr->update |= (PU_DISTANCE);
+ /* Hack -- For moving monster or riding player's moving */
+ if (!(mpe_mode & MPE_DONT_SWAP_MON))
+ {
+ /* Swap two monsters */
+ c_ptr->m_idx = om_idx;
+ oc_ptr->m_idx = nm_idx;
- /* Window stuff */
- p_ptr->window |= (PW_OVERHEAD | PW_DUNGEON);
+ if (om_idx > 0) /* Monster on old spot (or p_ptr->riding) */
+ {
+ monster_type *om_ptr = &m_list[om_idx];
+ om_ptr->fy = ny;
+ om_ptr->fx = nx;
+ update_mon(om_idx, TRUE);
+ }
- /* Remove "unsafe" flag */
- if ((!p_ptr->blind && !no_lite()) || !is_trap(c_ptr->feat)) c_ptr->info &= ~(CAVE_UNSAFE);
+ if (nm_idx > 0) /* Monster on new spot */
+ {
+ monster_type *nm_ptr = &m_list[nm_idx];
+ nm_ptr->fy = oy;
+ nm_ptr->fx = ox;
+ update_mon(nm_idx, TRUE);
+ }
+ }
- /* For get everything when requested hehe I'm *NASTY* */
- if (dun_level && (d_info[dungeon_type].flags1 & DF1_FORGET)) wiz_dark();
+ /* Redraw old spot */
+ lite_spot(oy, ox);
- if (p_ptr->pclass == CLASS_NINJA)
- {
- if (c_ptr->info & (CAVE_GLOW)) set_superstealth(FALSE);
- else if (p_ptr->cur_lite <= 0) set_superstealth(TRUE);
- }
+ /* Redraw new spot */
+ lite_spot(ny, nx);
- if ((p_ptr->action == ACTION_HAYAGAKE) && !have_flag(f_ptr->flags, FF_PROJECT))
- {
+ /* Check for new panel (redraw map) */
+ verify_panel();
+
+ if (mpe_mode & MPE_FORGET_FLOW)
+ {
+ forget_flow();
+
+ /* Mega-Hack -- Forget the view */
+ p_ptr->update |= (PU_UN_VIEW);
+
+ /* Redraw map */
+ p_ptr->redraw |= (PR_MAP);
+ }
+
+ /* Update stuff */
+ p_ptr->update |= (PU_VIEW | PU_LITE | PU_FLOW | PU_MON_LITE | PU_DISTANCE);
+
+ /* Window stuff */
+ p_ptr->window |= (PW_OVERHEAD | PW_DUNGEON);
+
+ /* Remove "unsafe" flag */
+ if ((!p_ptr->blind && !no_lite()) || !is_trap(c_ptr->feat)) c_ptr->info &= ~(CAVE_UNSAFE);
+
+ /* For get everything when requested hehe I'm *NASTY* */
+ if (dun_level && (d_info[dungeon_type].flags1 & DF1_FORGET)) wiz_dark();
+
+ /* Handle stuff */
+ if (mpe_mode & MPE_HANDLE_STUFF) handle_stuff();
+
+ if (p_ptr->pclass == CLASS_NINJA)
+ {
+ if (c_ptr->info & (CAVE_GLOW)) set_superstealth(FALSE);
+ else if (p_ptr->cur_lite <= 0) set_superstealth(TRUE);
+ }
+
+ if ((p_ptr->action == ACTION_HAYAGAKE) &&
+ (!have_flag(f_ptr->flags, FF_PROJECT) ||
+ (!p_ptr->levitation && have_flag(f_ptr->flags, FF_DEEP))))
+ {
#ifdef JP
- msg_print("¤³¤³¤Ç¤ÏÁÇÁ᤯ư¤±¤Ê¤¤¡£");
+ msg_print("¤³¤³¤Ç¤ÏÁÇÁ᤯ư¤±¤Ê¤¤¡£");
#else
- msg_print("You cannot run in wall.");
+ msg_print("You cannot run in here.");
#endif
- set_action(ACTION_NONE);
- }
-
- /* Spontaneous Searching */
- if ((p_ptr->skill_fos >= 50) || (0 == randint0(50 - p_ptr->skill_fos)))
- {
- search();
+ set_action(ACTION_NONE);
+ }
}
- /* Continuous Searching */
- if (p_ptr->action == ACTION_SEARCH)
+ if (mpe_mode & MPE_ENERGY_USE)
{
- search();
- }
-
- /* Handle "objects" */
-
-#ifdef ALLOW_EASY_DISARM /* TNB */
+ if (music_singing(MUSIC_WALL))
+ {
+ (void)project(0, 0, py, px, (60 + p_ptr->lev), GF_DISINTEGRATE,
+ PROJECT_KILL | PROJECT_ITEM, -1);
- carry(do_pickup != always_pickup);
+ if (!player_bold(ny, nx) || p_ptr->is_dead || p_ptr->leaving) return FALSE;
+ }
-#else /* ALLOW_EASY_DISARM -- TNB */
+ /* Spontaneous Searching */
+ if ((p_ptr->skill_fos >= 50) || (0 == randint0(50 - p_ptr->skill_fos)))
+ {
+ search();
+ }
- carry(do_pickup);
+ /* Continuous Searching */
+ if (p_ptr->action == ACTION_SEARCH)
+ {
+ search();
+ }
+ }
-#endif /* ALLOW_EASY_DISARM -- TNB */
+ /* Handle "objects" */
+ if (!(mpe_mode & MPE_DONT_PICKUP))
+ {
+ carry((mpe_mode & MPE_DO_PICKUP) ? TRUE : FALSE);
+ }
/* Handle "store doors" */
if (have_flag(f_ptr->flags, FF_STORE))
}
/* Set off a trap */
- else if (have_flag(f_ptr->flags, FF_HIT_TRAP))
+ else if (have_flag(f_ptr->flags, FF_HIT_TRAP) && !(mpe_mode & MPE_STAYING))
{
/* Disturb */
disturb(0, 0);
}
/* Hit the trap */
- hit_trap(break_trap);
+ hit_trap((mpe_mode & MPE_BREAK_TRAP) ? TRUE : FALSE);
+
+ if (!player_bold(ny, nx) || p_ptr->is_dead || p_ptr->leaving) return FALSE;
}
/* Warn when leaving trap detected region */
- if ((disturb_trap_detect || alert_trap_detect)
- && p_ptr->dtrap && !(cave[py][px].info & CAVE_IN_DETECT))
+ if (!(mpe_mode & MPE_STAYING) && (disturb_trap_detect || alert_trap_detect)
+ && p_ptr->dtrap && !(c_ptr->info & CAVE_IN_DETECT))
{
/* No duplicate warning */
p_ptr->dtrap = FALSE;
/* You are just on the edge */
- if (!(cave[py][px].info & CAVE_UNSAFE))
+ if (!(c_ptr->info & CAVE_UNSAFE))
{
if (alert_trap_detect)
{
if (disturb_trap_detect) disturb(0, 0);
}
}
+
+ return player_bold(ny, nx) && !p_ptr->is_dead && !p_ptr->leaving;
+}
+
+
+bool trap_can_be_ignored(int feat)
+{
+ feature_type *f_ptr = &f_info[feat];
+
+ if (!have_flag(f_ptr->flags, FF_TRAP)) return TRUE;
+
+ switch (f_ptr->subtype)
+ {
+ case TRAP_TRAPDOOR:
+ case TRAP_PIT:
+ case TRAP_SPIKED_PIT:
+ case TRAP_POISON_PIT:
+ if (p_ptr->levitation) return TRUE;
+ break;
+ case TRAP_TELEPORT:
+ if (p_ptr->anti_tele) return TRUE;
+ break;
+ case TRAP_FIRE:
+ if (p_ptr->immune_fire) return TRUE;
+ break;
+ case TRAP_ACID:
+ if (p_ptr->immune_acid) return TRUE;
+ break;
+ case TRAP_BLIND:
+ if (p_ptr->resist_blind) return TRUE;
+ break;
+ case TRAP_CONFUSE:
+ if (p_ptr->resist_conf) return TRUE;
+ break;
+ case TRAP_POISON:
+ if (p_ptr->resist_pois) return TRUE;
+ break;
+ case TRAP_SLEEP:
+ if (p_ptr->free_act) return TRUE;
+ break;
+ }
+
+ return FALSE;
}
* any monster which might be in the destination grid. Previously,
* moving into walls was "free" and did NOT hit invisible monsters.
*/
-void move_player(int dir, int do_pickup, bool break_trap)
+void move_player(int dir, bool do_pickup, bool break_trap)
{
/* Find the result of moving */
int y = py + ddy[dir];
/* Player can not walk through "walls"... */
/* unless in Shadow Form */
- p_can_kill_walls = p_ptr->kill_wall && have_flag(f_ptr->flags, FF_TUNNEL) &&
+ p_can_kill_walls = p_ptr->kill_wall && have_flag(f_ptr->flags, FF_HURT_DISI) &&
(!p_can_enter || !have_flag(f_ptr->flags, FF_LOS)) &&
!have_flag(f_ptr->flags, FF_PERMANENT);
((p_ptr->muta2 & MUT2_BERS_RAGE) && p_ptr->shero)) &&
pattern_seq(py, px, y, x) && (p_can_enter || p_can_kill_walls))
{
- m_ptr->csleep = 0;
- if (r_ptr->flags7 & RF7_HAS_LD_MASK) p_ptr->update |= (PU_MON_LITE);
+ /* Disturb the monster */
+ (void)set_monster_csleep(c_ptr->m_idx, 0);
/* Extract monster name (or "it") */
monster_desc(m_name, m_ptr, 0);
oktomove = FALSE;
disturb(0, 0);
}
- else if (riding_m_ptr->monfear)
+ else if (MON_MONFEAR(riding_m_ptr))
{
char m_name[80];
disturb(0, 0);
}
- if (oktomove && riding_m_ptr->stunned && one_in_(2))
+ if (oktomove && MON_STUNNED(riding_m_ptr) && one_in_(2))
{
char m_name[80];
monster_desc(m_name, riding_m_ptr, 0);
{
}
- else if (!have_flag(f_ptr->flags, FF_MOVE) && have_flag(f_ptr->flags, FF_CAN_FLY) && !p_ptr->ffall)
+ else if (!have_flag(f_ptr->flags, FF_MOVE) && have_flag(f_ptr->flags, FF_CAN_FLY) && !p_ptr->levitation)
{
#ifdef JP
msg_format("¶õ¤òÈô¤Ð¤Ê¤¤¤È%s¤Î¾å¤Ë¤Ï¹Ô¤±¤Ê¤¤¡£", f_name + f_info[get_feat_mimic(c_ptr)].name);
*/
else if (have_flag(f_ptr->flags, FF_TREE) && !p_can_kill_walls)
{
- if ((p_ptr->pclass != CLASS_RANGER) && !p_ptr->ffall) energy_use *= 2;
+ if ((p_ptr->pclass != CLASS_RANGER) && !p_ptr->levitation && (!p_ptr->riding || !(riding_r_ptr->flags8 & RF8_WILD_WOOD))) energy_use *= 2;
}
#ifdef ALLOW_EASY_DISARM /* TNB */
/* Disarm a visible trap */
else if ((do_pickup != easy_disarm) && have_flag(f_ptr->flags, FF_DISARM) && !c_ptr->mimic)
{
- bool ignore = FALSE;
- switch (c_ptr->feat)
- {
- case FEAT_TRAP_TRAPDOOR:
- case FEAT_TRAP_PIT:
- case FEAT_TRAP_SPIKED_PIT:
- case FEAT_TRAP_POISON_PIT:
- if (p_ptr->ffall) ignore = TRUE;
- break;
- case FEAT_TRAP_TELEPORT:
- if (p_ptr->anti_tele) ignore = TRUE;
- break;
- case FEAT_TRAP_FIRE:
- if (p_ptr->immune_fire) ignore = TRUE;
- break;
- case FEAT_TRAP_ACID:
- if (p_ptr->immune_acid) ignore = TRUE;
- break;
- case FEAT_TRAP_BLIND:
- if (p_ptr->resist_blind) ignore = TRUE;
- break;
- case FEAT_TRAP_CONFUSE:
- if (p_ptr->resist_conf) ignore = TRUE;
- break;
- case FEAT_TRAP_POISON:
- if (p_ptr->resist_pois) ignore = TRUE;
- break;
- case FEAT_TRAP_SLEEP:
- if (p_ptr->free_act) ignore = TRUE;
- break;
- }
-
- if (!ignore)
+ if (!trap_can_be_ignored(c_ptr->feat))
{
(void)do_cmd_disarm_aux(y, x, dir);
return;
/* Normal movement */
if (oktomove)
{
- int oy, ox;
+ u32b mpe_mode = MPE_ENERGY_USE;
if (p_ptr->warning)
{
- if(!process_warning(x, y))
+ if (!process_warning(x, y))
{
energy_use = 25;
return;
}
}
- /* Hack -- For moving monster or riding player's moving */
- cave[py][px].m_idx = c_ptr->m_idx;
- c_ptr->m_idx = 0;
-
if (do_past)
{
#ifdef JP
#else
msg_format("You push past %s.", m_name);
#endif
-
- m_ptr->fy = py;
- m_ptr->fx = px;
- update_mon(cave[py][px].m_idx, TRUE);
}
/* Change oldpx and oldpy to place the player well when going back to big mode */
if (p_ptr->wild_mode)
{
- if(ddy[dir] > 0) p_ptr->oldpy = 1;
- if(ddy[dir] < 0) p_ptr->oldpy = MAX_HGT - 2;
- if(ddy[dir] == 0) p_ptr->oldpy = MAX_HGT / 2;
- if(ddx[dir] > 0) p_ptr->oldpx = 1;
- if(ddx[dir] < 0) p_ptr->oldpx = MAX_WID - 2;
- if(ddx[dir] == 0) p_ptr->oldpx = MAX_WID / 2;
+ if (ddy[dir] > 0) p_ptr->oldpy = 1;
+ if (ddy[dir] < 0) p_ptr->oldpy = MAX_HGT - 2;
+ if (ddy[dir] == 0) p_ptr->oldpy = MAX_HGT / 2;
+ if (ddx[dir] > 0) p_ptr->oldpx = 1;
+ if (ddx[dir] < 0) p_ptr->oldpx = MAX_WID - 2;
+ if (ddx[dir] == 0) p_ptr->oldpx = MAX_WID / 2;
}
- /* Save old location */
- oy = py;
- ox = px;
-
- /* Move the player */
- py = y;
- px = x;
-
- if (music_singing(MUSIC_WALL))
- {
- project(0, 0, py, px,
- (60 + p_ptr->lev), GF_DISINTEGRATE, PROJECT_KILL | PROJECT_ITEM, -1);
- }
- else if (p_can_kill_walls)
+ if (p_can_kill_walls)
{
- cave_alter_feat(py, px, FF_HURT_DISI);
+ cave_alter_feat(y, x, FF_HURT_DISI);
/* Update some things -- similar to GF_KILL_WALL */
- p_ptr->update |= (PU_VIEW | PU_LITE | PU_FLOW | PU_MONSTERS | PU_MON_LITE);
+ p_ptr->update |= (PU_FLOW);
}
- if (p_ptr->riding)
- {
- riding_m_ptr->fy = py;
- riding_m_ptr->fx = px;
- cave[py][px].m_idx = p_ptr->riding;
- update_mon(p_ptr->riding, TRUE);
- }
+ /* Sound */
+ /* sound(SOUND_WALK); */
- /* Redraw new spot */
- lite_spot(py, px);
+#ifdef ALLOW_EASY_DISARM /* TNB */
- /* Redraw old spot */
- lite_spot(oy, ox);
+ if (do_pickup != always_pickup) mpe_mode |= MPE_DO_PICKUP;
- /* Sound */
- /* sound(SOUND_WALK); */
+#else /* ALLOW_EASY_DISARM -- TNB */
+
+ if (do_pickup) mpe_mode |= MPE_DO_PICKUP;
- move_player_effect(do_pickup, break_trap);
+#endif /* ALLOW_EASY_DISARM -- TNB */
+
+ if (break_trap) mpe_mode |= MPE_BREAK_TRAP;
+
+ /* Move the player */
+ (void)move_player_effect(y, x, mpe_mode);
}
}
row = py + ddy[dir];
col = px + ddx[dir];
- ignore_avoid_run = have_flag(f_flags_bold(row, col), FF_AVOID_RUN);
+ ignore_avoid_run = cave_have_flag_bold(row, col, FF_AVOID_RUN);
/* Extract cycle index */
i = chome[dir];
next_o_idx = o_ptr->next_o_idx;
/* Visible object */
- if (o_ptr->marked) return (TRUE);
+ if (o_ptr->marked & OM_FOUND) return (TRUE);
}
/* Assume unknown */
/* Deep water */
else if (have_flag(f_ptr->flags, FF_WATER) && have_flag(f_ptr->flags, FF_DEEP) &&
- (p_ptr->ffall || p_ptr->can_swim ||
- p_ptr->total_weight <= (((u32b)adj_str_wgt[p_ptr->stat_ind[A_STR]]*(p_ptr->pclass == CLASS_BERSERKER ? 150 : 100)) / 2)))
+ (p_ptr->levitation || p_ptr->can_swim || (p_ptr->total_weight <= weight_limit())))
{
/* Ignore */
notice = FALSE;