|
Atrinik Server 2.5
|
#include <global.h>Go to the source code of this file.
Defines | |
| #define | ARCH_SACRIFICE(xyz) ((xyz)->slaying) |
| #define | NROF_SACRIFICE(xyz) ((xyz)->stats.food) |
Functions | |
| int | apply_altar (object *altar, object *sacrifice, object *originator) |
| int | check_altar_sacrifice (object *altar, object *sacrifice) |
| int | operate_altar (object *altar, object **sacrifice) |
Check if the sacrifice meets the needs of the altar.
Identify altars won't grab money unnecessarily - we can see if there is sufficient money, see if something needs to be identified, and then remove money if needed.
Linked objects (ie, objects that are connected) can not be sacrificed. This fixes a bug of trying to put multiple altars/related objects on the same space that take the same sacrifice.
| altar | The altar object |
| sacrifice | The sacrifice |
Checks if sacrifice was accepted and removes sacrificed objects. Might be better to call check_altar_sacrifice (above) than depend on the return value, since operate_altar will remove the sacrifice also.
If this function returns 1, '*sacrifice' is modified to point to the remaining sacrifice, or is set to NULL if the sacrifice was used up.
| altar | The altar object |
| sacrifice | The object to be sacrificed |
1.7.4