- three tier guardhouse

- new new cavalry rule
This commit is contained in:
Enno Rehling 2009-06-18 22:26:26 +00:00
parent 67a1e18723
commit 5fb1a39f13
6 changed files with 26 additions and 23 deletions

View File

@ -606,6 +606,7 @@ cr_output_ship(FILE * F, const ship * sh, const unit * u, int fcaptain, const fa
fprintf(F, "%d;cargo\n", n);
fprintf(F, "%d;capacity\n", c);
fprintf(F, "%d;speed\n", shipspeed(sh, u));
n = (n+99) / 100; /* 1 Silber = 1 GE */
fprintf(F, "%d;Ladung\n", n);

View File

@ -718,8 +718,10 @@ static int CavalrySkill(void)
return skill;
}
#define BONUS_SKILL 1
#define BONUS_DAMAGE 2
static int
CavalryBonus(const unit * u, troop enemy)
CavalryBonus(const unit * u, troop enemy, int type)
{
static int mode = -1;
@ -728,15 +730,15 @@ CavalryBonus(const unit * u, troop enemy)
}
if (mode==0) {
/* old rule, Eressea 1.0 compat */
return 2;
return (type==BONUS_SKILL)?2:0;
} else {
/* new rule, chargers in Eressea 1.1 */
int skl = effskill(u, SK_RIDING);
/* only half against trolls */
if (enemy.fighter->unit->race==new_race[RC_TROLL]) {
skl = (skl-2)*3/4;
skl = skl/4;
} else {
skl = (skl-2)*3/2;
skl = skl/2;
}
return MAX(skl, 0);
}
@ -790,7 +792,7 @@ weapon_effskill(troop t, troop enemy, const weapon * w, boolean attacking, boole
/* Burgenbonus, Pferdebonus */
if (is_riding(t) && (wtype==NULL || (fval(wtype, WTF_HORSEBONUS) && !fval(wtype, WTF_MISSILE)))) {
skill += CavalryBonus(tu, enemy);
skill += CavalryBonus(tu, enemy, BONUS_SKILL);
if (wtype) skill = skillmod(urace(tu)->attribs, tu, tu->region, wtype->skill, skill, SMF_RIDING);
}
@ -1118,6 +1120,10 @@ terminate(troop dt, troop at, int type, const char *damage, boolean missile)
sd = weapon_effskill(dt, at, weapon, false, false);
if (weapon!=NULL) dwtype=weapon->type;
if (is_riding(at) && (awtype==NULL || (fval(awtype, WTF_HORSEBONUS) && !fval(awtype, WTF_MISSILE)))) {
da += CavalryBonus(au, dt, BONUS_DAMAGE);
}
if (armor) {
ar += armor->prot;
if (armor->projectile>0 && chance(armor->projectile)) {

View File

@ -230,18 +230,6 @@ findbuilding(int i)
/* ** old building types ** */
/** Building: Fortification */
enum {
B_SITE,
B_TRADEPOST,
B_FORTIFICATION,
B_TOWER,
B_CASTLE,
B_FORTRESS,
B_CITADEL,
MAXBUILDINGS
};
static int
sm_smithy(const unit * u, const region * r, skill_t sk, int value) /* skillmod */
{
@ -266,7 +254,7 @@ init_smithy(struct building_type * bt)
static const char *
castle_name(const struct building_type* btype, int bsize)
{
const char * fname[MAXBUILDINGS] = {
const char * fname[] = {
"site",
"tradepost",
"fortification",
@ -290,7 +278,8 @@ castle_name(const struct building_type* btype, int bsize)
static const char *
fort_name(const struct building_type* btype, int bsize)
{
const char * fname[MAXBUILDINGS] = {
const char * fname[] = {
"scaffolding",
"guardhouse",
"guardtower",
};

View File

@ -134,7 +134,7 @@
<param name="rules.combat.demon_vampire" value="5"/> <!-- regen 1 hp per X points of damage done -->
<param name="rules.combat.skill_bonus" value="0"/>
<param name="rules.combat.loot" value="3"/> <!-- only self + monsters -->
<param name="rules.cavalry.skill" value="4"/>
<param name="rules.cavalry.skill" value="2"/>
<param name="rules.cavalry.mode" value="1"/>
<param name="rules.magic.factionlist" value="1"/>
<param name="rules.magic.common" value="tybied"/> <!-- tybied spells can be cast by anyone -->

View File

@ -5,7 +5,10 @@
<construction skill="building" minskill="1" maxsize="4" reqsize="1">
<requirement type="log" quantity="1"/>
</construction>
<construction skill="building" minskill="1" maxsize="10" reqsize="1">
<construction skill="building" minskill="2" maxsize="9" reqsize="1">
<requirement type="log" quantity="1"/>
</construction>
<construction skill="building" minskill="2" maxsize="10" reqsize="1">
<requirement type="log" quantity="1"/>
</construction>
</building>

View File

@ -21,6 +21,10 @@
<text locale="en">repeating crossbows</text>
</string>
<string name="scaffolding">
<text locale="de">Gerüst</text>
<text locale="en">scaffolding</text>
</string>
<string name="guardhouse">
<text locale="de">Wachstube</text>
<text locale="en">guard house</text>