- 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,7 +866,7 @@ learn_monster(unit *u)
* Lerntage hat. */
for(sk=0;sk<MAXSKILLS;sk++)
if(get_skill(u, sk) > 0) c++;
if (get_skill(u, sk)) c++;
if(c == 0) return;
@ -874,7 +874,7 @@ learn_monster(unit *u)
c = 0;
for (sk=0;sk<MAXSKILLS;sk++) {
if(get_skill(u, sk) > 0) {
if (get_skill(u, sk)) {
c++;
if(c == n) {
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;
/* Monster bekommen jede Runde ein paar Tage Wahrnehmung dazu */
#if SKILLPOINTS
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);
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]);
name_unit(un);
change_money(u, -un->number * 50);
set_skill(un, SK_SPEAR, un->number * (180 + rand() % 500));
set_skill(un, SK_SWORD, un->number * (180 + rand() % 500));
set_skill(un, SK_LONGBOW, un->number * (90 + rand() % 300));
#if SKILLPOINTS
set_skill(un, SK_SPEAR, un->number * (level_days(3) + rand() % (level_days(6)-level_days(3))));
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) {
case 0:
set_item(un, I_LONGBOW, un->number);

View File

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

View File

@ -493,3 +493,4 @@ register_ships(void)
xml_register(&xml_ships, "eressea ship", 0);
#endif
}

View File

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