forked from github/server
- #define NOVISIBLESKILLPOINTS
- #define RANDOMIZED_LEARNING
This commit is contained in:
parent
2561eb90c4
commit
c5b4cecfb8
4 changed files with 29 additions and 9 deletions
|
@ -1,6 +1,6 @@
|
||||||
/* vi: set ts=2:
|
/* 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
|
* Eressea PB(E)M host Copyright (C) 1998-2000
|
||||||
* Christian Schlittchen (corwin@amber.kn-bremen.de)
|
* Christian Schlittchen (corwin@amber.kn-bremen.de)
|
||||||
* Katja Zedel (katze@felidae.kn-bremen.de)
|
* Katja Zedel (katze@felidae.kn-bremen.de)
|
||||||
|
@ -486,7 +486,12 @@ cr_output_unit(FILE * F, region * r,
|
||||||
pr = 1;
|
pr = 1;
|
||||||
fprintf(F, "TALENTE\n");
|
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]);
|
fprintf(F, "%d %d;%s\n", get_skill(u, sk), eff_skill(u, sk, r), skillnames[sk]);
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
/* spells */
|
/* spells */
|
||||||
if (is_mage(u)) {
|
if (is_mage(u)) {
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
/* vi: set ts=2:
|
/* 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
|
* Eressea PB(E)M host Copyright (C) 1998-2000
|
||||||
* Christian Schlittchen (corwin@amber.kn-bremen.de)
|
* Christian Schlittchen (corwin@amber.kn-bremen.de)
|
||||||
* Katja Zedel (katze@felidae.kn-bremen.de)
|
* Katja Zedel (katze@felidae.kn-bremen.de)
|
||||||
|
@ -35,6 +35,7 @@
|
||||||
#include "message.h"
|
#include "message.h"
|
||||||
#include "plane.h"
|
#include "plane.h"
|
||||||
#include "karma.h"
|
#include "karma.h"
|
||||||
|
#include "rand.h"
|
||||||
|
|
||||||
/* util includes */
|
/* util includes */
|
||||||
#include <base36.h>
|
#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
|
* n ist die Anzahl zusätzlich gelernter Tage. n darf max. die Differenz
|
||||||
* von schon gelernten Tagen zum max(30 Tage pro Mann) betragen. */
|
* 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);
|
a = a_find(u2->attribs, &at_learning);
|
||||||
if (a!=NULL) n -= a->data.i;
|
if (a!=NULL) n -= a->data.i;
|
||||||
|
|
||||||
|
@ -503,7 +508,7 @@ learn(void)
|
||||||
a->data.i += l * 10;
|
a->data.i += l * 10;
|
||||||
change_effect(u, oldpotiontype[P_WISE], -l);
|
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]));
|
l = min(u->number, get_effect(u, oldpotiontype[P_FOOL]));
|
||||||
a->data.i -= l * 30;
|
a->data.i -= l * 30;
|
||||||
change_effect(u, oldpotiontype[P_FOOL], -l);
|
change_effect(u, oldpotiontype[P_FOOL], -l);
|
||||||
|
@ -540,7 +545,11 @@ learn(void)
|
||||||
}
|
}
|
||||||
#endif
|
#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));
|
change_skill(u, (skill_t)i, (int)((u->number * 30 + a->data.i) * multi));
|
||||||
|
#endif
|
||||||
if (a) {
|
if (a) {
|
||||||
a_remove(&u->attribs, a);
|
a_remove(&u->attribs, a);
|
||||||
a = NULL;
|
a = NULL;
|
||||||
|
|
|
@ -66,6 +66,8 @@ struct building_type;
|
||||||
#include <attrib.h>
|
#include <attrib.h>
|
||||||
|
|
||||||
#define AT_PERSISTENT
|
#define AT_PERSISTENT
|
||||||
|
#undef RANDOMIZED_LEARNING
|
||||||
|
#undef NOVISIBLESKILLPOINTS
|
||||||
|
|
||||||
/* eressea-defined attribute-type flags */
|
/* eressea-defined attribute-type flags */
|
||||||
#define ATF_CURSE ATF_USER_DEFINED
|
#define ATF_CURSE ATF_USER_DEFINED
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
/* vi: set ts=2:
|
/* 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
|
* Eressea PB(E)M host Copyright (C) 1998-2000
|
||||||
* Christian Schlittchen (corwin@amber.kn-bremen.de)
|
* Christian Schlittchen (corwin@amber.kn-bremen.de)
|
||||||
* Katja Zedel (katze@felidae.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) {
|
||||||
if (sk == SK_STEALTH && i>=0) {
|
i = u_geteffstealth(u);
|
||||||
icat(i);
|
if(i>=0) {
|
||||||
scat("/");
|
icat(i);
|
||||||
|
scat("/");
|
||||||
|
}
|
||||||
}
|
}
|
||||||
icat(effskill(u, sk));
|
icat(effskill(u, sk));
|
||||||
|
|
||||||
|
#ifndef NOVISIBLESKILLPOINTS
|
||||||
if (days) {
|
if (days) {
|
||||||
assert(u->number);
|
assert(u->number);
|
||||||
scat(" [");
|
scat(" [");
|
||||||
icat(d / u->number);
|
icat(d / u->number);
|
||||||
scat("]");
|
scat("]");
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
|
|
Loading…
Reference in a new issue