- Armbruständerung (#define CHANGED_CROSSBOWS 1)

This commit is contained in:
Christian Schlittchen 2002-04-27 14:46:27 +00:00
parent 059427e309
commit 4e98600738
8 changed files with 47 additions and 22 deletions

View File

@ -84,11 +84,12 @@ enum {
RL_NONE
};
/* Schadenstypen */
/* damage types */
#define CUT (1<<0)
#define PIERCE (1<<1)
#define BASH (1<<2)
#define CUT (1<<0)
#define PIERCE (1<<1)
#define BASH (1<<2)
#define ARMORPIERCING (1<<3)
typedef struct weapondata {
double magres;
@ -124,7 +125,11 @@ static weapondata weapontable[WP_MAX + 1] =
/* Langbogen */
{0.00, "1d11+1", "1d11+1", I_LONGBOW, SK_LONGBOW, 0, 0, true, false, { RL_NONE, 0 }, PIERCE },
/* Armbrust */
#if CHANGED_CROSSBOWS == 1
{0.00, "3d3+5", "3d3+5", I_CROSSBOW, SK_CROSSBOW, 0, 0, true, false, { RL_CROSSBOW, 2 }, PIERCE | ARMORPIERCING },
#else
{0.00, "3d3+5", "3d3+5", I_CROSSBOW, SK_CROSSBOW, 0, 0, true, false, { RL_CROSSBOW, 1 }, PIERCE },
#endif
/* Speer */
{0.00, "1d10+0", "1d12+2", I_SPEAR, SK_SPEAR, 0, 0, false, false, { RL_NONE, 0}, PIERCE },
/* Zweihänder */
@ -304,6 +309,7 @@ init_oldweapons(void)
if (weapontable[w].damage_type & CUT) wflags |= WTF_CUT;
if (weapontable[w].damage_type & PIERCE) wflags |= WTF_PIERCE;
if (weapontable[w].damage_type & BASH) wflags |= WTF_BLUNT;
if (weapontable[w].damage_type & ARMORPIERCING) wflags |= WTF_ARMORPIERCING;
damage[0] = weapontable[w].damfoot;
damage[1] = weapontable[w].damhorse;

View File

@ -1000,15 +1000,20 @@ terminate(troop dt, troop at, int type, const char *damage, boolean missile)
int ar, an, am;
int armor = select_armor(dt);
int shield = select_shield(dt);
int da = dice_rand(damage);
int rda, sk = 0, sd;
boolean magic = false;
const weapon_type *dwtype = NULL;
const weapon_type *awtype = NULL;
const weapon * weapon;
int rda, sk = 0, sd;
boolean magic = false;
int da = dice_rand(damage);
if(fval(au, UFL_WERE)) {
int level = fspecial(du->faction, FS_LYCANTROPE);
da += level;
}
switch (type) {
case AT_STANDARD:
weapon = select_weapon(at, true, true);
@ -1030,20 +1035,28 @@ 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;
/* Magischer Schaden durch Sprüche oder magische Waffen? */
ar = armordata[armor].prot;
ar += armordata[shield].prot;
/* natürliche Rüstung */
an = du->race->armor;
if(fval(du, UFL_WERE)) {
int level = fspecial(du->faction, FS_LYCANTROPE);
an += level;
da += level;
}
/* magische Rüstung durch Artefakte oder Sprüche */
/* Momentan nur Trollgürtel */
/* Momentan nur Trollgürtel und Werwolf-Eigenschaft */
am = select_magicarmor(dt);
if(fval(du, UFL_WERE)) {
/* this counts as magical armor */
int level = fspecial(du->faction, FS_LYCANTROPE);
am += level;
}
#if CHANGED_CROSSBOWS == 1
if(fval(awtype,ARMORPIERCING)) {
/* crossbows */
ar /= 2;
an /= 2;
}
#endif
/* natürliche Rüstung ist halbkumulativ */
if (ar>0) {

View File

@ -181,6 +181,7 @@ typedef struct weapon_mod {
#define WTF_CUT 0x08
#define WTF_BLUNT 0x10
#define WTF_BOW 0x20 /* elves like 'em */
#define WTF_ARMORPIERCING 0x40 /* armor has only half value */
typedef struct weapon_type {
const item_type * itype;

View File

@ -35,4 +35,5 @@
#define RESOURCE_QUANTITY 1.0
#define RECRUITFRACTION 5
#define CATAPULT_AMMUNITION 0 /* Gebaut werden kann sie auch mit 0! */
#define CHANGED_CROSSBOWS 0

View File

@ -30,9 +30,10 @@
#define SKILLPOINTS 0
#define NEW_MIGRATION 1
#define PEASANTS_DO_NOT_STARVE 0
#define GUARD_DISABLES_RECRUIT 1
#define GUARD_DISABLES_PRODUCTION 1
#define RESOURCE_QUANTITY 0.5
#define RECRUITFRACTION 5
#define CATAPULT_AMMUNITION 1
#define GUARD_DISABLES_RECRUIT 0
#define GUARD_DISABLES_PRODUCTION 0
#define RESOURCE_QUANTITY 1.0
#define RECRUITFRACTION 10
#define CATAPULT_AMMUNITION 0
#define CHANGED_CROSSBOWS 0

View File

@ -33,4 +33,5 @@
#define RESOURCE_QUANTITY 1.0
#define RECRUITFRACTION 20
#define CATAPULT_AMMUNITION 0
#define CHANGED_CROSSBOWS 0

View File

@ -35,6 +35,7 @@
#define RESOURCE_QUANTITY 1.0
#define RECRUITFRACTION 5
#define CATAPULT_AMMUNITION 1
#define CHANGED_CROSSBOWS 0
#define VICTORY_CONDITION VICTORY_MURDER
#define VICTORY_DELAY 4

View File

@ -33,4 +33,5 @@
#define RESOURCE_QUANTITY 1.0
#define RECRUITFRACTION 20
#define CATAPULT_AMMUNITION 0
#define CHANGED_CROSSBOWS 0