1 | /* |
1 | /* |
2 | * This file is part of Deliantra, the Roguelike Realtime MMORPG. |
2 | * This file is part of Deliantra, the Roguelike Realtime MMORPG. |
3 | * |
3 | * |
4 | * Copyright (©) 2005,2006,2007 Marc Alexander Lehmann / Robin Redeker / the Deliantra team |
4 | * Copyright (©) 2005,2006,2007,2008 Marc Alexander Lehmann / Robin Redeker / the Deliantra team |
5 | * Copyright (©) 2002-2003,2007 Mark Wedel & Crossfire Development Team |
5 | * Copyright (©) 2002-2003,2007 Mark Wedel & Crossfire Development Team |
6 | * Copyright (©) 1992,2007 Frank Tore Johansen |
6 | * Copyright (©) 1992,2007 Frank Tore Johansen |
7 | * |
7 | * |
8 | * Deliantra is free software: you can redistribute it and/or modify |
8 | * Deliantra is free software: you can redistribute it and/or modify |
9 | * it under the terms of the GNU General Public License as published by |
9 | * it under the terms of the GNU General Public License as published by |
… | |
… | |
999 | } |
999 | } |
1000 | |
1000 | |
1001 | int |
1001 | int |
1002 | create_bomb (object *op, object *caster, int dir, object *spell) |
1002 | create_bomb (object *op, object *caster, int dir, object *spell) |
1003 | { |
1003 | { |
1004 | |
|
|
1005 | object *tmp; |
1004 | object *tmp; |
1006 | int mflags; |
1005 | int mflags; |
1007 | sint16 dx = op->x + freearr_x[dir], dy = op->y + freearr_y[dir]; |
1006 | sint16 dx = op->x + freearr_x[dir], dy = op->y + freearr_y[dir]; |
1008 | maptile *m; |
1007 | maptile *m; |
1009 | |
1008 | |
… | |
… | |
1011 | if ((mflags & P_OUT_OF_MAP) || (GET_MAP_MOVE_BLOCK (m, dx, dy) & MOVE_WALK)) |
1010 | if ((mflags & P_OUT_OF_MAP) || (GET_MAP_MOVE_BLOCK (m, dx, dy) & MOVE_WALK)) |
1012 | { |
1011 | { |
1013 | new_draw_info (NDI_UNIQUE, 0, op, "There is something in the way."); |
1012 | new_draw_info (NDI_UNIQUE, 0, op, "There is something in the way."); |
1014 | return 0; |
1013 | return 0; |
1015 | } |
1014 | } |
|
|
1015 | |
1016 | tmp = arch_to_object (spell->other_arch); |
1016 | tmp = arch_to_object (spell->other_arch); |
1017 | |
1017 | |
1018 | /* level dependencies for bomb */ |
1018 | /* level dependencies for bomb */ |
1019 | tmp->range = spell->range + SP_level_range_adjust (caster, spell); |
1019 | tmp->range = spell->range + SP_level_range_adjust (caster, spell); |
1020 | tmp->stats.dam = spell->stats.dam + SP_level_dam_adjust (caster, spell); |
1020 | tmp->stats.dam = spell->stats.dam + SP_level_dam_adjust (caster, spell); |