forked from github/server
Unicode WIP:
- completed i18n for combatspells and battle adding the filereader header (the implementation is on my PC which is still in transit to Germany)
This commit is contained in:
parent
7e36df93a4
commit
d2094d6205
12 changed files with 199 additions and 87 deletions
|
@ -69,7 +69,7 @@ createmonsters(void)
|
||||||
* no 0 muss keine orders einreichen! */
|
* no 0 muss keine orders einreichen! */
|
||||||
|
|
||||||
f->email = strdup("monsters@eressea.de");
|
f->email = strdup("monsters@eressea.de");
|
||||||
set_string(&f->name, (xmlChar*)"Monster");
|
f->name = (xmlChar*)strdup("Monster");
|
||||||
f->alive = 1;
|
f->alive = 1;
|
||||||
f->options = (char)(1<<O_REPORT);
|
f->options = (char)(1<<O_REPORT);
|
||||||
addlist(&factions, f);
|
addlist(&factions, f);
|
||||||
|
|
|
@ -169,7 +169,6 @@ use_instantartsculpture(struct unit * u, const struct item_type * itype,
|
||||||
|
|
||||||
b = new_building(bt_find("artsculpture"), u->region, u->faction->locale);
|
b = new_building(bt_find("artsculpture"), u->region, u->faction->locale);
|
||||||
b->size = 100;
|
b->size = 100;
|
||||||
set_string(&b->name, LOC(u->faction->locale, "artsculpture"));
|
|
||||||
|
|
||||||
ADDMSG(&u->region->msgs, msg_message("artsculpture_create", "unit region",
|
ADDMSG(&u->region->msgs, msg_message("artsculpture_create", "unit region",
|
||||||
u, u->region));
|
u, u->region));
|
||||||
|
@ -192,7 +191,6 @@ use_instantartacademy(struct unit * u, const struct item_type * itype,
|
||||||
|
|
||||||
b = new_building(bt_find("artacademy"), u->region, u->faction->locale);
|
b = new_building(bt_find("artacademy"), u->region, u->faction->locale);
|
||||||
b->size = 100;
|
b->size = 100;
|
||||||
set_string(&b->name, LOC(u->faction->locale, "artacademy"));
|
|
||||||
|
|
||||||
ADDMSG(&u->region->msgs, msg_message(
|
ADDMSG(&u->region->msgs, msg_message(
|
||||||
"artacademy_create", "unit region", u, u->region));
|
"artacademy_create", "unit region", u, u->region));
|
||||||
|
|
|
@ -1064,7 +1064,8 @@ parse_restart(void)
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
if (fval(f, FFL_OVERRIDE)) {
|
if (fval(f, FFL_OVERRIDE)) {
|
||||||
set_string(&f->override, (xmlChar*)strdup(itoa36(rng_int())));
|
free(f->override);
|
||||||
|
f->override = (xmlChar*)strdup(itoa36(rng_int()));
|
||||||
freset(f, FFL_OVERRIDE);
|
freset(f, FFL_OVERRIDE);
|
||||||
}
|
}
|
||||||
if (turn!=f->lastorders) {
|
if (turn!=f->lastorders) {
|
||||||
|
@ -1408,13 +1409,11 @@ display_cmd(unit * u, struct order * ord)
|
||||||
if (s!=NULL) {
|
if (s!=NULL) {
|
||||||
const xmlChar * s2 = getstrtoken();
|
const xmlChar * s2 = getstrtoken();
|
||||||
|
|
||||||
|
free(*s);
|
||||||
|
*s = xstrdup(s2);
|
||||||
if (xstrlen(s2)>=DISPLAYSIZE) {
|
if (xstrlen(s2)>=DISPLAYSIZE) {
|
||||||
xmlChar * s3 = xstrdup(s2);
|
(*s)[DISPLAYSIZE] = 0;
|
||||||
s3[DISPLAYSIZE] = 0;
|
}
|
||||||
set_string(s, s3);
|
|
||||||
free(s3);
|
|
||||||
} else
|
|
||||||
set_string(s, s2);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
|
@ -1677,14 +1676,11 @@ name_cmd(unit * u, struct order * ord)
|
||||||
/* TODO: Validate to make sure people don't have illegal characters in
|
/* TODO: Validate to make sure people don't have illegal characters in
|
||||||
* names, phishing-style? () come to mind. */
|
* names, phishing-style? () come to mind. */
|
||||||
|
|
||||||
|
free(*s);
|
||||||
|
*s = xstrdup(s2);
|
||||||
if (xstrlen(s2)>=NAMESIZE) {
|
if (xstrlen(s2)>=NAMESIZE) {
|
||||||
xmlChar * s3 = xstrdup(s2);
|
(*s)[NAMESIZE] = 0;
|
||||||
s3[NAMESIZE] = 0;
|
}
|
||||||
set_string(s, s3);
|
|
||||||
free(s3);
|
|
||||||
} else
|
|
||||||
set_string(s, s2);
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
|
|
|
@ -114,6 +114,7 @@ static const double TROLL_REGENERATION = 0.10;
|
||||||
/* Nach dem alten System: */
|
/* Nach dem alten System: */
|
||||||
static int missile_range[2] = {FIGHT_ROW, BEHIND_ROW};
|
static int missile_range[2] = {FIGHT_ROW, BEHIND_ROW};
|
||||||
static int melee_range[2] = {FIGHT_ROW, FIGHT_ROW};
|
static int melee_range[2] = {FIGHT_ROW, FIGHT_ROW};
|
||||||
|
static message * msg_separator;
|
||||||
|
|
||||||
const troop no_troop = {0, 0};
|
const troop no_troop = {0, 0};
|
||||||
|
|
||||||
|
@ -2832,7 +2833,7 @@ print_stats(battle * b)
|
||||||
message * msg;
|
message * msg;
|
||||||
char buf[1024];
|
char buf[1024];
|
||||||
|
|
||||||
fbattlerecord(b, f, " ");
|
message_faction(b, f, msg_separator);
|
||||||
|
|
||||||
msg = msg_message("msg_army", "index name", army_index(s), sname);
|
msg = msg_message("msg_army", "index name", army_index(s), sname);
|
||||||
message_faction(b, f, msg);
|
message_faction(b, f, msg);
|
||||||
|
@ -2901,7 +2902,7 @@ print_stats(battle * b)
|
||||||
print_fighters(b, s);
|
print_fighters(b, s);
|
||||||
}
|
}
|
||||||
|
|
||||||
battlerecord(b, " ");
|
message_all(b, msg_separator);
|
||||||
|
|
||||||
/* Besten Taktiker ermitteln */
|
/* Besten Taktiker ermitteln */
|
||||||
|
|
||||||
|
@ -3452,7 +3453,7 @@ battle_report(battle * b)
|
||||||
size_t size = sizeof(buf), rsize;
|
size_t size = sizeof(buf), rsize;
|
||||||
message * m;
|
message * m;
|
||||||
|
|
||||||
fbattlerecord(b, fac, " ");
|
message_faction(b, fac, msg_separator);
|
||||||
|
|
||||||
if (cont) m = msg_message("battle::lineup", "turn", b->turn);
|
if (cont) m = msg_message("battle::lineup", "turn", b->turn);
|
||||||
else m = msg_message("battle::after", "");
|
else m = msg_message("battle::after", "");
|
||||||
|
@ -4035,6 +4036,10 @@ do_battle(region * r)
|
||||||
ship * sh;
|
ship * sh;
|
||||||
building *bu;
|
building *bu;
|
||||||
|
|
||||||
|
if (msg_separator==NULL) {
|
||||||
|
msg_separator = msg_message("battle::section", "");
|
||||||
|
}
|
||||||
|
|
||||||
fighting = init_battle(r, &b);
|
fighting = init_battle(r, &b);
|
||||||
|
|
||||||
if (b==NULL) return;
|
if (b==NULL) return;
|
||||||
|
|
|
@ -772,6 +772,15 @@ r_demand(const region * r, const luxury_type * ltype)
|
||||||
return d->value;
|
return d->value;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void
|
||||||
|
rsetname(struct region * r, const xmlChar * name)
|
||||||
|
{
|
||||||
|
if (r->land) {
|
||||||
|
free(r->land->name);
|
||||||
|
r->land->name = strdup(name);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
const xmlChar *
|
const xmlChar *
|
||||||
rname(const region * r, const struct locale * lang) {
|
rname(const region * r, const struct locale * lang) {
|
||||||
if (r->land) {
|
if (r->land) {
|
||||||
|
|
|
@ -213,7 +213,7 @@ extern boolean r_isforest(const struct region * r);
|
||||||
#define rsetterrain(r, t) ((r)->terrain = newterrain(t))
|
#define rsetterrain(r, t) ((r)->terrain = newterrain(t))
|
||||||
|
|
||||||
extern const xmlChar * rname(const struct region * r, const struct locale * lang);
|
extern const xmlChar * rname(const struct region * r, const struct locale * lang);
|
||||||
#define rsetname(r, str) (set_string(&(r)->land->name, str))
|
extern void rsetname(struct region * r, const xmlChar * name);
|
||||||
|
|
||||||
#define rplane(r) getplane(r)
|
#define rplane(r) getplane(r)
|
||||||
|
|
||||||
|
|
|
@ -38,6 +38,7 @@
|
||||||
|
|
||||||
/* libc includes */
|
/* libc includes */
|
||||||
#include <assert.h>
|
#include <assert.h>
|
||||||
|
#include <string.h>
|
||||||
|
|
||||||
#define EFFECT_HEALING_SPELL 5
|
#define EFFECT_HEALING_SPELL 5
|
||||||
|
|
||||||
|
@ -715,6 +716,7 @@ sp_wolfhowl(fighter * fi, int level, double power, spell * sp)
|
||||||
region *r = b->region;
|
region *r = b->region;
|
||||||
unit *mage = fi->unit;
|
unit *mage = fi->unit;
|
||||||
attrib *a;
|
attrib *a;
|
||||||
|
message * msg;
|
||||||
int force = (int)(get_force(power, 3)/2);
|
int force = (int)(get_force(power, 3)/2);
|
||||||
unit *u = create_unit(r, mage->faction, force, new_race[RC_WOLF], 0, NULL, mage);
|
unit *u = create_unit(r, mage->faction, force, new_race[RC_WOLF], 0, NULL, mage);
|
||||||
unused(sp);
|
unused(sp);
|
||||||
|
@ -734,9 +736,10 @@ sp_wolfhowl(fighter * fi, int level, double power, spell * sp)
|
||||||
a_add(&u->attribs, a);
|
a_add(&u->attribs, a);
|
||||||
|
|
||||||
make_fighter(b, u, fi->side, is_attacker(fi));
|
make_fighter(b, u, fi->side, is_attacker(fi));
|
||||||
sprintf(buf, "%s ruft %d %s zu Hilfe", unitname(mage), force,
|
msg = msg_message("sp_wolfhowl_effect", "mage amount race", mage, u->number, u->race);
|
||||||
racename(default_locale, u, u->race));
|
message_all(b, msg);
|
||||||
battlerecord(b, buf);
|
msg_release(msg);
|
||||||
|
|
||||||
return level;
|
return level;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -749,9 +752,11 @@ sp_shadowknights(fighter * fi, int level, double power, spell * sp)
|
||||||
unit *mage = fi->unit;
|
unit *mage = fi->unit;
|
||||||
attrib *a;
|
attrib *a;
|
||||||
int force = max(1, (int)get_force(power, 3));
|
int force = max(1, (int)get_force(power, 3));
|
||||||
|
message * msg;
|
||||||
|
|
||||||
unused(sp);
|
unused(sp);
|
||||||
|
|
||||||
|
|
||||||
u = create_unit(r, mage->faction, force, new_race[RC_SHADOWKNIGHT], 0, NULL, mage);
|
u = create_unit(r, mage->faction, force, new_race[RC_SHADOWKNIGHT], 0, NULL, mage);
|
||||||
setstatus(u, ST_FIGHT);
|
setstatus(u, ST_FIGHT);
|
||||||
|
|
||||||
|
@ -767,8 +772,10 @@ sp_shadowknights(fighter * fi, int level, double power, spell * sp)
|
||||||
|
|
||||||
make_fighter(b, u, fi->side, is_attacker(fi));
|
make_fighter(b, u, fi->side, is_attacker(fi));
|
||||||
|
|
||||||
sprintf(buf, "%s beschwört Trugbilder herauf", unitname(mage));
|
msg = msg_message("sp_shadowknights_effect", "mage", mage);
|
||||||
battlerecord(b, buf);
|
message_all(b, msg);
|
||||||
|
msg_release(msg);
|
||||||
|
|
||||||
return level;
|
return level;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -780,15 +787,13 @@ sp_strong_wall(fighter * fi, int level, double power, spell * sp)
|
||||||
building *burg;
|
building *burg;
|
||||||
variant effect;
|
variant effect;
|
||||||
static boolean init = false;
|
static boolean init = false;
|
||||||
|
message * msg;
|
||||||
static const curse_type * strongwall_ct;
|
static const curse_type * strongwall_ct;
|
||||||
if (!init) { init = true; strongwall_ct = ct_find("strongwall"); }
|
if (!init) { init = true; strongwall_ct = ct_find("strongwall"); }
|
||||||
|
|
||||||
unused(sp);
|
unused(sp);
|
||||||
|
|
||||||
if (!mage->building) {
|
if (!mage->building) {
|
||||||
sprintf(buf, "%s zaubert nicht, denn dieser Zauber hätte hier keinen "
|
|
||||||
"Sinn.", unitname(mage));
|
|
||||||
battlerecord(b, buf);
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
burg = mage->building;
|
burg = mage->building;
|
||||||
|
@ -798,9 +803,10 @@ sp_strong_wall(fighter * fi, int level, double power, spell * sp)
|
||||||
|
|
||||||
create_curse(mage, &burg->attribs, strongwall_ct, power, 1, effect, 0);
|
create_curse(mage, &burg->attribs, strongwall_ct, power, 1, effect, 0);
|
||||||
|
|
||||||
sprintf(buf, "%s Mauern erglühen in einem unheimlichen magischen Licht.",
|
msg = msg_message("sp_strongwalls_effect", "mage building", mage, mage->building);
|
||||||
buildingname(burg));
|
message_all(b, msg);
|
||||||
battlerecord(b, buf);
|
msg_release(msg);
|
||||||
|
|
||||||
return level;
|
return level;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -811,26 +817,19 @@ sp_chaosrow(fighter * fi, int level, double power, spell * sp)
|
||||||
unit *mage = fi->unit;
|
unit *mage = fi->unit;
|
||||||
cvector *fgs;
|
cvector *fgs;
|
||||||
void **fig;
|
void **fig;
|
||||||
|
message * m;
|
||||||
|
const char * mtype;
|
||||||
int k = 0;
|
int k = 0;
|
||||||
|
|
||||||
if (!count_enemies(b, fi, FIGHT_ROW, NUMROWS, SELECT_ADVANCE|SELECT_FIND)) {
|
if (!count_enemies(b, fi, FIGHT_ROW, NUMROWS, SELECT_ADVANCE|SELECT_FIND)) {
|
||||||
message * m = msg_message("battle::out_of_range", "mage spell", fi->unit, sp);
|
m = msg_message("battle::out_of_range", "mage spell", fi->unit, sp);
|
||||||
message_all(b, m);
|
message_all(b, m);
|
||||||
msg_release(m);
|
msg_release(m);
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
switch (sp->id) {
|
if (sp->id==SPL_CHAOSROW) power *=40;
|
||||||
case SPL_CHAOSROW:
|
else power = get_force(power, 5);
|
||||||
sprintf(buf, "%s murmelt eine düster klingende Formel. ", unitname(mage));
|
|
||||||
power *= 40;
|
|
||||||
break;
|
|
||||||
|
|
||||||
case SPL_SONG_OF_CONFUSION:
|
|
||||||
sprintf(buf, "%s stimmt einen seltsamen Gesang an. ", unitname(mage));
|
|
||||||
power = get_force(power, 5);
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
|
|
||||||
fgs = fighters(b, fi->side, FIGHT_ROW, NUMROWS, FS_ENEMY);
|
fgs = fighters(b, fi->side, FIGHT_ROW, NUMROWS, FS_ENEMY);
|
||||||
v_scramble(fgs->begin, fgs->end);
|
v_scramble(fgs->begin, fgs->end);
|
||||||
|
@ -880,13 +879,14 @@ sp_chaosrow(fighter * fi, int level, double power, spell * sp)
|
||||||
cv_kill(fgs);
|
cv_kill(fgs);
|
||||||
free(fgs);
|
free(fgs);
|
||||||
|
|
||||||
scat("Ein plötzlicher Tumult entsteht");
|
if (sp->id==SPL_CHAOSROW) {
|
||||||
if (k > 0) {
|
mtype = (k>0) ? "sp_chaosrow_effect_1" : "sp_chaosrow_effect_0";
|
||||||
scat(" und bringt die Kampfaufstellung durcheinander.");
|
|
||||||
} else {
|
} else {
|
||||||
scat(", der sich jedoch schnell wieder legt.");
|
mtype = (k>0) ? "sp_confusion_effect_1" : "sp_confusion_effect_0";
|
||||||
}
|
}
|
||||||
battlerecord(b, buf);
|
m = msg_message(mtype, "mage", mage);
|
||||||
|
message_all(b, m);
|
||||||
|
msg_release(m);
|
||||||
return level;
|
return level;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -902,19 +902,16 @@ sp_flee(fighter * fi, int level, double power, spell * sp)
|
||||||
void **fig;
|
void **fig;
|
||||||
int force, n;
|
int force, n;
|
||||||
int panik = 0;
|
int panik = 0;
|
||||||
|
message * msg;
|
||||||
|
|
||||||
switch(sp->id) {
|
switch(sp->id) {
|
||||||
case SPL_FLEE:
|
case SPL_FLEE:
|
||||||
sprintf(buf, "%s zaubert %s", unitname(mage),
|
|
||||||
spell_name(sp, default_locale));
|
|
||||||
force = (int)get_force(power,4);
|
force = (int)get_force(power,4);
|
||||||
break;
|
break;
|
||||||
case SPL_SONG_OF_FEAR:
|
case SPL_SONG_OF_FEAR:
|
||||||
sprintf(buf, "%s stimmt einen düsteren Gesang an", unitname(mage));
|
|
||||||
force = (int)get_force(power,3);
|
force = (int)get_force(power,3);
|
||||||
break;
|
break;
|
||||||
case SPL_AURA_OF_FEAR:
|
case SPL_AURA_OF_FEAR:
|
||||||
sprintf(buf, "%s ist von dunklen Schatten umgeben", unitname(mage));
|
|
||||||
force = (int)get_force(power,5);
|
force = (int)get_force(power,5);
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
|
@ -922,12 +919,11 @@ sp_flee(fighter * fi, int level, double power, spell * sp)
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!count_enemies(b, fi, FIGHT_ROW, AVOID_ROW, SELECT_ADVANCE|SELECT_FIND)) {
|
if (!count_enemies(b, fi, FIGHT_ROW, AVOID_ROW, SELECT_ADVANCE|SELECT_FIND)) {
|
||||||
scat(", aber es gab niemanden mehr, der beeinflusst werden konnte.");
|
msg = msg_message("sp_flee_effect_0", "mage spell", mage, sp);
|
||||||
battlerecord(b, buf);
|
message_all(b, msg);
|
||||||
|
msg_release(msg);
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
scat(":");
|
|
||||||
battlerecord(b, buf);
|
|
||||||
|
|
||||||
fgs = fighters(b, fi->side, FIGHT_ROW, AVOID_ROW, FS_ENEMY);
|
fgs = fighters(b, fi->side, FIGHT_ROW, AVOID_ROW, FS_ENEMY);
|
||||||
v_scramble(fgs->begin, fgs->end);
|
v_scramble(fgs->begin, fgs->end);
|
||||||
|
@ -956,9 +952,9 @@ sp_flee(fighter * fi, int level, double power, spell * sp)
|
||||||
cv_kill(fgs);
|
cv_kill(fgs);
|
||||||
free(fgs);
|
free(fgs);
|
||||||
|
|
||||||
sprintf(buf, "%d Krieger %s von Furcht gepackt.", panik,
|
msg = msg_message("sp_flee_effect_1", "mage spell amount", mage, sp, panik);
|
||||||
panik == 1 ? "wurde" : "wurden");
|
message_all(b, msg);
|
||||||
battlerecord(b, buf);
|
msg_release(msg);
|
||||||
|
|
||||||
return level;
|
return level;
|
||||||
}
|
}
|
||||||
|
@ -968,7 +964,6 @@ int
|
||||||
sp_hero(fighter * fi, int level, double power, spell * sp)
|
sp_hero(fighter * fi, int level, double power, spell * sp)
|
||||||
{
|
{
|
||||||
battle *b = fi->side->battle;
|
battle *b = fi->side->battle;
|
||||||
unit *mage = fi->unit;
|
|
||||||
int df_bonus = 0;
|
int df_bonus = 0;
|
||||||
int force = 0;
|
int force = 0;
|
||||||
int allies;
|
int allies;
|
||||||
|
@ -1017,7 +1012,6 @@ int
|
||||||
sp_berserk(fighter * fi, int level, double power, spell * sp)
|
sp_berserk(fighter * fi, int level, double power, spell * sp)
|
||||||
{
|
{
|
||||||
battle *b = fi->side->battle;
|
battle *b = fi->side->battle;
|
||||||
unit *mage = fi->unit;
|
|
||||||
int at_bonus = 0;
|
int at_bonus = 0;
|
||||||
int df_malus = 0;
|
int df_malus = 0;
|
||||||
int force = 0;
|
int force = 0;
|
||||||
|
@ -1126,7 +1120,6 @@ sp_tiredsoldiers(fighter * fi, int level, double power, spell * sp)
|
||||||
int n = 0;
|
int n = 0;
|
||||||
int force = (int)(power * power * 4);
|
int force = (int)(power * power * 4);
|
||||||
message * m;
|
message * m;
|
||||||
const char * effect;
|
|
||||||
|
|
||||||
if (!count_enemies(b, fi, FIGHT_ROW, BEHIND_ROW, SELECT_ADVANCE|SELECT_FIND)) {
|
if (!count_enemies(b, fi, FIGHT_ROW, BEHIND_ROW, SELECT_ADVANCE|SELECT_FIND)) {
|
||||||
message * m = msg_message("battle::out_of_range", "mage spell", fi->unit, sp);
|
message * m = msg_message("battle::out_of_range", "mage spell", fi->unit, sp);
|
||||||
|
@ -1163,7 +1156,6 @@ int
|
||||||
sp_windshield(fighter * fi, int level, double power, spell * sp)
|
sp_windshield(fighter * fi, int level, double power, spell * sp)
|
||||||
{
|
{
|
||||||
battle *b = fi->side->battle;
|
battle *b = fi->side->battle;
|
||||||
unit *mage = fi->unit;
|
|
||||||
int force, at_malus;
|
int force, at_malus;
|
||||||
int enemies;
|
int enemies;
|
||||||
message * m;
|
message * m;
|
||||||
|
@ -1217,7 +1209,7 @@ sp_reeling_arrows(fighter * fi, int level, double power, spell * sp)
|
||||||
unused(power);
|
unused(power);
|
||||||
|
|
||||||
b->reelarrow = true;
|
b->reelarrow = true;
|
||||||
m = msg_message("cast_tired_effect", "mage spell amount", fi->unit, sp, n);
|
m = msg_message("cast_spell_effect", "mage spell", fi->unit, sp);
|
||||||
message_all(b, m);
|
message_all(b, m);
|
||||||
msg_release(m);
|
msg_release(m);
|
||||||
return level;
|
return level;
|
||||||
|
@ -1552,6 +1544,7 @@ sp_undeadhero(fighter * fi, int level, double power, spell * sp)
|
||||||
cvector *fgs;
|
cvector *fgs;
|
||||||
void **fig;
|
void **fig;
|
||||||
int n, undead = 0;
|
int n, undead = 0;
|
||||||
|
message * msg;
|
||||||
int force = (int)get_force(power,0);
|
int force = (int)get_force(power,0);
|
||||||
double c = 0.50 + 0.02 * power;
|
double c = 0.50 + 0.02 * power;
|
||||||
|
|
||||||
|
@ -1580,15 +1573,15 @@ sp_undeadhero(fighter * fi, int level, double power, spell * sp)
|
||||||
}
|
}
|
||||||
|
|
||||||
if (j > 0) {
|
if (j > 0) {
|
||||||
unit * u = create_unit(r, mage->faction, 0, new_race[RC_UNDEAD], 0, NULL, mage);
|
unit * u = create_unit(r, mage->faction, 0, new_race[RC_UNDEAD], 0, du->name, du);
|
||||||
|
|
||||||
/* new units gets some stats from old unit */
|
/* new units gets some stats from old unit */
|
||||||
set_string(&u->name, du->name);
|
free(u->display);
|
||||||
set_string(&u->display, du->display);
|
u->display = xstrdup(du->display);
|
||||||
setstatus(u, du->status);
|
setstatus(u, du->status);
|
||||||
setguard(u, GUARD_NONE);
|
setguard(u, GUARD_NONE);
|
||||||
|
|
||||||
/* inherit stealth from magician */
|
/* inheit stealth from magician */
|
||||||
if (fval(mage, UFL_PARTEITARNUNG)) {
|
if (fval(mage, UFL_PARTEITARNUNG)) {
|
||||||
fset(u, UFL_PARTEITARNUNG);
|
fset(u, UFL_PARTEITARNUNG);
|
||||||
}
|
}
|
||||||
|
@ -1608,19 +1601,14 @@ sp_undeadhero(fighter * fi, int level, double power, spell * sp)
|
||||||
cv_kill(fgs);
|
cv_kill(fgs);
|
||||||
free(fgs);
|
free(fgs);
|
||||||
|
|
||||||
|
level = min(level, undead);
|
||||||
if (undead == 0) {
|
if (undead == 0) {
|
||||||
sprintf(buf, "%s kann keine Untoten rufen.", unitname(mage));
|
msg = msg_message("summonundead_effect_0", "mage", mage);
|
||||||
level = 0;
|
|
||||||
} else if (undead == 1) {
|
|
||||||
sprintf(buf, "%s erweckt einen Untoten.", unitname(mage));
|
|
||||||
level = 1;
|
|
||||||
} else {
|
} else {
|
||||||
sprintf(buf, "%s erweckt %d Untote.", unitname(mage), undead);
|
msg = msg_message("summonundead_effect_1", "mage", mage);
|
||||||
}
|
}
|
||||||
|
|
||||||
battlerecord(b, buf);
|
message_all(b, msg);
|
||||||
|
msg_release(msg);
|
||||||
return level;
|
return level;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/* ------------------------------------------------------------------ */
|
|
||||||
|
|
21
src/common/util/filereader.h
Normal file
21
src/common/util/filereader.h
Normal file
|
@ -0,0 +1,21 @@
|
||||||
|
/* vi: set ts=2:
|
||||||
|
* +-------------------+ Christian Schlittchen <corwin@amber.kn-bremen.de>
|
||||||
|
* | | Enno Rehling <enno@eressea.de>
|
||||||
|
* | Eressea PBEM host | Katja Zedel <katze@felidae.kn-bremen.de>
|
||||||
|
* | (c) 1998 - 2005 |
|
||||||
|
* | | This program may not be used, modified or distributed
|
||||||
|
* +-------------------+ without prior permission by the authors of Eressea.
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
#ifndef UTIL_FILEREADER_H
|
||||||
|
#define UTIL_FILEREADER_H
|
||||||
|
#ifdef __cplusplus
|
||||||
|
extern "C" {
|
||||||
|
#endif
|
||||||
|
|
||||||
|
const xmlChar * getbuf(FILE *, int encoding);
|
||||||
|
|
||||||
|
#ifdef __cplusplus
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
#endif
|
|
@ -82,25 +82,27 @@ building_addaction(building& b, const char * fname, const char * param)
|
||||||
static const char *
|
static const char *
|
||||||
building_getinfo(const building& b)
|
building_getinfo(const building& b)
|
||||||
{
|
{
|
||||||
return b.display;
|
return (const char*)b.display;
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
building_setinfo(building& b, const char * info)
|
building_setinfo(building& b, const char * info)
|
||||||
{
|
{
|
||||||
set_string(&b.display, info);
|
free(b.display);
|
||||||
|
b.display = (xmlChar*)strdup(info);
|
||||||
}
|
}
|
||||||
|
|
||||||
static const char *
|
static const char *
|
||||||
building_getname(const building& b)
|
building_getname(const building& b)
|
||||||
{
|
{
|
||||||
return b.name;
|
return (const char *)b.name;
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
building_setname(building& b, const char * name)
|
building_setname(building& b, const char * name)
|
||||||
{
|
{
|
||||||
set_string(&b.name, name);
|
free(b.name);
|
||||||
|
b.name = (xmlChar*)strdup(name);
|
||||||
}
|
}
|
||||||
|
|
||||||
static region *
|
static region *
|
||||||
|
|
|
@ -90,8 +90,10 @@ region_getherbtype(const region& r) {
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
region_setinfo(region& r, const char * info) {
|
region_setinfo(region& r, const char * info)
|
||||||
set_string(&r.display, info);
|
{
|
||||||
|
free(r.display);
|
||||||
|
r.display = xstrdup(info);
|
||||||
}
|
}
|
||||||
|
|
||||||
static const char *
|
static const char *
|
||||||
|
|
|
@ -378,7 +378,8 @@ unit_getname(const unit& u)
|
||||||
static void
|
static void
|
||||||
unit_setname(unit& u, const char * name)
|
unit_setname(unit& u, const char * name)
|
||||||
{
|
{
|
||||||
set_string(&u.name, name);
|
free(u.name);
|
||||||
|
u.name = xstrdup(name);
|
||||||
}
|
}
|
||||||
|
|
||||||
static const char *
|
static const char *
|
||||||
|
@ -390,7 +391,8 @@ unit_getinfo(const unit& u)
|
||||||
static void
|
static void
|
||||||
unit_setinfo(unit& u, const char * info)
|
unit_setinfo(unit& u, const char * info)
|
||||||
{
|
{
|
||||||
set_string(&u.display, info);
|
free(u.display);
|
||||||
|
u.display = xstrdup(info);
|
||||||
}
|
}
|
||||||
|
|
||||||
static bool
|
static bool
|
||||||
|
|
|
@ -1155,6 +1155,25 @@
|
||||||
<text locale="en">"$unit($mage) casts $spell($spell): $int($amount) fighters were intimidated."</text>
|
<text locale="en">"$unit($mage) casts $spell($spell): $int($amount) fighters were intimidated."</text>
|
||||||
</message>
|
</message>
|
||||||
|
|
||||||
|
<message name="sp_flee_effect_0" section="magic">
|
||||||
|
<type>
|
||||||
|
<arg name="mage" type="unit"/>
|
||||||
|
<arg name="spell" type="spell"/>
|
||||||
|
</type>
|
||||||
|
<text locale="de">"$unit($mage) zaubert $spell($spell), aber es gab niemanden, der beeinflusst werden konnte."</text>
|
||||||
|
<text locale="en">"$unit($mage) casts $spell($spell), but nobody is impressed."</text>
|
||||||
|
</message>
|
||||||
|
|
||||||
|
<message name="sp_flee_effect_1" section="magic">
|
||||||
|
<type>
|
||||||
|
<arg name="mage" type="unit"/>
|
||||||
|
<arg name="spell" type="spell"/>
|
||||||
|
<arg name="amount" type="int"/>
|
||||||
|
</type>
|
||||||
|
<text locale="de">"$unit($mage) zaubert $spell($spell): $int($amount) Krieger wurden von Furcht gepackt."</text>
|
||||||
|
<text locale="en">"$unit($mage) casts $spell($spell): $int($amount) fighters were consumed by fear."</text>
|
||||||
|
</message>
|
||||||
|
|
||||||
<message name="cast_escape_effect" section="magic">
|
<message name="cast_escape_effect" section="magic">
|
||||||
<type>
|
<type>
|
||||||
<arg name="mage" type="unit"/>
|
<arg name="mage" type="unit"/>
|
||||||
|
@ -1299,6 +1318,14 @@
|
||||||
<text locale="en">"A vortex of blinding light appears."</text>
|
<text locale="en">"A vortex of blinding light appears."</text>
|
||||||
</message>
|
</message>
|
||||||
|
|
||||||
|
<message name="summonundead_effect_0" section="magic">
|
||||||
|
<type>
|
||||||
|
<arg name="mage" type="unit"/>
|
||||||
|
</type>
|
||||||
|
<text locale="de">"$unit($mage) kann keine Unjtoten rufen."</text>
|
||||||
|
<text locale="en">"$unit($mage) cannot summon any undead."</text>
|
||||||
|
</message>
|
||||||
|
|
||||||
<message name="summonundead_effect_1" section="magic">
|
<message name="summonundead_effect_1" section="magic">
|
||||||
<type>
|
<type>
|
||||||
<arg name="mage" type="unit"/>
|
<arg name="mage" type="unit"/>
|
||||||
|
@ -7129,12 +7156,74 @@
|
||||||
<text locale="de">"$unit($mage) zaubert $spell($spell), aber niemand war in Reichweite."</text>
|
<text locale="de">"$unit($mage) zaubert $spell($spell), aber niemand war in Reichweite."</text>
|
||||||
<text locale="en">"$unit($mage) casts $spell($spell), but nobody was in range."</text>
|
<text locale="en">"$unit($mage) casts $spell($spell), but nobody was in range."</text>
|
||||||
</message>
|
</message>
|
||||||
|
|
||||||
<message name="battle::after" section="battle">
|
<message name="battle::after" section="battle">
|
||||||
<type>
|
<type>
|
||||||
</type>
|
</type>
|
||||||
<text locale="de">"Einheiten nach dem Kampf:"</text>
|
<text locale="de">"Einheiten nach dem Kampf:"</text>
|
||||||
<text locale="en">"Units after the battle:"</text>
|
<text locale="en">"Units after the battle:"</text>
|
||||||
</message>
|
</message>
|
||||||
|
|
||||||
|
<message name="battle::section" section="battle">
|
||||||
|
<type>
|
||||||
|
</type>
|
||||||
|
<text locale="de">""</text>
|
||||||
|
<text locale="en">""</text>
|
||||||
|
</message>
|
||||||
|
|
||||||
|
<message name="sp_wolfhowl_effect" section="battle">
|
||||||
|
<type>
|
||||||
|
<arg name="mage" type="unit"/>
|
||||||
|
<arg name="amount" type="int"/>
|
||||||
|
<arg name="race" type="race"/>
|
||||||
|
</type>
|
||||||
|
<text locale="de">"$unit($mage) ruft $int($amount) $race($race, $amount) zu Hilfe."</text>
|
||||||
|
<text locale="en">"$unit($mage) calls for the help of $int($amount) $race($race, $amount)."</text>
|
||||||
|
</message>
|
||||||
|
|
||||||
|
<message name="sp_shadowknights_effect" section="battle">
|
||||||
|
<type>
|
||||||
|
<arg name="mage" type="unit"/>
|
||||||
|
</type>
|
||||||
|
<text locale="de">"$unit($mage) beschwört Trugbilder herauf."</text>
|
||||||
|
</message>
|
||||||
|
|
||||||
|
<message name="sp_chaosrow_effect_0" section="battle">
|
||||||
|
<type>
|
||||||
|
<arg name="mage" type="unit"/>
|
||||||
|
</type>
|
||||||
|
<text locale="de">"$unit($mage) murmelt eine düster klingende Formel. Ein plötzlicher Tumult entsteht, der sich jedoch schnell wieder legt."</text>
|
||||||
|
</message>
|
||||||
|
|
||||||
|
<message name="sp_chaosrow_effect_1" section="battle">
|
||||||
|
<type>
|
||||||
|
<arg name="mage" type="unit"/>
|
||||||
|
</type>
|
||||||
|
<text locale="de">"$unit($mage) murmelt eine düster klingende Formel. Ein plötzlicher Tumult entsteht und bringt die Kampfaufstellung durcheinander."</text>
|
||||||
|
</message>
|
||||||
|
|
||||||
|
<message name="sp_confusion_effect_0" section="battle">
|
||||||
|
<type>
|
||||||
|
<arg name="mage" type="unit"/>
|
||||||
|
</type>
|
||||||
|
<text locale="de">"$unit($mage) stimmt einen seltsamen Gesang an. Ein plötzlicher Tumult entsteht, der sich jedoch schnell wieder legt."</text>
|
||||||
|
</message>
|
||||||
|
|
||||||
|
<message name="sp_confusion_effect_1" section="battle">
|
||||||
|
<type>
|
||||||
|
<arg name="mage" type="unit"/>
|
||||||
|
</type>
|
||||||
|
<text locale="de">"$unit($mage) stimmt einen seltsamen Gesang an. Ein plötzlicher Tumult entsteht und bringt die Kampfaufstellung durcheinander."</text>
|
||||||
|
</message>
|
||||||
|
|
||||||
|
<message name="sp_strongwalls_effect" section="battle">
|
||||||
|
<type>
|
||||||
|
<arg name="mage" type="unit"/>
|
||||||
|
<arg name="building" type="building"/>
|
||||||
|
</type>
|
||||||
|
<text locale="de">"$unit($mage) läßt die Mauern von $building($building) in einem unheimlichen magischen Licht erglühen."</text>
|
||||||
|
</message>
|
||||||
|
|
||||||
<message name="battle::lineup" section="battle">
|
<message name="battle::lineup" section="battle">
|
||||||
<type>
|
<type>
|
||||||
<arg name="turn" type="int"/>
|
<arg name="turn" type="int"/>
|
||||||
|
|
Loading…
Reference in a new issue