server/src/common/items/demonseye.c

72 lines
1.7 KiB
C
Raw Normal View History

2001-01-25 10:37:55 +01:00
/* vi: set ts=2:
*
*
2001-01-25 10:37:55 +01:00
* Eressea PB(E)M host Copyright (C) 1998-2000
* Christian Schlittchen (corwin@amber.kn-bremen.de)
* Katja Zedel (katze@felidae.kn-bremen.de)
* Henning Peters (faroul@beyond.kn-bremen.de)
* Enno Rehling (enno@eressea-pbem.de)
* Ingo Wilken (Ingo.Wilken@informatik.uni-oldenburg.de)
*
* This program may not be used, modified or distributed without
* prior permission by the authors of Eressea.
*/
#include <config.h>
#include <eressea.h>
#include "demonseye.h"
/* kernel includes */
#include <item.h>
/* util includes */
#include <functions.h>
2001-01-25 10:37:55 +01:00
/* libc includes */
#include <assert.h>
static int
summon_igjarjuk(struct unit * u, const struct item_type * itype, int amount, const char * cmd)
2001-01-25 10:37:55 +01:00
{
unused(u);
unused(amount);
2001-01-25 10:37:55 +01:00
unused(itype);
unused(cmd);
assert(!"not implemented");
return -1;
}
static resource_type rt_demonseye = {
{ "ao_daemon", "ao_daemon_p" },
{ "ao_daemon", "ao_daemon_p" },
2001-01-25 10:37:55 +01:00
RTF_ITEM,
&res_changeitem
};
boolean
2001-01-25 10:37:55 +01:00
give_igjarjuk(const struct unit * src, const struct unit * d, const struct item_type * itype, int n, const char * cmd)
{
sprintf(buf, "Eine h<>here Macht hindert %s daran, das Objekt zu <20>bergeben. "
"'ES IST DEINS, MEIN KIND. DEINS GANZ ALLEIN'.", unitname(src));
mistake(src, cmd, buf, MSG_COMMERCE);
return false;
}
item_type it_demonseye = {
&rt_demonseye, /* resourcetype */
ITF_NOTLOST|ITF_CURSED, 0, 0, /* flags, weight, capacity */
NULL, /* construction */
&summon_igjarjuk,
NULL,
2001-01-25 10:37:55 +01:00
&give_igjarjuk
};
void
register_demonseye(void)
{
it_register(&it_demonseye);
register_function((pf_generic)summon_igjarjuk, "useigjarjuk");
register_function((pf_generic)give_igjarjuk, "giveigjarjuk");
}