forked from github/server
* crashbug im prefix-fix
* falscher namespace für damage-anzeige * falsche Ursprünge in Eternath * Mistelzweige, mehrere aauf einmal benutzbar.
This commit is contained in:
parent
32bc84c970
commit
a0fe319b4b
|
@ -52,22 +52,6 @@
|
||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
|
|
||||||
/* eine insel pro 9x9 feld. das erste feld von (0,0) bis (8,8) */
|
|
||||||
|
|
||||||
/* Ozean und Grasland wird automatisch generiert (ein Ozean, darin eine Insel
|
|
||||||
* aus Grasland). Jedes Seed generiert ein Feld des entsprechenden terrains,
|
|
||||||
* und max. 3 angrenzende Felder. Details in der Funktion SEED und TRANSMUTE in
|
|
||||||
* REGIONS.C */
|
|
||||||
|
|
||||||
/* ------------------------------------------------------------- */
|
|
||||||
|
|
||||||
/* OCEAN, PLAIN, FOREST, SWAMP, DESERT, HIGHLAND, MOUNTAIN, GLACIER,
|
|
||||||
* MAXTERRAINS */
|
|
||||||
|
|
||||||
/* ------------------------------------------------------------- */
|
|
||||||
|
|
||||||
/* ------------------------------------------------------------- */
|
|
||||||
|
|
||||||
void
|
void
|
||||||
createmonsters(void)
|
createmonsters(void)
|
||||||
{
|
{
|
||||||
|
@ -91,8 +75,6 @@ createmonsters(void)
|
||||||
|
|
||||||
/* ------------------------------------------------------------- */
|
/* ------------------------------------------------------------- */
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
void
|
void
|
||||||
listnames(void)
|
listnames(void)
|
||||||
{
|
{
|
||||||
|
|
|
@ -556,7 +556,7 @@ cr_output_unit(FILE * F, const region * r,
|
||||||
ap = a_find(u->faction->attribs, &at_raceprefix);
|
ap = a_find(u->faction->attribs, &at_raceprefix);
|
||||||
}
|
}
|
||||||
if (ap) {
|
if (ap) {
|
||||||
const char * name = (const char*)a->data.v;
|
const char * name = (const char*)ap->data.v;
|
||||||
fprintf(F, "\"%s\";typprefix\n", add_translation(name, LOC(f->locale, name)));
|
fprintf(F, "\"%s\";typprefix\n", add_translation(name, LOC(f->locale, name)));
|
||||||
}
|
}
|
||||||
fprintf(F, "%d;Partei\n", u->faction->no);
|
fprintf(F, "%d;Partei\n", u->faction->no);
|
||||||
|
|
|
@ -1825,7 +1825,7 @@ create_item(unit * u, const item_type * itype, int want)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
static void
|
||||||
make(region * r, unit * u)
|
make(region * r, unit * u)
|
||||||
{
|
{
|
||||||
char *s;
|
char *s;
|
||||||
|
@ -2512,7 +2512,7 @@ plant(region *r, unit *u, int raw)
|
||||||
}
|
}
|
||||||
|
|
||||||
#if GROWING_TREES
|
#if GROWING_TREES
|
||||||
void
|
static void
|
||||||
planttrees(region *r, unit *u, int raw)
|
planttrees(region *r, unit *u, int raw)
|
||||||
{
|
{
|
||||||
int n, i, skill, planted = 0;
|
int n, i, skill, planted = 0;
|
||||||
|
@ -2558,8 +2558,8 @@ planttrees(region *r, unit *u, int raw)
|
||||||
produceexp(u, SK_HERBALISM, u->number);
|
produceexp(u, SK_HERBALISM, u->number);
|
||||||
new_use_pooled(u, itype->rtype, GET_DEFAULT, n);
|
new_use_pooled(u, itype->rtype, GET_DEFAULT, n);
|
||||||
|
|
||||||
add_message(&u->faction->msgs, new_message(u->faction,
|
ADDMSG(&u->faction->msgs, msg_message("plant",
|
||||||
"plant%u:unit%r:region%i:amount%X:herb", u, r, planted, itype->rtype));
|
"unit region amount herb", u, r, planted, itype->rtype));
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
@ -2759,7 +2759,7 @@ rough_amount(int a, int m)
|
||||||
return "sehr viele";
|
return "sehr viele";
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
static void
|
||||||
research(region *r, unit *u)
|
research(region *r, unit *u)
|
||||||
{
|
{
|
||||||
char *s;
|
char *s;
|
||||||
|
|
|
@ -1919,12 +1919,14 @@ use_bloodpotion(struct unit *u, const struct potion_type *ptype, const char *cmd
|
||||||
static int
|
static int
|
||||||
use_mistletoe(struct unit * user, const struct item_type * itype, const char * cmd)
|
use_mistletoe(struct unit * user, const struct item_type * itype, const char * cmd)
|
||||||
{
|
{
|
||||||
if (user->number!=1) {
|
int mtoes = new_get_pooled(user, itype->rtype, GET_SLACK|GET_RESERVE|GET_POOLED_SLACK);
|
||||||
|
|
||||||
|
if (user->number>mtoes) {
|
||||||
ADDMSG(&user->faction->msgs, msg_message("use_singleperson",
|
ADDMSG(&user->faction->msgs, msg_message("use_singleperson",
|
||||||
"unit item region command", user, itype, user->region, cmd));
|
"unit item region command", user, itype, user->region, cmd));
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
new_use_pooled(user, itype->rtype, GET_SLACK|GET_RESERVE|GET_POOLED_SLACK, 1);
|
new_use_pooled(user, itype->rtype, GET_SLACK|GET_RESERVE|GET_POOLED_SLACK, user->number);
|
||||||
a_add(&user->attribs, make_fleechance((float)1.0));
|
a_add(&user->attribs, make_fleechance((float)1.0));
|
||||||
ADDMSG(&user->faction->msgs, msg_message("use_item",
|
ADDMSG(&user->faction->msgs, msg_message("use_item",
|
||||||
"unit item", user, itype));
|
"unit item", user, itype));
|
||||||
|
|
|
@ -117,16 +117,11 @@ hp_status(const unit * u)
|
||||||
{
|
{
|
||||||
double p = (double) ((double) u->hp / (double) (u->number * unit_max_hp(u)));
|
double p = (double) ((double) u->hp / (double) (u->number * unit_max_hp(u)));
|
||||||
|
|
||||||
if (p > 2.00)
|
if (p > 2.00) return mkname("damage", "critical");
|
||||||
return "dmg_critical";
|
if (p > 1.50) return mkname("damage", "heavily");
|
||||||
if (p > 1.50)
|
if (p < 0.50) return mkname("damage", "badly");
|
||||||
return "dmg_heavily";
|
if (p < 0.75) return mkname("damage", "wounded");
|
||||||
if (p < 0.50)
|
if (p < 0.99) return mkname("damage", "exhausted");
|
||||||
return "dmg_badly";
|
|
||||||
if (p < 0.75)
|
|
||||||
return "dmg_wounded";
|
|
||||||
if (p < 0.99)
|
|
||||||
return "dmg_exhausted";
|
|
||||||
|
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
|
|
@ -6916,7 +6916,7 @@ sp_destroy_curse(castorder *co)
|
||||||
switch(obj){
|
switch(obj){
|
||||||
case SPP_REGION:
|
case SPP_REGION:
|
||||||
ap = &r->attribs;
|
ap = &r->attribs;
|
||||||
set_string(&ts, regionid(r));
|
set_string(&ts, regionname(r, mage->faction));
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case SPP_UNIT:
|
case SPP_UNIT:
|
||||||
|
|
|
@ -2665,6 +2665,28 @@ convert_skills(void)
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
static int
|
||||||
|
fix_questcoors(void)
|
||||||
|
{
|
||||||
|
plane * p = getplanebyid (59034966);
|
||||||
|
if (p) {
|
||||||
|
faction * f;
|
||||||
|
region * eternath = findregion(-8750, 3631);
|
||||||
|
if (eternath) for (f=factions;f;f=f->next) {
|
||||||
|
ursprung * u = f->ursprung;
|
||||||
|
while (u) {
|
||||||
|
if (u->id == p->id) {
|
||||||
|
u->x = eternath->x;
|
||||||
|
u->y = eternath->y;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
u=u->next;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
korrektur(void)
|
korrektur(void)
|
||||||
{
|
{
|
||||||
|
@ -2715,6 +2737,7 @@ korrektur(void)
|
||||||
do_once("idlo", fix_idleout());
|
do_once("idlo", fix_idleout());
|
||||||
do_once("szip", set_zip());
|
do_once("szip", set_zip());
|
||||||
do_once("heal", heal_all());
|
do_once("heal", heal_all());
|
||||||
|
do_once("fqco", fix_questcoors());
|
||||||
|
|
||||||
/* seems something fishy is going on, do this just
|
/* seems something fishy is going on, do this just
|
||||||
* to be on the safe side:
|
* to be on the safe side:
|
||||||
|
|
|
@ -583,8 +583,8 @@ main(int argc, char *argv[])
|
||||||
kernel_init();
|
kernel_init();
|
||||||
game_init();
|
game_init();
|
||||||
#if defined(BETA_CODE) && 0
|
#if defined(BETA_CODE) && 0
|
||||||
xml_writeships();
|
/* xml_writeships(); */
|
||||||
/* xml_writeitems("items.xml"); */
|
xml_writeitems("items.xml");
|
||||||
return 0;
|
return 0;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
|
@ -3153,26 +3153,27 @@
|
||||||
<text locale="en">dwarf</text>
|
<text locale="en">dwarf</text>
|
||||||
</string>
|
</string>
|
||||||
|
|
||||||
<string name="dmg_critical">
|
</namespace>
|
||||||
|
<namespace name="damage">
|
||||||
|
<string name="critical">
|
||||||
<text locale="de">sehr stark</text>
|
<text locale="de">sehr stark</text>
|
||||||
<text locale="en">critically wounded</text>
|
<text locale="en">critically wounded</text>
|
||||||
</string>
|
</string>
|
||||||
<string name="dmg_heavily">
|
<string name="heavily">
|
||||||
<text locale="de">stark</text>
|
<text locale="de">stark</text>
|
||||||
<text locale="en">heavily wounded</text>
|
<text locale="en">heavily wounded</text>
|
||||||
</string>
|
</string>
|
||||||
<string name="dmg_badly">
|
<string name="badly">
|
||||||
<text locale="de">schwer verwundet</text>
|
<text locale="de">schwer verwundet</text>
|
||||||
<text locale="en">badly wounded</text>
|
<text locale="en">badly wounded</text>
|
||||||
</string>
|
</string>
|
||||||
<string name="dmg_wounded">
|
<string name="wounded">
|
||||||
<text locale="de">verwundet</text>
|
<text locale="de">verwundet</text>
|
||||||
<text locale="en">wounded</text>
|
<text locale="en">wounded</text>
|
||||||
</string>
|
</string>
|
||||||
<string name="dmg_exhausted">
|
<string name="exhausted">
|
||||||
<text locale="de">erschöpft</text>
|
<text locale="de">erschöpft</text>
|
||||||
<text locale="en">exhausted</text>
|
<text locale="en">exhausted</text>
|
||||||
</string>
|
</string>
|
||||||
|
|
||||||
</namespace>
|
</namespace>
|
||||||
</strings>
|
</strings>
|
||||||
|
|
Loading…
Reference in New Issue