Ejemplo n.º 1
0
void do_cmd_snipe(void)
{
    int             n = 0;
    snipe_power     spell;
    bool            cast;

    if (p_ptr->confused)
    {
        msg_print("You are too confused!");
        return;
    }
    if (p_ptr->image)
    {
        msg_print("You are hallucinating!");
        return;
    }
    if (p_ptr->stun)
    {
        msg_print("You are too stuned!");
        return;
    }

    if (!get_snipe_power(&n, FALSE)) return;
    spell = snipe_powers[n];
    sound(SOUND_SHOOT);
    cast = cast_sniper_spell(n);
    if (!cast) return;

    p_ptr->redraw |= (PR_HP | PR_MANA);
    p_ptr->window |= (PW_PLAYER);
    p_ptr->window |= (PW_SPELL);
}
Ejemplo n.º 2
0
void do_cmd_snipe_browse(void)
{
    int n = 0;
    int j, line;
    char temp[62 * 4];

    screen_save();

    while(1)
    {
        /* get power */
        if (!get_snipe_power(&n, TRUE))
        {
            screen_load();
            return;
        }

        /* Clear lines, position cursor  (really should use strlen here) */
        Term_erase(12, 22, 255);
        Term_erase(12, 21, 255);
        Term_erase(12, 20, 255);
        Term_erase(12, 19, 255);
        Term_erase(12, 18, 255);

        roff_to_buf(snipe_tips[n], 62, temp, sizeof(temp));
        for(j = 0, line = 19; temp[j]; j += (1 + strlen(&temp[j])))
        {
            prt(&temp[j], line, 15);
            line++;
        }
    }
}
Ejemplo n.º 3
0
/*!
 * @brief スナイパー技能コマンドのメインルーチン /
 * @return なし
 */
void do_cmd_snipe(void)
{
	int             n = 0;
	bool            cast;


	/* not if confused */
	if (p_ptr->confused)
	{
		msg_print(_("混乱していて集中できない!", "You are too confused!"));
		return;
	}

	/* not if hullucinated */
	if (p_ptr->image)
	{
		msg_print(_("幻覚が見えて集中できない!", "You are too hallucinated!"));
		return;
	}

	/* not if stuned */
	if (p_ptr->stun)
	{
		msg_print(_("頭が朦朧としていて集中できない!", "You are too stuned!"));
		return;
	}

	/* get power */
	if (!get_snipe_power(&n, FALSE)) return;

	sound(SOUND_SHOOT);

	/* Cast the spell */
	cast = cast_sniper_spell(n);

	if (!cast) return;
#if 0
	/* Take a turn */
	energy_use = 100;
#endif
	/* Redraw mana */
	p_ptr->redraw |= (PR_HP | PR_MANA);

	/* Window stuff */
	p_ptr->window |= (PW_PLAYER);
	p_ptr->window |= (PW_SPELL);
}