forked from github/server
Found a lot of small bugs during testing.
This commit is contained in:
parent
faa7f6ac27
commit
f2b4e4ad9e
11 changed files with 131 additions and 25 deletions
|
@ -1963,7 +1963,7 @@ hits(troop at, troop dt, weapon * awp)
|
|||
skdiff = skilldiff(at, dt, dist);
|
||||
/* Verteidiger bekommt eine Rüstung */
|
||||
armor = select_armor(dt, true);
|
||||
if (dwp->type->flags & WTF_USESHIELD) {
|
||||
if (dwp==NULL || (dwp->type->flags & WTF_USESHIELD)) {
|
||||
shield = select_armor(dt, false);
|
||||
}
|
||||
if (contest(skdiff, dt, armor, shield)) {
|
||||
|
|
|
@ -134,9 +134,8 @@ MaxAge(void) {
|
|||
}
|
||||
|
||||
static int
|
||||
ally_flag(const char * s)
|
||||
ally_flag(const char * s, int help_mask)
|
||||
{
|
||||
int help_mask = HelpMask();
|
||||
if ((help_mask&HELP_MONEY) && strcmp(s, "money")==0) return HELP_MONEY;
|
||||
if ((help_mask&HELP_FIGHT) && strcmp(s, "fight")==0) return HELP_FIGHT;
|
||||
if ((help_mask&HELP_GIVE) && strcmp(s, "give")==0) return HELP_GIVE;
|
||||
|
@ -170,13 +169,13 @@ AllianceAuto(void)
|
|||
char * sstr = strdup(str);
|
||||
char * tok = strtok(sstr, " ");
|
||||
while (tok) {
|
||||
value |= ally_flag(tok);
|
||||
value |= ally_flag(tok, -1);
|
||||
tok = strtok(NULL, " ");
|
||||
}
|
||||
free(sstr);
|
||||
}
|
||||
}
|
||||
return value | ~HelpMask();
|
||||
return value & HelpMask();
|
||||
}
|
||||
|
||||
/** Limits the available help modes
|
||||
|
@ -196,7 +195,7 @@ HelpMask(void)
|
|||
char * sstr = strdup(str);
|
||||
char * tok = strtok(sstr, " ");
|
||||
while (tok) {
|
||||
value |= ally_flag(tok);
|
||||
value |= ally_flag(tok, -1);
|
||||
tok = strtok(NULL, " ");
|
||||
}
|
||||
free(sstr);
|
||||
|
@ -218,11 +217,12 @@ AllianceRestricted(void)
|
|||
char * sstr = strdup(str);
|
||||
char * tok = strtok(sstr, " ");
|
||||
while (tok) {
|
||||
value |= ally_flag(tok);
|
||||
value |= ally_flag(tok, -1);
|
||||
tok = strtok(NULL, " ");
|
||||
}
|
||||
free(sstr);
|
||||
}
|
||||
value &= HelpMask();
|
||||
}
|
||||
return value;
|
||||
}
|
||||
|
@ -878,7 +878,6 @@ autoalliance(const plane * pl, const faction * sf, const faction * f2)
|
|||
if (!init) {
|
||||
init_gms();
|
||||
init = true;
|
||||
automode = ~HelpMask();
|
||||
}
|
||||
if (pl && (pl->flags & PFL_FRIENDLY)) return HELP_ALL;
|
||||
/* if f2 is a gm in this plane, everyone has an auto-help to it */
|
||||
|
@ -896,7 +895,7 @@ autoalliance(const plane * pl, const faction * sf, const faction * f2)
|
|||
if (sf->alliance==f2->alliance) return AllianceAuto();
|
||||
}
|
||||
|
||||
return automode;
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int
|
||||
|
|
|
@ -404,7 +404,6 @@ extern int NewbieImmunity(void);
|
|||
extern int AllianceAuto(void); /* flags that allied factions get automatically */
|
||||
extern int AllianceRestricted(void); /* flags restricted to allied factions */
|
||||
extern int HelpMask(void); /* flags restricted to allied factions */
|
||||
extern int HelpMask(void); /* flags restricted to allied factions */
|
||||
extern struct order * default_order(const struct locale * lang);
|
||||
extern int entertainmoney(const struct region * r);
|
||||
|
||||
|
|
|
@ -47,6 +47,7 @@ without prior permission by the authors of Eressea.
|
|||
#include <tolua.h>
|
||||
|
||||
#include <limits.h>
|
||||
#include <assert.h>
|
||||
|
||||
static int
|
||||
tolua_unit_get_objects(lua_State* tolua_S)
|
||||
|
@ -835,10 +836,15 @@ tolua_unit_create(lua_State* tolua_S)
|
|||
region * r = (region *)tolua_tousertype(tolua_S, 2, 0);
|
||||
int num = (int)tolua_tonumber(tolua_S, 3, 0);
|
||||
if (f && r) {
|
||||
unit * u = create_unit(r, f, num, f->race, 0, NULL, NULL);
|
||||
const race * rc = f->race;
|
||||
const char * rcname = tolua_tostring(tolua_S, 4, NULL);
|
||||
if (rcname) rc = rc_find(rcname);
|
||||
if (rc) {
|
||||
unit * u = create_unit(r, f, num, rc, 0, NULL, NULL);
|
||||
tolua_pushusertype(tolua_S, u, "unit");
|
||||
return 1;
|
||||
}
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
<?xml version="1.0"?>
|
||||
<resources>
|
||||
<resources xmlns:xi="http://www.w3.org/2001/XInclude">
|
||||
<!-- this file contains a lot of armor -->
|
||||
|
||||
<xi:include href="../armor/plate.xml"/>
|
||||
|
|
|
@ -59,8 +59,8 @@
|
|||
</item>
|
||||
</resource>
|
||||
|
||||
<resource name="p4" appearance="vial">
|
||||
<!-- Heilwasser -->
|
||||
<resource name="ointment" appearance="vial">
|
||||
<!-- Wundsalbe -->
|
||||
<item weight="0" score="60">
|
||||
<function name="use" value="usehealingpotion"/>
|
||||
<potion level="2"/>
|
||||
|
|
|
@ -56,7 +56,7 @@
|
|||
<!-- Game specific settings -->
|
||||
<param name="database.gameid" value="7"></param>
|
||||
|
||||
<order name="ARBEITEN" disable="yes"/>
|
||||
<!--order name="ARBEITEN" disable="yes"/-->
|
||||
<order name="BETEN" disable="yes"/>
|
||||
<order name="BELAGERE" disable="yes"/>
|
||||
<order name="FRIEDEN" disable="yes"/>
|
||||
|
@ -96,11 +96,11 @@
|
|||
<skill name="training" enable="true"/>
|
||||
<skill name="unarmed" enable="true"/>
|
||||
<skill name="weaponsmithing" enable="true"/>
|
||||
<skill name="herbalism" enable="true"/>
|
||||
|
||||
<skill name="alchemy" enable="false"/>
|
||||
<skill name="entertainment" enable="false"/>
|
||||
<skill name="espionage" enable="false"/>
|
||||
<skill name="herbalism" enable="false"/>
|
||||
<skill name="perception" enable="false"/>
|
||||
<skill name="stealth" enable="false"/>
|
||||
<skill name="taxation" enable="false"/>
|
||||
|
@ -138,13 +138,14 @@
|
|||
<param name="rules.magic.common" value="tybied"/> <!-- tybied spells can be cast by anyone -->
|
||||
<param name="rules.magic.playerschools" value="gwyrrd illaun draig cerddor"/>
|
||||
<param name="rules.economy.taxation" value="1"/>
|
||||
<param name="rules.economy.wages" value="1"/>
|
||||
<param name="rules.economy.roqf" value="5"/>
|
||||
<param name="rules.economy.herbrot" value="0"/>
|
||||
<param name="rules.give" value="11"/> <!-- only self + peasants + ondeath -->
|
||||
<param name="rules.help.mask" value="fight guard money"/>
|
||||
<param name="movement.shipspeed.skillbonus" value="7"/>
|
||||
<param name="alliance.auto" value="fight"/>
|
||||
<!--param name="alliance.restricted" value="fight"/-->
|
||||
<param name="alliance.restricted" value="fight"/>
|
||||
</game>
|
||||
<xi:include href="eressea/strings.xml"/>
|
||||
<xi:include href="eressea/races.xml"/>
|
||||
|
|
|
@ -15,4 +15,48 @@
|
|||
<item name="seaserpenthead" amount="1"/>
|
||||
</set>
|
||||
|
||||
</equipment>
|
||||
<set name="dwarf_0">
|
||||
<skill name="melee" level="7"/>
|
||||
<skill name="stamina" level="3"/>
|
||||
<item name="sword" amount="1"/>
|
||||
<item name="shield" amount="1"/>
|
||||
<item name="plate" amount="1"/>
|
||||
</set>
|
||||
|
||||
<set name="halfling_0">
|
||||
<skill name="crossbow" level="7"/>
|
||||
<skill name="stamina" level="3"/>
|
||||
<item name="crossbow" amount="1"/>
|
||||
<item name="shield" amount="1"/>
|
||||
</set>
|
||||
|
||||
<set name="dwarf_1">
|
||||
<skill name="melee" level="7"/>
|
||||
<skill name="stamina" level="3"/>
|
||||
<item name="sword" amount="1"/>
|
||||
<item name="towershield" amount="1"/>
|
||||
<item name="plate" amount="1"/>
|
||||
</set>
|
||||
|
||||
<set name="halfling_1">
|
||||
<skill name="crossbow" level="7"/>
|
||||
<skill name="stamina" level="3"/>
|
||||
<item name="crossbow" amount="1"/>
|
||||
<item name="shield" amount="1"/>
|
||||
</set>
|
||||
|
||||
<set name="dwarf_2">
|
||||
<skill name="melee" level="7"/>
|
||||
<skill name="stamina" level="3"/>
|
||||
<item name="sword" amount="1"/>
|
||||
<item name="shield" amount="1"/>
|
||||
<item name="plate" amount="1"/>
|
||||
</set>
|
||||
|
||||
<set name="halfling_2">
|
||||
<skill name="crossbow" level="7"/>
|
||||
<skill name="stamina" level="3"/>
|
||||
<item name="rep_crossbow" amount="1"/>
|
||||
</set>
|
||||
|
||||
</equipment>
|
||||
|
|
|
@ -1,14 +1,64 @@
|
|||
<?xml version="1.0"?>
|
||||
<?xml version="1.0" encoding="iso-8859-1" ?>
|
||||
<resources>
|
||||
|
||||
<resource name="p2" appearance="vial">
|
||||
<resource name="ointment" appearance="vial">
|
||||
<!-- Wundsalbe -->
|
||||
<item weight="0" score="60">
|
||||
<function name="use" value="usehealingpotion"/>
|
||||
<potion level="2"/>
|
||||
</item>
|
||||
</resource>
|
||||
|
||||
<resource name="p13" appearance="vial">
|
||||
<!-- Elixier der Macht -->
|
||||
<item weight="0" score="120">
|
||||
<function name="use" value="usepotion"/>
|
||||
<potion level="4"/>
|
||||
</item>
|
||||
</resource>
|
||||
|
||||
<resource name="p3" appearance="vial">
|
||||
<!-- Schaffenstrunk -->
|
||||
<item weight="0" score="60">
|
||||
<function name="use" value="usepotion"/>
|
||||
<potion level="2"/>
|
||||
</item>
|
||||
</resource>
|
||||
|
||||
<resource name="p14" appearance="vial">
|
||||
<!-- Heiltrank -->
|
||||
<item weight="0" score="120">
|
||||
<function name="use" value="usepotion"/>
|
||||
<potion level="4"/>
|
||||
</item>
|
||||
</resource>
|
||||
|
||||
<resource name="p0" appearance="vial">
|
||||
<!-- Siebenmeilentee -->
|
||||
<item weight="0" score="30">
|
||||
<function name="use" value="usepotion"/>
|
||||
<potion level="1"/>
|
||||
</item>
|
||||
</resource>
|
||||
|
||||
<resource name="p10" appearance="vial">
|
||||
<resource name="p2" appearance="vial">
|
||||
<!-- Wasser des Lebens -->
|
||||
<item weight="0" score="30">
|
||||
<function name="use" value="usepotion"/>
|
||||
<potion level="1"/>
|
||||
</item>
|
||||
</resource>
|
||||
|
||||
<resource name="peasantblood" appearance="vial">
|
||||
<!-- Bauernblut -->
|
||||
<item weight="0" score="60">
|
||||
<function name="use" value="usebloodpotion"/>
|
||||
<potion level="2"/>
|
||||
</item>
|
||||
</resource>
|
||||
|
||||
<resource name="p9" appearance="vial">
|
||||
<!-- Pferdeglück -->
|
||||
<item weight="0" score="90">
|
||||
<function name="use" value="usepotion"/>
|
||||
<potion level="3"/>
|
||||
|
|
|
@ -13,6 +13,7 @@
|
|||
<skill name="building" modifier="1"/>
|
||||
<skill name="cartmaking" modifier="-1"/>
|
||||
<skill name="catapult" modifier="1"/>
|
||||
<skill name="herbalism" modifier="-99"/>
|
||||
<skill name="magic" modifier="-99"/>
|
||||
<skill name="mining" modifier="1"/>
|
||||
<skill name="roadwork" modifier="-2"/>
|
||||
|
@ -37,6 +38,7 @@
|
|||
<skill name="catapult" speed="+5"/>
|
||||
<skill name="crossbow" speed="+5"/>
|
||||
<skill name="forestry" modifier="1"/>
|
||||
<skill name="herbalism" modifier="-99"/>
|
||||
<skill name="melee" speed="+5"/>
|
||||
<skill name="mining" modifier="1"/>
|
||||
<skill name="polearm" speed="+5"/>
|
||||
|
@ -59,6 +61,7 @@
|
|||
<function name="itemdrop" value="defaultdrops"/>
|
||||
<param name="other_race" value="elf"/>
|
||||
<param name="other_cost" value="500"/>
|
||||
<skill name="herbalism" modifier="-99"/>
|
||||
<skill name="riding" modifier="+2"/>
|
||||
<skill name="shipcraft" modifier="2"/>
|
||||
<skill name="sailing" modifier="2"/>
|
||||
|
@ -81,6 +84,7 @@
|
|||
<skill name="cartmaking" modifier="2"/>
|
||||
<skill name="catapult" modifier="-1"/>
|
||||
<skill name="crossbow" modifier="2"/>
|
||||
<skill name="herbalism" modifier="-99"/>
|
||||
<skill name="melee" modifier="-1"/>
|
||||
<skill name="mining" modifier="1"/>
|
||||
<skill name="polearm" modifier="-1"/>
|
||||
|
@ -103,6 +107,7 @@
|
|||
<function name="itemdrop" value="defaultdrops"/>
|
||||
<skill name="cartmaking" modifier="-2"/>
|
||||
<skill name="forestry" modifier="1"/>
|
||||
<skill name="herbalism" modifier="-99"/>
|
||||
<skill name="magic" modifier="1"/>
|
||||
<skill name="melee" modifier="1"/>
|
||||
<skill name="polearm" modifier="1"/>
|
||||
|
@ -127,6 +132,7 @@
|
|||
<skill name="bow" modifier="2"/>
|
||||
<skill name="building" modifier="-1"/>
|
||||
<skill name="catapult" modifier="-2"/>
|
||||
<skill name="herbalism" modifier="-99"/>
|
||||
<skill name="magic" modifier="1"/>
|
||||
<skill name="mining" modifier="-2"/>
|
||||
<skill name="quarrying" modifier="-1"/>
|
||||
|
@ -148,6 +154,7 @@
|
|||
<skill name="bow" modifier="-2"/>
|
||||
<skill name="building" modifier="2"/>
|
||||
<skill name="catapult" modifier="2"/>
|
||||
<skill name="herbalism" modifier="-99"/>
|
||||
<skill name="melee" modifier="1"/>
|
||||
<skill name="mining" modifier="1"/>
|
||||
<skill name="quarrying" modifier="2"/>
|
||||
|
@ -171,6 +178,7 @@
|
|||
<skill name="building" modifier="2"/>
|
||||
<skill name="catapult" modifier="2"/>
|
||||
<skill name="forestry" modifier="-1"/>
|
||||
<skill name="herbalism" modifier="-99"/>
|
||||
<skill name="magic" modifier="-2"/>
|
||||
<skill name="melee" modifier="1"/>
|
||||
<skill name="mining" modifier="2"/>
|
||||
|
@ -179,7 +187,6 @@
|
|||
<skill name="roadwork" modifier="2"/>
|
||||
<skill name="sailing" modifier="-2"/>
|
||||
<skill name="shipcraft" modifier="-1"/>
|
||||
<skill name="tactics" modifier="1"/>
|
||||
<skill name="training" modifier="-2"/>
|
||||
<skill name="weaponsmithing" modifier="2"/>
|
||||
<skill name="unarmed" modifier="-99"/>
|
||||
|
|
|
@ -7,7 +7,7 @@
|
|||
_a: including article (ein Troll, a troll)
|
||||
-->
|
||||
<!--Fort-Ausbaustufen -->
|
||||
<string name="thirdage">
|
||||
<string name="calendar::thirdage">
|
||||
<text locale="de">des dritten Zeitalters</text>
|
||||
<text locale="en">the third age</text>
|
||||
</string>
|
||||
|
|
Loading…
Reference in a new issue