maybe show a helpful gameplay tip? returns True if tip gets shown */
| 1849 | |
| 1850 | /* maybe show a helpful gameplay tip? returns True if tip gets shown */ |
| 1851 | boolean |
| 1852 | handle_tip(int tip) |
| 1853 | { |
| 1854 | if (!flags.tips) |
| 1855 | return FALSE; |
| 1856 | |
| 1857 | if (tip >= 0 && tip < NUM_TIPS && !(svc.context.tips & (1 << tip))) { |
| 1858 | svc.context.tips |= (1 << tip); |
| 1859 | /* the "Tip:" prefix is a hint to use of OPTIONS=!tips to suppress */ |
| 1860 | switch (tip) { |
| 1861 | case TIP_ENHANCE: |
| 1862 | pline("(Tip: use the #enhance command to advance them.)"); |
| 1863 | break; |
| 1864 | case TIP_SWIM: |
| 1865 | pline("(Tip: use '%s' prefix to step in if you really want to.)", |
| 1866 | visctrl(cmd_from_func(do_reqmenu))); |
| 1867 | break; |
| 1868 | case TIP_UNTRAP_MON: |
| 1869 | pline("(Tip: perhaps #untrap would help?)"); |
| 1870 | break; |
| 1871 | case TIP_GETPOS: |
| 1872 | l_nhcore_call(NHCORE_GETPOS_TIP); |
| 1873 | break; |
| 1874 | default: |
| 1875 | impossible("Unknown tip in handle_tip(%i)", tip); |
| 1876 | break; |
| 1877 | } |
| 1878 | return TRUE; |
| 1879 | } |
| 1880 | return FALSE; |
| 1881 | } |
| 1882 | |
| 1883 | /* Is it dangerous for hero to move to x,y due to water or lava? */ |
| 1884 | staticfn boolean |
no test coverage detected