forked from github/server
More curseinfo everywhere, less code.
This commit is contained in:
parent
15d056e423
commit
fd06a885f0
|
@ -32,11 +32,13 @@
|
||||||
#include "faction.h"
|
#include "faction.h"
|
||||||
#include "building.h"
|
#include "building.h"
|
||||||
#include "ship.h"
|
#include "ship.h"
|
||||||
|
#include "message.h"
|
||||||
#include "objtypes.h"
|
#include "objtypes.h"
|
||||||
|
|
||||||
/* util includes */
|
/* util includes */
|
||||||
#include <util/resolve.h>
|
#include <util/resolve.h>
|
||||||
#include <util/base36.h>
|
#include <util/base36.h>
|
||||||
|
#include <util/nrmessage.h>
|
||||||
#include <util/rand.h>
|
#include <util/rand.h>
|
||||||
#include <util/rng.h>
|
#include <util/rng.h>
|
||||||
#include <util/goodies.h>
|
#include <util/goodies.h>
|
||||||
|
@ -733,3 +735,22 @@ oldcursename(int id)
|
||||||
return oldnames[id];
|
return oldnames[id];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* ------------------------------------------------------------- */
|
||||||
|
int
|
||||||
|
cinfo_simple(const struct locale * lang, const void * obj, typ_t typ, struct curse *c, int self)
|
||||||
|
{
|
||||||
|
struct message * msg;
|
||||||
|
|
||||||
|
unused(typ);
|
||||||
|
unused(self);
|
||||||
|
unused(obj);
|
||||||
|
|
||||||
|
msg = msg_message(mkname("curseinfo", c->type->cname), "id", c->no);
|
||||||
|
if (msg) {
|
||||||
|
nr_render(msg, lang, buf, sizeof(buf), NULL);
|
||||||
|
msg_release(msg);
|
||||||
|
return 1;
|
||||||
|
}
|
||||||
|
log_warning(("There is no curseinfo for %s.\n", c->type->cname));
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
|
@ -326,6 +326,7 @@ extern boolean curse_active(const curse * c);
|
||||||
/*** COMPATIBILITY MACROS. DO NOT USE FOR NEW CODE, REPLACE IN OLD CODE: */
|
/*** COMPATIBILITY MACROS. DO NOT USE FOR NEW CODE, REPLACE IN OLD CODE: */
|
||||||
extern const char * oldcursename(int id);
|
extern const char * oldcursename(int id);
|
||||||
extern void register_curses(void);
|
extern void register_curses(void);
|
||||||
|
extern int cinfo_simple(const struct locale * lang, const void * obj, typ_t typ, struct curse *c, int self);
|
||||||
|
|
||||||
#define is_cursed(a, id, id2) \
|
#define is_cursed(a, id, id2) \
|
||||||
curse_active(get_curse(a, ct_find(oldcursename(id))))
|
curse_active(get_curse(a, ct_find(oldcursename(id))))
|
||||||
|
|
|
@ -121,8 +121,6 @@ static struct curse_type ct_nocostbuilding = { "nocostbuilding",
|
||||||
void
|
void
|
||||||
register_buildingcurse(void)
|
register_buildingcurse(void)
|
||||||
{
|
{
|
||||||
register_function((pf_generic)cinfo_magicrunes, "curseinfo::magicrunes");
|
|
||||||
|
|
||||||
ct_register(&ct_magicwalls);
|
ct_register(&ct_magicwalls);
|
||||||
ct_register(&ct_strongwall);
|
ct_register(&ct_strongwall);
|
||||||
ct_register(&ct_magicrunes);
|
ct_register(&ct_magicrunes);
|
||||||
|
|
|
@ -34,30 +34,6 @@
|
||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
#include <assert.h>
|
#include <assert.h>
|
||||||
|
|
||||||
/* --------------------------------------------------------------------- */
|
|
||||||
|
|
||||||
int
|
|
||||||
cinfo_region(const struct locale * lang, const void * obj, typ_t typ, struct curse *c, int self)
|
|
||||||
{
|
|
||||||
message * msg;
|
|
||||||
|
|
||||||
unused(typ);
|
|
||||||
unused(self);
|
|
||||||
unused(obj);
|
|
||||||
|
|
||||||
assert(typ == TYP_REGION);
|
|
||||||
|
|
||||||
msg = msg_message(mkname("curseinfo", c->type->cname), "id", c->no);
|
|
||||||
if (msg) {
|
|
||||||
nr_render(msg, lang, buf, sizeof(buf), NULL);
|
|
||||||
msg_release(msg);
|
|
||||||
return 1;
|
|
||||||
}
|
|
||||||
log_warning(("There is no curseinfo for %s.\n", c->type->cname));
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
/* --------------------------------------------------------------------- */
|
/* --------------------------------------------------------------------- */
|
||||||
/* CurseInfo mit Spezialabfragen
|
/* CurseInfo mit Spezialabfragen
|
||||||
*/
|
*/
|
||||||
|
@ -197,18 +173,10 @@ cinfo_antimagiczone(const struct locale * lang, const void * obj, typ_t typ, cur
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
static struct curse_type ct_antimagiczone = {
|
|
||||||
"antimagiczone",
|
|
||||||
CURSETYP_NORM, 0, (M_DURATION | M_VIGOUR),
|
|
||||||
"Dieser Zauber scheint magische Energien irgendwie abzuleiten und "
|
|
||||||
"so alle in der Region gezauberten Sprüche in ihrer Wirkung zu "
|
|
||||||
"schwächen oder ganz zu verhindern.",
|
|
||||||
cinfo_antimagiczone
|
|
||||||
};
|
|
||||||
|
|
||||||
/* alle Magier können eine Antimagiezone wahrnehmen */
|
/* alle Magier können eine Antimagiezone wahrnehmen */
|
||||||
static int
|
static int
|
||||||
cansee_antimagiczone(const struct faction *viewer, curse *c, const void * obj, typ_t typ, int self)
|
cansee_antimagiczone(const struct faction *viewer, const void * obj, typ_t typ, curse *c, int self)
|
||||||
{
|
{
|
||||||
region *r;
|
region *r;
|
||||||
unit *u = NULL;
|
unit *u = NULL;
|
||||||
|
@ -224,13 +192,21 @@ cansee_antimagiczone(const struct faction *viewer, curse *c, const void * obj, t
|
||||||
self = 2;
|
self = 2;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
if (is_mage(u)){
|
if (is_mage(u)) {
|
||||||
self = 1;
|
self = 1;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return self;
|
return self;
|
||||||
}
|
}
|
||||||
|
static struct curse_type ct_antimagiczone = {
|
||||||
|
"antimagiczone",
|
||||||
|
CURSETYP_NORM, 0, (M_DURATION | M_VIGOUR),
|
||||||
|
"Dieser Zauber scheint magische Energien irgendwie abzuleiten und "
|
||||||
|
"so alle in der Region gezauberten Sprüche in ihrer Wirkung zu "
|
||||||
|
"schwächen oder ganz zu verhindern.",
|
||||||
|
cinfo_antimagiczone, NULL, NULL, NULL, cansee_antimagiczone
|
||||||
|
};
|
||||||
|
|
||||||
/* --------------------------------------------------------------------- */
|
/* --------------------------------------------------------------------- */
|
||||||
static int
|
static int
|
||||||
|
@ -268,7 +244,7 @@ static struct curse_type ct_fogtrap = {
|
||||||
"fogtrap",
|
"fogtrap",
|
||||||
CURSETYP_NORM, 0, (M_DURATION | M_VIGOUR),
|
CURSETYP_NORM, 0, (M_DURATION | M_VIGOUR),
|
||||||
"",
|
"",
|
||||||
cinfo_region
|
cinfo_simple
|
||||||
};
|
};
|
||||||
static struct curse_type ct_maelstrom = {
|
static struct curse_type ct_maelstrom = {
|
||||||
"maelstrom",
|
"maelstrom",
|
||||||
|
@ -282,14 +258,14 @@ static struct curse_type ct_blessedharvest = {
|
||||||
"blessedharvest",
|
"blessedharvest",
|
||||||
CURSETYP_NORM, 0, ( M_DURATION | M_VIGOUR ),
|
CURSETYP_NORM, 0, ( M_DURATION | M_VIGOUR ),
|
||||||
"Dieser Fruchtbarkeitszauber erhöht die Erträge der Felder.",
|
"Dieser Fruchtbarkeitszauber erhöht die Erträge der Felder.",
|
||||||
cinfo_region
|
cinfo_simple
|
||||||
};
|
};
|
||||||
static struct curse_type ct_drought = {
|
static struct curse_type ct_drought = {
|
||||||
"drought",
|
"drought",
|
||||||
CURSETYP_NORM, 0, ( M_DURATION | M_VIGOUR ),
|
CURSETYP_NORM, 0, ( M_DURATION | M_VIGOUR ),
|
||||||
"Dieser Zauber strahlt starke negative Energien aus. Warscheinlich "
|
"Dieser Zauber strahlt starke negative Energien aus. Warscheinlich "
|
||||||
"ist er die Ursache der Dürre." ,
|
"ist er die Ursache der Dürre." ,
|
||||||
cinfo_region
|
cinfo_simple
|
||||||
};
|
};
|
||||||
static struct curse_type ct_badlearn = {
|
static struct curse_type ct_badlearn = {
|
||||||
"badlearn",
|
"badlearn",
|
||||||
|
@ -297,7 +273,7 @@ static struct curse_type ct_badlearn = {
|
||||||
"Dieser Zauber scheint die Ursache für die Schlaflosigkeit und "
|
"Dieser Zauber scheint die Ursache für die Schlaflosigkeit und "
|
||||||
"Mattigkeit zu sein, unter der die meisten Leute hier leiden und "
|
"Mattigkeit zu sein, unter der die meisten Leute hier leiden und "
|
||||||
"die dazu führt, das Lernen weniger Erfolg bringt. ",
|
"die dazu führt, das Lernen weniger Erfolg bringt. ",
|
||||||
cinfo_region
|
cinfo_simple
|
||||||
};
|
};
|
||||||
/* Trübsal-Zauber */
|
/* Trübsal-Zauber */
|
||||||
static struct curse_type ct_depression = {
|
static struct curse_type ct_depression = {
|
||||||
|
@ -308,7 +284,7 @@ static struct curse_type ct_depression = {
|
||||||
"hat sich wie ein bleiernes Tuch auf die Gemüter der Bevölkerung "
|
"hat sich wie ein bleiernes Tuch auf die Gemüter der Bevölkerung "
|
||||||
"gelegt und eh er nicht gebrochen oder verklungen ist, wird keiner "
|
"gelegt und eh er nicht gebrochen oder verklungen ist, wird keiner "
|
||||||
"sich an Gaukelleien erfreuen können.",
|
"sich an Gaukelleien erfreuen können.",
|
||||||
cinfo_region
|
cinfo_simple
|
||||||
};
|
};
|
||||||
|
|
||||||
/* Astralblock, auf Astralregion */
|
/* Astralblock, auf Astralregion */
|
||||||
|
@ -316,7 +292,7 @@ static struct curse_type ct_astralblock = {
|
||||||
"astralblock",
|
"astralblock",
|
||||||
CURSETYP_NORM, 0, NO_MERGE,
|
CURSETYP_NORM, 0, NO_MERGE,
|
||||||
"",
|
"",
|
||||||
cinfo_region
|
cinfo_simple
|
||||||
};
|
};
|
||||||
/* Unterhaltungsanteil vermehren */
|
/* Unterhaltungsanteil vermehren */
|
||||||
static struct curse_type ct_generous = {
|
static struct curse_type ct_generous = {
|
||||||
|
@ -324,7 +300,7 @@ static struct curse_type ct_generous = {
|
||||||
CURSETYP_NORM, 0, ( M_DURATION | M_VIGOUR | M_MAXEFFECT ),
|
CURSETYP_NORM, 0, ( M_DURATION | M_VIGOUR | M_MAXEFFECT ),
|
||||||
"Dieser Zauber beeinflusst die allgemeine Stimmung in der Region positiv. "
|
"Dieser Zauber beeinflusst die allgemeine Stimmung in der Region positiv. "
|
||||||
"Die gute Laune macht die Leute freigiebiger.",
|
"Die gute Laune macht die Leute freigiebiger.",
|
||||||
cinfo_region
|
cinfo_simple
|
||||||
};
|
};
|
||||||
/* verhindert Attackiere regional */
|
/* verhindert Attackiere regional */
|
||||||
static struct curse_type ct_peacezone = {
|
static struct curse_type ct_peacezone = {
|
||||||
|
@ -332,65 +308,59 @@ static struct curse_type ct_peacezone = {
|
||||||
CURSETYP_NORM, 0, NO_MERGE,
|
CURSETYP_NORM, 0, NO_MERGE,
|
||||||
"Dieser machtvoller Beeinflussungszauber erstickt jeden Streit schon im "
|
"Dieser machtvoller Beeinflussungszauber erstickt jeden Streit schon im "
|
||||||
"Keim.",
|
"Keim.",
|
||||||
cinfo_region
|
cinfo_simple
|
||||||
};
|
};
|
||||||
/* erschwert geordnete Bewegungen */
|
/* erschwert geordnete Bewegungen */
|
||||||
static struct curse_type ct_disorientationzone = {
|
static struct curse_type ct_disorientationzone = {
|
||||||
"disorientationzone",
|
"disorientationzone",
|
||||||
CURSETYP_NORM, 0, NO_MERGE,
|
CURSETYP_NORM, 0, NO_MERGE,
|
||||||
"",
|
"",
|
||||||
cinfo_region
|
cinfo_simple
|
||||||
};
|
};
|
||||||
/* erniedigt Magieresistenz von nicht-aliierten Einheiten, wirkt nur 1x
|
/* erniedigt Magieresistenz von nicht-aliierten Einheiten, wirkt nur 1x
|
||||||
* pro Einheit */
|
* pro Einheit */
|
||||||
static struct curse_type ct_badmagicresistancezone = {
|
static struct curse_type ct_badmagicresistancezone = {
|
||||||
"badmagicresistancezone",
|
"badmagicresistancezone",
|
||||||
CURSETYP_NORM, 0, NO_MERGE,
|
CURSETYP_NORM, 0, NO_MERGE,
|
||||||
"Dieses Lied, das irgendwie in die magische Essenz der Region gewoben "
|
"Dieses Lied, das irgendwie in die magische Essenz der Region gewoben "
|
||||||
"ist, schwächt die natürliche Widerstandskraft gegen eine "
|
"ist, schwächt die natürliche Widerstandskraft gegen eine "
|
||||||
"Verzauberung. Es scheint jedoch nur auf bestimmte Einheiten zu wirken.",
|
"Verzauberung. Es scheint jedoch nur auf bestimmte Einheiten zu wirken.",
|
||||||
cinfo_region
|
cinfo_simple
|
||||||
};
|
};
|
||||||
/* erhöht Magieresistenz von aliierten Einheiten, wirkt nur 1x pro
|
/* erhöht Magieresistenz von aliierten Einheiten, wirkt nur 1x pro
|
||||||
* Einheit */
|
* Einheit */
|
||||||
static struct curse_type ct_goodmagicresistancezone = {
|
static struct curse_type ct_goodmagicresistancezone = {
|
||||||
"goodmagicresistancezone",
|
"goodmagicresistancezone",
|
||||||
CURSETYP_NORM, 0, NO_MERGE,
|
CURSETYP_NORM, 0, NO_MERGE,
|
||||||
"Dieses Lied, das irgendwie in die magische Essenz der Region gewoben "
|
"Dieses Lied, das irgendwie in die magische Essenz der Region gewoben "
|
||||||
"ist, verstärkt die natürliche Widerstandskraft gegen eine "
|
"ist, verstärkt die natürliche Widerstandskraft gegen eine "
|
||||||
"Verzauberung. Es scheint jedoch nur auf bestimmte Einheiten zu wirken.",
|
"Verzauberung. Es scheint jedoch nur auf bestimmte Einheiten zu wirken.",
|
||||||
cinfo_region
|
cinfo_simple
|
||||||
};
|
};
|
||||||
static struct curse_type ct_riotzone = {
|
static struct curse_type ct_riotzone = {
|
||||||
"riotzone",
|
"riotzone",
|
||||||
CURSETYP_NORM, 0, (M_DURATION),
|
CURSETYP_NORM, 0, (M_DURATION),
|
||||||
NULL,
|
NULL,
|
||||||
cinfo_region
|
cinfo_simple
|
||||||
};
|
};
|
||||||
static struct curse_type ct_holyground = {
|
static struct curse_type ct_holyground = {
|
||||||
"holyground",
|
"holyground",
|
||||||
CURSETYP_NORM, 0, (M_VIGOUR_ADD),
|
CURSETYP_NORM, 0, (M_VIGOUR_ADD),
|
||||||
"Verschiedene Naturgeistern sind im Boden der Region gebunden und "
|
"Verschiedene Naturgeistern sind im Boden der Region gebunden und "
|
||||||
"beschützen diese vor dem der dunklen Magie des lebenden Todes.",
|
"beschützen diese vor dem der dunklen Magie des lebenden Todes.",
|
||||||
cinfo_region
|
cinfo_simple
|
||||||
};
|
};
|
||||||
static struct curse_type ct_healing = {
|
static struct curse_type ct_healing = {
|
||||||
"healingzone",
|
"healingzone",
|
||||||
CURSETYP_NORM, 0, (M_VIGOUR | M_DURATION),
|
CURSETYP_NORM, 0, (M_VIGOUR | M_DURATION),
|
||||||
"Heilung ist in dieser Region magisch beeinflusst.",
|
"Heilung ist in dieser Region magisch beeinflusst.",
|
||||||
cinfo_region
|
cinfo_simple
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
void
|
void
|
||||||
register_regioncurse(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");
|
|
||||||
|
|
||||||
register_function((pf_generic)cansee_antimagiczone, "cursecansee::antimagiczone");
|
|
||||||
|
|
||||||
ct_register(&ct_fogtrap);
|
ct_register(&ct_fogtrap);
|
||||||
ct_register(&ct_antimagiczone);
|
ct_register(&ct_antimagiczone);
|
||||||
ct_register(&ct_farvision);
|
ct_register(&ct_farvision);
|
||||||
|
|
|
@ -19,7 +19,6 @@ extern "C" {
|
||||||
|
|
||||||
struct curse;
|
struct curse;
|
||||||
struct locale;
|
struct locale;
|
||||||
extern int cinfo_region(const struct locale * lang, const void * obj, typ_t typ, struct curse *c, int self);
|
|
||||||
|
|
||||||
extern void register_regioncurse(void);
|
extern void register_regioncurse(void);
|
||||||
|
|
||||||
|
|
|
@ -3263,7 +3263,7 @@ dc_age(struct curse * c)
|
||||||
}
|
}
|
||||||
|
|
||||||
static struct curse_type ct_deathcloud = {
|
static struct curse_type ct_deathcloud = {
|
||||||
"deathcloud", CURSETYP_REGION, 0, NO_MERGE, NULL, cinfo_region, NULL, NULL, NULL, NULL, dc_age
|
"deathcloud", CURSETYP_REGION, 0, NO_MERGE, NULL, cinfo_simple, NULL, NULL, NULL, NULL, dc_age
|
||||||
};
|
};
|
||||||
|
|
||||||
static curse *
|
static curse *
|
||||||
|
|
|
@ -35,29 +35,6 @@
|
||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
#include <assert.h>
|
#include <assert.h>
|
||||||
|
|
||||||
|
|
||||||
/* ------------------------------------------------------------- */
|
|
||||||
int
|
|
||||||
cinfo_unit(const struct locale * lang, const void * obj, typ_t typ, struct curse *c, int self)
|
|
||||||
{
|
|
||||||
struct message * msg;
|
|
||||||
|
|
||||||
unused(typ);
|
|
||||||
unused(self);
|
|
||||||
unused(obj);
|
|
||||||
|
|
||||||
assert(typ == TYP_UNIT);
|
|
||||||
|
|
||||||
msg = msg_message(mkname("curseinfo", c->type->cname), "id", c->no);
|
|
||||||
if (msg) {
|
|
||||||
nr_render(msg, lang, buf, sizeof(buf), NULL);
|
|
||||||
msg_release(msg);
|
|
||||||
return 1;
|
|
||||||
}
|
|
||||||
log_warning(("There is no curseinfo for %s.\n", c->type->cname));
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
static int
|
static int
|
||||||
cinfo_unit_onlyowner(const struct locale * lang, const void * obj, typ_t typ, struct curse *c, int self)
|
cinfo_unit_onlyowner(const struct locale * lang, const void * obj, typ_t typ, struct curse *c, int self)
|
||||||
{
|
{
|
||||||
|
@ -221,8 +198,8 @@ static struct curse_type ct_speed = {
|
||||||
/*
|
/*
|
||||||
* C_ORC
|
* C_ORC
|
||||||
*/
|
*/
|
||||||
static int
|
int
|
||||||
cinfo_orc(const struct locale * lang, const void * obj, typ_t typ, struct curse *c, int self)
|
cinfo_unit(const struct locale * lang, const void * obj, typ_t typ, struct curse *c, int self)
|
||||||
{
|
{
|
||||||
unit *u;
|
unit *u;
|
||||||
message * msg;
|
message * msg;
|
||||||
|
@ -239,12 +216,13 @@ cinfo_orc(const struct locale * lang, const void * obj, typ_t typ, struct curse
|
||||||
}
|
}
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
static struct curse_type ct_orcish = {
|
static struct curse_type ct_orcish = {
|
||||||
"orcish",
|
"orcish",
|
||||||
CURSETYP_UNIT, CURSE_SPREADMODULO, M_MEN,
|
CURSETYP_UNIT, CURSE_SPREADMODULO, M_MEN,
|
||||||
"Dieser Zauber scheint die Einheit zu 'orkisieren'. Wie bei Orks "
|
"Dieser Zauber scheint die Einheit zu 'orkisieren'. Wie bei Orks "
|
||||||
"ist eine deutliche Neigung zur Fortpflanzung zu beobachten.",
|
"ist eine deutliche Neigung zur Fortpflanzung zu beobachten.",
|
||||||
cinfo_orc
|
cinfo_unit
|
||||||
};
|
};
|
||||||
|
|
||||||
/* ------------------------------------------------------------- */
|
/* ------------------------------------------------------------- */
|
||||||
|
@ -345,53 +323,22 @@ static struct curse_type ct_sparkle = { "sparkle",
|
||||||
/*
|
/*
|
||||||
* C_STRENGTH
|
* C_STRENGTH
|
||||||
*/
|
*/
|
||||||
static int
|
|
||||||
cinfo_strength(const struct locale * lang, const void * obj, typ_t typ, struct curse *c, int self)
|
|
||||||
{
|
|
||||||
unused(c);
|
|
||||||
unused(typ);
|
|
||||||
|
|
||||||
assert(typ == TYP_UNIT);
|
|
||||||
unused(obj);
|
|
||||||
|
|
||||||
if (self != 0){
|
|
||||||
sprintf(buf, "Die Leute strotzen nur so vor Kraft. (%s)",
|
|
||||||
curseid(c));
|
|
||||||
return 1;
|
|
||||||
}
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
static struct curse_type ct_strength = { "strength",
|
static struct curse_type ct_strength = { "strength",
|
||||||
CURSETYP_UNIT, CURSE_SPREADMODULO, M_MEN,
|
CURSETYP_UNIT, CURSE_SPREADMODULO, M_MEN,
|
||||||
"Dieser Zauber vermehrt die Stärke der verzauberten Personen um ein "
|
"Dieser Zauber vermehrt die Stärke der verzauberten Personen um ein "
|
||||||
"vielfaches.",
|
"vielfaches.",
|
||||||
cinfo_strength
|
cinfo_simple
|
||||||
};
|
};
|
||||||
|
|
||||||
/* ------------------------------------------------------------- */
|
/* ------------------------------------------------------------- */
|
||||||
/*
|
/*
|
||||||
* C_ALLSKILLS (Alp)
|
* C_ALLSKILLS (Alp)
|
||||||
*/
|
*/
|
||||||
static int
|
|
||||||
cinfo_allskills(const struct locale * lang, const void * obj, typ_t typ, struct curse *c, int self)
|
|
||||||
{
|
|
||||||
unused(obj);
|
|
||||||
unused(typ);
|
|
||||||
unused(c);
|
|
||||||
|
|
||||||
assert(typ == TYP_UNIT);
|
|
||||||
|
|
||||||
if (self != 0){
|
|
||||||
sprintf(buf, "Wird von einem Alp geritten. (%s)", curseid(c));
|
|
||||||
return 1;
|
|
||||||
}
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
static struct curse_type ct_worse = {
|
static struct curse_type ct_worse = {
|
||||||
"worse",
|
"worse",
|
||||||
CURSETYP_UNIT, CURSE_SPREADMODULO, M_MEN,
|
CURSETYP_UNIT, CURSE_SPREADMODULO, M_MEN,
|
||||||
"",
|
"",
|
||||||
cinfo_allskills
|
cinfo_unit
|
||||||
};
|
};
|
||||||
|
|
||||||
/* ------------------------------------------------------------- */
|
/* ------------------------------------------------------------- */
|
||||||
|
@ -399,50 +346,19 @@ static struct curse_type ct_worse = {
|
||||||
/*
|
/*
|
||||||
* C_ITEMCLOAK
|
* C_ITEMCLOAK
|
||||||
*/
|
*/
|
||||||
static int
|
|
||||||
cinfo_itemcloak(const struct locale * lang, const void * obj, typ_t typ, struct curse *c, int self)
|
|
||||||
{
|
|
||||||
unit *u;
|
|
||||||
unused(typ);
|
|
||||||
|
|
||||||
assert(typ == TYP_UNIT);
|
|
||||||
u = (unit *)obj;
|
|
||||||
|
|
||||||
if (self != 0) {
|
|
||||||
sprintf(buf, "Die Ausrüstung von %s scheint unsichtbar. (%s)",
|
|
||||||
u->name, curseid(c));
|
|
||||||
return 1;
|
|
||||||
}
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
static struct curse_type ct_itemcloak = {
|
static struct curse_type ct_itemcloak = {
|
||||||
"itemcloak",
|
"itemcloak",
|
||||||
CURSETYP_UNIT, CURSE_SPREADNEVER, M_DURATION,
|
CURSETYP_UNIT, CURSE_SPREADNEVER, M_DURATION,
|
||||||
"Dieser Zauber macht die Ausrüstung unsichtbar.",
|
"Dieser Zauber macht die Ausrüstung unsichtbar.",
|
||||||
cinfo_itemcloak
|
cinfo_unit
|
||||||
};
|
};
|
||||||
/* ------------------------------------------------------------- */
|
/* ------------------------------------------------------------- */
|
||||||
|
|
||||||
static int
|
|
||||||
cinfo_fumble(const struct locale * lang, const void * obj, typ_t typ, struct curse *c, int self)
|
|
||||||
{
|
|
||||||
unit * u = (unit*)obj;
|
|
||||||
unused(typ);
|
|
||||||
|
|
||||||
assert(typ == TYP_UNIT);
|
|
||||||
|
|
||||||
if (self != 0){
|
|
||||||
sprintf(buf, "%s kann sich kaum konzentrieren. (%s)",
|
|
||||||
u->name, curseid(c));
|
|
||||||
return 1;
|
|
||||||
}
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
static struct curse_type ct_fumble = {
|
static struct curse_type ct_fumble = {
|
||||||
"fumble",
|
"fumble",
|
||||||
CURSETYP_NORM, CURSE_SPREADNEVER, NO_MERGE,
|
CURSETYP_NORM, CURSE_SPREADNEVER, NO_MERGE,
|
||||||
"Eine Wolke negativer Energie umgibt die Einheit.",
|
"Eine Wolke negativer Energie umgibt die Einheit.",
|
||||||
cinfo_fumble
|
cinfo_unit
|
||||||
};
|
};
|
||||||
/* ------------------------------------------------------------- */
|
/* ------------------------------------------------------------- */
|
||||||
|
|
||||||
|
@ -452,11 +368,12 @@ static struct curse_type ct_oldrace = { "oldrace",
|
||||||
"",
|
"",
|
||||||
NULL
|
NULL
|
||||||
};
|
};
|
||||||
|
|
||||||
static struct curse_type ct_magicresistance = { "magicresistance",
|
static struct curse_type ct_magicresistance = { "magicresistance",
|
||||||
CURSETYP_UNIT, CURSE_SPREADMODULO, M_MEN,
|
CURSETYP_UNIT, CURSE_SPREADMODULO, M_MEN,
|
||||||
"Dieser Zauber verstärkt die natürliche Widerstandskraft gegen eine "
|
"Dieser Zauber verstärkt die natürliche Widerstandskraft gegen eine "
|
||||||
"Verzauberung.",
|
"Verzauberung.",
|
||||||
NULL
|
cinfo_simple
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
|
@ -500,6 +417,7 @@ cinfo_skill(const struct locale * lang, const void * obj, typ_t typ, struct curs
|
||||||
}
|
}
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
static struct curse_type ct_skillmod = {
|
static struct curse_type ct_skillmod = {
|
||||||
"skillmod",
|
"skillmod",
|
||||||
CURSETYP_NORM, CURSE_SPREADMODULO, M_MEN,
|
CURSETYP_NORM, CURSE_SPREADMODULO, M_MEN,
|
||||||
|
@ -513,20 +431,6 @@ static struct curse_type ct_skillmod = {
|
||||||
void
|
void
|
||||||
register_unitcurse(void)
|
register_unitcurse(void)
|
||||||
{
|
{
|
||||||
register_function((pf_generic)cinfo_unit_onlyowner, "curseinfo::unit_onlyowner");
|
|
||||||
register_function((pf_generic)cinfo_auraboost, "curseinfo::auraboost");
|
|
||||||
register_function((pf_generic)cinfo_slave, "curseinfo::slave");
|
|
||||||
register_function((pf_generic)cinfo_calm, "curseinfo::calm");
|
|
||||||
register_function((pf_generic)cinfo_speed, "curseinfo::speed");
|
|
||||||
register_function((pf_generic)cinfo_orc, "curseinfo::orc");
|
|
||||||
register_function((pf_generic)cinfo_kaelteschutz, "curseinfo::kaelteschutz");
|
|
||||||
register_function((pf_generic)cinfo_sparkle, "curseinfo::sparkle");
|
|
||||||
register_function((pf_generic)cinfo_strength, "curseinfo::strength");
|
|
||||||
register_function((pf_generic)cinfo_allskills, "curseinfo::allskills");
|
|
||||||
register_function((pf_generic)cinfo_skill, "curseinfo::skill");
|
|
||||||
register_function((pf_generic)cinfo_itemcloak, "curseinfo::itemcloak");
|
|
||||||
register_function((pf_generic)cinfo_fumble, "curseinfo::fumble");
|
|
||||||
|
|
||||||
ct_register(&ct_auraboost);
|
ct_register(&ct_auraboost);
|
||||||
ct_register(&ct_magicboost);
|
ct_register(&ct_magicboost);
|
||||||
ct_register(&ct_slavery);
|
ct_register(&ct_slavery);
|
||||||
|
@ -544,4 +448,3 @@ register_unitcurse(void)
|
||||||
ct_register(&ct_magicresistance);
|
ct_register(&ct_magicresistance);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -20,6 +20,7 @@ extern "C" {
|
||||||
struct curse;
|
struct curse;
|
||||||
struct locale;
|
struct locale;
|
||||||
extern int cinfo_unit(const struct locale * lang, const void * obj, typ_t typ, struct curse *c, int self);
|
extern int cinfo_unit(const struct locale * lang, const void * obj, typ_t typ, struct curse *c, int self);
|
||||||
|
|
||||||
extern void register_unitcurse(void);
|
extern void register_unitcurse(void);
|
||||||
|
|
||||||
#ifdef __cplusplus
|
#ifdef __cplusplus
|
||||||
|
|
|
@ -712,6 +712,7 @@
|
||||||
</string>
|
</string>
|
||||||
<string name="section_newpotions">
|
<string name="section_newpotions">
|
||||||
<text locale="de">Neue Tränke</text>
|
<text locale="de">Neue Tränke</text>
|
||||||
|
<text locale="en">New Potions</text>
|
||||||
</string>
|
</string>
|
||||||
|
|
||||||
<!--Gebäudetypen -->
|
<!--Gebäudetypen -->
|
||||||
|
@ -2992,19 +2993,19 @@
|
||||||
|
|
||||||
<string name="alp">
|
<string name="alp">
|
||||||
<text locale="de">Alp</text>
|
<text locale="de">Alp</text>
|
||||||
<text locale="en">alp</text>
|
<text locale="en">nightmare</text>
|
||||||
</string>
|
</string>
|
||||||
<string name="alp_p">
|
<string name="alp_p">
|
||||||
<text locale="de">Alps</text>
|
<text locale="de">Alps</text>
|
||||||
<text locale="en">alps</text>
|
<text locale="en">nightmaress</text>
|
||||||
</string>
|
</string>
|
||||||
<string name="alp_d">
|
<string name="alp_d">
|
||||||
<text locale="de">Alps</text>
|
<text locale="de">Alps</text>
|
||||||
<text locale="en">alps</text>
|
<text locale="en">nightmares</text>
|
||||||
</string>
|
</string>
|
||||||
<string name="alp_x">
|
<string name="alp_x">
|
||||||
<text locale="de">Alp</text>
|
<text locale="de">Alp</text>
|
||||||
<text locale="en">alp</text>
|
<text locale="en">nightmare</text>
|
||||||
</string>
|
</string>
|
||||||
|
|
||||||
<string name="mountainguard">
|
<string name="mountainguard">
|
||||||
|
|
|
@ -47,14 +47,49 @@
|
||||||
<text locale="fr">"A fog of negative energy enshrouds the region. ($int36($id))"</text>
|
<text locale="fr">"A fog of negative energy enshrouds the region. ($int36($id))"</text>
|
||||||
<text locale="en">"A fog of negative energy enshrouds the region. ($int36($id))"</text>
|
<text locale="en">"A fog of negative energy enshrouds the region. ($int36($id))"</text>
|
||||||
</message>
|
</message>
|
||||||
|
<message name="curseinfo::strength" section="events">
|
||||||
|
<type>
|
||||||
|
<arg name="id" type="int"/>
|
||||||
|
</type>
|
||||||
|
<text locale="de">"Die Leute strotzen nur so vor Kraft. ($int36($id))"</text>
|
||||||
|
<text locale="fr">"Testosterone levels are at an all-time high. ($int36($id))"</text>
|
||||||
|
<text locale="en">"Testosterone levels are at an all-time high. ($int36($id))"</text>
|
||||||
|
</message>
|
||||||
|
<message name="curseinfo::worse" section="events">
|
||||||
|
<type>
|
||||||
|
<arg name="unit" type="unit"/>
|
||||||
|
<arg name="id" type="int"/>
|
||||||
|
</type>
|
||||||
|
<text locale="de">"$unit($unit) wird von einem Alp geritten. ($int36($id))"</text>
|
||||||
|
<text locale="fr">"$unit($unit) is chased by a nightmare. ($int36($id))"</text>
|
||||||
|
<text locale="en">"$unit($unit) is chased by a nightmare. ($int36($id))"</text>
|
||||||
|
</message>
|
||||||
<message name="curseinfo::orcish" section="events">
|
<message name="curseinfo::orcish" section="events">
|
||||||
<type>
|
<type>
|
||||||
<arg name="unit" type="unit"/>
|
<arg name="unit" type="unit"/>
|
||||||
<arg name="id" type="int"/>
|
<arg name="id" type="int"/>
|
||||||
</type>
|
</type>
|
||||||
<text locale="de">"$unit($unit) stürzt sich von einem amourösen Abenteuer ins nächste. ($int36($id))"</text>
|
<text locale="de">"$unit($unit) stürzt sich von einem amourösen Abenteuer ins nächste. ($int36($id))"</text>
|
||||||
<text locale="fr">"($int36($id))"</text>
|
<text locale="fr">"$unit($unit) goes from one amourous adventure to another. ($int36($id))"</text>
|
||||||
<text locale="de">"$unit($unit) goes from one amourous adventure to another. ($int36($id))"</text>
|
<text locale="en">"$unit($unit) goes from one amourous adventure to another. ($int36($id))"</text>
|
||||||
|
</message>
|
||||||
|
<message name="curseinfo::fumble" section="events">
|
||||||
|
<type>
|
||||||
|
<arg name="unit" type="unit"/>
|
||||||
|
<arg name="id" type="int"/>
|
||||||
|
</type>
|
||||||
|
<text locale="de">"$unit($unit) kann sich kaum konzentrieren. ($int36($id))"</text>
|
||||||
|
<text locale="fr">"$unit($unit) can hardly focus on anything. ($int36($id))"</text>
|
||||||
|
<text locale="en">"$unit($unit) can hardly focus on anything. ($int36($id))"</text>
|
||||||
|
</message>
|
||||||
|
<message name="curseinfo::itemcloak" section="events">
|
||||||
|
<type>
|
||||||
|
<arg name="unit" type="unit"/>
|
||||||
|
<arg name="id" type="int"/>
|
||||||
|
</type>
|
||||||
|
<text locale="de">"Die Ausrüstung von $unit($unit) scheint unsichtbar. ($int36($id))"</text>
|
||||||
|
<text locale="fr">"$unit($unit)'s equipment is invisible. ($int36($id))"</text>
|
||||||
|
<text locale="en">"$unit($unit)'s equipment is invisible. ($int36($id))"</text>
|
||||||
</message>
|
</message>
|
||||||
<message name="curseinfo::magicresistance" section="events">
|
<message name="curseinfo::magicresistance" section="events">
|
||||||
<type>
|
<type>
|
||||||
|
|
Loading…
Reference in New Issue