- gib bauern verboten
- lernt nur bis T8 (+/-)
This commit is contained in:
Katja Zedel 2002-02-10 17:23:00 +00:00
parent 0a0474df52
commit 94b2f4f2de
10 changed files with 83 additions and 52 deletions

View File

@ -546,7 +546,7 @@ givemen(int n, unit * u, unit * u2, const char * cmd)
} else if (u == u2) { } else if (u == u2) {
error = 10; error = 10;
#if RACE_ADJUSTMENTS #if RACE_ADJUSTMENTS
} else if (u->race == new_race[RC_URUK]) { } else if (u->race == new_race[RC_URUK] || u->race == new_race[RC_SNOT]) {
/* Uruks/Snotlings können nicht an Bauern übergeben werden. */ /* Uruks/Snotlings können nicht an Bauern übergeben werden. */
error = 307; error = 307;
#endif #endif

View File

@ -132,11 +132,6 @@ teach_unit(unit * teacher, unit * student, int teaching, skill_t sk, boolean rep
{ {
attrib * a; attrib * a;
int n; int n;
#ifdef RANDOMIZED_LEARNING
#ifdef SKILLMODIFIESLEARNING
int smod, lmod, learning;
#endif
#endif
/* learning sind die Tage, die sie schon durch andere Lehrer zugute /* learning sind die Tage, die sie schon durch andere Lehrer zugute
* geschrieben bekommen haben. Total darf dies nicht über 30 Tage pro Mann * geschrieben bekommen haben. Total darf dies nicht über 30 Tage pro Mann
@ -150,23 +145,7 @@ teach_unit(unit * teacher, unit * student, int teaching, skill_t sk, boolean rep
return 0; return 0;
} }
#ifdef RANDOMIZED_LEARNING
#ifdef SKILLMODIFIESLEARNING
smod = rc_skillmod(student->race, student->region, sk);
lmod = 5 * smod;
if(smod < 0) {
lmod -= 5;
} else if(smod > 0) {
lmod += 5;
}
learning = max(0, 30 + lmod);
n = student->number * dice(2, learning);
#else
n = student->number * dice(2,30);
#endif
#else
n = student->number * 30; n = student->number * 30;
#endif
a = a_find(student->attribs, &at_learning); a = a_find(student->attribs, &at_learning);
if (a!=NULL) n -= a->data.i; if (a!=NULL) n -= a->data.i;
@ -193,7 +172,13 @@ teach_unit(unit * teacher, unit * student, int teaching, skill_t sk, boolean rep
/* Jeder Schüler zusätzlich +10 Tage wenn in Uni. */ /* Jeder Schüler zusätzlich +10 Tage wenn in Uni. */
a->data.i += (n / 30) * 10; /* learning erhöhen */ a->data.i += (n / 30) * 10; /* learning erhöhen */
/* Lehrer zusätzlich +1 Tag pro Schüler. */ /* Lehrer zusätzlich +1 Tag pro Schüler. */
set_skill(teacher, sk, get_skill(teacher, sk) + (n / 30)); #if SKILLPOINTS
change_skill(teacher, sk, n / 30);
#else
if (learn_skill(teacher, sk, n / 30)) {
change_skill(teacher, sk, teacher->number);
}
#endif
} /* sonst nehmen sie nicht am Unterricht teil */ } /* sonst nehmen sie nicht am Unterricht teil */
} }
/* Teaching ist die Anzahl Leute, denen man noch was beibringen kann. Da /* Teaching ist die Anzahl Leute, denen man noch was beibringen kann. Da
@ -310,7 +295,7 @@ teach(region * r, unit * u)
if (igetkeyword(student->thisorder, student->faction->locale) == K_STUDY) { if (igetkeyword(student->thisorder, student->faction->locale) == K_STUDY) {
/* Input ist nun von student->thisorder !! */ /* Input ist nun von student->thisorder !! */
sk = getskill(student->faction->locale); sk = getskill(student->faction->locale);
if (sk != NOSKILL && eff_skill(u, sk, r) > eff_skill(student, sk, r)) { if (sk != NOSKILL && eff_skill(u, sk, r) >= eff_skill(student, sk, r)+TEACHDIFFERENCE) {
teaching -= teach_unit(u, student, teaching, sk, true); teaching -= teach_unit(u, student, teaching, sk, true);
} }
} }
@ -445,11 +430,6 @@ learn(void)
int i, l; int i, l;
int warrior_skill; int warrior_skill;
int studycost; int studycost;
#ifdef RANDOMIZED_LEARNING
#ifdef SKILLMODIFIESLEARNING
int smod, lmod, learning;
#endif
#endif
/* lernen nach lehren */ /* lernen nach lehren */
@ -493,6 +473,13 @@ learn(void)
cmistake(u, findorder(u, u->thisorder), 77, MSG_EVENT); cmistake(u, findorder(u, u->thisorder), 77, MSG_EVENT);
continue; continue;
} }
/* snotlings können Talente nur bis T8 lernen */
if (u->race == new_race[RC_SNOT]){
if (get_level(u, i) >= 8){
cmistake(u, findorder(u, u->thisorder), 308, MSG_EVENT);
continue;
}
}
p = studycost = study_cost(u,i); p = studycost = study_cost(u,i);
a = a_find(u->attribs, &at_learning); a = a_find(u->attribs, &at_learning);
@ -657,25 +644,15 @@ learn(void)
} }
#endif #endif
#ifdef RANDOMIZED_LEARNING
#ifdef SKILLMODIFIESLEARNING
smod = rc_skillmod(u->race, u->region, (skill_t)i);
lmod = 5 * smod;
if(smod < 0) {
lmod -= 5;
} else if(smod > 0) {
lmod += 5;
}
learning = max(0, 30 + lmod);
days = (int)((u->number * dice(2, learning) + a->data.i) * multi);
#else
days = (int)((u->number * dice(2, 30) + a->data.i) * multi);
#endif
#else
days = (int)((u->number * 30 + a->data.i) * multi); days = (int)((u->number * 30 + a->data.i) * multi);
#endif
if (fval(u, FL_HUNGER)) days = days / 2; if (fval(u, FL_HUNGER)) days = days / 2;
#if SKILLPOINTS
change_skill(u, (skill_t)i, days); change_skill(u, (skill_t)i, days);
#else
if (learn_skill(u, (skill_t)i, days)) {
change_skill(u, (skill_t)i, u->number);
}
#endif
if (a) { if (a) {
a_remove(&u->attribs, a); a_remove(&u->attribs, a);
a = NULL; a = NULL;

View File

@ -2764,8 +2764,7 @@ wage(const region *r, const unit *u, boolean img)
if (b) esize = buildingeffsize(b, img); if (b) esize = buildingeffsize(b, img);
if (u) { if (u) {
/* TODO: Snotling! */ wage = wagetable[esize][u->race == new_race[RC_ORC] || u->race == new_race[RC_SNOT] || u->race == new_race[RC_URUK]];
wage = wagetable[esize][u->race == new_race[RC_ORC] || u->race == new_race[RC_URUK]];
if (fspecial(u->faction, FS_URBAN)) { if (fspecial(u->faction, FS_URBAN)) {
wage += wagetable[esize][3]; wage += wagetable[esize][3];
} }

View File

@ -617,6 +617,7 @@ enum {
RC_CAT, RC_CAT,
RC_AQUARIAN, RC_AQUARIAN,
RC_URUK, RC_URUK,
RC_SNOT,
RC_UNDEAD, /* 12 - Untoter */ RC_UNDEAD, /* 12 - Untoter */
RC_ILLUSION, RC_ILLUSION,

View File

@ -155,7 +155,7 @@ const struct race_syn race_synonyms[] = {
/* required for old_race, do not change order! */ /* required for old_race, do not change order! */
static const char * oldracenames[MAXRACES] = { static const char * oldracenames[MAXRACES] = {
"dwarf", "elf", "orc", "goblin", "human", "troll", "demon", "insect", "halfling", "cat", "aquarian", "uruk" "dwarf", "elf", "orc", "goblin", "human", "troll", "demon", "insect", "halfling", "cat", "aquarian", "uruk" "snotling"
"undead", "illusion", "undead", "illusion",
"young dragon", "dragon", "wyrm", "ent", "catdragon", "dracoid", "young dragon", "dragon", "wyrm", "ent", "catdragon", "dracoid",
"special", "spell", "special", "spell",

View File

@ -27,4 +27,4 @@
#define SKILLPOINTS 1 #define SKILLPOINTS 1
#define TEACHDIFFERENCE 1 #define TEACHDIFFERENCE 1
#define PEASANT_ADJUSTMENT 0 #define PEASANT_ADJUSTMENT 1

View File

@ -2529,7 +2529,7 @@ heal_all(void)
#if PEASANT_ADJUSTMENT == 1 #if PEASANT_ADJUSTMENT == 1
#define WEIGHT ((double)0.5) #define WEIGHT ((double)0.5)
#define PLWEIGHT ((double)0.75) #define PLWEIGHT ((double)0.80)
static int static int
peasant_adjustment(void) peasant_adjustment(void)
@ -2575,12 +2575,10 @@ peasant_adjustment(void)
if(playerp * PLWEIGHT + rpeasants(r) > soll) { if(playerp * PLWEIGHT + rpeasants(r) > soll) {
p_weg = (int)(min(((playerp * PLWEIGHT) + rpeasants(r)) - soll, rpeasants(r))); p_weg = (int)(min(((playerp * PLWEIGHT) + rpeasants(r)) - soll, rpeasants(r)));
assert(p_weg >= 0); assert(p_weg >= 0);
/*
if (p_weg > 0){ if (p_weg > 0){
log_printf("BAUERN: war %d, minus %d, playerp %d\n", log_printf("BAUERN: war %d, minus %d, playerp %d\n",
rpeasants(r), p_weg, playerp); rpeasants(r), p_weg, playerp);
} }
*/
pool += p_weg; pool += p_weg;
rsetpeasants(r, rpeasants(r) - p_weg); rsetpeasants(r, rpeasants(r) - p_weg);
assert(rpeasants(r) >= 0); assert(rpeasants(r) >= 0);

View File

@ -4313,6 +4313,19 @@
</locale> </locale>
</message> </message>
<message name="error308">
<type>
<arg name="unit" type="unit"></arg>
<arg name="region" type="region"></arg>
<arg name="command" type="string"></arg>
</type>
<locale name="de">
<nr section="errors">
<text>"$unit($unit) in $region($region): '$command' - Dieses Talent kann nicht höher gelernt werden."</text>
</nr>
</locale>
</message>
<message name="drown_on_ship"> <message name="drown_on_ship">
<type> <type>
<arg name="unit" type="unit"></arg> <arg name="unit" type="unit"></arg>

View File

@ -2781,6 +2781,19 @@
</locale> </locale>
</message> </message>
<message name="error308">
<type>
<arg name="unit" type="unit"></arg>
<arg name="region" type="region"></arg>
<arg name="command" type="string"></arg>
</type>
<locale name="de">
<nr section="errors">
<text>"$unit($unit) in $region($region): '$command' - This skill couldn't learned higher."</text>
</nr>
</locale>
</message>
<message name="mistake"> <message name="mistake">
<type> <type>
<arg name="unit" type="unit"></arg> <arg name="unit" type="unit"></arg>

View File

@ -1118,6 +1118,36 @@
<familiar race="rat"></familiar> <familiar race="rat"></familiar>
<familiar race="imp"></familiar> <familiar race="imp"></familiar>
</race> </race>
<race name="snotling" magres="-0.050000" maxaura="1.000000" regaura="1.000000" recruitcost="50" maintenance="10" weight="1000" speed="1.000000" hp="24" ac="0" damage="1d5" unarmedattack="-2" unarmeddefense="-2" attackmodifier="0" defensemodifier="0" playerrace walk giveitem giveperson giveunit getitem equipment>
<ai splitsize="10000" attackrandom moverandom learn></ai>
<skill name="sk_alchemy" modifier="1"></skill>
<skill name="sk_mining" modifier="1"></skill>
<skill name="sk_building" modifier="1"></skill>
<skill name="sk_trade" modifier="-3"></skill>
<skill name="sk_forestry" modifier="1"></skill>
<skill name="sk_herbalism" modifier="-2"></skill>
<skill name="sk_magic" modifier="-1"></skill>
<skill name="sk_training" modifier="-1"></skill>
<skill name="sk_armorer" modifier="1"></skill>
<skill name="sk_shipcraft" modifier="-1"></skill>
<skill name="sk_sailing" modifier="-1"></skill>
<skill name="sk_espionage" modifier="-1"></skill>
<skill name="sk_quarrying" modifier="1"></skill>
<skill name="sk_tactics" modifier="1"></skill>
<skill name="sk_entertainment" modifier="-2"></skill>
<skill name="sk_weaponsmithing" modifier="2"></skill>
<skill name="sk_cartmaking" modifier="-1"></skill>
<skill name="sk_taxation" modifier="1"></skill>
<skill name="sk_unarmed" modifier="-99"></skill>
<attack type="1" damage="1d5"></attack>
<familiar race="goblin" default></familiar>
<familiar race="ghost"></familiar>
<familiar race="imp"></familiar>
<familiar race="rat"></familiar>
<familiar race="wolf"></familiar>
<familiar race="demon"></familiar>
</race>
<race name="orc" magres="-0.050000" maxaura="1.000000" regaura="1.000000" recruitcost="50" maintenance="10" weight="1000" speed="1.000000" hp="24" ac="0" damage="1d5" unarmedattack="-2" unarmeddefense="-2" attackmodifier="0" defensemodifier="0" playerrace walk giveitem giveperson giveunit getitem equipment> <race name="orc" magres="-0.050000" maxaura="1.000000" regaura="1.000000" recruitcost="50" maintenance="10" weight="1000" speed="1.000000" hp="24" ac="0" damage="1d5" unarmedattack="-2" unarmeddefense="-2" attackmodifier="0" defensemodifier="0" playerrace walk giveitem giveperson giveunit getitem equipment>
<ai splitsize="10000" attackrandom moverandom learn></ai> <ai splitsize="10000" attackrandom moverandom learn></ai>
<skill name="sk_alchemy" modifier="1"></skill> <skill name="sk_alchemy" modifier="1"></skill>