… | |
… | |
822 | if (!spell->other_arch) |
822 | if (!spell->other_arch) |
823 | return 0; |
823 | return 0; |
824 | |
824 | |
825 | if (op->type == PLAYER && op->flag [FLAG_UNDEAD] && op->attacktype & AT_TURN_UNDEAD) |
825 | if (op->type == PLAYER && op->flag [FLAG_UNDEAD] && op->attacktype & AT_TURN_UNDEAD) |
826 | { |
826 | { |
827 | new_draw_info (NDI_UNIQUE, 0, op, "Your undead nature prevents you from turning undead!"); |
827 | op->failmsg ("Your undead nature prevents you from turning undead!"); |
828 | return 0; |
828 | return 0; |
829 | } |
829 | } |
830 | |
830 | |
831 | if (!dir) |
831 | if (!dir) |
832 | { |
832 | { |
… | |
… | |
1025 | // to fix create bomb traps in doors, which cast with dir=0). |
1025 | // to fix create bomb traps in doors, which cast with dir=0). |
1026 | if (dir) |
1026 | if (dir) |
1027 | { |
1027 | { |
1028 | if ((mflags & P_OUT_OF_MAP) || (GET_MAP_MOVE_BLOCK (m, dx, dy) & MOVE_WALK)) |
1028 | if ((mflags & P_OUT_OF_MAP) || (GET_MAP_MOVE_BLOCK (m, dx, dy) & MOVE_WALK)) |
1029 | { |
1029 | { |
1030 | new_draw_info (NDI_UNIQUE, 0, op, "There is something in the way."); |
1030 | op->failmsg ("There is something in the way."); |
1031 | return 0; |
1031 | return 0; |
1032 | } |
1032 | } |
1033 | } |
1033 | } |
1034 | |
1034 | |
1035 | tmp = spell->other_arch->instance (); |
1035 | tmp = spell->other_arch->instance (); |
… | |
… | |
1872 | |
1872 | |
1873 | mflags = get_map_flags (m, &m, x, y, &x, &y); |
1873 | mflags = get_map_flags (m, &m, x, y, &x, &y); |
1874 | |
1874 | |
1875 | if (mflags & P_OUT_OF_MAP) |
1875 | if (mflags & P_OUT_OF_MAP) |
1876 | { |
1876 | { |
1877 | new_draw_info (NDI_UNIQUE, 0, op, "Nothing is there."); |
1877 | op->failmsg ("Nothing is there."); |
1878 | return 0; |
1878 | return 0; |
1879 | } |
1879 | } |
1880 | |
1880 | |
1881 | if (mflags & P_IS_ALIVE && spell->attacktype) |
1881 | if (mflags & P_IS_ALIVE && spell->attacktype) |
1882 | { |
1882 | { |
… | |
… | |
1893 | } |
1893 | } |
1894 | |
1894 | |
1895 | /* no live target, perhaps a wall is in the way? */ |
1895 | /* no live target, perhaps a wall is in the way? */ |
1896 | if (OB_TYPE_MOVE_BLOCK (op, GET_MAP_MOVE_BLOCK (m, x, y))) |
1896 | if (OB_TYPE_MOVE_BLOCK (op, GET_MAP_MOVE_BLOCK (m, x, y))) |
1897 | { |
1897 | { |
1898 | new_draw_info (NDI_UNIQUE, 0, op, "Something is in the way."); |
1898 | op->failmsg ("Something is in the way."); |
1899 | return 0; |
1899 | return 0; |
1900 | } |
1900 | } |
1901 | } |
1901 | } |
1902 | |
1902 | |
1903 | /* ok, looks groovy to just insert a new light on the map */ |
1903 | /* ok, looks groovy to just insert a new light on the map */ |