forked from github/server
- three tier guardhouse
- new new cavalry rule
This commit is contained in:
parent
67a1e18723
commit
5fb1a39f13
6 changed files with 26 additions and 23 deletions
|
@ -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;cargo\n", n);
|
||||||
fprintf(F, "%d;capacity\n", c);
|
fprintf(F, "%d;capacity\n", c);
|
||||||
|
fprintf(F, "%d;speed\n", shipspeed(sh, u));
|
||||||
|
|
||||||
n = (n+99) / 100; /* 1 Silber = 1 GE */
|
n = (n+99) / 100; /* 1 Silber = 1 GE */
|
||||||
fprintf(F, "%d;Ladung\n", n);
|
fprintf(F, "%d;Ladung\n", n);
|
||||||
|
|
|
@ -718,8 +718,10 @@ static int CavalrySkill(void)
|
||||||
return skill;
|
return skill;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#define BONUS_SKILL 1
|
||||||
|
#define BONUS_DAMAGE 2
|
||||||
static int
|
static int
|
||||||
CavalryBonus(const unit * u, troop enemy)
|
CavalryBonus(const unit * u, troop enemy, int type)
|
||||||
{
|
{
|
||||||
static int mode = -1;
|
static int mode = -1;
|
||||||
|
|
||||||
|
@ -728,15 +730,15 @@ CavalryBonus(const unit * u, troop enemy)
|
||||||
}
|
}
|
||||||
if (mode==0) {
|
if (mode==0) {
|
||||||
/* old rule, Eressea 1.0 compat */
|
/* old rule, Eressea 1.0 compat */
|
||||||
return 2;
|
return (type==BONUS_SKILL)?2:0;
|
||||||
} else {
|
} else {
|
||||||
/* new rule, chargers in Eressea 1.1 */
|
/* new rule, chargers in Eressea 1.1 */
|
||||||
int skl = effskill(u, SK_RIDING);
|
int skl = effskill(u, SK_RIDING);
|
||||||
/* only half against trolls */
|
/* only half against trolls */
|
||||||
if (enemy.fighter->unit->race==new_race[RC_TROLL]) {
|
if (enemy.fighter->unit->race==new_race[RC_TROLL]) {
|
||||||
skl = (skl-2)*3/4;
|
skl = skl/4;
|
||||||
} else {
|
} else {
|
||||||
skl = (skl-2)*3/2;
|
skl = skl/2;
|
||||||
}
|
}
|
||||||
return MAX(skl, 0);
|
return MAX(skl, 0);
|
||||||
}
|
}
|
||||||
|
@ -790,7 +792,7 @@ weapon_effskill(troop t, troop enemy, const weapon * w, boolean attacking, boole
|
||||||
|
|
||||||
/* Burgenbonus, Pferdebonus */
|
/* Burgenbonus, Pferdebonus */
|
||||||
if (is_riding(t) && (wtype==NULL || (fval(wtype, WTF_HORSEBONUS) && !fval(wtype, WTF_MISSILE)))) {
|
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);
|
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);
|
sd = weapon_effskill(dt, at, weapon, false, false);
|
||||||
if (weapon!=NULL) dwtype=weapon->type;
|
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) {
|
if (armor) {
|
||||||
ar += armor->prot;
|
ar += armor->prot;
|
||||||
if (armor->projectile>0 && chance(armor->projectile)) {
|
if (armor->projectile>0 && chance(armor->projectile)) {
|
||||||
|
|
|
@ -230,18 +230,6 @@ findbuilding(int i)
|
||||||
/* ** old building types ** */
|
/* ** old building types ** */
|
||||||
|
|
||||||
|
|
||||||
/** Building: Fortification */
|
|
||||||
enum {
|
|
||||||
B_SITE,
|
|
||||||
B_TRADEPOST,
|
|
||||||
B_FORTIFICATION,
|
|
||||||
B_TOWER,
|
|
||||||
B_CASTLE,
|
|
||||||
B_FORTRESS,
|
|
||||||
B_CITADEL,
|
|
||||||
MAXBUILDINGS
|
|
||||||
};
|
|
||||||
|
|
||||||
static int
|
static int
|
||||||
sm_smithy(const unit * u, const region * r, skill_t sk, int value) /* skillmod */
|
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 *
|
static const char *
|
||||||
castle_name(const struct building_type* btype, int bsize)
|
castle_name(const struct building_type* btype, int bsize)
|
||||||
{
|
{
|
||||||
const char * fname[MAXBUILDINGS] = {
|
const char * fname[] = {
|
||||||
"site",
|
"site",
|
||||||
"tradepost",
|
"tradepost",
|
||||||
"fortification",
|
"fortification",
|
||||||
|
@ -290,7 +278,8 @@ castle_name(const struct building_type* btype, int bsize)
|
||||||
static const char *
|
static const char *
|
||||||
fort_name(const struct building_type* btype, int bsize)
|
fort_name(const struct building_type* btype, int bsize)
|
||||||
{
|
{
|
||||||
const char * fname[MAXBUILDINGS] = {
|
const char * fname[] = {
|
||||||
|
"scaffolding",
|
||||||
"guardhouse",
|
"guardhouse",
|
||||||
"guardtower",
|
"guardtower",
|
||||||
};
|
};
|
||||||
|
|
|
@ -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.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.skill_bonus" value="0"/>
|
||||||
<param name="rules.combat.loot" value="3"/> <!-- only self + monsters -->
|
<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.cavalry.mode" value="1"/>
|
||||||
<param name="rules.magic.factionlist" value="1"/>
|
<param name="rules.magic.factionlist" value="1"/>
|
||||||
<param name="rules.magic.common" value="tybied"/> <!-- tybied spells can be cast by anyone -->
|
<param name="rules.magic.common" value="tybied"/> <!-- tybied spells can be cast by anyone -->
|
||||||
|
|
|
@ -5,7 +5,10 @@
|
||||||
<construction skill="building" minskill="1" maxsize="4" reqsize="1">
|
<construction skill="building" minskill="1" maxsize="4" reqsize="1">
|
||||||
<requirement type="log" quantity="1"/>
|
<requirement type="log" quantity="1"/>
|
||||||
</construction>
|
</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"/>
|
<requirement type="log" quantity="1"/>
|
||||||
</construction>
|
</construction>
|
||||||
</building>
|
</building>
|
||||||
|
|
|
@ -21,6 +21,10 @@
|
||||||
<text locale="en">repeating crossbows</text>
|
<text locale="en">repeating crossbows</text>
|
||||||
</string>
|
</string>
|
||||||
|
|
||||||
|
<string name="scaffolding">
|
||||||
|
<text locale="de">Gerüst</text>
|
||||||
|
<text locale="en">scaffolding</text>
|
||||||
|
</string>
|
||||||
<string name="guardhouse">
|
<string name="guardhouse">
|
||||||
<text locale="de">Wachstube</text>
|
<text locale="de">Wachstube</text>
|
||||||
<text locale="en">guard house</text>
|
<text locale="en">guard house</text>
|
||||||
|
|
Loading…
Reference in a new issue