}
+u32b get_curse(int power, object_type *o_ptr)
+{
+ u32b new_curse;
+
+ while(1)
+ {
+ new_curse = (1 << (randint0(MAX_CURSE)+4));
+ if (power == 2)
+ {
+ if (!(new_curse & TRC_HEAVY_MASK)) continue;
+ }
+ else if (power == 1)
+ {
+ if (new_curse & TRC_SPECIAL_MASK) continue;
+ }
+ else if (power == 0)
+ {
+ if (new_curse & TRC_HEAVY_MASK) continue;
+ }
+ if (((o_ptr->tval < TV_BOW) || (o_ptr->tval > TV_SWORD)) && (new_curse == TRC_LOW_MELEE)) continue;
+ if (((o_ptr->tval < TV_BOOTS) || (o_ptr->tval > TV_DRAG_ARMOR)) && (new_curse == TRC_LOW_AC)) continue;
+ break;
+ }
+ return new_curse;
+}
+
void curse_equipment(int chance, int heavy_chance)
{
bool changed = FALSE;
+ int curse_power = 0;
+ u32b new_curse;
u32b o1, o2, o3;
object_type *o_ptr = &inventory[INVEN_RARM + randint0(12)];
+ char o_name[MAX_NLEN];
if (randint1(100) > chance) return;
object_flags(o_ptr, &o1, &o2, &o3);
+ object_desc(o_name, o_ptr, FALSE, 0);
/* Extra, biased saving throw for blessed items */
if ((o3 & TR3_BLESSED) && (randint1(888) > chance))
{
- char o_name[MAX_NLEN];
- object_desc(o_name, o_ptr, FALSE, 0);
#ifdef JP
msg_format("%s¤Ï¼ö¤¤¤òÄ·¤ÍÊÖ¤·¤¿¡ª", o_name,
#else
if ((randint1(100) <= heavy_chance) &&
(o_ptr->name1 || o_ptr->name2 || o_ptr->art_name))
{
- if (!(o3 & TR3_HEAVY_CURSE))
+ if (!(o_ptr->curse_flags & TRC_HEAVY_CURSE))
changed = TRUE;
- o_ptr->art_flags3 |= TR3_HEAVY_CURSE;
- o_ptr->art_flags3 |= TR3_CURSED;
- o_ptr->ident |= IDENT_CURSED;
+ o_ptr->curse_flags |= TRC_HEAVY_CURSE;
+ o_ptr->curse_flags |= TRC_CURSED;
+ curse_power++;
}
else
{
- if (!(o_ptr->ident & IDENT_CURSED))
+ if (!cursed_p(o_ptr))
changed = TRUE;
- o_ptr->art_flags3 |= TR3_CURSED;
- o_ptr->ident |= IDENT_CURSED;
+ o_ptr->curse_flags |= TRC_CURSED;
+ }
+ if (heavy_chance >= 50) curse_power++;
+
+ new_curse = get_curse(curse_power, o_ptr);
+ if (!(o_ptr->curse_flags & new_curse))
+ {
+ changed = TRUE;
+ o_ptr->curse_flags |= new_curse;
}
if (changed)
{
#ifdef JP
-msg_print("°°Õ¤ËËþ¤Á¤¿¹õ¤¤¥ª¡¼¥é¤¬¤¢¤Ê¤¿¤ò¤È¤ê¤Þ¤¤¤¿...");
+msg_format("°°Õ¤ËËþ¤Á¤¿¹õ¤¤¥ª¡¼¥é¤¬%s¤ò¤È¤ê¤Þ¤¤¤¿...", o_name);
#else
- msg_print("There is a malignant black aura surrounding you...");
+ msg_format("There is a malignant black aura surrounding %s...", o_name);
#endif
o_ptr->feeling = FEEL_NONE;
}
+ p_ptr->update |= (PU_BONUS);
}
bool no_inate = FALSE;
bool do_disi = FALSE;
int dam = 0;
+ u32b mode = 0L;
int s_num_6 = (easy_band ? 2 : 6);
int s_num_4 = (easy_band ? 1 : 4);
if (!num) return (FALSE);
/* Stop if player is dead or gone */
- if (!alive || death) return (FALSE);
+ if (!p_ptr->playing || p_ptr->is_dead) return (FALSE);
/* Stop if player is leaving */
if (p_ptr->leaving) return (FALSE);
}
}
+
/* Cast the spell. */
switch (thrown_spell)
{
set_tim_ffall(0, TRUE);
set_tim_sh_touki(0, TRUE);
set_tim_sh_fire(0, TRUE);
+ set_tim_sh_holy(0, TRUE);
+ set_tim_eyeeye(0, TRUE);
set_magicdef(0, TRUE);
set_resist_magic(0, TRUE);
set_oppose_acid(0, TRUE);
/* Window stuff */
p_ptr->window |= (PW_OVERHEAD | PW_DUNGEON);
- p_ptr->energy -= 100;
+ p_ptr->energy_need += ENERGY_NEED();
}
if (p_ptr->riding)
{
}
else
{
- curse_equipment(33, 0);
+ curse_equipment(15, 0);
take_hit(DAMAGE_ATTACK, dam, ddesc, MS_CAUSE_1);
}
break;
}
else
{
- curse_equipment(50, 5);
+ curse_equipment(25, MIN(rlev/2-15, 5));
take_hit(DAMAGE_ATTACK, dam, ddesc, MS_CAUSE_2);
}
break;
}
else
{
- curse_equipment(80, 15);
+ curse_equipment(33, MIN(rlev/2-15, 15));
take_hit(DAMAGE_ATTACK, dam, ddesc, MS_CAUSE_3);
}
break;
#endif
take_hit(DAMAGE_ATTACK, dummy, m_name, MS_HAND_DOOM);
- curse_equipment(100, 20);
+ curse_equipment(40, 20);
if (p_ptr->chp < 1) p_ptr->chp = 1;
}
for (i=INVEN_RARM;i<INVEN_TOTAL;i++)
{
o_ptr = &inventory[i];
- if(!(o_ptr->ident & IDENT_CURSED))
+ if(!cursed_p(o_ptr))
{
object_flags(o_ptr, &f1, &f2, &f3);
if((f3 & TR3_TELEPORT) || (p_ptr->muta1 & MUT1_VTELEPORT) || (p_ptr->pclass == CLASS_IMITATOR))
{
#ifdef JP
- if(get_check_strict("¤Ä¤¤¤Æ¤¤¤¤Þ¤¹¤«¡©", 1))
+ if(get_check_strict("¤Ä¤¤¤Æ¤¤¤¤Þ¤¹¤«¡©", CHECK_OKAY_CANCEL))
#else
- if(get_check_strict("Do you follow it? ", 1))
+ if(get_check_strict("Do you follow it? ", CHECK_OKAY_CANCEL))
#endif
{
if (one_in_(3))
#endif
}
else teleport_player_to(m_ptr->fy, m_ptr->fx, TRUE);
- p_ptr->energy -= 100;
+ p_ptr->energy_need += ENERGY_NEED();
}
break;
}
if (p_ptr->inside_arena || p_ptr->inside_battle) return FALSE;
for (k = 0; k < 6; k++)
{
- count += summon_specific(m_idx, m_ptr->fy, m_ptr->fx, rlev, SUMMON_BIZARRE1, TRUE, FALSE, FALSE, FALSE, FALSE);
+ count += summon_specific(m_idx, m_ptr->fy, m_ptr->fx, rlev, SUMMON_BIZARRE1, PM_ALLOW_GROUP);
}
return FALSE;
if (p_ptr->inside_arena || p_ptr->inside_battle || !summon_possible(m_ptr->fy, m_ptr->fx)) return FALSE;
delete_monster_idx(cave[m_ptr->fy][m_ptr->fx].m_idx);
- summon_named_creature(dummy_y, dummy_x, MON_BANOR, FALSE, FALSE, is_friendly(m_ptr), FALSE);
+ summon_named_creature(0, dummy_y, dummy_x, MON_BANOR, mode);
m_list[hack_m_idx_ii].hp = dummy_hp;
m_list[hack_m_idx_ii].maxhp = dummy_maxhp;
- summon_named_creature(dummy_y, dummy_x, MON_LUPART, FALSE, FALSE, is_friendly(m_ptr), FALSE);
+ summon_named_creature(0, dummy_y, dummy_x, MON_LUPART, mode);
m_list[hack_m_idx_ii].hp = dummy_hp;
m_list[hack_m_idx_ii].maxhp = dummy_maxhp;
delete_monster_idx(k);
}
}
- summon_named_creature(dummy_y, dummy_x, MON_BANORLUPART, FALSE, FALSE, is_friendly(m_ptr), FALSE);
+ summon_named_creature(0, dummy_y, dummy_x, MON_BANORLUPART, mode);
m_list[hack_m_idx_ii].hp = dummy_hp;
m_list[hack_m_idx_ii].maxhp = dummy_maxhp;
if(m_ptr->r_idx == MON_ROLENTO)
{
int num = 1 + randint1(3);
+
for (k = 0; k < num; k++)
{
- count += summon_named_creature(y, x, MON_SHURYUUDAN, FALSE, FALSE, is_friendly(m_ptr), is_pet(m_ptr));
+ count += summon_named_creature(m_idx, y, x, MON_SHURYUUDAN, mode);
}
}
else if(m_ptr->r_idx == MON_LOUSY)
int num = 2 + randint1(3);
for (k = 0; k < num; k++)
{
- count += summon_specific(m_idx, y, x, rlev, SUMMON_LOUSE, TRUE, FALSE, FALSE, FALSE, FALSE);
+ count += summon_specific(m_idx, y, x, rlev, SUMMON_LOUSE, PM_ALLOW_GROUP);
}
}
else if(m_ptr->r_idx == MON_BULLGATES)
int num = 2 + randint1(3);
for (k = 0; k < num; k++)
{
- count += summon_named_creature(y, x, 921, FALSE, FALSE, is_friendly(m_ptr), is_pet(m_ptr));
+ count += summon_named_creature(m_idx, y, x, 921, mode);
}
}
else if (m_ptr->r_idx == MON_CALDARM)
int num = randint1(3);
for (k = 0; k < num; k++)
{
- count += summon_named_creature(y, x, 930, FALSE, FALSE, is_friendly(m_ptr), is_pet(m_ptr));
+ count += summon_named_creature(m_idx, y, x, 930, mode);
}
}
else if (m_ptr->r_idx == MON_SERPENT || m_ptr->r_idx == MON_ZOMBI_SERPENT)
for (k = 0; k < num; k++)
{
- count += summon_specific(m_idx, y, x, rlev, SUMMON_GUARDIANS, TRUE, FALSE, FALSE, TRUE, FALSE);
+ count += summon_specific(m_idx, y, x, rlev, SUMMON_GUARDIANS, (PM_ALLOW_GROUP | PM_ALLOW_UNIQUE));
}
}
else
for (k = 0; k < 4; k++)
{
- count += summon_specific(m_idx, y, x, rlev, SUMMON_KIN, TRUE, FALSE, FALSE, FALSE, FALSE);
+ count += summon_specific(m_idx, y, x, rlev, SUMMON_KIN, PM_ALLOW_GROUP);
}
}
#ifdef JP
for (k = 0; k < 1; k++)
{
- count += summon_specific(m_idx, y, x, rlev, 0, TRUE, FALSE, FALSE, TRUE, FALSE);
+ count += summon_specific(m_idx, y, x, rlev, 0, (PM_ALLOW_GROUP | PM_ALLOW_UNIQUE));
}
#ifdef JP
if (blind && count) msg_print("²¿¤«¤¬´Ö¶á¤Ë¸½¤ì¤¿²»¤¬¤¹¤ë¡£");
for (k = 0; k < s_num_6; k++)
{
- count += summon_specific(m_idx, y, x, rlev, 0, TRUE, FALSE, FALSE, TRUE, FALSE);
+ count += summon_specific(m_idx, y, x, rlev, 0, (PM_ALLOW_GROUP | PM_ALLOW_UNIQUE));
}
#ifdef JP
if (blind && count) msg_print("¿¤¯¤Î¤â¤Î¤¬´Ö¶á¤Ë¸½¤ì¤¿²»¤¬¤¹¤ë¡£");
for (k = 0; k < s_num_6; k++)
{
- count += summon_specific(m_idx, y, x, rlev, SUMMON_ANT, TRUE, FALSE, FALSE, FALSE, FALSE);
+ count += summon_specific(m_idx, y, x, rlev, SUMMON_ANT, PM_ALLOW_GROUP);
}
#ifdef JP
if (blind && count) msg_print("¿¤¯¤Î¤â¤Î¤¬´Ö¶á¤Ë¸½¤ì¤¿²»¤¬¤¹¤ë¡£");
for (k = 0; k < s_num_6; k++)
{
- count += summon_specific(m_idx, y, x, rlev, SUMMON_SPIDER, TRUE, FALSE, FALSE, FALSE, FALSE);
+ count += summon_specific(m_idx, y, x, rlev, SUMMON_SPIDER, PM_ALLOW_GROUP);
}
#ifdef JP
if (blind && count) msg_print("¿¤¯¤Î¤â¤Î¤¬´Ö¶á¤Ë¸½¤ì¤¿²»¤¬¤¹¤ë¡£");
for (k = 0; k < s_num_4; k++)
{
- count += summon_specific(m_idx, y, x, rlev, SUMMON_HOUND, TRUE, FALSE, FALSE, FALSE, FALSE);
+ count += summon_specific(m_idx, y, x, rlev, SUMMON_HOUND, PM_ALLOW_GROUP);
}
#ifdef JP
if (blind && count) msg_print("¿¤¯¤Î¤â¤Î¤¬´Ö¶á¤Ë¸½¤ì¤¿²»¤¬¤¹¤ë¡£");
for (k = 0; k < s_num_4; k++)
{
- count += summon_specific(m_idx, y, x, rlev, SUMMON_HYDRA, TRUE, FALSE, FALSE, FALSE, FALSE);
+ count += summon_specific(m_idx, y, x, rlev, SUMMON_HYDRA, PM_ALLOW_GROUP);
}
#ifdef JP
if (blind && count) msg_print("¿¤¯¤Î¤â¤Î¤¬´Ö¶á¤Ë¸½¤ì¤¿²»¤¬¤¹¤ë¡£");
for (k = 0; k < num; k++)
{
- count += summon_specific(m_idx, y, x, rlev, SUMMON_ANGEL, TRUE, FALSE, FALSE, FALSE, FALSE);
+ count += summon_specific(m_idx, y, x, rlev, SUMMON_ANGEL, PM_ALLOW_GROUP);
}
if (count < 2)
for (k = 0; k < 1; k++)
{
- count += summon_specific(m_idx, y, x, rlev, SUMMON_DEMON, TRUE, FALSE, FALSE, FALSE, FALSE);
+ count += summon_specific(m_idx, y, x, rlev, SUMMON_DEMON, PM_ALLOW_GROUP);
}
#ifdef JP
if (blind && count) msg_print("²¿¤«¤¬´Ö¶á¤Ë¸½¤ì¤¿²»¤¬¤¹¤ë¡£");
for (k = 0; k < 1; k++)
{
- count += summon_specific(m_idx, y, x, rlev, SUMMON_UNDEAD, TRUE, FALSE, FALSE, FALSE, FALSE);
+ count += summon_specific(m_idx, y, x, rlev, SUMMON_UNDEAD, PM_ALLOW_GROUP);
}
#ifdef JP
if (blind && count) msg_print("²¿¤«¤¬´Ö¶á¤Ë¸½¤ì¤¿²»¤¬¤¹¤ë¡£");
for (k = 0; k < 1; k++)
{
- count += summon_specific(m_idx, y, x, rlev, SUMMON_DRAGON, TRUE, FALSE, FALSE, FALSE, FALSE);
+ count += summon_specific(m_idx, y, x, rlev, SUMMON_DRAGON, PM_ALLOW_GROUP);
}
#ifdef JP
if (blind && count) msg_print("²¿¤«¤¬´Ö¶á¤Ë¸½¤ì¤¿²»¤¬¤¹¤ë¡£");
}
if (!cave_floor_bold(cy, cx)) continue;
- if (summon_named_creature(cy, cx, MON_NAZGUL, FALSE, FALSE, is_friendly(m_ptr), is_pet(m_ptr)))
+ if (summon_named_creature(m_idx, cy, cx, MON_NAZGUL, mode))
{
y = cy;
x = cx;
for (k = 0; k < s_num_6; k++)
{
- count += summon_specific(m_idx, y, x, rlev, SUMMON_HI_UNDEAD, TRUE, FALSE, FALSE, TRUE, FALSE);
+ count += summon_specific(m_idx, y, x, rlev, SUMMON_HI_UNDEAD, (PM_ALLOW_GROUP | PM_ALLOW_UNIQUE));
}
}
if (blind && count)
for (k = 0; k < s_num_4; k++)
{
- count += summon_specific(m_idx, y, x, rlev, SUMMON_HI_DRAGON, TRUE, FALSE, FALSE, TRUE, FALSE);
+ count += summon_specific(m_idx, y, x, rlev, SUMMON_HI_DRAGON, (PM_ALLOW_GROUP | PM_ALLOW_UNIQUE));
}
if (blind && count)
{
for (k = 0; k < s_num_4; k++)
{
- count += summon_specific(m_idx, y, x, rlev, SUMMON_AMBERITES, TRUE, FALSE, FALSE, TRUE, FALSE);
+ count += summon_specific(m_idx, y, x, rlev, SUMMON_AMBERITES, (PM_ALLOW_GROUP | PM_ALLOW_UNIQUE));
}
if (blind && count)
{
for (k = 0; k < s_num_4; k++)
{
- count += summon_specific(m_idx, y, x, rlev, SUMMON_UNIQUE, TRUE, FALSE, FALSE, TRUE, FALSE);
+ count += summon_specific(m_idx, y, x, rlev, SUMMON_UNIQUE, (PM_ALLOW_GROUP | PM_ALLOW_UNIQUE));
}
if (r_ptr->flags3 & RF3_GOOD)
{
for (k = count; k < s_num_4; k++)
{
- count += summon_specific(m_idx, y, x, rlev, SUMMON_ANGEL, TRUE, FALSE, FALSE, TRUE, FALSE);
+ count += summon_specific(m_idx, y, x, rlev, SUMMON_ANGEL, (PM_ALLOW_GROUP | PM_ALLOW_UNIQUE));
}
}
else
{
for (k = count; k < s_num_4; k++)
{
- count += summon_specific(m_idx, y, x, rlev, SUMMON_HI_UNDEAD, TRUE, FALSE, FALSE, TRUE, FALSE);
+ count += summon_specific(m_idx, y, x, rlev, SUMMON_HI_UNDEAD, (PM_ALLOW_GROUP | PM_ALLOW_UNIQUE));
}
}
if (blind && count)
{
if (thrown_spell != 167)
{
- if (mane_num == MAX_MANE)
+ if (p_ptr->mane_num == MAX_MANE)
{
int i;
- mane_num--;
- for (i = 0;i < mane_num;i++)
+ p_ptr->mane_num--;
+ for (i = 0;i < p_ptr->mane_num;i++)
{
- mane_spell[i] = mane_spell[i+1];
- mane_dam[i] = mane_dam[i+1];
+ p_ptr->mane_spell[i] = p_ptr->mane_spell[i+1];
+ p_ptr->mane_dam[i] = p_ptr->mane_dam[i+1];
}
}
- mane_spell[mane_num] = thrown_spell - 96;
- mane_dam[mane_num] = dam;
- mane_num++;
+ p_ptr->mane_spell[p_ptr->mane_num] = thrown_spell - 96;
+ p_ptr->mane_dam[p_ptr->mane_num] = dam;
+ p_ptr->mane_num++;
new_mane = TRUE;
p_ptr->redraw |= (PR_MANE);
/* Always take note of monsters that kill you */
- if (death && (r_ptr->r_deaths < MAX_SHORT) && !p_ptr->inside_arena)
+ if (p_ptr->is_dead && (r_ptr->r_deaths < MAX_SHORT) && !p_ptr->inside_arena)
{
r_ptr->r_deaths++;
}