… | |
… | |
1936 | new_draw_info (NDI_UNIQUE, 0, op, "You can't read! Your attempt fails."); |
1936 | new_draw_info (NDI_UNIQUE, 0, op, "You can't read! Your attempt fails."); |
1937 | return; |
1937 | return; |
1938 | } |
1938 | } |
1939 | |
1939 | |
1940 | spell = tmp->inv; |
1940 | spell = tmp->inv; |
|
|
1941 | |
1941 | if (!spell) |
1942 | if (!spell) |
1942 | { |
1943 | { |
1943 | LOG (llevError, "apply_spellbook: Book %s has no spell in it!\n", &tmp->name); |
1944 | LOG (llevError, "apply_spellbook: Book %s has no spell in it!\n", &tmp->name); |
1944 | new_draw_info (NDI_UNIQUE, 0, op, "The spellbook symbols make no sense."); |
1945 | new_draw_info (NDI_UNIQUE, 0, op, "The spellbook symbols make no sense."); |
1945 | return; |
1946 | return; |
1946 | } |
1947 | } |
1947 | |
1948 | |
1948 | if (spell->level > (skop->level + 10)) |
1949 | if (floorf (sqrtf (spell->level) * 1.5f) > skop->level + 1) |
1949 | { |
1950 | { |
1950 | new_draw_info (NDI_UNIQUE, 0, op, "You are unable to decipher the strange symbols."); |
1951 | new_draw_info (NDI_UNIQUE, 0, op, "It is too hard to read at your level: You are unable to decipher the strange symbols."); |
1951 | return; |
1952 | return; |
1952 | } |
1953 | } |
1953 | |
1954 | |
1954 | new_draw_info_format (NDI_UNIQUE, 0, op, "The spellbook contains the %s level spell %s.", get_levelnumber (spell->level), &spell->name); |
1955 | new_draw_info_format (NDI_UNIQUE, 0, op, "The spellbook contains the %s level spell %s.", get_levelnumber (spell->level), &spell->name); |
1955 | |
1956 | |