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 (©) 2017,2018 Marc Alexander Lehmann / the Deliantra team |
|
|
5 | * Copyright (©) 2005,2006,2007,2008,2009,2010,2011,2012,2013,2014,2015,2016 Marc Alexander Lehmann / Robin Redeker / the Deliantra team |
5 | * Copyright (©) 2005,2007 Mark Wedel & Crossfire Development Team |
6 | * Copyright (©) 2005 Mark Wedel & Crossfire Development Team |
6 | * Copyright (©) 1992,2007 Frank Tore Johansen |
7 | * Copyright (©) 1992 Frank Tore Johansen |
7 | * |
8 | * |
8 | * Deliantra is free software: you can redistribute it and/or modify |
9 | * Deliantra is free software: you can redistribute it and/or modify it under |
9 | * it under the terms of the GNU General Public License as published by |
10 | * the terms of the Affero GNU General Public License as published by the |
10 | * the Free Software Foundation, either version 3 of the License, or |
11 | * Free Software Foundation, either version 3 of the License, or (at your |
11 | * (at your option) any later version. |
12 | * option) any later version. |
12 | * |
13 | * |
13 | * This program is distributed in the hope that it will be useful, |
14 | * This program is distributed in the hope that it will be useful, |
14 | * but WITHOUT ANY WARRANTY; without even the implied warranty of |
15 | * but WITHOUT ANY WARRANTY; without even the implied warranty of |
15 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
16 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
16 | * GNU General Public License for more details. |
17 | * GNU General Public License for more details. |
17 | * |
18 | * |
18 | * You should have received a copy of the GNU General Public License |
19 | * You should have received a copy of the Affero GNU General Public License |
19 | * along with this program. If not, see <http://www.gnu.org/licenses/>. |
20 | * and the GNU General Public License along with this program. If not, see |
|
|
21 | * <http://www.gnu.org/licenses/>. |
20 | * |
22 | * |
21 | * The authors can be reached via e-mail to <support@deliantra.net> |
23 | * The authors can be reached via e-mail to <support@deliantra.net> |
22 | */ |
24 | */ |
23 | |
25 | |
24 | #include <global.h> |
26 | #include <global.h> |
25 | #ifndef __CEXTRACT__ |
27 | #ifndef __CEXTRACT__ |
… | |
… | |
48 | object *nabove; |
50 | object *nabove; |
49 | |
51 | |
50 | while (above) |
52 | while (above) |
51 | { |
53 | { |
52 | nabove = above->above; |
54 | nabove = above->above; |
53 | if (above->type == PLAYER && !(above->move_type & MOVE_FLYING) && above->stats.hp >= 0 && !QUERY_FLAG (above, FLAG_WIZ)) |
55 | if (above->type == PLAYER && !(above->move_type & MOVE_FLYING) && above->stats.hp >= 0 && !above->flag [FLAG_WIZ]) |
54 | { |
56 | { |
55 | if (op->stats.food < 1) |
57 | if (op->stats.food < 1) |
56 | { |
58 | { |
57 | LOG (llevDebug, "move_deep_swamp(): player is here, but state is " "%d\n", op->stats.food); |
59 | LOG (llevDebug, "move_deep_swamp(): player is here, but state is " "%d\n", op->stats.food); |
58 | op->stats.food = 1; |
60 | op->stats.food = 1; |
… | |
… | |
103 | } |
105 | } |
104 | } |
106 | } |
105 | break; |
107 | break; |
106 | } |
108 | } |
107 | } |
109 | } |
108 | else if (!QUERY_FLAG (above, FLAG_ALIVE) && !(above->move_type & MOVE_FLYING) && |
110 | else if (!above->flag [FLAG_ALIVE] && !(above->move_type & MOVE_FLYING) && |
109 | !(QUERY_FLAG (above, FLAG_IS_FLOOR)) && !(QUERY_FLAG (above, FLAG_OVERLAY_FLOOR)) && !(QUERY_FLAG (above, FLAG_NO_PICK))) |
111 | !(above->flag [FLAG_IS_FLOOR]) && !(above->flag [FLAG_OVERLAY_FLOOR]) && !(above->flag [FLAG_NO_PICK])) |
110 | { |
112 | { |
111 | if (rndm (0, 2) == 0) |
113 | if (rndm (0, 2) == 0) |
112 | above->decrease (); |
114 | above->decrease (); |
113 | } |
115 | } |
114 | |
116 | |