forked from github/server
academy changes light: teacher does not need to be in an academy
This commit is contained in:
parent
573404e390
commit
513e448976
|
@ -17,12 +17,6 @@ void academy_teaching_bonus(struct unit *u, skill_t sk, int students) {
|
|||
|
||||
bool academy_can_teach(unit *teacher, unit *scholar, skill_t sk) {
|
||||
const struct building_type *btype = bt_find("academy");
|
||||
if (active_building(teacher, btype) && active_building(scholar, btype)) {
|
||||
int j = study_cost(scholar, sk) * 2;
|
||||
if (j < 50) j = 50;
|
||||
/* kann Einheit das zahlen? */
|
||||
return get_pooled(scholar, get_resourcetype(R_SILVER), GET_DEFAULT, j) >= j;
|
||||
/* sonst nehmen sie nicht am Unterricht teil */
|
||||
}
|
||||
return false;
|
||||
return (active_building(scholar, btype));
|
||||
}
|
||||
|
||||
|
|
|
@ -41,10 +41,6 @@ static void test_academy(CuTest * tc)
|
|||
CuAssert(tc, "building must have capacity", !academy_can_teach(u, u2, SK_CROSSBOW));
|
||||
b->size = 2;
|
||||
CuAssertTrue(tc, academy_can_teach(u, u2, SK_CROSSBOW));
|
||||
|
||||
CuAssert(tc, "student must pay skillcost", !academy_can_teach(u, u2, SK_ALCHEMY));
|
||||
i_change(&u2->items, it_silver, 150);
|
||||
CuAssertTrue(tc, academy_can_teach(u, u2, SK_ALCHEMY));
|
||||
test_teardown();
|
||||
}
|
||||
|
||||
|
|
|
@ -201,7 +201,7 @@ teach_unit(unit * teacher, unit * scholar, int nteaching, skill_t sk,
|
|||
teach->days += students * STUDYDAYS;
|
||||
teach->students += students;
|
||||
|
||||
if (scholar->building && teacher->building == scholar->building) {
|
||||
if (scholar->building) {
|
||||
/* Solange Akademien groessenbeschraenkt sind, sollte Lehrer und
|
||||
* Student auch in unterschiedlichen Gebaeuden stehen duerfen */
|
||||
/* FIXME comment contradicts implementation */
|
||||
|
|
Loading…
Reference in New Issue