static int damage;
-void mane_info(char *p, int power, int dam)
+static void mane_info(char *p, int power, int dam)
{
int plev = p_ptr->lev;
#ifdef JP
/* No redraw yet */
redraw = FALSE;
- num = mane_num;
+ num = p_ptr->mane_num;
/* Build a prompt (accept all spells) */
#ifdef JP
for (i = 0; i < num; i++)
{
/* Access the spell */
- spell = monster_powers[mane_spell[i]];
+ spell = monster_powers[p_ptr->mane_spell[i]];
chance = spell.manefail;
/* Reduce failure rate by INT/WIS adjustment */
chance -= 3 * (adj_mag_stat[p_ptr->stat_ind[spell.use_stat]] + adj_mag_stat[p_ptr->stat_ind[A_DEX]] - 2) / 2;
- if (spell.manedam) chance = chance * mane_dam[i] / spell.manedam;
+ if (spell.manedam) chance = chance * p_ptr->mane_dam[i] / spell.manedam;
- if (p_ptr->pseikaku == SEIKAKU_NAMAKE) chance += 10;
- if (p_ptr->pseikaku == SEIKAKU_KIREMONO) chance -= 3;
- if ((p_ptr->pseikaku == SEIKAKU_GAMAN) || (p_ptr->pseikaku == SEIKAKU_CHIKARA)) chance++;
+ chance += p_ptr->to_m_chance;
/* Extract the minimum failure rate */
minfail = adj_mag_fail[p_ptr->stat_ind[spell.use_stat]];
if (chance > 95) chance = 95;
/* Get info */
- mane_info(comment, mane_spell[i], (baigaesi ? mane_dam[i]*2 : mane_dam[i]));
+ mane_info(comment, p_ptr->mane_spell[i], (baigaesi ? p_ptr->mane_dam[i]*2 : p_ptr->mane_dam[i]));
/* Dump the spell --(-- */
sprintf(psi_desc, " %c) %-30s %3d%%%s",
}
/* Save the spell index */
- spell = monster_powers[mane_spell[i]];
+ spell = monster_powers[p_ptr->mane_spell[i]];
/* Verify it */
if (ask)
/* Prompt */
#ifdef JP
-(void) strnfmt(tmp_val, 78, "%s¤ò¤Þ¤Í¤Þ¤¹¤«¡©", monster_powers[mane_spell[i]].name);
+(void) strnfmt(tmp_val, 78, "%s¤ò¤Þ¤Í¤Þ¤¹¤«¡©", monster_powers[p_ptr->mane_spell[i]].name);
#else
- (void)strnfmt(tmp_val, 78, "Use %s? ", monster_powers[mane_spell[i]].name);
+ (void)strnfmt(tmp_val, 78, "Use %s? ", monster_powers[p_ptr->mane_spell[i]].name);
#endif
/* Save the choice */
(*sn) = i;
- damage = (baigaesi ? mane_dam[i]*2 : mane_dam[i]);
+ damage = (baigaesi ? p_ptr->mane_dam[i]*2 : p_ptr->mane_dam[i]);
/* Success */
return (TRUE);
{
int dir;
int plev = p_ptr->lev;
- bool unique_okay = FALSE;
- if (randint1(50+plev) < plev/10) unique_okay = TRUE;
+ u32b mode = (PM_ALLOW_GROUP | PM_FORCE_PET);
+ u32b u_mode = 0L;
+
+ if (randint1(50+plev) < plev/10) u_mode = PM_ALLOW_UNIQUE;
/* spell code */
fire_rocket(GF_ROCKET, dir, damage, 2);
break;
- case MS_ARROW_1:
- case MS_ARROW_2:
+ case MS_SHOOT:
if (!get_aim_dir(&dir)) return FALSE;
#ifdef JP
else msg_print("Ìð¤òÊü¤Ã¤¿¡£");
fire_bolt(GF_ARROW, dir, damage);
break;
- case MS_ARROW_3:
- case MS_ARROW_4:
- if (!get_aim_dir(&dir)) return FALSE;
-#ifdef JP
-else msg_print("¥Ü¥ë¥È¤ò·â¤Ã¤¿¡£");
-#else
- else msg_print("You fires a bolt.");
-#endif
-
- fire_bolt(GF_ARROW, dir, damage);
+ case MS_XXX2:
+ break;
+ case MS_XXX3:
+ break;
+ case MS_XXX4:
break;
case MS_BR_ACID:
if (!get_aim_dir(&dir)) return FALSE;
msg_print("hek!");
msg_print(NULL);
- p_ptr->energy += (randint1(200)+1200);
+ /* Hack */
+ p_ptr->energy_need -= 1000 + (100 + randint1(200)+200)*TURNS_PER_TICK/10;
/* Redraw map */
p_ptr->redraw |= (PR_MAP);
#endif
for (k = 0;k < 4; k++)
{
- (void)summon_kin_player(TRUE, plev, target_row, target_col, TRUE);
+ (void)summon_kin_player(plev, target_row, target_col, (PM_FORCE_PET | PM_ALLOW_GROUP));
}
break;
}
#endif
if (max_cyber > 4) max_cyber = 4;
for (k = 0;k < max_cyber; k++)
- summon_specific(-1, target_row, target_col, plev, SUMMON_CYBER, TRUE, TRUE, TRUE, FALSE, FALSE);
+ summon_specific(-1, target_row, target_col, plev, SUMMON_CYBER, mode);
break;
}
case MS_S_MONSTER:
msg_print("You summons help.");
#endif
for (k = 0;k < 1; k++)
- summon_specific(-1, target_row, target_col, plev, 0, TRUE, TRUE, TRUE, unique_okay, FALSE);
+ summon_specific(-1, target_row, target_col, plev, 0, (mode | u_mode));
break;
}
case MS_S_MONSTERS:
msg_print("You summons monsters!");
#endif
for (k = 0;k < 6; k++)
- summon_specific(-1, target_row, target_col, plev, 0, TRUE, TRUE, TRUE, unique_okay, FALSE);
+ summon_specific(-1, target_row, target_col, plev, 0, (mode | u_mode));
break;
}
case MS_S_ANT:
msg_print("You summons ants.");
#endif
for (k = 0;k < 6; k++)
- summon_specific(-1, target_row, target_col, plev, SUMMON_ANT, TRUE, TRUE, TRUE, FALSE, FALSE);
+ summon_specific(-1, target_row, target_col, plev, SUMMON_ANT, mode);
break;
}
case MS_S_SPIDER:
msg_print("You summons spiders.");
#endif
for (k = 0;k < 6; k++)
- summon_specific(-1, target_row, target_col, plev, SUMMON_SPIDER, TRUE, TRUE, TRUE, FALSE, FALSE);
+ summon_specific(-1, target_row, target_col, plev, SUMMON_SPIDER, mode);
break;
}
case MS_S_HOUND:
msg_print("You summons hounds.");
#endif
for (k = 0;k < 4; k++)
- summon_specific(-1, target_row, target_col, plev, SUMMON_HOUND, TRUE, TRUE, TRUE, FALSE, FALSE);
+ summon_specific(-1, target_row, target_col, plev, SUMMON_HOUND, mode);
break;
}
case MS_S_HYDRA:
msg_print("You summons hydras.");
#endif
for (k = 0;k < 4; k++)
- summon_specific(-1, target_row, target_col, plev, SUMMON_HYDRA, TRUE, TRUE, TRUE, FALSE, FALSE);
+ summon_specific(-1, target_row, target_col, plev, SUMMON_HYDRA, mode);
break;
}
case MS_S_ANGEL:
msg_print("You summons angel!");
#endif
for (k = 0;k < 1; k++)
- summon_specific(-1, target_row, target_col, plev, SUMMON_ANGEL, TRUE, TRUE, TRUE, FALSE, FALSE);
+ summon_specific(-1, target_row, target_col, plev, SUMMON_ANGEL, mode);
break;
}
case MS_S_DEMON:
msg_print("You summons a demon from the Courts of Chaos!");
#endif
for (k = 0;k < 1; k++)
- summon_specific(-1, target_row, target_col, plev, SUMMON_DEMON, TRUE, TRUE, TRUE, unique_okay, FALSE);
+ summon_specific(-1, target_row, target_col, plev, SUMMON_DEMON, (mode | u_mode));
break;
}
case MS_S_UNDEAD:
msg_print("You summons an undead adversary!");
#endif
for (k = 0;k < 1; k++)
- summon_specific(-1, target_row, target_col, plev, SUMMON_UNDEAD, TRUE, TRUE, TRUE, unique_okay, FALSE);
+ summon_specific(-1, target_row, target_col, plev, SUMMON_UNDEAD, (mode | u_mode));
break;
}
case MS_S_DRAGON:
msg_print("You summons dragon!");
#endif
for (k = 0;k < 1; k++)
- summon_specific(-1, target_row, target_col, plev, SUMMON_DRAGON, TRUE, TRUE, TRUE, unique_okay, FALSE);
+ summon_specific(-1, target_row, target_col, plev, SUMMON_DRAGON, (mode | u_mode));
break;
}
case MS_S_HI_UNDEAD:
msg_print("You summons greater undead!");
#endif
for (k = 0;k < 6; k++)
- summon_specific(-1, target_row, target_col, plev, SUMMON_HI_UNDEAD, TRUE, TRUE, TRUE, unique_okay, FALSE);
+ summon_specific(-1, target_row, target_col, plev, SUMMON_HI_UNDEAD, (mode | u_mode));
break;
}
case MS_S_HI_DRAGON:
msg_print("You summons ancient dragons!");
#endif
for (k = 0;k < 4; k++)
- summon_specific(-1, target_row, target_col, plev, SUMMON_HI_DRAGON, TRUE, TRUE, TRUE, unique_okay, FALSE);
+ summon_specific(-1, target_row, target_col, plev, SUMMON_HI_DRAGON, (mode | u_mode));
break;
}
case MS_S_AMBERITE:
int k;
if (!target_set(TARGET_KILL)) return FALSE;
#ifdef JP
-msg_print("¥¢¥ó¥Ð¡¼¤Î²¦¤ò¾¤´¤·¤¿¡ª");
+msg_print("¥¢¥ó¥Ð¡¼¤Î²¦²¤ò¾¤´¤·¤¿¡ª");
#else
msg_print("You summons Lords of Amber!");
#endif
for (k = 0;k < 4; k++)
- summon_specific(-1, target_row, target_col, plev, SUMMON_AMBERITES, TRUE, TRUE, TRUE, TRUE, FALSE);
+ summon_specific(-1, target_row, target_col, plev, SUMMON_AMBERITES, (mode | PM_ALLOW_UNIQUE));
break;
}
case MS_S_UNIQUE:
msg_print("You summons special opponents!");
#endif
for (k = 0;k < 4; k++)
- if (summon_specific(-1, target_row, target_col, plev, SUMMON_UNIQUE, TRUE, TRUE, TRUE, TRUE, FALSE)) count++;
+ if (summon_specific(-1, target_row, target_col, plev, SUMMON_UNIQUE, (mode | PM_ALLOW_UNIQUE))) count++;
for (k = count;k < 4; k++)
- summon_specific(-1, target_row, target_col, plev, SUMMON_HI_UNDEAD, TRUE, TRUE, TRUE, unique_okay, FALSE);
+ summon_specific(-1, target_row, target_col, plev, SUMMON_HI_UNDEAD, (mode | u_mode));
break;
}
default:
return TRUE;
}
- if (!mane_num)
+ if (!p_ptr->mane_num)
{
#ifdef JP
msg_print("¤Þ¤Í¤é¤ì¤ë¤â¤Î¤¬²¿¤â¤Ê¤¤¡ª");
/* get power */
if (!get_mane_power(&n, baigaesi)) return FALSE;
- spell = monster_powers[mane_spell[n]];
+ spell = monster_powers[p_ptr->mane_spell[n]];
/* Spell failure chance */
chance = spell.manefail;
sound(SOUND_ZAP);
/* Cast the spell */
- cast = use_mane(mane_spell[n]);
+ cast = use_mane(p_ptr->mane_spell[n]);
if (!cast) return FALSE;
}
- mane_num--;
- for (j = n; j < mane_num;j++)
+ p_ptr->mane_num--;
+ for (j = n; j < p_ptr->mane_num;j++)
{
- mane_spell[j] = mane_spell[j+1];
- mane_dam[j] = mane_dam[j+1];
+ p_ptr->mane_spell[j] = p_ptr->mane_spell[j+1];
+ p_ptr->mane_dam[j] = p_ptr->mane_dam[j+1];
}
/* Take a turn */