noch ein bischen curse

This commit is contained in:
Katja Zedel 2002-05-09 12:36:43 +00:00
parent ae6fae8229
commit eca624d887
4 changed files with 46 additions and 66 deletions

View File

@ -672,51 +672,6 @@ is_cursed_with(attrib *ap, curse *c)
return false;
}
/* ------------------------------------------------------------- */
/* Diese Funktionen werden von reports.c:print_curses() während der
* Generierung des Normalreports aufgerufen und ersetzen
* cursedisplay
*/
/* C_MAGICSTONE*/
static int
cinfo_magicrunes(void * obj, typ_t typ, curse *c, int self)
{
if (typ == TYP_BUILDING){
building * b;
b = (building*)obj;
if (self){
sprintf(buf, "Auf den Mauern von %s erkennt man seltsame Runen. (%s)",
b->name, curseid(c));
return 1;
}
} else if (typ == TYP_SHIP) {
ship *sh;
sh = (ship*)obj;
if (self){
sprintf(buf, "Auf den Planken von %s erkennt man seltsame Runen. (%s)",
sh->name, curseid(c));
return 1;
}
}
return 0;
}
/* C_DISORIENTATION */
static int
cinfo_disorientation(void * obj, typ_t typ, curse *c, int self)
{
unused(typ);
unused(obj);
unused(self);
assert(typ == TYP_SHIP);
sprintf(buf, "Der Kompaß kaputt, die Segel zerrissen, der Himmel "
"wolkenverhangen. Wohin fahren wir? (%s)", curseid(c));
return 1;
}
static int
read_skill(FILE * F, curse * c)

View File

@ -39,9 +39,9 @@ cinfo_building(const locale * lang, void * obj, typ_t typ, curse *c, int self)
unused(typ);
assert(typ == TYP_BUILDING);
if (self){
if (self == 1){ /* owner or inside */
msg = msg_message(mkname("curseinfo", c->type->cname), "id", c->no);
} else {
} else { /* outside */
msg = msg_message(mkname("curseinfo", "buildingunknown"), "id", c->no);
}
nr_render(msg, lang, buf, sizeof(buf), NULL);
@ -51,3 +51,29 @@ cinfo_building(const locale * lang, void * obj, typ_t typ, curse *c, int self)
/* CurseInfo mit Spezialabfragen */
/* C_MAGICSTONE*/
static int
cinfo_magicrunes(void * obj, typ_t typ, curse *c, int self)
{
if (typ == TYP_BUILDING){
building * b;
b = (building*)obj;
if (self){
sprintf(buf, "Auf den Mauern von %s erkennt man seltsame Runen. (%s)",
b->name, curseid(c));
return 1;
}
} else if (typ == TYP_SHIP) {
ship *sh;
sh = (ship*)obj;
if (self){
sprintf(buf, "Auf den Planken von %s erkennt man seltsame Runen. (%s)",
sh->name, curseid(c));
return 1;
}
}
return 0;
}

View File

@ -114,6 +114,7 @@ cinfo_magicstreet(const locale * lang,void * obj, typ_t typ, curse *c, int self)
return 1;
}
void
register_regioncurse(void)
{

View File

@ -41,7 +41,7 @@ cinfo_ship(const locale * lang, void * obj, typ_t typ, curse *c, int self)
unused(obj);
assert(typ == TYP_SHIP);
if (self){
if (self){ /* owner or inside */
msg = msg_message(mkname("curseinfo", c->type->cname), "id", c->no);
} else {
msg = msg_message(mkname("curseinfo", "shipunknown"), "id", c->no);
@ -51,24 +51,6 @@ cinfo_ship(const locale * lang, void * obj, typ_t typ, curse *c, int self)
return 1;
}
static int
cinfo_ship_onlyowner(const locale * lang, void * obj, typ_t typ, curse *c, int self)
{
message * msg;
unused(obj);
unused(typ);
assert(typ == TYP_SHIP);
if (self){
msg = msg_message(mkname("curseinfo", c->type->cname), "id", c->no);
nr_render(msg, lang, buf, sizeof(buf), NULL);
msg_release(msg);
return 1;
}
return 0;
}
/* CurseInfo mit Spezialabfragen */
/* C_SHIP_NODRIFT */
@ -96,3 +78,19 @@ cinfo_shipnodrift(const locale * lang, void * obj, typ_t typ, curse *c, int self
return 1;
}
/* C_DISORIENTATION */
static int
cinfo_disorientation(void * obj, typ_t typ, curse *c, int self)
{
unused(typ);
unused(obj);
unused(self);
assert(typ == TYP_SHIP);
sprintf(buf, "Der Kompaß kaputt, die Segel zerrissen, der Himmel "
"wolkenverhangen. Wohin fahren wir? (%s)", curseid(c));
return 1;
}