forked from github/server
- neue Lerntage-Regel
- Dämonenhunger (Bauernhunger = kein Schaden) - Keine Schilde mit Bihändern
This commit is contained in:
parent
ad9dc82cfd
commit
a5a0b6d46c
15 changed files with 93 additions and 26 deletions
|
@ -309,14 +309,23 @@ get_food(region *r)
|
|||
peasantfood = 0;
|
||||
}
|
||||
if (hungry > 0) {
|
||||
/* nicht gefütterte dämonen hungern */
|
||||
static int demon_hunger = -1;
|
||||
if (demon_hunger<0) {
|
||||
demon_hunger = get_param_int(global.parameters, "hunger.demons", 0);
|
||||
}
|
||||
if (demon_hunger==0) {
|
||||
/* nicht gefütterte dämonen hungern */
|
||||
#ifdef PEASANT_HUNGRY_DAEMONS_HAVE_FULL_SKILLS
|
||||
/* wdw special rule */
|
||||
hunger(hungry, u);
|
||||
/* wdw special rule */
|
||||
hunger(hungry, u);
|
||||
#else
|
||||
if (hunger(hungry, u)) fset(u, UFL_HUNGER);
|
||||
if (hunger(hungry, u)) fset(u, UFL_HUNGER);
|
||||
#endif
|
||||
/* used to be: hunger(hungry, u); */
|
||||
} else {
|
||||
/* no damage, but set the hungry-flag */
|
||||
fset(u, UFL_HUNGER);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -457,8 +457,28 @@ teach_cmd(unit * u, struct order * ord)
|
|||
}
|
||||
return 0;
|
||||
}
|
||||
/* ------------------------------------------------------------- */
|
||||
|
||||
static double
|
||||
study_speedup(unit * u)
|
||||
{
|
||||
static int rule = -1;
|
||||
if (rule<0) {
|
||||
rule = get_param_int(global.parameters, "study.speedup", 0);
|
||||
}
|
||||
if (rule==1) {
|
||||
double age = 0;
|
||||
int i;
|
||||
for (i=0;i!=u->skill_size;++i) {
|
||||
skill * sv = u->skills+i;
|
||||
double time = sv->level*(sv->level+1)/2.0;
|
||||
age += time;
|
||||
}
|
||||
if (age < turn) {
|
||||
return 2.0-age/turn;
|
||||
}
|
||||
}
|
||||
return 1.0;
|
||||
}
|
||||
int
|
||||
learn_cmd(unit * u, order * ord)
|
||||
{
|
||||
|
@ -674,6 +694,8 @@ learn_cmd(unit * u, order * ord)
|
|||
teach->value -= u->number * 10;
|
||||
}
|
||||
|
||||
multi *= study_speedup(u);
|
||||
|
||||
days = (int)((u->number * 30 + teach->value) * multi);
|
||||
|
||||
/* the artacademy currently improves the learning of entertainment
|
||||
|
|
|
@ -1871,7 +1871,7 @@ int
|
|||
hits(troop at, troop dt, weapon * awp)
|
||||
{
|
||||
fighter *af = at.fighter, *df = dt.fighter;
|
||||
const armor_type * armor, * shield;
|
||||
const armor_type * armor, * shield = 0;
|
||||
int skdiff = 0;
|
||||
int dist = get_unitrow(af, df->side) + get_unitrow(df, af->side) - 1;
|
||||
weapon * dwp = select_weapon(dt, false, dist>1);
|
||||
|
@ -1899,7 +1899,9 @@ hits(troop at, troop dt, weapon * awp)
|
|||
skdiff = skilldiff(at, dt, dist);
|
||||
/* Verteidiger bekommt eine Rüstung */
|
||||
armor = select_armor(dt, true);
|
||||
shield = select_armor(dt, false);
|
||||
if (weapon->type->flags & WTF_USESHIELD) {
|
||||
shield = select_armor(dt, false);
|
||||
}
|
||||
if (contest(skdiff, dt, armor, shield)) {
|
||||
if (bdebug) {
|
||||
debug_hit(at, awp, dt, dwp, skdiff, dist, true);
|
||||
|
|
|
@ -197,6 +197,7 @@ typedef struct armor_type {
|
|||
#define WTF_SIEGE 0x20
|
||||
#define WTF_ARMORPIERCING 0x40 /* armor has only half value */
|
||||
#define WTF_HORSEBONUS 0x80
|
||||
#define WTF_USESHIELD 0x100
|
||||
|
||||
typedef struct weapon_type {
|
||||
const item_type * itype;
|
||||
|
|
|
@ -665,6 +665,7 @@ xml_readweapon(xmlXPathContextPtr xpath, item_type * itype)
|
|||
if (xml_bvalue(node, "blunt", false)) flags |= WTF_BLUNT;
|
||||
if (xml_bvalue(node, "siege", false)) flags |= WTF_SIEGE;
|
||||
if (xml_bvalue(node, "horse", (flags&WTF_MISSILE)==0)) flags |= WTF_HORSEBONUS;
|
||||
if (xml_bvalue(node, "useshield", true)) flags |= WTF_USESHIELD;
|
||||
|
||||
propValue = xmlGetProp(node, BAD_CAST "skill");
|
||||
assert(propValue!=NULL);
|
||||
|
|
|
@ -10,7 +10,7 @@
|
|||
<xi:include href="common/armor.xml" />
|
||||
<!-- xi:include href="common/weapons.xml" /-->
|
||||
<xi:include href="common/resources.xml" />
|
||||
<xi:include href="common/luxuries.xml" />
|
||||
<!--xi:include href="common/luxuries.xml" /-->
|
||||
<xi:include href="common/herbs.xml" />
|
||||
<!-- xi:include href="common/potions.xml" /-->
|
||||
<xi:include href="spoils.xml"/>
|
||||
|
@ -23,6 +23,7 @@
|
|||
<xi:include href="dungeons.xml"/>
|
||||
<xi:include href="directions.xml"/>
|
||||
|
||||
<xi:include href="e2k9/luxuries.xml" />
|
||||
<xi:include href="e2k9/weapons.xml" />
|
||||
<xi:include href="e2k9/items.xml" />
|
||||
<xi:include href="e2k9/strings.xml"/>
|
||||
|
@ -119,8 +120,10 @@
|
|||
<param name="hunger.demon.skill" value="1"/>
|
||||
<param name="init_spells" value="0"/>
|
||||
<param name="hunger.damage" value="1d9+9"/>
|
||||
<param name="hunger.demons" value="1"/>
|
||||
<param name="recruit.allow_merge" value="1"/>
|
||||
<param name="study.expensivemigrants" value="1"/>
|
||||
<param name="study.speedup" value="1"/>
|
||||
<param name="rules.check_overload" value="0"/>
|
||||
<param name="rules.alliances" value="1"/>
|
||||
<param name="rules.combat.herospeed" value="3"/>
|
||||
|
|
|
@ -10,4 +10,9 @@
|
|||
<skill name="stamina" level="2"/>
|
||||
</set>
|
||||
|
||||
</equipment>
|
||||
<set name="seaserpent_spoils">
|
||||
<item name="dragonblood" amount="2"/>
|
||||
<item name="seaserpenthead" amount="1"/>
|
||||
</set>
|
||||
|
||||
</equipment>
|
||||
|
|
23
src/res/e2k9/luxuries.xml
Normal file
23
src/res/e2k9/luxuries.xml
Normal file
|
@ -0,0 +1,23 @@
|
|||
<?xml version="1.0"?>
|
||||
<resources>
|
||||
<!-- this file contains luxury items that are part of the trade system -->
|
||||
<resource name="balm">
|
||||
<item weight="200"><luxury price="4"/></item>
|
||||
</resource>
|
||||
<resource name="jewel">
|
||||
<item weight="100"><luxury price="7"/></item>
|
||||
</resource>
|
||||
<resource name="myrrh">
|
||||
<item weight="200"><luxury price="5"/></item>
|
||||
</resource>
|
||||
<resource name="oil">
|
||||
<item weight="300"><luxury price="3"/></item>
|
||||
</resource>
|
||||
<resource name="silk">
|
||||
<item weight="300"><luxury price="6"/></item>
|
||||
</resource>
|
||||
<resource name="incense">
|
||||
<item weight="200"><luxury price="4"/></item>
|
||||
</resource>
|
||||
|
||||
</resources>
|
|
@ -21,7 +21,7 @@
|
|||
<spell name="puttorest" type="illaun" rank="5" level="2" index="168" variable="true">
|
||||
<!-- Seelenfrieden -->
|
||||
<resource name="aura" amount="3" cost="level"/>
|
||||
<resource name="p2" amount="1" cost="fixed"/>
|
||||
<resource name="balm" amount="10" cost="fixed"/>
|
||||
</spell>
|
||||
<spell name="shapeshift" type="illaun" rank="5" level="3" index="93" syntax="race" parameters="uc" variable="true">
|
||||
<!-- Gestaltwandlung -->
|
||||
|
@ -70,7 +70,7 @@
|
|||
<resource name="aura" amount="100" cost="fixed"/>
|
||||
<resource name="permaura" amount="20" cost="fixed"/>
|
||||
<resource name="dragonblood" amount="5" cost="fixed"/>
|
||||
<resource name="p2" amount="5" cost="fixed"/>
|
||||
<resource name="silk" amount="20" cost="fixed"/>
|
||||
</spell>
|
||||
<spell name="bad_dreams" type="illaun" rank="5" level="10" index="11" far="true">
|
||||
<!-- Schlechte Träume -->
|
||||
|
@ -166,7 +166,7 @@
|
|||
<!-- Erschaffe ein Flammenschwert -->
|
||||
<function name="cast" value="lua_castspell"/>
|
||||
<resource name="aura" amount="100" cost="fixed"/>
|
||||
<resource name="p10" amount="1" cost="fixed"/>
|
||||
<resource name="oil" amount="10" cost="fixed"/>
|
||||
<resource name="sword" amount="1" cost="fixed"/>
|
||||
<resource name="permaura" amount="1" cost="fixed"/>
|
||||
</spell>
|
||||
|
@ -289,13 +289,13 @@
|
|||
<!-- Erschaffe Steingolems -->
|
||||
<resource name="aura" amount="2" cost="level"/>
|
||||
<resource name="stone" amount="1" cost="level"/>
|
||||
<resource name="p2" amount="1" cost="fixed"/>
|
||||
<resource name="jewel" amount="10" cost="fixed"/>
|
||||
</spell>
|
||||
<spell name="treegrow" type="gwyrrd" rank="5" level="2" index="8" far="true" variable="true">
|
||||
<!-- Hainzauber -->
|
||||
<resource name="aura" amount="4" cost="level"/>
|
||||
<resource name="log" amount="1" cost="level"/>
|
||||
<resource name="p2" amount="1" cost="fixed"/>
|
||||
<resource name="myrrh" amount="10" cost="fixed"/>
|
||||
</spell>
|
||||
<spell name="hail" type="gwyrrd" rank="5" level="3" index="5" variable="true">
|
||||
<!-- Hagel -->
|
||||
|
@ -436,7 +436,7 @@
|
|||
<resource name="dragonblood" amount="1" cost="fixed"/><!-- Drachenblut -->
|
||||
</spell>
|
||||
|
||||
<spell name="create_roi" type="tybied" ship="true" rank="5" level="6" index="130">
|
||||
<spell name="create_roi" type="tybied" ship="true" rank="5" level="7" index="130">
|
||||
<!-- Erschaffe einen Ring der Unsichtbarkeit -->
|
||||
<function name="cast" value="lua_castspell"/>
|
||||
<resource name="aura" amount="50" cost="fixed"/>
|
||||
|
@ -506,9 +506,10 @@
|
|||
<resource name="aura" amount="1" cost="level"/>
|
||||
</spell>
|
||||
<spell name="irongolem" type="common" rank="4" level="2" index="33" variable="true">
|
||||
<!-- Eisengolem -->
|
||||
<resource name="aura" amount="2" cost="level"/>
|
||||
<resource name="iron" amount="1" cost="level"/>
|
||||
<resource name="p2" amount="1" cost="fixed"/>
|
||||
<resource name="incense" amount="1" cost="fixed"/>
|
||||
</spell>
|
||||
<spell name="reelingarrows" type="common" rank="5" level="5" index="36" variable="true">
|
||||
<!-- Wirbelwind -->
|
||||
|
@ -533,7 +534,7 @@
|
|||
</spell>
|
||||
<spell name="forestfire" type="common" rank="5" level="10" index="47" far="true">
|
||||
<resource name="aura" amount="50" cost="fixed"/>
|
||||
<resource name="oil" amount="1" cost="fixed"/>
|
||||
<resource name="oil" amount="5" cost="fixed"/>
|
||||
</spell>
|
||||
<spell name="disturbingdreams" type="common" rank="5" level="6" index="50" far="true">
|
||||
<resource name="aura" amount="18" cost="fixed"/>
|
||||
|
|
|
@ -374,11 +374,6 @@
|
|||
<item name="dragonhead" amount="1"/>
|
||||
</set>
|
||||
|
||||
<set name="seaserpent_spoils">
|
||||
<item name="dragonblood" amount="6"/>
|
||||
<item name="seaserpenthead" amount="1"/>
|
||||
</set>
|
||||
|
||||
<!-- sets that are used by the monster-spawning code -->
|
||||
<set name="monster_dragon">
|
||||
<skill name="magic" level="4"/>
|
||||
|
|
|
@ -11,4 +11,9 @@
|
|||
<skill name="melee" level="1"/>
|
||||
</set>
|
||||
|
||||
<set name="seaserpent_spoils">
|
||||
<item name="dragonblood" amount="6"/>
|
||||
<item name="seaserpenthead" amount="1"/>
|
||||
</set>
|
||||
|
||||
</equipment>
|
||||
|
|
|
@ -7,7 +7,7 @@
|
|||
<construction skill="weaponsmithing" minskill="4" reqsize="1">
|
||||
<requirement type="iron" quantity="2"/>
|
||||
</construction>
|
||||
<weapon cut="true" skill="melee" offmod="-1" defmod="-2" horse="false">
|
||||
<weapon useshield="false" cut="true" skill="melee" offmod="-1" defmod="-2" horse="false">
|
||||
<damage type="rider" value="2d8+3"/>
|
||||
<damage type="footman" value="2d8+3"/>
|
||||
</weapon>
|
||||
|
|
|
@ -8,7 +8,7 @@
|
|||
<requirement type="log" quantity="2"/>
|
||||
<requirement type="iron" quantity="1"/>
|
||||
</construction>
|
||||
<weapon cut="true" skill="polearm" offmod="-1" defmod="2" magres="0.0" horse="false">
|
||||
<weapon useshield="false" cut="true" skill="polearm" offmod="-1" defmod="2" magres="0.0" horse="false">
|
||||
<damage type="rider" value="2d6+3"/>
|
||||
<damage type="footman" value="2d6+3"/>
|
||||
<modifier type="skill" value="1" walking="true" against_riding="true" defensive="true"/>
|
||||
|
|
|
@ -7,7 +7,7 @@
|
|||
<construction skill="weaponsmithing" minskill="4" reqsize="1">
|
||||
<requirement type="iron" quantity="2"/>
|
||||
</construction>
|
||||
<weapon cut="true" skill="melee" offmod="-2" defmod="-3" horse="false">
|
||||
<weapon useshield="false" cut="true" skill="melee" offmod="-2" defmod="-3" horse="false">
|
||||
<damage type="rider" value="2d8"/>
|
||||
<damage type="footman" value="2d8"/>
|
||||
</weapon>
|
||||
|
|
|
@ -8,7 +8,7 @@
|
|||
<requirement type="iron" quantity="1"/>
|
||||
<requirement type="log" quantity="1"/>
|
||||
</construction>
|
||||
<weapon cut="true" skill="polearm" offmod="-2" defmod="-1" horse="false">
|
||||
<weapon useshield="false" cut="true" skill="polearm" offmod="-2" defmod="-1" horse="false">
|
||||
<damage type="rider" value="2d6"/>
|
||||
<damage type="footman" value="2d6"/>
|
||||
</weapon>
|
||||
|
|
Loading…
Reference in a new issue