Ejemplo n.º 1
0
/*
 * Mirror Master's Dimension Door
 */
bool mirror_tunnel(void)
{
    int x = 0, y = 0;

    /* Rerutn FALSE if cancelled */
    if (!tgt_pt(&x, &y)) return FALSE;

    if (dimension_door_aux(x, y, p_ptr->lev / 2 + 10)) return TRUE;

#ifdef JP
    msg_print("鏡の世界をうまく通れなかった!");
#else
    msg_print("You fail to pass the mirror plane correctly!");
#endif

    return TRUE;
}
Ejemplo n.º 2
0
static void _mirror_tunnel_spell(int cmd, variant *res)
{
    switch (cmd)
    {
    case SPELL_NAME:
        var_set_string(res, "Mirror Tunnel");
        break;
    case SPELL_DESC:
        if (_on_mirror)
            var_set_string(res, "Quickly teleport to a given location.");
        else
            var_set_string(res, "Teleport to a given location.");
        break;
    case SPELL_CAST:
    {
        int x = 0, y = 0;
        var_set_bool(res, FALSE);

        msg_print("You go through the mirror world ...");
        if (!tgt_pt(&x, &y, p_ptr->lev / 2 + 10)) return;
        if (!dimension_door_aux(x, y, p_ptr->lev / 2 + 10))
            msg_print("You fail to pass into the mirror plane correctly!");

        var_set_bool(res, TRUE);
        break;
    }
    case SPELL_ENERGY:
        if (_on_mirror)
        {
            var_set_int(res, 50);
            break;
        }
    default:
        default_spell(cmd, res);
        break;
    }
}