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,2008,2009 Marc Alexander Lehmann / Robin Redeker / the Deliantra team |
4 | * Copyright (©) 2005,2006,2007,2008,2009 Marc Alexander Lehmann / Robin Redeker / the Deliantra team |
5 | * Copyright (©) 2002,2007 Mark Wedel & Crossfire Development Team |
5 | * Copyright (©) 2002 Mark Wedel & Crossfire Development Team |
6 | * Copyright (©) 1992,2007 Frank Tore Johansen |
6 | * Copyright (©) 1992 Frank Tore Johansen |
7 | * |
7 | * |
8 | * Deliantra is free software: you can redistribute it and/or modify it under |
8 | * Deliantra is free software: you can redistribute it and/or modify it under |
9 | * the terms of the Affero GNU General Public License as published by the |
9 | * the terms of the Affero GNU General Public License as published by the |
10 | * Free Software Foundation, either version 3 of the License, or (at your |
10 | * Free Software Foundation, either version 3 of the License, or (at your |
11 | * option) any later version. |
11 | * option) any later version. |
… | |
… | |
346 | * |
346 | * |
347 | * 0.93.4: Linked objects (ie, objects that are connected) can not be |
347 | * 0.93.4: Linked objects (ie, objects that are connected) can not be |
348 | * sacrificed. This fixes a bug of trying to put multiple altars/related |
348 | * sacrificed. This fixes a bug of trying to put multiple altars/related |
349 | * objects on the same space that take the same sacrifice. |
349 | * objects on the same space that take the same sacrifice. |
350 | */ |
350 | */ |
351 | |
|
|
352 | int |
351 | int |
353 | check_altar_sacrifice (object *altar, object *sacrifice, object *originator) |
352 | check_altar_sacrifice (object *altar, object *sacrifice, object *originator) |
354 | { |
353 | { |
355 | if (sacrifice->flag [FLAG_UNPAID]) |
354 | if (sacrifice->flag [FLAG_UNPAID]) |
356 | return 0; |
355 | return 0; |
… | |
… | |
424 | new_info_map (NDI_BLACK, altar->map, altar->msg); |
423 | new_info_map (NDI_BLACK, altar->map, altar->msg); |
425 | |
424 | |
426 | return 1; |
425 | return 1; |
427 | } |
426 | } |
428 | |
427 | |
429 | void |
428 | static void |
430 | trigger_move (object *op, int state, object *originator) /* 1 down and 0 up */ |
429 | trigger_move (object *op, int state, object *originator) /* 1 down and 0 up */ |
431 | { |
430 | { |
432 | op->stats.wc = state; |
431 | op->stats.wc = state; |
433 | |
432 | |
434 | if (state) |
433 | if (state) |
… | |
… | |
460 | int |
459 | int |
461 | check_trigger (object *op, object *cause, object *originator) |
460 | check_trigger (object *op, object *cause, object *originator) |
462 | { |
461 | { |
463 | object *tmp; |
462 | object *tmp; |
464 | int push = 0, tot = 0; |
463 | int push = 0, tot = 0; |
465 | int in_movement = op->stats.wc || op->speed; |
464 | int in_movement = op->stats.wc || op->has_active_speed (); |
466 | |
465 | |
467 | switch (op->type) |
466 | switch (op->type) |
468 | { |
467 | { |
469 | case TRIGGER_BUTTON: |
468 | case TRIGGER_BUTTON: |
470 | if (op->weight > 0) |
469 | if (op->weight > 0) |