- #define NOVISIBLESKILLPOINTS

- #define RANDOMIZED_LEARNING
This commit is contained in:
Christian Schlittchen 2001-02-19 14:19:24 +00:00
parent 2561eb90c4
commit c5b4cecfb8
4 changed files with 29 additions and 9 deletions

View File

@ -1,6 +1,6 @@
/* vi: set ts=2:
*
* $Id: creport.c,v 1.8 2001/02/17 15:52:46 enno Exp $
* $Id: creport.c,v 1.9 2001/02/19 14:19:24 corwin Exp $
* Eressea PB(E)M host Copyright (C) 1998-2000
* Christian Schlittchen (corwin@amber.kn-bremen.de)
* Katja Zedel (katze@felidae.kn-bremen.de)
@ -486,7 +486,12 @@ cr_output_unit(FILE * F, region * r,
pr = 1;
fprintf(F, "TALENTE\n");
}
#ifdef NOVISIBLESKILLPOINTS
/* 0 ist nur der Kompatibilität wegen drin, rausnehmen */
fprintf(F, "0 %d;%s\n", eff_skill(u, sk, r), skillnames[sk]);
#else
fprintf(F, "%d %d;%s\n", get_skill(u, sk), eff_skill(u, sk, r), skillnames[sk]);
#endif
}
/* spells */
if (is_mage(u)) {

View File

@ -1,6 +1,6 @@
/* vi: set ts=2:
*
* $Id: study.c,v 1.7 2001/02/18 10:06:08 enno Exp $
* $Id: study.c,v 1.8 2001/02/19 14:19:24 corwin Exp $
* Eressea PB(E)M host Copyright (C) 1998-2000
* Christian Schlittchen (corwin@amber.kn-bremen.de)
* Katja Zedel (katze@felidae.kn-bremen.de)
@ -35,6 +35,7 @@
#include "message.h"
#include "plane.h"
#include "karma.h"
#include "rand.h"
/* util includes */
#include <base36.h>
@ -265,7 +266,11 @@ teach(region * r, unit * u)
* n ist die Anzahl zusätzlich gelernter Tage. n darf max. die Differenz
* von schon gelernten Tagen zum max(30 Tage pro Mann) betragen. */
n = (u2->number * 30);;
#ifdef RANDOMIZED_LEARNING
n = u2->number * dice(2,30);
#else
n = u2->number * 30;
#endif
a = a_find(u2->attribs, &at_learning);
if (a!=NULL) n -= a->data.i;
@ -503,7 +508,7 @@ learn(void)
a->data.i += l * 10;
change_effect(u, oldpotiontype[P_WISE], -l);
}
if (get_effect(u, oldpotiontype[P_FOOL])) { /* Trank "Dumpfbackenbrot" */
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);
@ -540,7 +545,11 @@ learn(void)
}
#endif
#ifdef RANDOMIZED_LEARNING
change_skill(u, (skill_t)i, (int)((u->number * dice(2,30) + a->data.i) * multi));
#else
change_skill(u, (skill_t)i, (int)((u->number * 30 + a->data.i) * multi));
#endif
if (a) {
a_remove(&u->attribs, a);
a = NULL;

View File

@ -66,6 +66,8 @@ struct building_type;
#include <attrib.h>
#define AT_PERSISTENT
#undef RANDOMIZED_LEARNING
#undef NOVISIBLESKILLPOINTS
/* eressea-defined attribute-type flags */
#define ATF_CURSE ATF_USER_DEFINED

View File

@ -1,6 +1,6 @@
/* vi: set ts=2:
*
* $Id: reports.c,v 1.5 2001/02/17 15:52:47 enno Exp $
* $Id: reports.c,v 1.6 2001/02/19 14:19:24 corwin Exp $
* Eressea PB(E)M host Copyright (C) 1998-2000
* Christian Schlittchen (corwin@amber.kn-bremen.de)
* Katja Zedel (katze@felidae.kn-bremen.de)
@ -436,19 +436,23 @@ spskill(const struct unit * u, skill_t sk, int *dh, int days)
}
}
i = u_geteffstealth(u);
if (sk == SK_STEALTH && i>=0) {
icat(i);
scat("/");
if (sk == SK_STEALTH) {
i = u_geteffstealth(u);
if(i>=0) {
icat(i);
scat("/");
}
}
icat(effskill(u, sk));
#ifndef NOVISIBLESKILLPOINTS
if (days) {
assert(u->number);
scat(" [");
icat(d / u->number);
scat("]");
}
#endif
}
void