forked from github/server
updates vom beta-branch nach dev-version
This commit is contained in:
parent
63f0c81ebd
commit
52aa6bccc2
|
@ -2843,8 +2843,9 @@ produce(void)
|
||||||
todo = igetkeyword(u->thisorder, u->faction->locale);
|
todo = igetkeyword(u->thisorder, u->faction->locale);
|
||||||
if (todo == NOKEYWORD) continue;
|
if (todo == NOKEYWORD) continue;
|
||||||
|
|
||||||
if (rterrain(r) == T_OCEAN && u->race != RC_AQUARIAN &&
|
if (rterrain(r) == T_OCEAN && u->race != RC_AQUARIAN
|
||||||
todo != K_STEAL && todo != K_SPY && todo != K_SABOTAGE)
|
&& !(race[u->race].flags & RCF_SWIM)
|
||||||
|
&& todo != K_STEAL && todo != K_SPY && todo != K_SABOTAGE)
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
switch (todo) {
|
switch (todo) {
|
||||||
|
|
|
@ -524,7 +524,7 @@ monster_seeks_target(region *r, unit *u)
|
||||||
|
|
||||||
switch( u->race ) {
|
switch( u->race ) {
|
||||||
case RC_ALP:
|
case RC_ALP:
|
||||||
if( !(u->age % 2) ) /* bewegt sich nur jede zweite Runde */
|
if( (u->age % 2) ) /* bewegt sich nur jede zweite Runde */
|
||||||
d = NODIRECTION;
|
d = NODIRECTION;
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
|
|
|
@ -415,122 +415,127 @@ learn(void)
|
||||||
|
|
||||||
/* lernen nach lehren */
|
/* lernen nach lehren */
|
||||||
|
|
||||||
for (r = regions; r; r = r->next)
|
for (r = regions; r; r = r->next) {
|
||||||
for (u = r->units; u; u = u->next)
|
for (u = r->units; u; u = u->next) {
|
||||||
if (rterrain(r) != T_OCEAN || u->race == RC_AQUARIAN)
|
if (rterrain(r) == T_OCEAN){
|
||||||
if (igetkeyword(u->thisorder, u->faction->locale) == K_STUDY) {
|
/* sonderbehandlung aller die auf Ozeanen lernen können */
|
||||||
double multi = 1.0;
|
if (u->race != RC_AQUARIAN
|
||||||
attrib * a = NULL;
|
&& !(race[u->race].flags & RCF_SWIM)) {
|
||||||
int money = 0;
|
continue;
|
||||||
int maxalchemy = 0;
|
}
|
||||||
if (rterrain(r) == T_GLACIER && u->race == RC_INSECT
|
}
|
||||||
&& !is_cursed(u->attribs, C_KAELTESCHUTZ,0)){
|
if (igetkeyword(u->thisorder, u->faction->locale) == K_STUDY) {
|
||||||
continue;
|
double multi = 1.0;
|
||||||
}
|
attrib * a = NULL;
|
||||||
if (attacked(u)) {
|
int money = 0;
|
||||||
cmistake(u, findorder(u, u->thisorder), 52, MSG_PRODUCE);
|
int maxalchemy = 0;
|
||||||
continue;
|
if (rterrain(r) == T_GLACIER && u->race == RC_INSECT
|
||||||
}
|
&& !is_cursed(u->attribs, C_KAELTESCHUTZ,0)){
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
if (attacked(u)) {
|
||||||
|
cmistake(u, findorder(u, u->thisorder), 52, MSG_PRODUCE);
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
|
||||||
i = getskill(u->faction->locale);
|
i = getskill(u->faction->locale);
|
||||||
|
|
||||||
if (i < 0) {
|
if (i < 0) {
|
||||||
cmistake(u, findorder(u, u->thisorder), 77, MSG_EVENT);
|
cmistake(u, findorder(u, u->thisorder), 77, MSG_EVENT);
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
/* Hack: Talente mit Malus -99 können nicht gelernt werden */
|
||||||
|
if (race[u->race].bonus[i] == -99) {
|
||||||
|
cmistake(u, findorder(u, u->thisorder), 77, MSG_EVENT);
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
if ((race[u->race].flags & RCF_NOLEARN)) {
|
||||||
|
sprintf(buf, "%s können nichts lernen", race[u->race].name[1]);
|
||||||
|
mistake(u, u->thisorder, buf, MSG_EVENT);
|
||||||
|
continue;
|
||||||
|
} else {
|
||||||
|
struct building * b = inside_building(u);
|
||||||
|
const struct building_type * btype = b?b->type:NULL;
|
||||||
|
|
||||||
|
p = studycost = study_cost(u,i);
|
||||||
|
a = a_find(u->attribs, &at_learning);
|
||||||
|
|
||||||
|
if (btype == &bt_academy) {
|
||||||
|
studycost = max(50, studycost * 2);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if (i == SK_MAGIC) {
|
||||||
|
if (u->number > 1){
|
||||||
|
cmistake(u, findorder(u, u->thisorder), 106, MSG_MAGIC);
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
/* Hack: Talente mit Malus -99 können nicht gelernt werden */
|
if (is_familiar(u)){
|
||||||
if (race[u->race].bonus[i] == -99) {
|
/* Vertraute zählen nicht zu den Magiern einer Partei,
|
||||||
cmistake(u, findorder(u, u->thisorder), 77, MSG_EVENT);
|
* können aber nur Graue Magie lernen */
|
||||||
continue;
|
mtyp = M_GRAU;
|
||||||
}
|
if (!get_skill(u, SK_MAGIC)){
|
||||||
if ((race[u->race].flags & RCF_NOLEARN)) {
|
|
||||||
sprintf(buf, "%s können nichts lernen", race[u->race].name[1]);
|
|
||||||
mistake(u, u->thisorder, buf, MSG_EVENT);
|
|
||||||
continue;
|
|
||||||
} else {
|
|
||||||
struct building * b = inside_building(u);
|
|
||||||
const struct building_type * btype = b?b->type:NULL;
|
|
||||||
|
|
||||||
p = studycost = study_cost(u,i);
|
|
||||||
a = a_find(u->attribs, &at_learning);
|
|
||||||
|
|
||||||
if (btype == &bt_academy) {
|
|
||||||
studycost = max(50, studycost * 2);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
if (i == SK_MAGIC){
|
|
||||||
if (u->number > 1){
|
|
||||||
cmistake(u, findorder(u, u->thisorder), 106, MSG_MAGIC);
|
|
||||||
continue;
|
|
||||||
}
|
|
||||||
if (is_familiar(u)){
|
|
||||||
/* Vertraute zählen nicht zu den Magiern einer Partei,
|
|
||||||
* können aber nur Graue Magie lernen */
|
|
||||||
mtyp = M_GRAU;
|
|
||||||
if (!get_skill(u, SK_MAGIC)){
|
|
||||||
create_mage(u, mtyp);
|
|
||||||
}
|
|
||||||
} else if (!get_skill(u, SK_MAGIC)){
|
|
||||||
/* Die Einheit ist noch kein Magier */
|
|
||||||
if (count_skill(u->faction, SK_MAGIC) + u->number >
|
|
||||||
max_skill(u->faction, SK_MAGIC))
|
|
||||||
{
|
|
||||||
sprintf(buf, "Es kann maximal %d Magier pro Partei geben",
|
|
||||||
max_skill(u->faction, SK_MAGIC));
|
|
||||||
mistake(u, u->thisorder, buf, MSG_EVENT);
|
|
||||||
continue;
|
|
||||||
}
|
|
||||||
mtyp = getmagicskill();
|
|
||||||
if (mtyp == M_NONE || mtyp == M_GRAU) {
|
|
||||||
/* wurde kein Magiegebiet angegeben, wird davon
|
|
||||||
* ausgegangen, daß das normal gelernt werden soll */
|
|
||||||
if(u->faction->magiegebiet != 0) {
|
|
||||||
mtyp = u->faction->magiegebiet;
|
|
||||||
} else {
|
|
||||||
/* Es wurde kein Magiegebiet angegeben und die Partei
|
|
||||||
* hat noch keins gewählt. */
|
|
||||||
cmistake(u, findorder(u, u->thisorder), 178, MSG_MAGIC);
|
|
||||||
continue;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
if (mtyp != u->faction->magiegebiet){
|
|
||||||
/* Es wurde versucht, ein anderes Magiegebiet zu lernen
|
|
||||||
* als das der Partei */
|
|
||||||
if (u->faction->magiegebiet != 0){
|
|
||||||
cmistake(u, findorder(u, u->thisorder), 179, MSG_MAGIC);
|
|
||||||
continue;
|
|
||||||
} else {
|
|
||||||
/* Lernt zum ersten mal Magie und legt damit das
|
|
||||||
* Magiegebiet der Partei fest */
|
|
||||||
u->faction->magiegebiet = mtyp;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
create_mage(u, mtyp);
|
create_mage(u, mtyp);
|
||||||
} else {
|
|
||||||
/* ist schon ein Magier und kein Vertrauter */
|
|
||||||
if(u->faction->magiegebiet == 0){
|
|
||||||
/* die Partei hat noch kein Magiegebiet gewählt. */
|
|
||||||
mtyp = getmagicskill();
|
|
||||||
if (mtyp == M_NONE){
|
|
||||||
cmistake(u, findorder(u, u->thisorder), 178, MSG_MAGIC);
|
|
||||||
continue;
|
|
||||||
} else {
|
|
||||||
/* Legt damit das Magiegebiet der Partei fest */
|
|
||||||
u->faction->magiegebiet = mtyp;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
} else if (!get_skill(u, SK_MAGIC)){
|
||||||
if (i == SK_ALCHEMY) {
|
/* Die Einheit ist noch kein Magier */
|
||||||
maxalchemy = eff_skill(u, SK_ALCHEMY, r);
|
if (count_skill(u->faction, SK_MAGIC) + u->number >
|
||||||
if (get_skill(u, SK_ALCHEMY)==0
|
max_skill(u->faction, SK_MAGIC))
|
||||||
&& count_skill(u->faction, SK_ALCHEMY) + u->number >
|
{
|
||||||
max_skill(u->faction, SK_ALCHEMY)) {
|
sprintf(buf, "Es kann maximal %d Magier pro Partei geben",
|
||||||
sprintf(buf, "Es kann maximal %d Alchemisten pro Partei geben",
|
max_skill(u->faction, SK_MAGIC));
|
||||||
max_skill(u->faction, SK_ALCHEMY));
|
|
||||||
mistake(u, u->thisorder, buf, MSG_EVENT);
|
mistake(u, u->thisorder, buf, MSG_EVENT);
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
mtyp = getmagicskill();
|
||||||
|
if (mtyp == M_NONE || mtyp == M_GRAU) {
|
||||||
|
/* wurde kein Magiegebiet angegeben, wird davon
|
||||||
|
* ausgegangen, daß das normal gelernt werden soll */
|
||||||
|
if(u->faction->magiegebiet != 0) {
|
||||||
|
mtyp = u->faction->magiegebiet;
|
||||||
|
} else {
|
||||||
|
/* Es wurde kein Magiegebiet angegeben und die Partei
|
||||||
|
* hat noch keins gewählt. */
|
||||||
|
cmistake(u, findorder(u, u->thisorder), 178, MSG_MAGIC);
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if (mtyp != u->faction->magiegebiet){
|
||||||
|
/* Es wurde versucht, ein anderes Magiegebiet zu lernen
|
||||||
|
* als das der Partei */
|
||||||
|
if (u->faction->magiegebiet != 0){
|
||||||
|
cmistake(u, findorder(u, u->thisorder), 179, MSG_MAGIC);
|
||||||
|
continue;
|
||||||
|
} else {
|
||||||
|
/* Lernt zum ersten mal Magie und legt damit das
|
||||||
|
* Magiegebiet der Partei fest */
|
||||||
|
u->faction->magiegebiet = mtyp;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
create_mage(u, mtyp);
|
||||||
|
} else {
|
||||||
|
/* ist schon ein Magier und kein Vertrauter */
|
||||||
|
if(u->faction->magiegebiet == 0){
|
||||||
|
/* die Partei hat noch kein Magiegebiet gewählt. */
|
||||||
|
mtyp = getmagicskill();
|
||||||
|
if (mtyp == M_NONE){
|
||||||
|
cmistake(u, findorder(u, u->thisorder), 178, MSG_MAGIC);
|
||||||
|
continue;
|
||||||
|
} else {
|
||||||
|
/* Legt damit das Magiegebiet der Partei fest */
|
||||||
|
u->faction->magiegebiet = mtyp;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if (i == SK_ALCHEMY) {
|
||||||
|
maxalchemy = eff_skill(u, SK_ALCHEMY, r);
|
||||||
|
if (get_skill(u, SK_ALCHEMY)==0
|
||||||
|
&& count_skill(u->faction, SK_ALCHEMY) + u->number >
|
||||||
|
max_skill(u->faction, SK_ALCHEMY)) {
|
||||||
|
sprintf(buf, "Es kann maximal %d Alchemisten pro Partei geben",
|
||||||
|
max_skill(u->faction, SK_ALCHEMY));
|
||||||
|
mistake(u, u->thisorder, buf, MSG_EVENT);
|
||||||
|
continue;
|
||||||
}
|
}
|
||||||
if (is_migrant(u)
|
if (is_migrant(u)
|
||||||
&& (i == SK_MAGIC || i == SK_ALCHEMY || i == SK_TACTICS
|
&& (i == SK_MAGIC || i == SK_ALCHEMY || i == SK_TACTICS
|
||||||
|
@ -543,106 +548,109 @@ learn(void)
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (studycost) {
|
}
|
||||||
money = get_pooled(u, r, R_SILVER);
|
if (studycost) {
|
||||||
money = min(money, studycost * u->number);
|
money = get_pooled(u, r, R_SILVER);
|
||||||
}
|
money = min(money, studycost * u->number);
|
||||||
if (money < studycost * u->number) {
|
}
|
||||||
studycost = p; /* Ohne Uni? */
|
if (money < studycost * u->number) {
|
||||||
money = min(money, studycost);
|
studycost = p; /* Ohne Uni? */
|
||||||
if (p>0 && money < studycost * u->number) {
|
money = min(money, studycost);
|
||||||
|
if (p>0 && money < studycost * u->number) {
|
||||||
#ifdef PARTIAL_STUDY
|
#ifdef PARTIAL_STUDY
|
||||||
cmistake(u, findorder(u, u->thisorder), 65, MSG_EVENT);
|
cmistake(u, findorder(u, u->thisorder), 65, MSG_EVENT);
|
||||||
multi = money / (double)(studycost * u->number);
|
multi = money / (double)(studycost * u->number);
|
||||||
#else
|
#else
|
||||||
cmistake(u, findorder(u, u->thisorder), 65, MSG_EVENT);
|
cmistake(u, findorder(u, u->thisorder), 65, MSG_EVENT);
|
||||||
continue; /* nein, Silber reicht auch so nicht */
|
continue; /* nein, Silber reicht auch so nicht */
|
||||||
#endif
|
#endif
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
if (a==NULL) a = a_add(&u->attribs, a_new(&at_learning));
|
if (a==NULL) a = a_add(&u->attribs, a_new(&at_learning));
|
||||||
|
if (money>0) {
|
||||||
|
use_pooled(u, r, R_SILVER, money);
|
||||||
|
add_message(&u->faction->msgs,
|
||||||
|
new_message(u->faction,
|
||||||
|
"studycost%u:unit%r:region%i:cost%t:skill",
|
||||||
|
u, u->region, money, i));
|
||||||
|
}
|
||||||
|
|
||||||
if (money>0) {
|
if (get_effect(u, oldpotiontype[P_WISE])) {
|
||||||
use_pooled(u, r, R_SILVER, money);
|
l = min(u->number, get_effect(u, oldpotiontype[P_WISE]));
|
||||||
add_message(&u->faction->msgs, new_message(u->faction,
|
a->data.i += l * 10;
|
||||||
"studycost%u:unit%r:region%i:cost%t:skill",
|
change_effect(u, oldpotiontype[P_WISE], -l);
|
||||||
u, u->region, money, i));
|
}
|
||||||
}
|
if (get_effect(u, oldpotiontype[P_FOOL])) {
|
||||||
|
l = min(u->number, get_effect(u, oldpotiontype[P_FOOL]));
|
||||||
|
a->data.i -= l * 30;
|
||||||
|
change_effect(u, oldpotiontype[P_FOOL], -l);
|
||||||
|
}
|
||||||
|
|
||||||
if (get_effect(u, oldpotiontype[P_WISE])) {
|
warrior_skill = fspecial(u->faction, FS_WARRIOR);
|
||||||
l = min(u->number, get_effect(u, oldpotiontype[P_WISE]));
|
if(warrior_skill > 0) {
|
||||||
a->data.i += l * 10;
|
if(i == SK_CROSSBOW || i == SK_LONGBOW
|
||||||
change_effect(u, oldpotiontype[P_WISE], -l);
|
|| i == SK_CATAPULT || i == SK_SWORD || i == SK_SPEAR
|
||||||
}
|
|| i == SK_AUSDAUER || i == SK_WEAPONLESS)
|
||||||
if (get_effect(u, oldpotiontype[P_FOOL])) {
|
{
|
||||||
l = min(u->number, get_effect(u, oldpotiontype[P_FOOL]));
|
a->data.i += u->number * (5+warrior_skill*5);
|
||||||
a->data.i -= l * 30;
|
} else {
|
||||||
change_effect(u, oldpotiontype[P_FOOL], -l);
|
a->data.i -= u->number * (5+warrior_skill*5);
|
||||||
|
a->data.i = max(0, a->data.i);
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
warrior_skill = fspecial(u->faction, FS_WARRIOR);
|
if (p != studycost) {
|
||||||
if(warrior_skill > 0) {
|
/* ist_in_gebaeude(r, u, BT_UNIVERSITAET) == 1) { */
|
||||||
if(i == SK_CROSSBOW || i == SK_LONGBOW
|
/* p ist Kosten ohne Uni, studycost mit; wenn
|
||||||
|| i == SK_CATAPULT || i == SK_SWORD || i == SK_SPEAR
|
* p!=studycost, ist die Einheit zwangsweise
|
||||||
|| i == SK_AUSDAUER || i == SK_WEAPONLESS)
|
* in einer Uni */
|
||||||
{
|
a->data.i += u->number * 10;
|
||||||
a->data.i += u->number * (5+warrior_skill*5);
|
}
|
||||||
} else {
|
if (is_cursed(r->attribs,C_BADLEARN,0)) {
|
||||||
a->data.i -= u->number * (5+warrior_skill*5);
|
a->data.i -= u->number * 10;
|
||||||
a->data.i = max(0, a->data.i);
|
}
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
if (p != studycost) {
|
|
||||||
/* ist_in_gebaeude(r, u, BT_UNIVERSITAET) == 1) { */
|
|
||||||
/* p ist Kosten ohne Uni, studycost mit; wenn
|
|
||||||
* p!=studycost, ist die Einheit zwangsweise
|
|
||||||
* in einer Uni */
|
|
||||||
a->data.i += u->number * 10;
|
|
||||||
}
|
|
||||||
if (is_cursed(r->attribs,C_BADLEARN,0)) {
|
|
||||||
a->data.i -= u->number * 10;
|
|
||||||
}
|
|
||||||
#ifdef SKILLFIX_SAVE
|
#ifdef SKILLFIX_SAVE
|
||||||
if (a && a->data.i) {
|
if (a && a->data.i) {
|
||||||
int skill = get_skill(u, (skill_t)i);
|
int skill = get_skill(u, (skill_t)i);
|
||||||
skillfix(u, (skill_t)i, skill,
|
skillfix(u, (skill_t)i, skill,
|
||||||
(int)(u->number * 30 * multi), a->data.i);
|
(int)(u->number * 30 * multi), a->data.i);
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifdef RANDOMIZED_LEARNING
|
#ifdef RANDOMIZED_LEARNING
|
||||||
change_skill(u, (skill_t)i, (int)((u->number * dice(2,30) + a->data.i) * multi));
|
change_skill(u, (skill_t)i, (int)((u->number * dice(2,30) + a->data.i) * multi));
|
||||||
#else
|
#else
|
||||||
change_skill(u, (skill_t)i, (int)((u->number * 30 + a->data.i) * multi));
|
change_skill(u, (skill_t)i, (int)((u->number * 30 + a->data.i) * multi));
|
||||||
#endif
|
#endif
|
||||||
if (a) {
|
if (a) {
|
||||||
a_remove(&u->attribs, a);
|
a_remove(&u->attribs, a);
|
||||||
a = NULL;
|
a = NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Anzeigen neuer Tränke */
|
/* Anzeigen neuer Tränke */
|
||||||
/* Spruchlistenaktualiesierung ist in Regeneration */
|
/* Spruchlistenaktualiesierung ist in Regeneration */
|
||||||
|
|
||||||
if (i == SK_ALCHEMY) {
|
if (i == SK_ALCHEMY) {
|
||||||
const potion_type * ptype;
|
const potion_type * ptype;
|
||||||
faction * f = u->faction;
|
faction * f = u->faction;
|
||||||
int skill = eff_skill(u, SK_ALCHEMY, r);
|
int skill = eff_skill(u, SK_ALCHEMY, r);
|
||||||
if (skill>maxalchemy) {
|
if (skill>maxalchemy) {
|
||||||
for (ptype=potiontypes; ptype; ptype=ptype->next) {
|
for (ptype=potiontypes; ptype; ptype=ptype->next) {
|
||||||
if (skill == ptype->level * 2) {
|
if (skill == ptype->level * 2) {
|
||||||
attrib * a = a_find(f->attribs, &at_showitem);
|
attrib * a = a_find(f->attribs, &at_showitem);
|
||||||
while (a && a->data.v != ptype) a=a->nexttype;
|
while (a && a->data.v != ptype) a=a->nexttype;
|
||||||
if (!a) {
|
if (!a) {
|
||||||
a = a_add(&f->attribs, a_new(&at_showitem));
|
a = a_add(&f->attribs, a_new(&at_showitem));
|
||||||
a->data.v = (void*) ptype->itype;
|
a->data.v = (void*) ptype->itype;
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -665,8 +673,10 @@ teaching(void)
|
||||||
if (u->race == RC_SPELL || fval(u, FL_LONGACTION))
|
if (u->race == RC_SPELL || fval(u, FL_LONGACTION))
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
if (rterrain(r) == T_OCEAN && u->race != RC_AQUARIAN)
|
if (rterrain(r) == T_OCEAN
|
||||||
continue;
|
&& u->race != RC_AQUARIAN
|
||||||
|
&& !(race[u->race].flags & RCF_SWIM))
|
||||||
|
continue;
|
||||||
|
|
||||||
if (rterrain(r) == T_GLACIER && u->race == RC_INSECT
|
if (rterrain(r) == T_GLACIER && u->race == RC_INSECT
|
||||||
&& !is_cursed(u->attribs, C_KAELTESCHUTZ,0))
|
&& !is_cursed(u->attribs, C_KAELTESCHUTZ,0))
|
||||||
|
|
|
@ -594,11 +594,19 @@ contest(int skilldiff, armor_t ar, armor_t sh)
|
||||||
|
|
||||||
/* Hardcodet, muß geändert werden. */
|
/* Hardcodet, muß geändert werden. */
|
||||||
|
|
||||||
|
#ifdef OLD_ARMOR
|
||||||
if (ar != AR_NONE)
|
if (ar != AR_NONE)
|
||||||
mod *= (1 - armordata[ar].penalty);
|
mod *= (1 - armordata[ar].penalty);
|
||||||
if (sh != AR_NONE)
|
if (sh != AR_NONE)
|
||||||
mod *= (1 - armordata[sh].penalty);
|
mod *= (1 - armordata[sh].penalty);
|
||||||
vw = (int) (vw * mod);
|
vw = (int) (vw * mod);
|
||||||
|
#else
|
||||||
|
if (ar != AR_NONE)
|
||||||
|
mod *= (1 + armordata[ar].penalty);
|
||||||
|
if (sh != AR_NONE)
|
||||||
|
mod *= (1 + armordata[sh].penalty);
|
||||||
|
vw = (int)(100 - ((100 - vw) * mod));
|
||||||
|
#endif
|
||||||
|
|
||||||
do {
|
do {
|
||||||
p = rand() % 100;
|
p = rand() % 100;
|
||||||
|
|
|
@ -630,7 +630,11 @@ build(unit * u, const construction * ctype, int completed, int want)
|
||||||
}
|
}
|
||||||
|
|
||||||
/* n = maximum buildable size */
|
/* n = maximum buildable size */
|
||||||
n = skills / type->minskill;
|
if(type->minskill > 1) {
|
||||||
|
n = skills / type->minskill;
|
||||||
|
} else {
|
||||||
|
n = skills;
|
||||||
|
}
|
||||||
itm = *i_find(&u->items, olditemtype[I_RING_OF_NIMBLEFINGER]);
|
itm = *i_find(&u->items, olditemtype[I_RING_OF_NIMBLEFINGER]);
|
||||||
if (itm!=NULL) i = itm->number;
|
if (itm!=NULL) i = itm->number;
|
||||||
if (i>0) {
|
if (i>0) {
|
||||||
|
|
|
@ -636,7 +636,7 @@ set_combatspell(unit *u, spell *sp, const char * cmd, int level)
|
||||||
if (!m) return;
|
if (!m) return;
|
||||||
|
|
||||||
/* knowsspell prüft auf ist_magier, ist_spruch, kennt_spruch */
|
/* knowsspell prüft auf ist_magier, ist_spruch, kennt_spruch */
|
||||||
if (!sp || !knowsspell(u->region, u, sp)) {
|
if (knowsspell(u->region, u, sp) == false){
|
||||||
/* Fehler 'Spell not found' */
|
/* Fehler 'Spell not found' */
|
||||||
cmistake(u, cmd, 173, MSG_MAGIC);
|
cmistake(u, cmd, 173, MSG_MAGIC);
|
||||||
return;
|
return;
|
||||||
|
@ -2801,7 +2801,9 @@ magic(void)
|
||||||
* normalerweise nur Meermenschen, ausgenommen explizit als
|
* normalerweise nur Meermenschen, ausgenommen explizit als
|
||||||
* OCEANCASTABLE deklarierte Sprüche */
|
* OCEANCASTABLE deklarierte Sprüche */
|
||||||
if (rterrain(r) == T_OCEAN) {
|
if (rterrain(r) == T_OCEAN) {
|
||||||
if (u->race != RC_AQUARIAN && !(sp->sptyp & OCEANCASTABLE)) {
|
if (u->race != RC_AQUARIAN
|
||||||
|
&& !(race[u->race].flags & RCF_SWIM)
|
||||||
|
&& !(sp->sptyp & OCEANCASTABLE)) {
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
/* Auf bewegenden Schiffen kann man nur explizit als
|
/* Auf bewegenden Schiffen kann man nur explizit als
|
||||||
|
|
|
@ -428,8 +428,14 @@ bufunit(const faction * f, const unit * u, int indent, int mode)
|
||||||
dh=0;
|
dh=0;
|
||||||
if (!getarnt && f && f->allies) {
|
if (!getarnt && f && f->allies) {
|
||||||
ally *sf;
|
ally *sf;
|
||||||
|
faction *tf = u->faction;
|
||||||
|
|
||||||
|
/* getarnte Partei bei a_otherfaction */
|
||||||
|
if(a_otherfaction) {
|
||||||
|
tf = findfaction(a_otherfaction->data.i);
|
||||||
|
}
|
||||||
for (sf = f->allies; sf && !dh; sf = sf->next) {
|
for (sf = f->allies; sf && !dh; sf = sf->next) {
|
||||||
if (sf->status > 0 && sf->status <= HELP_ALL && sf->faction == u->faction) {
|
if (sf->status > 0 && sf->status <= HELP_ALL && sf->faction == tf) {
|
||||||
dh = 1;
|
dh = 1;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -582,8 +588,14 @@ bufunit_ugroupleader(const faction * f, const unit * u, int indent, int mode)
|
||||||
dh=0;
|
dh=0;
|
||||||
if (!getarnt && f && f->allies) {
|
if (!getarnt && f && f->allies) {
|
||||||
ally *sf;
|
ally *sf;
|
||||||
|
faction *tf = u->faction;
|
||||||
|
|
||||||
|
/* getarnte Partei bei a_otherfaction */
|
||||||
|
if(a_otherfaction) {
|
||||||
|
tf = findfaction(a_otherfaction->data.i);
|
||||||
|
}
|
||||||
for (sf = f->allies; sf && !dh; sf = sf->next) {
|
for (sf = f->allies; sf && !dh; sf = sf->next) {
|
||||||
if (sf->status > 0 && sf->status <= HELP_ALL && sf->faction == u->faction) {
|
if (sf->status > 0 && sf->status <= HELP_ALL && sf->faction == tf) {
|
||||||
dh = 1;
|
dh = 1;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -385,6 +385,7 @@ destroy_curse(attrib **alist, int cast_level, int force,
|
||||||
* Allgemein sichtbare Auswirkungen in der Region sollten als
|
* Allgemein sichtbare Auswirkungen in der Region sollten als
|
||||||
* Regionsereignisse auch dort auftauchen.
|
* Regionsereignisse auch dort auftauchen.
|
||||||
|
|
||||||
|
freset(mage->faction, FL_DH);
|
||||||
for(u = r->units; u; u = u->next ) freset(u->faction, FL_DH);
|
for(u = r->units; u; u = u->next ) freset(u->faction, FL_DH);
|
||||||
for(u = r->units; u; u = u->next ) {
|
for(u = r->units; u; u = u->next ) {
|
||||||
if (!fval(u->faction, FL_DH) ) {
|
if (!fval(u->faction, FL_DH) ) {
|
||||||
|
@ -392,6 +393,7 @@ destroy_curse(attrib **alist, int cast_level, int force,
|
||||||
add_message(r, u->faction, buf, MSG_EVENT, ML_WARN | ML_INFO);
|
add_message(r, u->faction, buf, MSG_EVENT, ML_WARN | ML_INFO);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Sonderbehandlung Magierpartei nicht vergessen!
|
||||||
|
|
||||||
* Meldungen an den Magier über Erfolg sollten, wenn sie nicht als
|
* Meldungen an den Magier über Erfolg sollten, wenn sie nicht als
|
||||||
* Regionsereigniss auftauchen, als MSG_MAGIC level ML_INFO unter
|
* Regionsereigniss auftauchen, als MSG_MAGIC level ML_INFO unter
|
||||||
|
@ -937,6 +939,7 @@ sp_goodwinds(castorder *co)
|
||||||
create_curse(mage, &sh->attribs, C_SHIP_NODRIFT, 0, power, cast_level, 0, 0);
|
create_curse(mage, &sh->attribs, C_SHIP_NODRIFT, 0, power, cast_level, 0, 0);
|
||||||
|
|
||||||
/* melden, 1x pro Partei */
|
/* melden, 1x pro Partei */
|
||||||
|
freset(mage->faction, FL_DH);
|
||||||
for(u = r->units; u; u = u->next ) freset(u->faction, FL_DH);
|
for(u = r->units; u; u = u->next ) freset(u->faction, FL_DH);
|
||||||
for(u = r->units; u; u = u->next ) {
|
for(u = r->units; u; u = u->next ) {
|
||||||
if(u->ship != sh ) /* nur den Schiffsbesatzungen! */
|
if(u->ship != sh ) /* nur den Schiffsbesatzungen! */
|
||||||
|
@ -947,6 +950,11 @@ sp_goodwinds(castorder *co)
|
||||||
"wind_effect%u:mage%h:ship", cansee(u->faction, r, mage, 0) ? mage:NULL, sh));
|
"wind_effect%u:mage%h:ship", cansee(u->faction, r, mage, 0) ? mage:NULL, sh));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
if(!fval(mage->faction, FL_DH)){
|
||||||
|
add_message(&mage->faction->msgs, new_message(mage->faction,
|
||||||
|
"wind_effect%u:mage%h:ship", mage, sh));
|
||||||
|
}
|
||||||
|
|
||||||
return cast_level;
|
return cast_level;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -988,6 +996,7 @@ sp_magicstreet(castorder *co)
|
||||||
create_curse(mage, &r->attribs, C_MAGICSTREET, 0, power, cast_level, 0, 0);
|
create_curse(mage, &r->attribs, C_MAGICSTREET, 0, power, cast_level, 0, 0);
|
||||||
|
|
||||||
/* melden, 1x pro Partei */
|
/* melden, 1x pro Partei */
|
||||||
|
freset(mage->faction, FL_DH);
|
||||||
for(u = r->units; u; u = u->next ) freset(u->faction, FL_DH);
|
for(u = r->units; u; u = u->next ) freset(u->faction, FL_DH);
|
||||||
for(u = r->units; u; u = u->next ) {
|
for(u = r->units; u; u = u->next ) {
|
||||||
if(!fval(u->faction, FL_DH) ) {
|
if(!fval(u->faction, FL_DH) ) {
|
||||||
|
@ -996,6 +1005,10 @@ sp_magicstreet(castorder *co)
|
||||||
"path_effect%u:mage%r:region", cansee(u->faction, r, mage, 0) ? mage:NULL, r));
|
"path_effect%u:mage%r:region", cansee(u->faction, r, mage, 0) ? mage:NULL, r));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
if(!fval(mage->faction, FL_DH)){
|
||||||
|
add_message(&mage->faction->msgs, new_message(mage->faction,
|
||||||
|
"path_effect%u:mage%r:region", mage, r));
|
||||||
|
}
|
||||||
|
|
||||||
return cast_level;
|
return cast_level;
|
||||||
}
|
}
|
||||||
|
@ -1052,6 +1065,8 @@ sp_summonent(castorder *co)
|
||||||
|
|
||||||
rsettrees(r, rtrees(r) - ents);
|
rsettrees(r, rtrees(r) - ents);
|
||||||
|
|
||||||
|
/* melden, 1x pro partei */
|
||||||
|
freset(mage->faction, FL_DH);
|
||||||
for(u2 = r->units; u2; u2 = u2->next ) freset(u2->faction, FL_DH);
|
for(u2 = r->units; u2; u2 = u2->next ) freset(u2->faction, FL_DH);
|
||||||
for(u2 = r->units; u2; u2 = u2->next ) {
|
for(u2 = r->units; u2; u2 = u2->next ) {
|
||||||
if (!fval(u2->faction, FL_DH) ) {
|
if (!fval(u2->faction, FL_DH) ) {
|
||||||
|
@ -1060,6 +1075,13 @@ sp_summonent(castorder *co)
|
||||||
"ent_effect%u:mage%i:amount", cansee(u2->faction, r, mage, 0)?mage:NULL, u->number));
|
"ent_effect%u:mage%i:amount", cansee(u2->faction, r, mage, 0)?mage:NULL, u->number));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
if(!fval(mage->faction, FL_DH)){
|
||||||
|
/* dann steht niemand von der Magierpartei in der Region, sieht also
|
||||||
|
* auch keine Regionsmeldung. ergo: global anzeigen */
|
||||||
|
add_message(&mage->faction->msgs, new_message(mage->faction,
|
||||||
|
"ent_effect%u:mage%i:amount", mage, u->number));
|
||||||
|
}
|
||||||
|
|
||||||
return cast_level;
|
return cast_level;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1147,6 +1169,7 @@ sp_maelstrom(castorder *co)
|
||||||
set_curseflag(r->attribs, C_MAELSTROM, 0, CURSE_ISNEW);
|
set_curseflag(r->attribs, C_MAELSTROM, 0, CURSE_ISNEW);
|
||||||
|
|
||||||
/* melden, 1x pro partei */
|
/* melden, 1x pro partei */
|
||||||
|
freset(mage->faction, FL_DH);
|
||||||
for (u = r->units; u; u = u->next) freset(u->faction, FL_DH);
|
for (u = r->units; u; u = u->next) freset(u->faction, FL_DH);
|
||||||
for (u = r->units; u; u = u->next) {
|
for (u = r->units; u; u = u->next) {
|
||||||
if (!fval(u->faction, FL_DH)) {
|
if (!fval(u->faction, FL_DH)) {
|
||||||
|
@ -1155,6 +1178,65 @@ sp_maelstrom(castorder *co)
|
||||||
"maelstrom_effect%u:mage", cansee(u->faction, r, mage, 0) ? mage:NULL));
|
"maelstrom_effect%u:mage", cansee(u->faction, r, mage, 0) ? mage:NULL));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
if(!fval(mage->faction, FL_DH)){
|
||||||
|
/* dann steht niemand von der Magierpartei in der Region, sieht also
|
||||||
|
* auch keine Regionsmeldung. ergo: global anzeigen */
|
||||||
|
add_message(&mage->faction->msgs, new_message(mage->faction,
|
||||||
|
"maelstrom_effect%u:mage", mage));
|
||||||
|
}
|
||||||
|
|
||||||
|
return cast_level;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* ------------------------------------------------------------- */
|
||||||
|
/* Name: Wurzeln der Magie
|
||||||
|
* Stufe: 16
|
||||||
|
* Kategorie: Region, neutral
|
||||||
|
* Gebiet: Gwyrrd
|
||||||
|
* Wirkung:
|
||||||
|
* Wandelt einen Wald permanent in eine Mallornregion
|
||||||
|
*
|
||||||
|
* Flags:
|
||||||
|
* (FARCASTING | REGIONSPELL | TESTRESISTANCE)
|
||||||
|
*/
|
||||||
|
static int
|
||||||
|
sp_mallorn(castorder *co)
|
||||||
|
{
|
||||||
|
unit *u;
|
||||||
|
region *r = co->rt;
|
||||||
|
int cast_level = co->level;
|
||||||
|
unit *mage = (unit *)co->magician;
|
||||||
|
|
||||||
|
if(!landregion(rterrain(r))) {
|
||||||
|
cmistake(mage, strdup(co->order), 290, MSG_MAGIC);
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
if(fval(r, RF_MALLORN)) {
|
||||||
|
cmistake(mage, strdup(co->order), 291, MSG_MAGIC);
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* half the trees will die */
|
||||||
|
rsettrees(r, rtrees(r)/2);
|
||||||
|
fset(r, RF_MALLORN);
|
||||||
|
|
||||||
|
/* melden, 1x pro partei */
|
||||||
|
freset(mage->faction, FL_DH);
|
||||||
|
for (u = r->units; u; u = u->next) freset(u->faction, FL_DH);
|
||||||
|
for (u = r->units; u; u = u->next) {
|
||||||
|
if (!fval(u->faction, FL_DH)) {
|
||||||
|
fset(u->faction, FL_DH);
|
||||||
|
add_message(&r->msgs, new_message(u->faction,
|
||||||
|
"mallorn_effect%u:mage", cansee(u->faction, r, mage, 0) ? mage:NULL));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if(!fval(mage->faction, FL_DH)){
|
||||||
|
/* dann steht niemand von der Magierpartei in der Region, sieht also
|
||||||
|
* auch keine Regionsmeldung. ergo: global anzeigen */
|
||||||
|
add_message(&mage->faction->msgs, new_message(mage->faction,
|
||||||
|
"mallorn_effect%u:mage", mage));
|
||||||
|
}
|
||||||
|
|
||||||
return cast_level;
|
return cast_level;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1185,6 +1267,7 @@ sp_blessedharvest(castorder *co)
|
||||||
create_curse(mage,&r->attribs,C_BLESSEDHARVEST,0,power,power,1,0);
|
create_curse(mage,&r->attribs,C_BLESSEDHARVEST,0,power,power,1,0);
|
||||||
|
|
||||||
/* melden, 1x pro partei */
|
/* melden, 1x pro partei */
|
||||||
|
freset(mage->faction, FL_DH);
|
||||||
for (u = r->units; u; u = u->next) freset(u->faction, FL_DH);
|
for (u = r->units; u; u = u->next) freset(u->faction, FL_DH);
|
||||||
|
|
||||||
for (u = r->units; u; u = u->next) {
|
for (u = r->units; u; u = u->next) {
|
||||||
|
@ -1195,6 +1278,8 @@ sp_blessedharvest(castorder *co)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (!fval(mage->faction, FL_DH)){
|
if (!fval(mage->faction, FL_DH)){
|
||||||
|
/* dann steht niemand von der Magierpartei in der Region, sieht also
|
||||||
|
* auch keine Regionsmeldung. ergo: global anzeigen */
|
||||||
add_message(&mage->faction->msgs, new_message(mage->faction,
|
add_message(&mage->faction->msgs, new_message(mage->faction,
|
||||||
"harvest_effect%u:mage", mage));
|
"harvest_effect%u:mage", mage));
|
||||||
}
|
}
|
||||||
|
@ -1228,6 +1313,7 @@ sp_hain(castorder *co)
|
||||||
rsettrees(r, rtrees(r) + trees);
|
rsettrees(r, rtrees(r) + trees);
|
||||||
|
|
||||||
/* melden, 1x pro partei */
|
/* melden, 1x pro partei */
|
||||||
|
freset(mage->faction, FL_DH);
|
||||||
for (u = r->units; u; u = u->next) freset(u->faction, FL_DH);
|
for (u = r->units; u; u = u->next) freset(u->faction, FL_DH);
|
||||||
for (u = r->units; u; u = u->next) {
|
for (u = r->units; u; u = u->next) {
|
||||||
if (!fval(u->faction, FL_DH)) {
|
if (!fval(u->faction, FL_DH)) {
|
||||||
|
@ -7349,7 +7435,9 @@ spell spelldaten[] =
|
||||||
"Die Beschwörung von Elementargeistern der Stürme ist ein uraltes "
|
"Die Beschwörung von Elementargeistern der Stürme ist ein uraltes "
|
||||||
"Ritual. Der Druide bannt die Elementare in die Segel der Schiffe, "
|
"Ritual. Der Druide bannt die Elementare in die Segel der Schiffe, "
|
||||||
"wo sie helfen, das Schiff mit hoher Geschwindigkeit über die Wellen "
|
"wo sie helfen, das Schiff mit hoher Geschwindigkeit über die Wellen "
|
||||||
"zu tragen.",
|
"zu tragen. Je mehr Kraft der Druide in den Zauber investiert, desto "
|
||||||
|
"größer ist die Zahl der Elementargeister, die sich bannen lassen. "
|
||||||
|
"Für jedes Schiff wird ein Elementargeist benötigt.",
|
||||||
NULL,
|
NULL,
|
||||||
"s+",
|
"s+",
|
||||||
M_DRUIDE,
|
M_DRUIDE,
|
||||||
|
@ -7685,6 +7773,26 @@ spell spelldaten[] =
|
||||||
(spell_f)sp_maelstrom, patzer
|
(spell_f)sp_maelstrom, patzer
|
||||||
},
|
},
|
||||||
|
|
||||||
|
{SPL_MALLORN, "Wurzeln der Magie",
|
||||||
|
"Mit Hilfe dieses aufwändigen Rituals läßt der Druide einen Teil seiner "
|
||||||
|
"dauerhaft in den Boden und die Wälder der Region fliessen. Dadurch wird "
|
||||||
|
"das Gleichgewicht der Natur in der Region für immer verändert, und in "
|
||||||
|
"Zukunft werden nur noch die anspruchsvollen, aber kräftigen "
|
||||||
|
"Mallorngewächse in der Region gedeihen.",
|
||||||
|
NULL,
|
||||||
|
NULL,
|
||||||
|
M_DRUIDE,
|
||||||
|
(FARCASTING | REGIONSPELL | TESTRESISTANCE),
|
||||||
|
5, 16,
|
||||||
|
{
|
||||||
|
{R_AURA, 250, SPC_FIX},
|
||||||
|
{R_PERMAURA, 10, SPC_FIX},
|
||||||
|
{R_TOADSLIME, 1, SPC_FIX},
|
||||||
|
{0, 0, 0},
|
||||||
|
{0, 0, 0}},
|
||||||
|
(spell_f)sp_mallorn, patzer
|
||||||
|
},
|
||||||
|
|
||||||
{SPL_GREAT_DROUGHT, "Tor in die Ebene der Hitze",
|
{SPL_GREAT_DROUGHT, "Tor in die Ebene der Hitze",
|
||||||
"Dieses mächtige Ritual öffnet ein Tor in die Elementarebene der "
|
"Dieses mächtige Ritual öffnet ein Tor in die Elementarebene der "
|
||||||
"Hitze. Eine grosse Dürre kommt über das Land. Bauern, Tiere und "
|
"Hitze. Eine grosse Dürre kommt über das Land. Bauern, Tiere und "
|
||||||
|
|
|
@ -195,6 +195,7 @@ enum {
|
||||||
SPL_UNHOLYPOWER,
|
SPL_UNHOLYPOWER,
|
||||||
SPL_HOLYGROUND,
|
SPL_HOLYGROUND,
|
||||||
SPL_BLOODSACRIFICE,
|
SPL_BLOODSACRIFICE,
|
||||||
|
SPL_MALLORN,
|
||||||
MAXALLSPELLS,
|
MAXALLSPELLS,
|
||||||
NO_SPELL = (spellid_t) -1
|
NO_SPELL = (spellid_t) -1
|
||||||
};
|
};
|
||||||
|
|
|
@ -104,6 +104,7 @@ sp_summon_alp(struct castorder *co)
|
||||||
alp->ship = mage->ship;
|
alp->ship = mage->ship;
|
||||||
}
|
}
|
||||||
set_skill(alp, SK_STEALTH, alp->number * 840); /* 840 Tage = T7 */
|
set_skill(alp, SK_STEALTH, alp->number * 840); /* 840 Tage = T7 */
|
||||||
|
set_string(&alp->name, "Alp");
|
||||||
alp->status = ST_FLEE; /* flieht */
|
alp->status = ST_FLEE; /* flieht */
|
||||||
|
|
||||||
{
|
{
|
||||||
|
@ -113,7 +114,7 @@ sp_summon_alp(struct castorder *co)
|
||||||
ad->target = opfer;
|
ad->target = opfer;
|
||||||
}
|
}
|
||||||
|
|
||||||
sprintf(buf, "Der Alp %s starb, ohne sein Ziel zu erreichen.", unitname(alp));
|
strcpy(buf, "Ein Alp starb, ohne sein Ziel zu erreichen.");
|
||||||
{
|
{
|
||||||
#ifdef NEW_TRIGGER
|
#ifdef NEW_TRIGGER
|
||||||
/* Wenn der Alp stirbt, den Magier nachrichtigen */
|
/* Wenn der Alp stirbt, den Magier nachrichtigen */
|
||||||
|
@ -162,11 +163,11 @@ alp_findet_opfer(unit *alp, region *r)
|
||||||
assert(mage);
|
assert(mage);
|
||||||
|
|
||||||
/* Magier und Opfer Bescheid geben */
|
/* Magier und Opfer Bescheid geben */
|
||||||
sprintf(buf, "Der Alp %s hat sein Opfer gefunden!", unitname(alp));
|
strcpy(buf, "Ein Alp hat sein Opfer gefunden!");
|
||||||
addmessage(r, mage->faction, buf, MSG_MAGIC, ML_INFO);
|
addmessage(r, mage->faction, buf, MSG_MAGIC, ML_INFO);
|
||||||
|
|
||||||
sprintf(buf, "Der Alp %s springt auf den Rücken von %s.",
|
sprintf(buf, "Ein Alp springt auf den Rücken von %s.",
|
||||||
unitname(alp), unitname(opfer));
|
unitname(opfer));
|
||||||
addmessage(r, opfer->faction, buf, MSG_EVENT, ML_IMPORTANT);
|
addmessage(r, opfer->faction, buf, MSG_EVENT, ML_IMPORTANT);
|
||||||
|
|
||||||
/* Relations werden in destroy_unit(alp) automatisch gelöscht.
|
/* Relations werden in destroy_unit(alp) automatisch gelöscht.
|
||||||
|
|
|
@ -31,7 +31,7 @@
|
||||||
/* Simple Integer-Liste */
|
/* Simple Integer-Liste */
|
||||||
|
|
||||||
char *
|
char *
|
||||||
sncat(char * buffer, size_t size, const char * str)
|
fstrncat(char * buffer, const char * str, unsigned int size)
|
||||||
{
|
{
|
||||||
static char * b = NULL;
|
static char * b = NULL;
|
||||||
static char * end = NULL;
|
static char * end = NULL;
|
||||||
|
@ -95,7 +95,7 @@ space_replace(char * str, char replace)
|
||||||
}
|
}
|
||||||
|
|
||||||
const char *
|
const char *
|
||||||
escape_string(const char * str, char * buffer, size_t len)
|
escape_string(const char * str, char * buffer, unsigned int len)
|
||||||
{
|
{
|
||||||
char s_buffer[4096];
|
char s_buffer[4096];
|
||||||
const char * p = str;
|
const char * p = str;
|
||||||
|
|
|
@ -19,11 +19,12 @@ extern int *intlist_init(void);
|
||||||
extern int *intlist_add(int *i_p, int i);
|
extern int *intlist_add(int *i_p, int i);
|
||||||
extern int *intlist_find(int *i_p, int i);
|
extern int *intlist_find(int *i_p, int i);
|
||||||
extern unsigned int hashstring(const char* s);
|
extern unsigned int hashstring(const char* s);
|
||||||
extern char *space_replace(char * str, char replace);
|
|
||||||
extern const char *escape_string(const char * str, char * buffer, size_t len);
|
|
||||||
extern boolean locale_check(void);
|
|
||||||
extern char *sncat(char * buffer, size_t size, const char * str);
|
|
||||||
|
|
||||||
|
extern char *space_replace(char * str, char replace);
|
||||||
|
extern const char *escape_string(const char * str, char * buffer, unsigned int len);
|
||||||
|
extern boolean locale_check(void);
|
||||||
|
extern char *fstrncat(char * buffer, const char * str, unsigned int size);
|
||||||
|
/* fast strncat */
|
||||||
/* grammar constants: */
|
/* grammar constants: */
|
||||||
#define GR_PLURAL 0x01
|
#define GR_PLURAL 0x01
|
||||||
/* 0x02-0x08 left unused for individual use */
|
/* 0x02-0x08 left unused for individual use */
|
||||||
|
|
|
@ -42,7 +42,8 @@ Druide/Gwyrrd (38 Spr
|
||||||
13 B... Hitzeelementar 600 halbiert Fruchtbarkeit der Region
|
13 B... Hitzeelementar 600 halbiert Fruchtbarkeit der Region
|
||||||
14 Nebel der Verwirrung 8*L Bewegung wird zufällig (nur Wald+Ozean)
|
14 Nebel der Verwirrung 8*L Bewegung wird zufällig (nur Wald+Ozean)
|
||||||
15 Mahlstrom 200,M Ozeanfeld beschädigt Schiffe schwer
|
15 Mahlstrom 200,M Ozeanfeld beschädigt Schiffe schwer
|
||||||
16 T... die Ebene der Hitze 800 stärker als L13, kann Region wandeln
|
16 Wurzeln der Magie 250,10P,M Wald wird permanent Mallornwald
|
||||||
|
17 T... die Ebene der Hitze 800 stärker als L13, kann Region wandeln
|
||||||
|
|
||||||
|
|
||||||
Chaos/Draig (27 Sprüche):
|
Chaos/Draig (27 Sprüche):
|
||||||
|
|
|
@ -975,7 +975,8 @@ show_newspells(void)
|
||||||
|
|
||||||
spellid_t newspellids[] = {
|
spellid_t newspellids[] = {
|
||||||
SPL_BLOODSACRIFICE,
|
SPL_BLOODSACRIFICE,
|
||||||
SPL_NOSPELL };
|
SPL_MALLORN,
|
||||||
|
SPL_NOSPELL };
|
||||||
|
|
||||||
/* die id's der neuen oder veränderten Sprüche werden in newspellids[]
|
/* die id's der neuen oder veränderten Sprüche werden in newspellids[]
|
||||||
* abgelegt */
|
* abgelegt */
|
||||||
|
|
|
@ -14,15 +14,16 @@
|
||||||
|
|
||||||
#define BOOL_DEFINED
|
#define BOOL_DEFINED
|
||||||
/* wenn config.h nicht vor curses included wird, kompiliert es unter windows nicht */
|
/* wenn config.h nicht vor curses included wird, kompiliert es unter windows nicht */
|
||||||
|
|
||||||
#include <config.h>
|
#include <config.h>
|
||||||
#include <curses.h>
|
#include <curses.h>
|
||||||
#include <eressea.h>
|
#include <eressea.h>
|
||||||
#include "mapper.h"
|
#include "mapper.h"
|
||||||
|
|
||||||
/* kernel includes */
|
/* kernel includes */
|
||||||
|
#include <goodies.h>
|
||||||
#include <building.h>
|
#include <building.h>
|
||||||
#include <faction.h>
|
#include <faction.h>
|
||||||
#include <goodies.h>
|
|
||||||
#include <item.h>
|
#include <item.h>
|
||||||
#include <movement.h>
|
#include <movement.h>
|
||||||
#include <race.h>
|
#include <race.h>
|
||||||
|
@ -37,6 +38,7 @@
|
||||||
#include <ctype.h>
|
#include <ctype.h>
|
||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
|
#include <stddef.h>
|
||||||
|
|
||||||
#define findunit(f,r) findunitg(f,r)
|
#define findunit(f,r) findunitg(f,r)
|
||||||
|
|
||||||
|
|
|
@ -288,6 +288,8 @@ error286;errors:0;de;{unit} in {region}: '{command}' - Die Einheit transportiert
|
||||||
error287;errors:0;de;{unit} in {region}: '{command}' - Dorthin können wir die Einheit nicht transportieren.
|
error287;errors:0;de;{unit} in {region}: '{command}' - Dorthin können wir die Einheit nicht transportieren.
|
||||||
error288;errors:0;de;{unit} in {region}: '{command}' - Wieviel sollen wir einreißen?
|
error288;errors:0;de;{unit} in {region}: '{command}' - Wieviel sollen wir einreißen?
|
||||||
error289;errors:0;de;{unit} in {region}: '{command}' - Tarne wie?
|
error289;errors:0;de;{unit} in {region}: '{command}' - Tarne wie?
|
||||||
|
error290;errors:0;de;{unit} in {region}: '{command}' - Hier wachsen keine Bäume.
|
||||||
|
error291;errors:0;de;{unit} in {region}: '{command}' - Dies ist schon eine Mallornregion.
|
||||||
|
|
||||||
# Meldungen und Ereignisse
|
# Meldungen und Ereignisse
|
||||||
msg_event;events:0;de;{string}
|
msg_event;events:0;de;{string}
|
||||||
|
@ -468,6 +470,7 @@ wind_effect;magic:0;de;{$mage mage} erfleht den Segen der G
|
||||||
path_effect;magic:0;de;{$mage mage} sorgt für trockene Straßen in {region}.
|
path_effect;magic:0;de;{$mage mage} sorgt für trockene Straßen in {region}.
|
||||||
ent_effect;magic:0;de;{$mage mage} belebt {amount} Bäume.
|
ent_effect;magic:0;de;{$mage mage} belebt {amount} Bäume.
|
||||||
maelstrom_effect;magic:0;de;{$mage mage} beschwört die Mächte des Wassers und ein gigantischer Strudel bildet sich.
|
maelstrom_effect;magic:0;de;{$mage mage} beschwört die Mächte des Wassers und ein gigantischer Strudel bildet sich.
|
||||||
|
mallorn_effect;magic:0;de;{$mage mage} läßt seine Kraft in die Region fliessen.
|
||||||
harvest_effect;magic:0;de;{$mage mage} segnet in einem kurzen Ritual die Felder.
|
harvest_effect;magic:0;de;{$mage mage} segnet in einem kurzen Ritual die Felder.
|
||||||
growtree_effect;magic:0;de;{$mage mage} erschuf einen heiligen Hain von {amount} Bäumen.
|
growtree_effect;magic:0;de;{$mage mage} erschuf einen heiligen Hain von {amount} Bäumen.
|
||||||
rust_effect;magic:0;de;{$mage mage} legt einen Rosthauch auf {target}. {amount} Waffen wurden vom Rost zerfressen.
|
rust_effect;magic:0;de;{$mage mage} legt einen Rosthauch auf {target}. {amount} Waffen wurden vom Rost zerfressen.
|
||||||
|
|
Loading…
Reference in New Issue