- Kompilierte nicht

This commit is contained in:
Christian Schlittchen 2002-02-03 08:31:39 +00:00
parent d58fa96354
commit 451542789f
4 changed files with 23 additions and 10 deletions

View File

@ -866,15 +866,15 @@ learn_monster(unit *u)
* Lerntage hat. */ * Lerntage hat. */
for(sk=0;sk<MAXSKILLS;sk++) for(sk=0;sk<MAXSKILLS;sk++)
if(get_skill(u, sk) > 0) c++; if (get_skill(u, sk)) c++;
if(c == 0) return; if(c == 0) return;
n = rand()%c + 1; n = rand()%c + 1;
c = 0; c = 0;
for(sk=0;sk<MAXSKILLS;sk++) { for (sk=0;sk<MAXSKILLS;sk++) {
if(get_skill(u, sk) > 0) { if (get_skill(u, sk)) {
c++; c++;
if(c == n) { if(c == n) {
sprintf(buf, "%s %s", locale_string(u->faction->locale, keywords[K_STUDY]), sprintf(buf, "%s %s", locale_string(u->faction->locale, keywords[K_STUDY]),
@ -948,7 +948,13 @@ plan_monsters(void)
if (u->faction->no != MONSTER_FACTION) continue; if (u->faction->no != MONSTER_FACTION) continue;
/* Monster bekommen jede Runde ein paar Tage Wahrnehmung dazu */ /* Monster bekommen jede Runde ein paar Tage Wahrnehmung dazu */
#if SKILLPOINTS
change_skill(u, SK_OBSERVATION, u->number * 10); change_skill(u, SK_OBSERVATION, u->number * 10);
#else
if (learn_skill(u, SK_OBSERVATION, u->number * 10)) {
change_skill(u, SK_OBSERVATION, u->number);
}
#endif
ta = a_find(u->attribs, &at_hate); ta = a_find(u->attribs, &at_hate);
if (ta && strncmp(u->lastorder, "WARTEN", 6) != 0) { if (ta && strncmp(u->lastorder, "WARTEN", 6) != 0) {
@ -1090,9 +1096,15 @@ plan_monsters(void)
un = createunit(r, findfaction(MONSTER_FACTION), ra, new_race[RC_DRACOID]); un = createunit(r, findfaction(MONSTER_FACTION), ra, new_race[RC_DRACOID]);
name_unit(un); name_unit(un);
change_money(u, -un->number * 50); change_money(u, -un->number * 50);
set_skill(un, SK_SPEAR, un->number * (180 + rand() % 500)); #if SKILLPOINTS
set_skill(un, SK_SWORD, un->number * (180 + rand() % 500)); set_skill(un, SK_SPEAR, un->number * (level_days(3) + rand() % (level_days(6)-level_days(3))));
set_skill(un, SK_LONGBOW, un->number * (90 + rand() % 300)); set_skill(un, SK_SWORD, un->number * (level_days(3) + rand() % (level_days(6)-level_days(3))));
set_skill(un, SK_LONGBOW, un->number * (level_days(2) + rand() % (level_days(4)-level_days(2))));
#else
set_skill(un, SK_SPEAR, un->number * (3 + rand() % 4));
set_skill(un, SK_SWORD, un->number * (3 + rand() % 4));
set_skill(un, SK_LONGBOW, un->number * (2 + rand() % 3));
#endif
switch (rand() % 3) { switch (rand() % 3) {
case 0: case 0:
set_item(un, I_LONGBOW, un->number); set_item(un, I_LONGBOW, un->number);

View File

@ -953,7 +953,7 @@ drain_exp(unit *u, int n)
} }
} }
if (sk != NOSKILL) { if (sk != NOSKILL) {
change_skill(u, sk, -1); change_skill(u, sk, -n);
} }
} }
#else #else
@ -976,7 +976,7 @@ drain_exp(unit *u, int n)
} }
if (sk != NOSKILL) { if (sk != NOSKILL) {
n = min(n, get_skill(u, sk)); n = min(n, get_skill(u, sk));
change_skill(u, sk, -n); change_skill(u, sk, -1);
} }
} }
#endif #endif

View File

@ -492,4 +492,5 @@ register_ships(void)
#ifndef NOXMLBOATS #ifndef NOXMLBOATS
xml_register(&xml_ships, "eressea ship", 0); xml_register(&xml_ships, "eressea ship", 0);
#endif #endif
} }

View File

@ -27,4 +27,4 @@
#define SKILLPOINTS 1 #define SKILLPOINTS 1
#define TEACHDIFFERENCE 1 #define TEACHDIFFERENCE 1
#define PEASANT_ADJUSTMENT 1 #define PEASANT_ADJUSTMENT 0