forked from github/server
grosser commit mit vielen curses
This commit is contained in:
parent
dfa6fe7397
commit
db6d04c888
|
@ -780,7 +780,7 @@ static struct curse_type ct_farvision = { "farvision",
|
||||||
static struct curse_type ct_gbdream = { "gbdream",
|
static struct curse_type ct_gbdream = { "gbdream",
|
||||||
CURSETYP_NORM, 0, (NO_MERGE),
|
CURSETYP_NORM, 0, (NO_MERGE),
|
||||||
"",
|
"",
|
||||||
cinfo_dreamcurse
|
cinfo_region
|
||||||
};
|
};
|
||||||
static struct curse_type ct_auraboost = { "auraboost",
|
static struct curse_type ct_auraboost = { "auraboost",
|
||||||
CURSETYP_NORM, CURSE_SPREADMODULO, (NO_MERGE),
|
CURSETYP_NORM, CURSE_SPREADMODULO, (NO_MERGE),
|
||||||
|
@ -993,8 +993,8 @@ static struct curse_type ct_sparkle = { "sparkle",
|
||||||
static struct curse_type ct_skillmod = { "skillmod",
|
static struct curse_type ct_skillmod = { "skillmod",
|
||||||
CURSETYP_NORM, CURSE_SPREADMODULO, M_MEN,
|
CURSETYP_NORM, CURSE_SPREADMODULO, M_MEN,
|
||||||
"",
|
"",
|
||||||
cinfo_skill,
|
cinfo_unit,
|
||||||
NULL, NULL,
|
NULL,
|
||||||
read_skill, write_skill
|
read_skill, write_skill
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -1007,7 +1007,6 @@ resolve_curse(void * id)
|
||||||
void
|
void
|
||||||
register_curses(void)
|
register_curses(void)
|
||||||
{
|
{
|
||||||
int i;
|
|
||||||
ct_register(&ct_fogtrap);
|
ct_register(&ct_fogtrap);
|
||||||
ct_register(&ct_antimagiczone);
|
ct_register(&ct_antimagiczone);
|
||||||
ct_register(&ct_farvision);
|
ct_register(&ct_farvision);
|
||||||
|
|
|
@ -208,8 +208,6 @@ typedef struct curse_unit {
|
||||||
|
|
||||||
/* ------------------------------------------------------------- */
|
/* ------------------------------------------------------------- */
|
||||||
|
|
||||||
typedef int (*cdesc_fun)(const locale *, const void*, int, curse*, int);
|
|
||||||
|
|
||||||
typedef struct curse_type {
|
typedef struct curse_type {
|
||||||
const char *cname; /* Name der Zauberwirkung, Identifizierung des curse */
|
const char *cname; /* Name der Zauberwirkung, Identifizierung des curse */
|
||||||
int typ;
|
int typ;
|
||||||
|
@ -217,7 +215,7 @@ typedef struct curse_type {
|
||||||
unsigned int mergeflags;
|
unsigned int mergeflags;
|
||||||
const char *info_str; /* Wirkung des curse, wird bei einer gelungenen
|
const char *info_str; /* Wirkung des curse, wird bei einer gelungenen
|
||||||
Zauberanalyse angezeigt */
|
Zauberanalyse angezeigt */
|
||||||
int (*curseinfo)(const locale*, const void*, int, curse*, int);
|
int (*curseinfo)(const struct locale*, const void*, int, curse*, int);
|
||||||
void (*change_vigour)(curse*, int);
|
void (*change_vigour)(curse*, int);
|
||||||
int (*read)(FILE * F, curse * c);
|
int (*read)(FILE * F, curse * c);
|
||||||
int (*write)(FILE * F, const curse * c);
|
int (*write)(FILE * F, const curse * c);
|
||||||
|
|
|
@ -24,15 +24,15 @@
|
||||||
|
|
||||||
/* util includes */
|
/* util includes */
|
||||||
#include <message.h>
|
#include <message.h>
|
||||||
|
#include <functions.h>
|
||||||
|
|
||||||
/* libc includes */
|
/* libc includes */
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
#include <assert.h>
|
#include <assert.h>
|
||||||
|
|
||||||
|
int
|
||||||
static int
|
cinfo_region(const struct locale * lang, const void * obj, enum typ_t typ, struct curse *c, int self)
|
||||||
cinfo_region(const locale * lang, void * obj, typ_t typ, curse *c, int self)
|
|
||||||
{
|
{
|
||||||
message * msg;
|
message * msg;
|
||||||
|
|
||||||
|
@ -114,7 +114,11 @@ cinfo_magicstreet(const locale * lang,void * obj, typ_t typ, curse *c, int self)
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
void register_regioncurse(void)
|
void
|
||||||
|
register_regioncurse(void)
|
||||||
{
|
{
|
||||||
|
register_function((pf_generic)cinfo_cursed_by_the_gods, "curseinfo::cursed_by_the_gods");
|
||||||
|
register_function((pf_generic)cinfo_dreamcurse, "curseinfo::dreamcurse");
|
||||||
|
register_function((pf_generic)cinfo_magicstreet, "curseinfo::magicstreet");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -14,13 +14,9 @@
|
||||||
#ifndef _RCURSE_H
|
#ifndef _RCURSE_H
|
||||||
#define _RCURSE_H
|
#define _RCURSE_H
|
||||||
|
|
||||||
/*
|
struct curse;
|
||||||
int cinfo_region(const locale *, void *, typ_t, curse *, int);
|
struct locale;
|
||||||
|
extern int cinfo_region(const struct locale * lang, const void * obj, enum typ_t typ, struct curse *c, int self);
|
||||||
int cinfo_cursed_by_the_gods(const locale *, void *, typ_t, curse *, int);
|
|
||||||
int cinfo_dreamcurse(const locale *, void *, typ_t, curse *, int);
|
|
||||||
int cinfo_magicstreet(const locale *, void *, typ_t, curse *, int);
|
|
||||||
*/
|
|
||||||
|
|
||||||
extern void register_regioncurse(void);
|
extern void register_regioncurse(void);
|
||||||
|
|
||||||
|
|
|
@ -36,7 +36,7 @@
|
||||||
#include <assert.h>
|
#include <assert.h>
|
||||||
|
|
||||||
int
|
int
|
||||||
cinfo_unit(const struct locale * lang, void * obj, enum typ_t typ, struct curse *c, int self)
|
cinfo_unit(const struct locale * lang, const void * obj, enum typ_t typ, struct curse *c, int self)
|
||||||
{
|
{
|
||||||
message * msg;
|
message * msg;
|
||||||
|
|
||||||
|
@ -53,7 +53,7 @@ cinfo_unit(const struct locale * lang, void * obj, enum typ_t typ, struct curse
|
||||||
}
|
}
|
||||||
|
|
||||||
static int
|
static int
|
||||||
cinfo_unit_onlyowner(const struct locale * lang, void * obj, enum typ_t typ, struct curse *c, int self)
|
cinfo_unit_onlyowner(const struct locale * lang, const void * obj, enum typ_t typ, struct curse *c, int self)
|
||||||
{
|
{
|
||||||
message * msg;
|
message * msg;
|
||||||
struct unit *u;
|
struct unit *u;
|
||||||
|
@ -77,7 +77,7 @@ cinfo_unit_onlyowner(const struct locale * lang, void * obj, enum typ_t typ, str
|
||||||
/* C_AURA */
|
/* C_AURA */
|
||||||
/* erhöht/senkt regeneration und maxaura um effect% */
|
/* erhöht/senkt regeneration und maxaura um effect% */
|
||||||
static int
|
static int
|
||||||
cinfo_auraboost(const struct locale * lang, void * obj, enum typ_t typ, struct curse *c, int self)
|
cinfo_auraboost(const struct locale * lang, const void * obj, enum typ_t typ, struct curse *c, int self)
|
||||||
{
|
{
|
||||||
struct unit *u;
|
struct unit *u;
|
||||||
unused(typ);
|
unused(typ);
|
||||||
|
@ -99,7 +99,7 @@ cinfo_auraboost(const struct locale * lang, void * obj, enum typ_t typ, struct c
|
||||||
|
|
||||||
/* C_SLAVE */
|
/* C_SLAVE */
|
||||||
static int
|
static int
|
||||||
cinfo_slave(const struct locale * lang, void * obj, enum typ_t typ, struct curse *c, int self)
|
cinfo_slave(const struct locale * lang, const void * obj, enum typ_t typ, struct curse *c, int self)
|
||||||
{
|
{
|
||||||
unit *u;
|
unit *u;
|
||||||
unused(typ);
|
unused(typ);
|
||||||
|
@ -117,7 +117,7 @@ cinfo_slave(const struct locale * lang, void * obj, enum typ_t typ, struct curse
|
||||||
|
|
||||||
/* C_CALM */
|
/* C_CALM */
|
||||||
static int
|
static int
|
||||||
cinfo_calm(const struct locale * lang, void * obj, enum typ_t typ, struct curse *c, int self)
|
cinfo_calm(const struct locale * lang, const void * obj, enum typ_t typ, struct curse *c, int self)
|
||||||
{
|
{
|
||||||
unit *u;
|
unit *u;
|
||||||
const struct race * rc;
|
const struct race * rc;
|
||||||
|
@ -144,7 +144,7 @@ cinfo_calm(const struct locale * lang, void * obj, enum typ_t typ, struct curse
|
||||||
}
|
}
|
||||||
/* C_SPEED */
|
/* C_SPEED */
|
||||||
static int
|
static int
|
||||||
cinfo_speed(const struct locale * lang, void * obj, enum typ_t typ, struct curse *c, int self)
|
cinfo_speed(const struct locale * lang, const void * obj, enum typ_t typ, struct curse *c, int self)
|
||||||
{
|
{
|
||||||
unit *u;
|
unit *u;
|
||||||
curse_unit * cu;
|
curse_unit * cu;
|
||||||
|
@ -166,7 +166,7 @@ cinfo_speed(const struct locale * lang, void * obj, enum typ_t typ, struct curse
|
||||||
}
|
}
|
||||||
/* C_ORC */
|
/* C_ORC */
|
||||||
static int
|
static int
|
||||||
cinfo_orc(const struct locale * lang, void * obj, enum typ_t typ, struct curse *c, int self)
|
cinfo_orc(const struct locale * lang, const void * obj, enum typ_t typ, struct curse *c, int self)
|
||||||
{
|
{
|
||||||
unit *u;
|
unit *u;
|
||||||
message * msg;
|
message * msg;
|
||||||
|
@ -186,7 +186,7 @@ cinfo_orc(const struct locale * lang, void * obj, enum typ_t typ, struct curse *
|
||||||
|
|
||||||
/* C_KAELTESCHUTZ */
|
/* C_KAELTESCHUTZ */
|
||||||
static int
|
static int
|
||||||
cinfo_kaelteschutz(const struct locale * lang, void * obj, enum typ_t typ, struct curse *c, int self)
|
cinfo_kaelteschutz(const struct locale * lang, const void * obj, enum typ_t typ, struct curse *c, int self)
|
||||||
{
|
{
|
||||||
unit *u;
|
unit *u;
|
||||||
curse_unit * cu;
|
curse_unit * cu;
|
||||||
|
@ -208,7 +208,7 @@ cinfo_kaelteschutz(const struct locale * lang, void * obj, enum typ_t typ, struc
|
||||||
|
|
||||||
/* C_SPARKLE */
|
/* C_SPARKLE */
|
||||||
static int
|
static int
|
||||||
cinfo_sparkle(const struct locale * lang, void * obj, enum typ_t typ, struct curse *c, int self)
|
cinfo_sparkle(const struct locale * lang, const void * obj, enum typ_t typ, struct curse *c, int self)
|
||||||
{
|
{
|
||||||
const char * effects[] = {
|
const char * effects[] = {
|
||||||
NULL, /* end grau*/
|
NULL, /* end grau*/
|
||||||
|
@ -263,7 +263,7 @@ cinfo_sparkle(const struct locale * lang, void * obj, enum typ_t typ, struct cur
|
||||||
|
|
||||||
/* C_STRENGTH */
|
/* C_STRENGTH */
|
||||||
static int
|
static int
|
||||||
cinfo_strength(const struct locale * lang, void * obj, enum typ_t typ, struct curse *c, int self)
|
cinfo_strength(const struct locale * lang, const void * obj, enum typ_t typ, struct curse *c, int self)
|
||||||
{
|
{
|
||||||
unused(c);
|
unused(c);
|
||||||
unused(typ);
|
unused(typ);
|
||||||
|
@ -280,7 +280,7 @@ cinfo_strength(const struct locale * lang, void * obj, enum typ_t typ, struct cu
|
||||||
}
|
}
|
||||||
/* C_ALLSKILLS */
|
/* C_ALLSKILLS */
|
||||||
static int
|
static int
|
||||||
cinfo_allskills(const struct locale * lang, void * obj, enum typ_t typ, struct curse *c, int self)
|
cinfo_allskills(const struct locale * lang, const void * obj, enum typ_t typ, struct curse *c, int self)
|
||||||
{
|
{
|
||||||
unused(obj);
|
unused(obj);
|
||||||
unused(typ);
|
unused(typ);
|
||||||
|
@ -296,7 +296,7 @@ cinfo_allskills(const struct locale * lang, void * obj, enum typ_t typ, struct c
|
||||||
}
|
}
|
||||||
/* C_SKILL */
|
/* C_SKILL */
|
||||||
static int
|
static int
|
||||||
cinfo_skill(const struct locale * lang, void * obj, enum typ_t typ, struct curse *c, int self)
|
cinfo_skill(const struct locale * lang, const void * obj, enum typ_t typ, struct curse *c, int self)
|
||||||
{
|
{
|
||||||
unit *u = (unit *)obj;
|
unit *u = (unit *)obj;
|
||||||
int sk = (int)c->data;
|
int sk = (int)c->data;
|
||||||
|
@ -312,7 +312,7 @@ cinfo_skill(const struct locale * lang, void * obj, enum typ_t typ, struct curse
|
||||||
}
|
}
|
||||||
/* C_ITEMCLOAK */
|
/* C_ITEMCLOAK */
|
||||||
static int
|
static int
|
||||||
cinfo_itemcloak(const struct locale * lang, void * obj, enum typ_t typ, struct curse *c, int self)
|
cinfo_itemcloak(const struct locale * lang, const void * obj, enum typ_t typ, struct curse *c, int self)
|
||||||
{
|
{
|
||||||
unit *u;
|
unit *u;
|
||||||
unused(typ);
|
unused(typ);
|
||||||
|
@ -329,7 +329,7 @@ cinfo_itemcloak(const struct locale * lang, void * obj, enum typ_t typ, struct c
|
||||||
}
|
}
|
||||||
|
|
||||||
static int
|
static int
|
||||||
cinfo_fumble(const struct locale * lang, void * obj, enum typ_t typ, struct curse *c, int self)
|
cinfo_fumble(const struct locale * lang, const void * obj, enum typ_t typ, struct curse *c, int self)
|
||||||
{
|
{
|
||||||
unit * u = (unit*)obj;
|
unit * u = (unit*)obj;
|
||||||
unused(typ);
|
unused(typ);
|
||||||
|
@ -348,18 +348,17 @@ cinfo_fumble(const struct locale * lang, void * obj, enum typ_t typ, struct curs
|
||||||
void
|
void
|
||||||
register_unitcurse(void)
|
register_unitcurse(void)
|
||||||
{
|
{
|
||||||
register_function((pf_generic)cinfo_unit, "cinfo::unit");
|
register_function((pf_generic)cinfo_unit_onlyowner, "curseinfo::unit_onlyowner");
|
||||||
register_function((pf_generic)cinfo_unit_onlyowner, "cinfo::unit_onlyowner");
|
register_function((pf_generic)cinfo_auraboost, "curseinfo::auraboost");
|
||||||
register_function((pf_generic)cinfo_auraboost, "cinfo::auraboost");
|
register_function((pf_generic)cinfo_slave, "curseinfo::slave");
|
||||||
register_function((pf_generic)cinfo_slave, "cinfo::slave");
|
register_function((pf_generic)cinfo_calm, "curseinfo::calm");
|
||||||
register_function((pf_generic)cinfo_calm, "cinfo::calm");
|
register_function((pf_generic)cinfo_speed, "curseinfo::speed");
|
||||||
register_function((pf_generic)cinfo_speed, "cinfo::speed");
|
register_function((pf_generic)cinfo_orc, "curseinfo::orc");
|
||||||
register_function((pf_generic)cinfo_orc, "cinfo::orc");
|
register_function((pf_generic)cinfo_kaelteschutz, "curseinfo::kaelteschutz");
|
||||||
register_function((pf_generic)cinfo_kaelteschutz, "cinfo::kaelteschutz");
|
register_function((pf_generic)cinfo_sparkle, "curseinfo::sparkle");
|
||||||
register_function((pf_generic)cinfo_sparkle, "cinfo::sparkle");
|
register_function((pf_generic)cinfo_strength, "curseinfo::strength");
|
||||||
register_function((pf_generic)cinfo_strength, "cinfo::strength");
|
register_function((pf_generic)cinfo_allskills, "curseinfo::allskills");
|
||||||
register_function((pf_generic)cinfo_allskills, "cinfo::allskills");
|
register_function((pf_generic)cinfo_skill, "curseinfo::skill");
|
||||||
register_function((pf_generic)cinfo_skill, "cinfo::skill");
|
register_function((pf_generic)cinfo_itemcloak, "curseinfo::itemcloak");
|
||||||
register_function((pf_generic)cinfo_itemcloak, "cinfo::itemcloak");
|
register_function((pf_generic)cinfo_fumble, "curseinfo::fumble");
|
||||||
register_function((pf_generic)cinfo_fumble, "cinfo::fumble");
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -33,7 +33,9 @@ int cinfo_skill(void *, enum typ_t, struct curse *, int);
|
||||||
int cinfo_itemcloak(void *, enum typ_t, struct curse *, int);
|
int cinfo_itemcloak(void *, enum typ_t, struct curse *, int);
|
||||||
int cinfo_fumble(void *, enum typ_t, struct curse *, int);
|
int cinfo_fumble(void *, enum typ_t, struct curse *, int);
|
||||||
*/
|
*/
|
||||||
|
struct curse;
|
||||||
|
struct locale;
|
||||||
|
extern int cinfo_unit(const struct locale * lang, const void * obj, enum typ_t typ, struct curse *c, int self);
|
||||||
extern void register_unitcurse(void);
|
extern void register_unitcurse(void);
|
||||||
|
|
||||||
#endif /* _UCURSE_H */
|
#endif /* _UCURSE_H */
|
||||||
|
|
Loading…
Reference in New Issue