/* File: cmd5.c */
-/* Purpose: Spell/Prayer commands */
-
/*
- * Copyright (c) 1989 James E. Wilson, Robert A. Koeneke
+ * Copyright (c) 1997 Ben Harrison, James E. Wilson, Robert A. Koeneke
*
- * This software may be copied and distributed for educational, research, and
- * not for profit purposes provided that this copyright and statement are
- * included in all such copies.
+ * This software may be copied and distributed for educational, research,
+ * and not for profit purposes provided that this copyright and statement
+ * are included in all such copies. Other copyrights may also apply.
*/
+/* Purpose: Spell/Prayer commands */
+
#include "angband.h"
#include "spellstips.h"
* The "known" should be TRUE for cast/pray, FALSE for study
*/
-bool select_spellbook=FALSE;
bool select_the_force=FALSE;
static int get_spell(int *sn, cptr prompt, int sval, bool learned, int use_realm)
s = "You have no books that you can read.";
#endif
- select_spellbook=TRUE;
if (p_ptr->pclass == CLASS_FORCETRAINER)
select_the_force = TRUE;
if (!get_item(&item, q, s, (USE_INVEN | USE_FLOOR))){
- select_spellbook = FALSE;
select_the_force = FALSE;
return;
}
- select_spellbook = FALSE;
select_the_force = FALSE;
if (item == 1111) { /* the_force */
s_ptr = &mp_ptr->info[use_realm - 1][spell];
}
- roff_to_buf( spell_tips[technic2magic(use_realm)-1][spell] ,62,temp);
+ roff_to_buf(spell_tips[technic2magic(use_realm)-1][spell] ,62, temp, sizeof(temp));
for(j=0, line = 11;temp[j];j+=(1+strlen(&temp[j])))
{
prt(&temp[j], line, 15);
s = "You have no books that you can read.";
#endif
- select_spellbook=TRUE;
if (!get_item(&item, q, s, (USE_INVEN | USE_FLOOR))) return;
- select_spellbook=FALSE;
/* Get the item (in the pack) */
if (item >= 0)
(void)mass_genocide_undead(plev+50,TRUE);
break;
case 27: /* Clairvoyance */
- wiz_lite(FALSE, FALSE);
+ wiz_lite(FALSE);
break;
case 28: /* Restoration */
(void)do_res_stat(A_STR);
chg_virtue(V_KNOWLEDGE, 1);
chg_virtue(V_ENLIGHTEN, 1);
- wiz_lite(FALSE, FALSE);
+ wiz_lite(FALSE);
if (!(p_ptr->telepathy))
{
(void)set_tim_esp(randint1(30) + 25, FALSE);
fire_ball(GF_LITE, 0, 150, 8);
chg_virtue(V_KNOWLEDGE, 1);
chg_virtue(V_ENLIGHTEN, 1);
- wiz_lite(FALSE, FALSE);
+ wiz_lite(FALSE);
if ((prace_is_(RACE_VAMPIRE) || (p_ptr->mimic_form == MIMIC_VAMPIRE)) && !p_ptr->resist_lite)
{
#ifdef JP
}
else if (die < 106)
{
- destroy_area(py, px, 13+randint0(5), TRUE);
+ destroy_area(py, px, 13+randint0(5));
}
else if (die < 108)
{
(void)fire_beam(GF_AWAY_ALL, dir, plev);
break;
case 14: /* Word of Destruction */
- destroy_area(py, px, 13+randint0(5), TRUE);
+ destroy_area(py, px, 13+randint0(5));
break;
case 15: /* Invoke Logrus */
if (!get_aim_dir(&dir)) return FALSE;
}
else if (die < 106)
{
- destroy_area(py, px, 13+randint0(5), TRUE);
+ destroy_area(py, px, 13+randint0(5));
}
else if (die < 108)
{
chg_virtue(V_KNOWLEDGE, 1);
chg_virtue(V_ENLIGHTEN, 1);
- wiz_lite(FALSE, FALSE);
+ wiz_lite(FALSE);
}
else
{
case 31: /* Clairvoyance */
chg_virtue(V_KNOWLEDGE, 1);
chg_virtue(V_ENLIGHTEN, 1);
- wiz_lite(FALSE, FALSE);
+ wiz_lite(FALSE);
if (!p_ptr->telepathy)
{
(void)set_tim_esp(randint1(30) + 25, FALSE);
}
break;
case 27: /* Word of Destruction */
- destroy_area(py, px, 13+randint0(5), TRUE);
+ destroy_area(py, px, 13+randint0(5));
break;
case 28: /* Eye for an Eye */
set_tim_eyeeye(randint1(10)+10, FALSE);
s = "You have no spell books!";
#endif
- select_spellbook=TRUE;
if (p_ptr->pclass == CLASS_FORCETRAINER)
select_the_force = TRUE;
if (!get_item(&item, q, s, (USE_INVEN | USE_FLOOR))){
- select_spellbook = FALSE;
select_the_force = FALSE;
return;
}
- select_spellbook = FALSE;
select_the_force = FALSE;
if (item == 1111) { /* the_force */
monster_race *r_ptr1 = &r_info[m_ptr1->r_idx];
monster_race *r_ptr2 = &r_info[m_ptr2->r_idx];
+ /* Unused */
+ (void)v;
+
if (w1 == p_ptr->riding) return TRUE;
if (w2 == p_ptr->riding) return FALSE;
#ifdef JP
msg_print("¤½¤Î¥â¥ó¥¹¥¿¡¼¤Ï¥Ú¥Ã¥È¤Ç¤Ï¤¢¤ê¤Þ¤»¤ó¡£");
#else
- msg_print("That monster is no a pet.");
+ msg_print("That monster is not a pet.");
#endif
return FALSE;