From 2314fefc93a8a179956b7580e973a0bb60ae6db1 Mon Sep 17 00:00:00 2001 From: Christian Schlittchen Date: Sun, 10 Mar 2002 15:43:00 +0000 Subject: [PATCH] - Lehren gefixt --- src/common/gamecode/study.c | 5 +++-- src/mapper/map_partei.c | 7 +++++-- src/mapper/mapper.h | 2 +- 3 files changed, 9 insertions(+), 5 deletions(-) diff --git a/src/common/gamecode/study.c b/src/common/gamecode/study.c index d1c8093b4..4a9196a77 100644 --- a/src/common/gamecode/study.c +++ b/src/common/gamecode/study.c @@ -304,7 +304,7 @@ teach(region * r, unit * u) if (igetkeyword(student->thisorder, student->faction->locale) == K_STUDY) { /* Input ist nun von student->thisorder !! */ sk = getskill(student->faction->locale); - if (sk != NOSKILL && eff_skill(u, sk, r) >= eff_skill(student, sk, r)+TEACHDIFFERENCE) { + if (sk != NOSKILL && eff_skill(u, sk, r)-TEACHDIFFERENCE >= eff_skill(student, sk, r)) { teaching -= teach_unit(u, student, teaching, sk, true, &academy); } } @@ -402,7 +402,8 @@ teach(region * r, unit * u) msg_error(u, u->thisorder, "teach_nolearn", "student", u2)); continue; } - if (eff_skill(u2, sk, r) + TEACHDIFFERENCE >= eff_skill(u, sk, r)) { + /* u is teacher, u2 is student */ + if (eff_skill(u2, sk, r) >= eff_skill(u, sk, r)-TEACHDIFFERENCE) { add_message(&u->faction->msgs, msg_error(u, u->thisorder, "teach_asgood", "student", u2)); continue; diff --git a/src/mapper/map_partei.c b/src/mapper/map_partei.c index 92e3cdb78..faf26046b 100644 --- a/src/mapper/map_partei.c +++ b/src/mapper/map_partei.c @@ -351,8 +351,11 @@ NeuePartei(region * r) lang = nf->lang; strcpy(email, nf->email); if (late) { - WINDOW *win = openwin(SX - 10, 2, "< Neue Partei einfügen >"); - late = (int) map_input(win, 2, 1, "Startbonus", -1, 99, 0); + WINDOW *win = openwin(SX - 10, 3, "< Neue Partei einfügen >"); + if(r->age >= 5) + late = (int) map_input(win, 2, 1, "Startbonus", -1, 99, r->age/2); + else + late = (int) map_input(win, 2, 1, "Startbonus", -1, 99, 0); delwin(win); } } else { diff --git a/src/mapper/mapper.h b/src/mapper/mapper.h index 178aa673a..6a4afa8a9 100644 --- a/src/mapper/mapper.h +++ b/src/mapper/mapper.h @@ -134,7 +134,7 @@ void insert_selection(struct selection ** p_sel, struct selection * prev, char * extern void read_newfactions(const char * filename); extern void read_orders(const char * filename); extern void read_dropouts(const char *filename); -extern void seed_dropouts(); +extern void seed_dropouts(void); #define sncat(b, s, size) strncat ((b), s, size - strlen (b))