übertrag aus beta-1-0 nach dev - magieparsing

This commit is contained in:
Enno Rehling 2001-05-20 07:57:52 +00:00
parent d91c4e7831
commit bc899524f3
3 changed files with 9 additions and 8 deletions

View File

@ -140,6 +140,11 @@ teach_unit(unit * teacher, unit * student, int teaching, skill_t sk, boolean rep
* n ist die Anzahl zusätzlich gelernter Tage. n darf max. die Differenz
* von schon gelernten Tagen zum max(30 Tage pro Mann) betragen. */
if (magic_lowskill(student)){
cmistake(teacher, teacher->thisorder, 274, MSG_EVENT);
return 0;
}
#ifdef RANDOMIZED_LEARNING
n = student->number * dice(2,30);
#else
@ -238,11 +243,6 @@ teach(region * r, unit * u)
return;
}
if (magic_lowskill(u2)){
cmistake(u, u->thisorder, 274, MSG_EVENT);
return;
}
teaching = u->number * 30 * TEACHNUMBER;
if ((i = get_effect(u, oldpotiontype[P_FOOL])) > 0) { /* Trank "Dumpfbackenbrot" */

View File

@ -1930,7 +1930,7 @@ spellparameter *
add_spellparameter(region *target_r, unit *u, const char *syntax,
char *s, int skip)
{
int i = 0;
int i = 1;
int c = 0;
int l = 0;
char *tbuf, *token;
@ -1970,7 +1970,7 @@ add_spellparameter(region *target_r, unit *u, const char *syntax,
strcpy(tbuf, s);
token = strtok (tbuf, " ");
while(token && syntax[c] != 0) {
if (i >= skip) {
if (i > skip) {
if (syntax[c] == '+') {
/* das vorhergehende Element kommt ein oder mehrmals vor, wir
* springen zum key zurück */

View File

@ -23,6 +23,7 @@
#include "base36.h"
#include <stdlib.h>
#include <assert.h>
#ifdef HAVE_STRTOL
int
@ -36,7 +37,7 @@ int
atoi36(const char * s)
{
int i = 0;
assert(s);
if(!(*s)) return 0;
while(!isalnum((int)*s)) ++s;