Exemplo n.º 1
0
/*!
 * @brief 闘技場への入場処理 / Town logic flow for generation of arena -KMW-
 * @return なし
 */
static void arena_gen(void)
{
    int y, x;
    int qy = 0;
    int qx = 0;

    /* Smallest area */
    cur_hgt = SCREEN_HGT;
    cur_wid = SCREEN_WID;

    /* Start with solid walls */
    for (y = 0; y < MAX_HGT; y++)
    {
        for (x = 0; x < MAX_WID; x++)
        {
            /* Create "solid" perma-wall */
            place_solid_perm_bold(y, x);

            /* Illuminate and memorize the walls */
            cave[y][x].info |= (CAVE_GLOW | CAVE_MARK);
        }
    }

    /* Then place some floors */
    for (y = qy + 1; y < qy + SCREEN_HGT - 1; y++)
    {
        for (x = qx + 1; x < qx + SCREEN_WID - 1; x++)
        {
            /* Create empty floor */
            cave[y][x].feat = feat_floor;
        }
    }

    build_arena();

    if(!place_monster_aux(0, p_ptr->y + 5, p_ptr->x, arena_info[p_ptr->arena_number].r_idx, (PM_NO_KAGE | PM_NO_PET)))
    {
        p_ptr->exit_bldg = TRUE;
        p_ptr->arena_number++;
#ifdef JP
        msg_print("相手は欠場した。あなたの不戦勝だ。");
#else
        msg_print("The enemy is unable appear. You won by default.");
#endif
    }

}
/*
 * Town logic flow for generation of arena -KMW-
 */
static void arena_gen(void)
{
    int y, x;
    int qy = 0;
    int qx = 0;

    /* Smallest area */
    cur_hgt = SCREEN_HGT;
    cur_wid = SCREEN_WID;

    /* Start with solid walls */
    for (y = 0; y < MAX_HGT; y++)
    {
        for (x = 0; x < MAX_WID; x++)
        {
            /* Create "solid" perma-wall */
            place_solid_perm_bold(y, x);

            /* Illuminate and memorize the walls */
            cave[y][x].info |= (CAVE_GLOW | CAVE_MARK | CAVE_AWARE);
        }
    }

    /* Then place some floors */
    for (y = qy + 1; y < qy + SCREEN_HGT - 1; y++)
    {
        for (x = qx + 1; x < qx + SCREEN_WID - 1; x++)
        {
            /* Create empty floor */
            cave[y][x].feat = feat_floor;
        }
    }

    build_arena();

    place_monster_aux(0, py + 5, px, arena_info[p_ptr->arena_number].r_idx,
        (PM_NO_KAGE | PM_NO_PET));
}