forked from github/server
Merge branch 'develop'
Conflicts: src/buildno.h src/util/unicode.test.c
This commit is contained in:
commit
cd2842ef38
|
@ -1,3 +1,4 @@
|
|||
.vscode/
|
||||
*.orig
|
||||
eressea.ini
|
||||
Debug
|
||||
|
@ -26,12 +27,6 @@ ipch/
|
|||
*.bak
|
||||
bin/
|
||||
build*/
|
||||
game-e2/data
|
||||
game-e2/*.log*
|
||||
game-e2/reports/
|
||||
game-e3/data/
|
||||
game-e3/*.log*
|
||||
game-e3/reports/
|
||||
*.log
|
||||
*.log.*
|
||||
tags
|
||||
|
|
|
@ -1,34 +1,28 @@
|
|||
[submodule "lunit"]
|
||||
path = lunit
|
||||
url = git://github.com/ennorehling/lunit.git
|
||||
[submodule "crypto"]
|
||||
path = crypto
|
||||
url = git://github.com/ennorehling/crypto.git
|
||||
url = https://github.com/ennorehling/lunit.git
|
||||
[submodule "cmake"]
|
||||
path = cmake
|
||||
url = git://github.com/ennorehling/cmake.git
|
||||
url = https://github.com/ennorehling/cmake.git
|
||||
[submodule "quicklist"]
|
||||
path = quicklist
|
||||
url = git://github.com/ennorehling/quicklist.git
|
||||
url = https://github.com/ennorehling/quicklist.git
|
||||
[submodule "critbit"]
|
||||
path = critbit
|
||||
url = git://github.com/ennorehling/critbit.git
|
||||
url = https://github.com/ennorehling/critbit.git
|
||||
[submodule "dlmalloc"]
|
||||
path = dlmalloc
|
||||
url = git://github.com/ennorehling/dlmalloc.git
|
||||
url = https://github.com/ennorehling/dlmalloc.git
|
||||
[submodule "cutest"]
|
||||
path = cutest
|
||||
url = git://github.com/ennorehling/cutest.git
|
||||
url = https://github.com/ennorehling/cutest.git
|
||||
[submodule "iniparser"]
|
||||
path = iniparser
|
||||
url = git://github.com/ennorehling/iniparser.git
|
||||
url = https://github.com/ennorehling/iniparser.git
|
||||
[submodule "cJSON"]
|
||||
path = cJSON
|
||||
url = git://github.com/ennorehling/cJSON.git
|
||||
url = https://github.com/ennorehling/cJSON.git
|
||||
[submodule "storage"]
|
||||
path = storage
|
||||
url = git://github.com/ennorehling/storage.git
|
||||
url = https://github.com/ennorehling/storage.git
|
||||
branch = master
|
||||
[submodule "tolua"]
|
||||
path = tolua
|
||||
url = git://github.com/ennorehling/tolua.git
|
||||
|
|
|
@ -7,7 +7,8 @@ script: s/travis-build
|
|||
addons:
|
||||
apt:
|
||||
packages:
|
||||
- liblua5.2-dev
|
||||
- liblua5.1-dev
|
||||
- libtolua-dev
|
||||
- libncurses5-dev
|
||||
- libsqlite3-dev
|
||||
- libxml2-dev
|
||||
|
|
|
@ -60,10 +60,11 @@ CONFIGURE_FILE (
|
|||
${CMAKE_CURRENT_SOURCE_DIR}/autoconf.h.in
|
||||
${CMAKE_BINARY_DIR}/include/autoconf.h)
|
||||
INCLUDE_DIRECTORIES (${CMAKE_BINARY_DIR}/include)
|
||||
SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -DUSE_AUTOCONF")
|
||||
|
||||
## skip compiler/libc detection and force cmake autoconf:
|
||||
#add_definitions(-DUSE_AUTOCONF)
|
||||
|
||||
add_subdirectory (cutest)
|
||||
add_subdirectory (crypto)
|
||||
add_subdirectory (cJSON)
|
||||
add_subdirectory (storage)
|
||||
add_subdirectory (iniparser)
|
||||
|
|
123
autoconf.h.in
123
autoconf.h.in
|
@ -33,127 +33,4 @@
|
|||
#cmakedefine HAVE_DIRECT_MKDIR 1
|
||||
#cmakedefine HAVE_DIRECT__MKDIR 1
|
||||
|
||||
#if defined(HAVE_STRINGS_H)
|
||||
#include <strings.h>
|
||||
#endif
|
||||
|
||||
#if defined(HAVE_UNISTD_H)
|
||||
#include <unistd.h>
|
||||
#endif
|
||||
|
||||
#if defined(HAVE_IO_H)
|
||||
#include <io.h>
|
||||
#endif
|
||||
|
||||
#if defined(HAVE_WINDOWS_H)
|
||||
#include <windows.h>
|
||||
#endif
|
||||
|
||||
#if defined(HAVE_STDBOOL_H)
|
||||
# include <stdbool.h>
|
||||
#else
|
||||
# if ! HAVE__BOOL
|
||||
# ifdef __cplusplus
|
||||
typedef bool _Bool;
|
||||
# else
|
||||
typedef unsigned char _Bool;
|
||||
# endif
|
||||
# endif
|
||||
# define bool _Bool
|
||||
# define false 0
|
||||
# define true 1
|
||||
# define __bool_true_false_are_defined 1
|
||||
#endif
|
||||
|
||||
#ifndef HAVE__ACCESS
|
||||
#ifdef HAVE_ACCESS
|
||||
#define _access(path, mode) access(path, mode)
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#ifndef _A_RDONLY
|
||||
#ifdef R_OK
|
||||
#define _A_RDONLY R_OK
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#if !defined(HAVE__MEMICMP)
|
||||
#if defined(HAVE_MEMICMP)
|
||||
#define _memicmp(a, b, n) memicmp(a, b, n)
|
||||
#elif defined(HAVE_STRNCASECMP)
|
||||
#define _memicmp(a, b, n) strncasecmp(a, b, n)
|
||||
#else
|
||||
#define _memicmp(a, b, n) lcp_memicmp(a, b, n)
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#if !defined(HAVE__STRCMPL)
|
||||
#if defined(HAVE_STRCMPL)
|
||||
#define _strcmpl(a, b) strcmpl(a, b)
|
||||
#elif defined(HAVE__STRICMP)
|
||||
#define _strcmpl(a, b) _stricmp(a, b)
|
||||
#elif defined(HAVE_STRICMP)
|
||||
#define _strcmpl(a, b) stricmp(a, b)
|
||||
#elif defined(HAVE_STRCASECMP)
|
||||
#define _strcmpl(a, b) strcasecmp(a, b)
|
||||
#else
|
||||
#define _strcmpl(a, b) lcp_strcmpl(a, b)
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#if defined(HAVE_DIRECT__MKDIR)
|
||||
#include <direct.h>
|
||||
#elif defined(HAVE_DIRECT_MKDIR)
|
||||
#include <direct.h>
|
||||
#define _mkdir(a) mkdir(a)
|
||||
#elif defined(HAVE_SYS_STAT_MKDIR)
|
||||
#include <sys/stat.h>
|
||||
#define _mkdir(a) mkdir(a, 0777)
|
||||
#endif
|
||||
|
||||
#if !defined(HAVE__STRLWR)
|
||||
#if defined(HAVE_STRLWR)
|
||||
#define _strlwr(a) strlwr(a)
|
||||
#else
|
||||
#define _strlwr(a) lcp_strlwr(a)
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#if !defined(HAVE__STRDUP)
|
||||
#if defined(HAVE_STRDUP)
|
||||
#define _strdup(a) strdup(a)
|
||||
#else
|
||||
#define _strdup(a) lcp_strdup(a)
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#if !defined(HAVE__SLEEP)
|
||||
#if defined(HAVE_USLEEP)
|
||||
#define _sleep(a) usleep(a)
|
||||
#elif defined(HAVE_SLEEP)
|
||||
#define _sleep(a) sleep((a)/1000)
|
||||
#else
|
||||
#define _sleep(a) lcp_sleep(a)
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#if !defined(HAVE__SNPRINTF)
|
||||
#if defined(HAVE_SNPRINTF)
|
||||
#define _snprintf snprintf
|
||||
#else
|
||||
#define _snprintf lcp_snprintf
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#ifndef _min
|
||||
#define _min(a,b) ((a) < (b) ? (a) : (b))
|
||||
#endif
|
||||
#ifndef _max
|
||||
#define _max(a,b) ((a) > (b) ? (a) : (b))
|
||||
#endif
|
||||
|
||||
#if !defined(DBG_UNREFERENCED_PARAMETER)
|
||||
#define DBG_UNREFERENCED_PARAMETER(x) x
|
||||
#endif
|
||||
|
||||
#endif
|
||||
|
|
|
@ -54,14 +54,14 @@
|
|||
<xi:include href="config://default/names-dragons.xml"/>
|
||||
<strings>
|
||||
<string name="mailto">
|
||||
<text locale="de">eressea-server@eressea.de</text>
|
||||
<text locale="en">eressea-server@eressea.de</text>
|
||||
<text locale="de">eressea-server@eressea.kn-bremen.de</text>
|
||||
<text locale="en">eressea-server@eressea.kn-bremen.de</text>
|
||||
</string>
|
||||
<string name="newbie_info_1">
|
||||
<string name="newbie_info_game">
|
||||
<text locale="de">Bitte denke daran, deine Befehle mit dem Betreff
|
||||
ERESSEA 2 BEFEHLE an eressea-server@eressea.de zu senden.</text>
|
||||
ERESSEA 2 BEFEHLE an eressea-server@eressea.kn-bremen.de zu senden.</text>
|
||||
<text locale="en">Remember to send your orders to
|
||||
eressea-server@eressea.de with the subject ERESSEA 2 ORDERS.</text>
|
||||
eressea-server@eressea.kn-bremen.de with the subject ERESSEA 2 ORDERS.</text>
|
||||
</string>
|
||||
<string name="mailcmd">
|
||||
<text locale="de">ERESSEA 2 BEFEHLE</text>
|
||||
|
|
|
@ -46,14 +46,14 @@
|
|||
</rules>
|
||||
<strings>
|
||||
<string name="mailto">
|
||||
<text locale="de">eressea-server@eressea.de</text>
|
||||
<text locale="en">eressea-server@eressea.de</text>
|
||||
<text locale="de">eressea-server@eressea.kn-bremen.de</text>
|
||||
<text locale="en">eressea-server@eressea.kn-bremen.de</text>
|
||||
</string>
|
||||
<string name="newbie_info_1">
|
||||
<string name="newbie_info_game">
|
||||
<text locale="de">Bitte denke daran, deine Befehle mit dem Betreff
|
||||
ERESSEA 3 BEFEHLE an eressea-server@eressea.de zu senden.</text>
|
||||
ERESSEA 3 BEFEHLE an eressea-server@eressea.kn-bremen.de zu senden.</text>
|
||||
<text locale="en">Remember to send your orders to
|
||||
eressea-server@eressea.de with the subject E3 ORDERS.</text>
|
||||
eressea-server@eressea.kn-bremen.de with the subject E3 ORDERS.</text>
|
||||
</string>
|
||||
<string name="mailcmd">
|
||||
<text locale="de">ERESSEA 3 BEFEHLE</text>
|
||||
|
|
|
@ -222,14 +222,6 @@
|
|||
"div": "100"
|
||||
}
|
||||
}
|
||||
},
|
||||
"default": {
|
||||
"size": 0,
|
||||
"herbs": [],
|
||||
"seed": 0,
|
||||
"road": 0,
|
||||
"flags": [ "land", "walk", "sail", "fly" ],
|
||||
"production": {}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -47,14 +47,14 @@
|
|||
</rules>
|
||||
<strings>
|
||||
<string name="mailto">
|
||||
<text locale="de">eressea-server@eressea.de</text>
|
||||
<text locale="en">eressea-server@eressea.de</text>
|
||||
<text locale="de">eressea-server@eressea.kn-bremen.de</text>
|
||||
<text locale="en">eressea-server@eressea.kn-bremen.de</text>
|
||||
</string>
|
||||
<string name="newbie_info_1">
|
||||
<string name="newbie_info_game">
|
||||
<text locale="de">Bitte denke daran, deine Befehle mit dem Betreff
|
||||
ERESSEA 4 BEFEHLE an eressea-server@eressea.de zu senden.</text>
|
||||
ERESSEA 4 BEFEHLE an eressea-server@eressea.kn-bremen.de zu senden.</text>
|
||||
<text locale="en">Remember to send your orders to
|
||||
eressea-server@eressea.de with the subject ERESSEA 4 ORDERS.</text>
|
||||
eressea-server@eressea.kn-bremen.de with the subject ERESSEA 4 ORDERS.</text>
|
||||
</string>
|
||||
<string name="mailcmd">
|
||||
<text locale="de">ERESSEA 4 BEFEHLE</text>
|
||||
|
|
2
critbit
2
critbit
|
@ -1 +1 @@
|
|||
Subproject commit 934c2dd94d41da19637a76a1a8b3dfeb7aa8524d
|
||||
Subproject commit 971836241277e37274aa3110344836499816ff21
|
1
crypto
1
crypto
|
@ -1 +0,0 @@
|
|||
Subproject commit 913358a8d7d961ffc35b238c744ca6ce823ffdd9
|
File diff suppressed because it is too large
Load Diff
|
@ -7,7 +7,6 @@ if [ -e ${ERESSEA}/build/.preview ]; then
|
|||
fi
|
||||
SRC=${ERESSEA}/git
|
||||
${SRC}/s/preview build ${branch} || exit $?
|
||||
${SRC}/s/preview version
|
||||
for game in 2 3 4 ; do
|
||||
${SRC}/s/preview -g ${game} run && \
|
||||
${SRC}/s/preview -g ${game} send
|
||||
|
|
|
@ -30,15 +30,15 @@ rejecthtml = True
|
|||
|
||||
games = [
|
||||
{
|
||||
"from" : "Eressea Server <eressea-server@eressea.de>",
|
||||
"from" : "Eressea Server <eressea-server@eressea.kn-bremen.de>",
|
||||
"prefix" : "Eressea"
|
||||
},
|
||||
{
|
||||
"from" : "Eressea Server <eressea-server@eressea.de>",
|
||||
"from" : "Eressea Server <eressea-server@eressea.kn-bremen.de>",
|
||||
"prefix": "E3"
|
||||
},
|
||||
{
|
||||
"from" : "Eressea Server <eressea-server@eressea.de>",
|
||||
"from" : "Eressea Server <eressea-server@eressea.kn-bremen.de>",
|
||||
"prefix": "E4"
|
||||
},
|
||||
]
|
||||
|
|
|
@ -65,7 +65,7 @@ messages = {
|
|||
|
||||
# base directory for all your games:
|
||||
rootdir = "/home/eressea/eressea"
|
||||
frommail = "Eressea Server <eressea-server@eressea.de>"
|
||||
frommail = "Eressea Server <eressea-server@eressea.kn-bremen.de>"
|
||||
orderbase = "orders.dir"
|
||||
sendmail = True
|
||||
maxlines = 25
|
||||
|
|
|
@ -23,7 +23,7 @@
|
|||
</building>
|
||||
|
||||
<building name="inn" capacity="1">
|
||||
<maintenance type="money" amount="5" variable="yes" vital="yes"/>
|
||||
<maintenance type="money" amount="5" variable="yes"/>
|
||||
<construction skill="building" minskill="2" reqsize="10">
|
||||
<requirement type="iron" quantity="10"/>
|
||||
<requirement type="log" quantity="30"/>
|
||||
|
@ -34,7 +34,7 @@
|
|||
|
||||
<building name="tunnel" capacity="1" maxsize="100">
|
||||
<maintenance type="stone" amount="2"/>
|
||||
<maintenance type="money" amount="100" vital="yes"/>
|
||||
<maintenance type="money" amount="100"/>
|
||||
<construction skill="building" minskill="6" reqsize="100" maxsize="100">
|
||||
<requirement type="iron" quantity="100"/>
|
||||
<requirement type="log" quantity="500"/>
|
||||
|
@ -45,7 +45,7 @@
|
|||
|
||||
<building name="caravan" capacity="1" maxsize="10">
|
||||
<maintenance type="horse" amount="2"/>
|
||||
<maintenance type="money" amount="3000" vital="yes"/>
|
||||
<maintenance type="money" amount="3000"/>
|
||||
<construction skill="building" minskill="2" reqsize="10" maxsize="10">
|
||||
<requirement type="iron" quantity="10"/>
|
||||
<requirement type="log" quantity="50"/>
|
||||
|
@ -56,7 +56,7 @@
|
|||
|
||||
<building name="dam" capacity="1" maxsize="50">
|
||||
<maintenance type="log" amount="3"/>
|
||||
<maintenance type="money" amount="1000" vital="yes"/>
|
||||
<maintenance type="money" amount="1000"/>
|
||||
<construction skill="building" minskill="4" reqsize="50" maxsize="50">
|
||||
<requirement type="iron" quantity="50"/>
|
||||
<requirement type="log" quantity="500"/>
|
||||
|
@ -75,7 +75,7 @@
|
|||
</building>
|
||||
|
||||
<building name="stables" capacity="1">
|
||||
<maintenance type="money" amount="150" vital="yes"/>
|
||||
<maintenance type="money" amount="150"/>
|
||||
<construction skill="building" minskill="2">
|
||||
<requirement type="log" quantity="4"/>
|
||||
<requirement type="stone" quantity="2"/>
|
||||
|
@ -85,7 +85,7 @@
|
|||
</building>
|
||||
|
||||
<building name="sawmill" capacity="1">
|
||||
<maintenance type="money" amount="250" vital="yes"/>
|
||||
<maintenance type="money" amount="250"/>
|
||||
<construction skill="building" minskill="3">
|
||||
<requirement type="log" quantity="5"/>
|
||||
<requirement type="stone" quantity="5"/>
|
||||
|
@ -96,7 +96,7 @@
|
|||
|
||||
<building name="smithy" capacity="1">
|
||||
<function name="init" value="init_smithy"/>
|
||||
<maintenance type="money" amount="300" vital="yes"/>
|
||||
<maintenance type="money" amount="300"/>
|
||||
<maintenance type="log" amount="1"/>
|
||||
<construction skill="building" minskill="3">
|
||||
<requirement type="log" quantity="5"/>
|
||||
|
@ -107,7 +107,7 @@
|
|||
</building>
|
||||
|
||||
<building name="magictower" maxcapacity="2" maxsize="50" magic="yes" magres="40" fumblebonus="10" auraregen="1.75">
|
||||
<maintenance type="money" amount="1000" vital="yes"/>
|
||||
<maintenance type="money" amount="1000"/>
|
||||
<construction skill="building" minskill="5" reqsize="50" maxsize="50">
|
||||
<requirement type="log" quantity="150"/>
|
||||
<requirement type="stone" quantity="250"/>
|
||||
|
@ -119,7 +119,7 @@
|
|||
</building>
|
||||
|
||||
<building name="academy" maxcapacity="25" maxsize="25">
|
||||
<maintenance type="money" amount="1000" vital="yes"/>
|
||||
<maintenance type="money" amount="1000"/>
|
||||
<construction skill="building" minskill="3" reqsize="25" maxsize="25">
|
||||
<requirement type="log" quantity="125"/>
|
||||
<requirement type="stone" quantity="125"/>
|
||||
|
@ -129,7 +129,7 @@
|
|||
</building>
|
||||
|
||||
<building name="harbour" capacity="1" maxcapacity="25" maxsize="25" unique="yes">
|
||||
<maintenance type="money" amount="250" vital="yes"/>
|
||||
<maintenance type="money" amount="250"/>
|
||||
<construction skill="building" minskill="3" reqsize="25" maxsize="25">
|
||||
<requirement type="log" quantity="125"/>
|
||||
<requirement type="stone" quantity="125"/>
|
||||
|
@ -138,7 +138,7 @@
|
|||
</building>
|
||||
|
||||
<building name="quarry" capacity="1">
|
||||
<maintenance type="money" amount="250" vital="yes"/>
|
||||
<maintenance type="money" amount="250"/>
|
||||
<construction skill="building" minskill="2">
|
||||
<requirement type="iron" quantity="1"/>
|
||||
<requirement type="log" quantity="5"/>
|
||||
|
@ -148,7 +148,7 @@
|
|||
</building>
|
||||
|
||||
<building name="mine" capacity="1">
|
||||
<maintenance type="money" amount="500" vital="yes"/>
|
||||
<maintenance type="money" amount="500"/>
|
||||
<construction skill="building" minskill="4">
|
||||
<requirement type="iron" quantity="1"/>
|
||||
<requirement type="log" quantity="10"/>
|
||||
|
@ -158,7 +158,7 @@
|
|||
</building>
|
||||
|
||||
<building name="lighthouse" capacity="1" maxcapacity="4">
|
||||
<maintenance type="money" amount="100" vital="yes"/>
|
||||
<maintenance type="money" amount="100"/>
|
||||
<construction skill="building" minskill="3">
|
||||
<requirement type="iron" quantity="1"/>
|
||||
<requirement type="log" quantity="1"/>
|
||||
|
|
|
@ -100,14 +100,14 @@
|
|||
</resource>
|
||||
|
||||
<!-- XE items -->
|
||||
<resource name="skillpotion">
|
||||
<resource name="skillpotion" appearance="vial">
|
||||
<!-- gives user one free learning attempt -->
|
||||
<item weight="0">
|
||||
<function name="use" value="use_skillpotion"/>
|
||||
</item>
|
||||
</resource>
|
||||
|
||||
<resource name="manacrystal">
|
||||
<resource name="manacrystal" appearance="amulet">
|
||||
<!-- gives user free aura -->
|
||||
<item weight="0">
|
||||
<function name="use" value="use_manacrystal"/>
|
||||
|
@ -135,12 +135,6 @@
|
|||
</item>
|
||||
</resource>
|
||||
|
||||
<resource name="wand_of_tears">
|
||||
<item notlost="yes" weight="0">
|
||||
<function name="use" value="use_wand_of_tears"/>
|
||||
</item>
|
||||
</resource>
|
||||
|
||||
<resource name="catapultammo">
|
||||
<item weight="1000">
|
||||
<construction skill="quarrying" minskill="3">
|
||||
|
|
|
@ -34,7 +34,7 @@
|
|||
</string>
|
||||
<string name="songdragon">
|
||||
<text locale="de">Singdrachen sind von der Größe eines ausgewachsenden Tigers. Ihre Färbung reicht von schillerndem Rot, über dunkles Grün bis hin zu tiefem Schwarz. Alle bekannten Drachen dieser Art weisen eine hohe Intelligenz und ein hohes Maß an magischen Fähigkeiten auf. Wie Ihre großen Verwandten verfügen sie über einen Feuerodem. Sie lieben den Gesang und das üppige Mahl. Von Zeit zu Zeit gehen sie eine engen magisches Bund zu einem Magier ein. Wenn dies geschieht, so steht dem Magier ein äußerst loyaler und lohnender Vertrauter zur Seite.
|
||||
</text>
|
||||
</text>
|
||||
<text locale="en">Song Dragons are roughly the size of a fully grown tiger. Their coloring ranges from bright red, through a dark green shade to a deep black. All known dragons of this species display a high level of intelligence and highly developed magical skills. Like their larger cousins, Song Dragons posess a firegland. They love singing and a good meal. From time to time one of these magnificent creatures will bond with a mage. When this happens, the mage is assured of a most loyal and useful familiar at his side.</text>
|
||||
</string>
|
||||
<string name="unicorn">
|
||||
|
@ -235,11 +235,6 @@
|
|||
einzige Vorteil ihrer geringen Größe ist, dass sie sich leichter
|
||||
verstecken kann.</text>
|
||||
</string>
|
||||
<string name="wand_of_tears">
|
||||
<text locale="de">Dieses magische Szepter, ein Geschenk Igjarjuks, sorgt für große
|
||||
Verwirrung und Gedächtnisverlust. Syntax: BENUTZE "Szepter der
|
||||
Tränen"</text>
|
||||
</string>
|
||||
<string name="speedsail">
|
||||
<text locale="de">Setzt eine Einheit dieses Segel auf einem Schiff, so erhöht
|
||||
sich dessen Reichweite permanent um 1 Region.</text>
|
||||
|
@ -1118,14 +1113,6 @@
|
|||
<text locale="de">Trollhörner</text>
|
||||
<text locale="en">troll horns</text>
|
||||
</string>
|
||||
<string name="phoenixfeather">
|
||||
<text locale="de">Feder des Phönix</text>
|
||||
<text locale="en">feather of the phoenix</text>
|
||||
</string>
|
||||
<string name="phoenixfeather_p">
|
||||
<text locale="de">Federn des Phönix</text>
|
||||
<text locale="en">feathers of the phoenix</text>
|
||||
</string>
|
||||
|
||||
<!--Resourcen -->
|
||||
<string name="money">
|
||||
|
@ -1622,14 +1609,6 @@
|
|||
<string name="presspass_p">
|
||||
<text locale="de">Akkreditionen des Xontormia-Expreß</text>
|
||||
</string>
|
||||
<string name="wand_of_tears">
|
||||
<text locale="de">Szepter der Tränen</text>
|
||||
<text locale="en">wand of tears</text>
|
||||
</string>
|
||||
<string name="wand_of_tears_p">
|
||||
<text locale="de">Szepter der Tränen</text>
|
||||
<text locale="en">wands of tears</text>
|
||||
</string>
|
||||
<string name="snowball">
|
||||
<text locale="de">Schneeball</text>
|
||||
<text locale="en">snowball</text>
|
||||
|
@ -2464,23 +2443,6 @@
|
|||
<text locale="en">skeleton</text>
|
||||
</string>
|
||||
|
||||
<string name="centaur">
|
||||
<text locale="de">Zentaur</text>
|
||||
<text locale="en">centaur</text>
|
||||
</string>
|
||||
<string name="centaur_p">
|
||||
<text locale="de">Zentauren</text>
|
||||
<text locale="en">centaurs</text>
|
||||
</string>
|
||||
<string name="centaur_d">
|
||||
<text locale="de">Zentauren</text>
|
||||
<text locale="en">centaurs</text>
|
||||
</string>
|
||||
<string name="centaur_x">
|
||||
<text locale="de">Zentauren</text>
|
||||
<text locale="en">centaur</text>
|
||||
</string>
|
||||
|
||||
<string name="shadowknight">
|
||||
<text locale="de">Schattenritter</text>
|
||||
<text locale="en">shadow knight</text>
|
||||
|
@ -3195,23 +3157,6 @@
|
|||
<text locale="en">young dragon</text>
|
||||
</string>
|
||||
|
||||
<string name="phoenix">
|
||||
<text locale="de">Phönix</text>
|
||||
<text locale="en">phoenix</text>
|
||||
</string>
|
||||
<string name="phoenix_p">
|
||||
<text locale="de">Phönixe</text>
|
||||
<text locale="en">phoenixes</text>
|
||||
</string>
|
||||
<string name="phoenix_d">
|
||||
<text locale="de">Phönixen</text>
|
||||
<text locale="en">phoenixes</text>
|
||||
</string>
|
||||
<string name="phoenix_x">
|
||||
<text locale="de">Phönix</text>
|
||||
<text locale="en">phoenix</text>
|
||||
</string>
|
||||
|
||||
<string name="illusion">
|
||||
<text locale="de">Illusion</text>
|
||||
<text locale="en">illusion</text>
|
||||
|
|
|
@ -1894,12 +1894,6 @@
|
|||
<string name="eagle">
|
||||
<text locale="fr">aigle</text>
|
||||
</string>
|
||||
<string name="centaur_p">
|
||||
<text locale="fr">centaures</text>
|
||||
</string>
|
||||
<string name="centaur">
|
||||
<text locale="fr">centaure</text>
|
||||
</string>
|
||||
<string name="skeleton_p">
|
||||
<text locale="fr">squelettes</text>
|
||||
</string>
|
||||
|
|
|
@ -1,5 +1,13 @@
|
|||
<?xml version="1.0" encoding="utf-8" ?>
|
||||
<messages>
|
||||
<message name="parse_error" section="errors">
|
||||
<type>
|
||||
<arg name="unit" type="unit"/>
|
||||
<arg name="command" type="string"/>
|
||||
</type>
|
||||
<text locale="de">"$unit($unit): '$command' - Dieser Befehl ist unbekannt."</text>
|
||||
<text locale="en">"$unit($unit): '$command' - Parse error, unknown command."</text>
|
||||
</message>
|
||||
<message name="reduced_production">
|
||||
<text locale="de">Die Region ist verwüstet, der Boden karg.</text>
|
||||
<text locale="en">The region is ravaged, the ground infertile.</text>
|
||||
|
@ -1245,14 +1253,6 @@
|
|||
<text locale="en">"$unit($unit) dies from poison damage taken in $region($region)."</text>
|
||||
</message>
|
||||
|
||||
<message name="wand_of_tears_usage" section="events">
|
||||
<type>
|
||||
<arg name="unit" type="unit"/>
|
||||
</type>
|
||||
<text locale="de">"$unit($unit) schwenkt sein Szepter und sorgt für Verwirrung und Chaos in der Region."</text>
|
||||
<text locale="en">"$unit($unit) waves their scepter and causes chaos and confusion in the region."</text>
|
||||
</message>
|
||||
|
||||
<message name="find_manual" section="events">
|
||||
<type>
|
||||
<arg name="unit" type="unit"/>
|
||||
|
@ -1565,20 +1565,6 @@
|
|||
<text locale="de">"$unit($mage) konnte $int($amount) $if($eq($amount,1),"Bauer","Bauern") anwerben."</text>
|
||||
<text locale="en">"$unit($mage) managed to recruit $int($amount) $if($eq($amount,1),"peasant","peasants")."</text>
|
||||
</message>
|
||||
<message name="wand_of_tears_effect" section="events">
|
||||
<type>
|
||||
<arg name="unit" type="unit"/>
|
||||
</type>
|
||||
<text locale="de">"Ein bohrender Schmerz durchzuckt $unit($unit), Verwirrung macht sich breit."</text>
|
||||
<text locale="en">"Pain pulses through $unit($unit), confusion spreads."</text>
|
||||
</message>
|
||||
<message name="cryinpain" section="events">
|
||||
<type>
|
||||
<arg name="unit" type="unit"/>
|
||||
</type>
|
||||
<text locale="de">""AAAAAAAGHHHHHH!" - Ein Schrei durchzieht die Region, $unit($unit) windet sich vor Schmerz."</text>
|
||||
<text locale="en">""AAAAAAAGHHHHHH!" - $unit($unit) screams and squirms with pain."</text>
|
||||
</message>
|
||||
|
||||
<message name="error_giveeye" section="events">
|
||||
<type>
|
||||
|
@ -1590,14 +1576,6 @@
|
|||
<text locale="en">"$unit($unit) in $region($region): '$order($command)' - A higher power prevents $unit($unit) from giving the object away. 'IT IS YOURS MY CHILD. ONLY YOURS.'."</text>
|
||||
</message>
|
||||
|
||||
<message name="praytoigjarjuk" section="events">
|
||||
<type>
|
||||
<arg name="unit" type="unit"/>
|
||||
</type>
|
||||
<text locale="de">"$unit($unit) sendet ein Stoßgebet an den Herrn der Schreie."</text>
|
||||
<text locale="en">"$unit($unit) sends a prayer to the Lord of Screams."</text>
|
||||
</message>
|
||||
|
||||
<message name="iceberg_melt" section="events">
|
||||
<type>
|
||||
<arg name="region" type="region"/>
|
||||
|
@ -7512,7 +7490,7 @@
|
|||
<arg name="mage" type="unit"/>
|
||||
<arg name="building" type="building"/>
|
||||
</type>
|
||||
<text locale="de">"$unit($mage) weight $building($building)."</text>
|
||||
<text locale="de">"$unit($mage) weiht $building($building)."</text>
|
||||
<text locale="en">"$unit($mage) blesses $building($building)."</text>
|
||||
</message>
|
||||
|
||||
|
@ -8090,27 +8068,6 @@
|
|||
<text locale="en">"The plank of $ship($ship) are inscribed with strange runes. ($int36($id))"</text>
|
||||
</message>
|
||||
|
||||
<message name="phoenixcompass_confusion" section="magic">
|
||||
<type>
|
||||
<arg name="unit" type="unit"/>
|
||||
<arg name="region" type="region"/>
|
||||
<arg name="command" type="order"/>
|
||||
</type>
|
||||
<text locale="de">"$unit($unit) in $region($region): '$order($command)' - Die Kompassnadel springt wild hin und her und es lässt sich keine Richtung erkennen."</text>
|
||||
<text locale="en">"$unit($unit) in $region($region): '$order($command)' - The needle jumps wildly and there is no specific direction recognizable."</text>
|
||||
</message>
|
||||
|
||||
<message name="phoenixcompass_success" section="magic">
|
||||
<type>
|
||||
<arg name="unit" type="unit"/>
|
||||
<arg name="region" type="region"/>
|
||||
<arg name="command" type="order"/>
|
||||
<arg name="dir" type="int"/>
|
||||
</type>
|
||||
<text locale="de">"$unit($unit) in $region($region): '$order($command)' - Die Kompassnadel zeigt nach $direction($dir)."</text>
|
||||
<text locale="en">"$unit($unit) in $region($region): '$order($command)' - The needle points $direction($dir)."</text>
|
||||
</message>
|
||||
|
||||
<message name="disrupt_astral" section="magic">
|
||||
<type>
|
||||
<arg name="unit" type="unit"/>
|
||||
|
|
|
@ -7,6 +7,5 @@
|
|||
<modifier building="mine" type="skill" value="1"/>
|
||||
<modifier building="mine" type="material" value="0.5"/>
|
||||
<modifier race="dwarf" type="material" value="0.60"/>
|
||||
<guard flag="mining"/>
|
||||
</resourcelimit>
|
||||
</resource>
|
||||
|
|
|
@ -5,6 +5,5 @@
|
|||
</item>
|
||||
<resourcelimit>
|
||||
<modifier type="require" building="mine"/>
|
||||
<guard flag="mining"/>
|
||||
</resourcelimit>
|
||||
</resource>
|
||||
|
|
|
@ -6,7 +6,6 @@
|
|||
<resourcelimit>
|
||||
<modifier building="sawmill" type="skill" value="1"/>
|
||||
<modifier building="sawmill" type="material" value="0.5"/>
|
||||
<guard flag="logging"/>
|
||||
<function name="produce" value="lua_produceresource"/>
|
||||
<function name="limit" value="lua_limitresource"/>
|
||||
</resourcelimit>
|
||||
|
|
|
@ -19,7 +19,7 @@
|
|||
</building>
|
||||
|
||||
<building name="market" capacity="1" maxsize="10">
|
||||
<maintenance type="money" amount="200" vital="yes"/>
|
||||
<maintenance type="money" amount="200"/>
|
||||
<construction skill="building" minskill="3">
|
||||
<requirement type="log" quantity="1"/>
|
||||
<requirement type="stone" quantity="1"/>
|
||||
|
|
|
@ -619,7 +619,7 @@
|
|||
<race name="braineater" magres="0.900000" maxaura="1.0" regaura="1.0" weight="100" capacity="540" speed="1.0" hp="20" damage="0d0" unarmedattack="0" unarmeddefense="0" attackmodifier="6" defensemodifier="10" scarepeasants="yes" fly="yes" walk="yes" teach="no" invinciblenonmagic="yes">
|
||||
<ai splitsize="500" killpeasants="yes" moverandom="yes" learn="yes"/>
|
||||
<function name="name" value="namegeneric"/>
|
||||
<function name="describe" value="describe_braineater"/>
|
||||
<function name="describe" value="describe_race"/>
|
||||
<attack type="2" damage="3d15"/>
|
||||
<attack type="3" damage="1d1"/>
|
||||
<attack type="4" damage="1d1"/>
|
||||
|
@ -890,7 +890,7 @@
|
|||
</race>
|
||||
|
||||
<!-- for the shadowcall spell -->
|
||||
<race name="shadowbat" magres="0.800000" maxaura="0.000000" regaura="0.000000" recruitcost="500" weight="500" capacity="540" speed="1.0" hp="1" ac="4" damage="2d4" unarmedattack="0" unarmeddefense="0" attackmodifier="3" defensemodifier="3" scarepeasants="yes" fly="yes" walk="yes" teach="no" getitem="yes">
|
||||
<race name="shadowbat" magres="0.800000" maxaura="0.000000" regaura="0.000000" weight="500" capacity="540" speed="1.0" hp="1" ac="4" damage="2d4" unarmedattack="0" unarmeddefense="0" attackmodifier="3" defensemodifier="3" scarepeasants="yes" fly="yes" walk="yes" teach="no" getitem="yes">
|
||||
<ai splitsize="5000" killpeasants="yes"/>
|
||||
<function name="name" value="namegeneric"/>
|
||||
<attack type="4" damage="1d6"/>
|
||||
|
@ -898,7 +898,7 @@
|
|||
</race>
|
||||
|
||||
<!-- for the shadowcall spell -->
|
||||
<race name="nightmare" magres="0.500000" maxaura="0.000000" regaura="0.000000" recruitcost="500" weight="100" capacity="540" speed="1.0" hp="80" ac="10" damage="2d4" unarmedattack="0" unarmeddefense="0" attackmodifier="3" defensemodifier="3" scarepeasants="yes" fly="yes" walk="yes" teach="no" getitem="yes" invinciblenonmagic="yes">
|
||||
<race name="nightmare" magres="0.500000" maxaura="0.000000" regaura="0.000000" weight="100" capacity="540" speed="1.0" hp="80" ac="10" damage="2d4" unarmedattack="0" unarmeddefense="0" attackmodifier="3" defensemodifier="3" scarepeasants="yes" fly="yes" walk="yes" teach="no" getitem="yes" invinciblenonmagic="yes">
|
||||
<ai splitsize="500" killpeasants="yes"/>
|
||||
<function name="name" value="namegeneric"/>
|
||||
<attack type="4" damage="1d4"/>
|
||||
|
@ -909,7 +909,7 @@
|
|||
</race>
|
||||
|
||||
<!-- for the shadowcall spell -->
|
||||
<race name="vampunicorn" magres="1.0" maxaura="0.000000" regaura="0.000000" recruitcost="500" weight="5000" capacity="2000" speed="1.0" hp="30" ac="4" damage="2d4" unarmedattack="0" unarmeddefense="0" attackmodifier="3" defensemodifier="3" scarepeasants="yes" walk="yes" teach="no" getitem="yes">
|
||||
<race name="vampunicorn" magres="1.0" maxaura="0.000000" regaura="0.000000" weight="5000" capacity="2000" speed="1.0" hp="30" ac="4" damage="2d4" unarmedattack="0" unarmeddefense="0" attackmodifier="3" defensemodifier="3" scarepeasants="yes" walk="yes" teach="no" getitem="yes">
|
||||
<ai splitsize="5000" killpeasants="yes"/>
|
||||
<function name="name" value="namegeneric"/>
|
||||
<attack type="4" damage="2d10"/>
|
||||
|
|
|
@ -68,10 +68,6 @@
|
|||
<callback name="equip_newunits"/>
|
||||
</set>
|
||||
|
||||
<set name="first_centaur">
|
||||
<callback name="equip_newunits"/>
|
||||
</set>
|
||||
|
||||
<!-- equipment-sets for random encounters -->
|
||||
<set name="random_desert">
|
||||
<skill name="melee" level="d2"/>
|
||||
|
@ -273,11 +269,6 @@
|
|||
<skill name="melee" level="1"/>
|
||||
</set>
|
||||
|
||||
<set name="new_centaur_unit">
|
||||
<skill name="polearm" level="1"/>
|
||||
<skill name="melee" level="1"/>
|
||||
</set>
|
||||
|
||||
<set name="seaserpent_spoils">
|
||||
<item name="dragonblood" amount="6"/>
|
||||
<item name="seaserpenthead" amount="1"/>
|
||||
|
|
|
@ -27,7 +27,7 @@
|
|||
<familiar race="eagle"/>
|
||||
<familiar race="imp"/>
|
||||
</race>
|
||||
<race name="kraken" magres="0.000000" maxaura="0.000000" regaura="0.000000" recruitcost="50" weight="500" capacity="540" speed="2.000000" hp="300" damage="2d10" unarmedattack="0" unarmeddefense="0" attackmodifier="7" defensemodifier="7" coastal="yes" swim="yes" teach="no" getitem="yes">
|
||||
<race name="kraken" magres="0.000000" maxaura="0.000000" regaura="0.000000" weight="500" capacity="540" speed="2.000000" hp="300" damage="2d10" unarmedattack="0" unarmeddefense="0" attackmodifier="7" defensemodifier="7" coastal="yes" swim="yes" teach="no" getitem="yes">
|
||||
<ai splitsize="5000"/>
|
||||
<function name="initfamiliar" value="oldfamiliars"/>
|
||||
<skill name="perception" modifier="1"/>
|
||||
|
@ -61,7 +61,7 @@
|
|||
<attack type="4" damage="1d10"/>
|
||||
<attack type="4" damage="1d10"/>
|
||||
</race>
|
||||
<race name="giantturtle" magres="0.000000" maxaura="0.000000" regaura="0.000000" recruitcost="50" weight="1600" capacity="600" speed="1.000000" hp="900" ac="7" damage="2d50" unarmedattack="0" unarmeddefense="0" attackmodifier="10" defensemodifier="5" coastal="yes" swim="yes" walk="yes" teach="no" getitem="yes">
|
||||
<race name="giantturtle" magres="0.000000" maxaura="0.000000" regaura="0.000000" weight="1600" capacity="600" speed="1.000000" hp="900" ac="7" damage="2d50" unarmedattack="0" unarmeddefense="0" attackmodifier="10" defensemodifier="5" coastal="yes" swim="yes" walk="yes" teach="no" getitem="yes">
|
||||
<ai splitsize="5000"/>
|
||||
<function name="initfamiliar" value="oldfamiliars"/>
|
||||
<skill name="perception" modifier="1"/>
|
||||
|
@ -90,7 +90,7 @@
|
|||
<skill name="taxation" modifier="-99"/>
|
||||
<attack type="4" damage="2d50"/>
|
||||
</race>
|
||||
<race name="dolphin" magres="0.000000" maxaura="0.000000" regaura="0.000000" recruitcost="50" weight="500" capacity="540" speed="2.000000" hp="24" damage="1d6" unarmedattack="0" unarmeddefense="0" attackmodifier="5" defensemodifier="5" coastal="yes" swim="yes" teach="no" getitem="yes">
|
||||
<race name="dolphin" magres="0.000000" maxaura="0.000000" regaura="0.000000" weight="500" capacity="540" speed="2.000000" hp="24" damage="1d6" unarmedattack="0" unarmeddefense="0" attackmodifier="5" defensemodifier="5" coastal="yes" swim="yes" teach="no" getitem="yes">
|
||||
<ai splitsize="5000"/>
|
||||
<function name="initfamiliar" value="oldfamiliars"/>
|
||||
<skill name="alchemy" modifier="-99"/>
|
||||
|
@ -118,7 +118,7 @@
|
|||
<skill name="taxation" modifier="-99"/>
|
||||
<attack type="4" damage="1d6"/>
|
||||
</race>
|
||||
<race name="tiger" magres="0.000000" maxaura="0.000000" regaura="0.000000" recruitcost="50" weight="500" capacity="540" speed="1.000000" hp="30" damage="2d6" unarmedattack="0" unarmeddefense="0" attackmodifier="6" defensemodifier="3" walk="yes" teach="no" getitem="yes">
|
||||
<race name="tiger" magres="0.000000" maxaura="0.000000" regaura="0.000000" weight="500" capacity="540" speed="1.000000" hp="30" damage="2d6" unarmedattack="0" unarmeddefense="0" attackmodifier="6" defensemodifier="3" walk="yes" teach="no" getitem="yes">
|
||||
<ai splitsize="5000"/>
|
||||
<function name="initfamiliar" value="oldfamiliars"/>
|
||||
<skill name="alchemy" modifier="-99"/>
|
||||
|
@ -148,7 +148,7 @@
|
|||
<attack type="4" damage="1d6"/>
|
||||
<attack type="4" damage="1d6"/>
|
||||
</race>
|
||||
<race name="hellcat" magres="0.500000" maxaura="0.000000" regaura="0.000000" recruitcost="50" weight="500" capacity="540" speed="1.000000" hp="40" damage="2d6" unarmedattack="0" unarmeddefense="0" attackmodifier="6" defensemodifier="4" walk="yes" teach="no" getitem="yes" resistpierce="yes">
|
||||
<race name="hellcat" magres="0.500000" maxaura="0.000000" regaura="0.000000" weight="500" capacity="540" speed="1.000000" hp="40" damage="2d6" unarmedattack="0" unarmeddefense="0" attackmodifier="6" defensemodifier="4" walk="yes" teach="no" getitem="yes" resistpierce="yes">
|
||||
<ai splitsize="5000"/>
|
||||
<function name="initfamiliar" value="oldfamiliars"/>
|
||||
<skill name="perception" modifier="1"/>
|
||||
|
@ -178,7 +178,7 @@
|
|||
<attack type="4" damage="1d6"/>
|
||||
<attack type="4" damage="1d6"/>
|
||||
</race>
|
||||
<race name="owl" magres="0.000000" maxaura="0.000000" regaura="0.000000" recruitcost="50" weight="500" capacity="540" speed="1.000000" hp="9" damage="1d4" unarmedattack="0" unarmeddefense="0" attackmodifier="2" defensemodifier="4" fly="yes" walk="yes" teach="no" getitem="yes">
|
||||
<race name="owl" magres="0.000000" maxaura="0.000000" regaura="0.000000" weight="500" capacity="540" speed="1.000000" hp="9" damage="1d4" unarmedattack="0" unarmeddefense="0" attackmodifier="2" defensemodifier="4" fly="yes" walk="yes" teach="no" getitem="yes">
|
||||
<ai splitsize="5000"/>
|
||||
<function name="initfamiliar" value="oldfamiliars"/>
|
||||
<skill name="espionage" modifier="1"/>
|
||||
|
@ -209,7 +209,7 @@
|
|||
<skill name="taxation" modifier="-99"/>
|
||||
<attack type="4" damage="1d4"/>
|
||||
</race>
|
||||
<race name="fairy" magres="0.800000" maxaura="1.000000" regaura="1.500000" recruitcost="50" weight="200" capacity="540" speed="1.000000" hp="6" damage="1d3" unarmedattack="0" unarmeddefense="0" attackmodifier="6" defensemodifier="14" fly="yes" walk="yes" teach="no" getitem="yes" equipment="yes">
|
||||
<race name="fairy" magres="0.800000" maxaura="1.000000" regaura="1.500000" weight="200" capacity="540" speed="1.000000" hp="6" damage="1d3" unarmedattack="0" unarmeddefense="0" attackmodifier="6" defensemodifier="14" fly="yes" walk="yes" teach="no" getitem="yes" equipment="yes">
|
||||
<ai splitsize="5000"/>
|
||||
<function name="initfamiliar" value="oldfamiliars"/>
|
||||
<skill name="stealth" modifier="5"/>
|
||||
|
@ -244,7 +244,7 @@
|
|||
<attack type="4" damage="1d3"/>
|
||||
<attack type="4" damage="1d3"/>
|
||||
</race>
|
||||
<race name="dreamcat" magres="0.500000" maxaura="1.000000" regaura="1.000000" recruitcost="50" weight="500" capacity="540" speed="1.000000" hp="10" damage="1d5" unarmedattack="0" unarmeddefense="0" attackmodifier="5" defensemodifier="6" fly="yes" walk="yes" teach="no" getitem="yes" invinciblenonmagic="yes">
|
||||
<race name="dreamcat" magres="0.500000" maxaura="1.000000" regaura="1.000000" weight="500" capacity="540" speed="1.000000" hp="10" damage="1d5" unarmedattack="0" unarmeddefense="0" attackmodifier="5" defensemodifier="6" fly="yes" walk="yes" teach="no" getitem="yes" invinciblenonmagic="yes">
|
||||
<ai splitsize="5000"/>
|
||||
<function name="initfamiliar" value="oldfamiliars"/>
|
||||
<skill name="magic" modifier="1"/>
|
||||
|
@ -275,7 +275,7 @@
|
|||
<attack type="4" damage="1d5"/>
|
||||
<attack type="4" damage="1d5"/>
|
||||
</race>
|
||||
<race name="imp" magres="0.500000" maxaura="1.000000" regaura="1.000000" recruitcost="50" weight="500" capacity="540" speed="1.000000" hp="10" ac="1" damage="1d4" unarmedattack="0" unarmeddefense="0" attackmodifier="5" defensemodifier="4" fly="yes" walk="yes" teach="no" getitem="yes" equipment="yes">
|
||||
<race name="imp" magres="0.500000" maxaura="1.000000" regaura="1.000000" weight="500" capacity="540" speed="1.000000" hp="10" ac="1" damage="1d4" unarmedattack="0" unarmeddefense="0" attackmodifier="5" defensemodifier="4" fly="yes" walk="yes" teach="no" getitem="yes" equipment="yes">
|
||||
<ai splitsize="5000"/>
|
||||
<function name="initfamiliar" value="oldfamiliars"/>
|
||||
<skill name="alchemy" modifier="-99"/>
|
||||
|
@ -308,7 +308,7 @@
|
|||
<attack type="1" damage="1d4"/>
|
||||
<attack type="6" spell="fiery_dragonbreath" level="3" />
|
||||
</race>
|
||||
<race name="ghost" magres="0.800000" maxaura="0.500000" regaura="0.100000" recruitcost="50" weight="500" capacity="540" speed="1.000000" hp="30" ac="5" damage="2d6" unarmedattack="0" unarmeddefense="0" attackmodifier="5" defensemodifier="8" scarepeasants="yes" fly="yes" walk="yes" teach="no" getitem="yes" equipment="yes" invinciblenonmagic="yes">
|
||||
<race name="ghost" magres="0.800000" maxaura="0.500000" regaura="0.100000" weight="500" capacity="540" speed="1.000000" hp="30" ac="5" damage="2d6" unarmedattack="0" unarmeddefense="0" attackmodifier="5" defensemodifier="8" scarepeasants="yes" fly="yes" walk="yes" teach="no" getitem="yes" equipment="yes" invinciblenonmagic="yes">
|
||||
<ai splitsize="5000"/>
|
||||
<function name="initfamiliar" value="oldfamiliars"/>
|
||||
<skill name="alchemy" modifier="-99"/>
|
||||
|
@ -339,7 +339,7 @@
|
|||
<attack type="2" damage="2d30"/>
|
||||
<attack type="3" damage="1d1"/>
|
||||
</race>
|
||||
<race name="wolf" magres="0.000000" maxaura="0.000000" regaura="0.000000" recruitcost="50" weight="500" capacity="540" speed="1.000000" hp="25" damage="2d6" unarmedattack="0" unarmeddefense="0" attackmodifier="6" defensemodifier="3" scarepeasants="yes" walk="yes" teach="no" getitem="yes">
|
||||
<race name="wolf" magres="0.000000" maxaura="0.000000" regaura="0.000000" weight="500" capacity="540" speed="1.000000" hp="25" damage="2d6" unarmedattack="0" unarmeddefense="0" attackmodifier="6" defensemodifier="3" scarepeasants="yes" walk="yes" teach="no" getitem="yes">
|
||||
<ai splitsize="5000"/>
|
||||
<function name="name" value="namegeneric"/>
|
||||
<function name="initfamiliar" value="oldfamiliars"/>
|
||||
|
@ -370,7 +370,7 @@
|
|||
<attack type="4" damage="1d4"/>
|
||||
<attack type="4" damage="1d4"/>
|
||||
</race>
|
||||
<race name="unicorn" magres="0.900000" maxaura="1.500000" regaura="1.500000" recruitcost="50" weight="5000" capacity="2000" speed="2.000000" hp="40" damage="2d4" unarmedattack="0" unarmeddefense="0" attackmodifier="6" defensemodifier="4" walk="yes" teach="no" getitem="yes">
|
||||
<race name="unicorn" magres="0.900000" maxaura="1.500000" regaura="1.500000" weight="5000" capacity="2000" speed="2.000000" hp="40" damage="2d4" unarmedattack="0" unarmeddefense="0" attackmodifier="6" defensemodifier="4" walk="yes" teach="no" getitem="yes">
|
||||
<ai splitsize="9999"/>
|
||||
<function name="initfamiliar" value="oldfamiliars"/>
|
||||
<skill name="alchemy" modifier="-99"/>
|
||||
|
@ -401,7 +401,7 @@
|
|||
<attack type="4" damage="3d12"/>
|
||||
<attack type="4" damage="2d4"/>
|
||||
</race>
|
||||
<race name="nymph" magres="0.900000" maxaura="1.000000" regaura="1.500000" recruitcost="50" weight="1000" capacity="540" speed="1.000000" hp="15" damage="1d4" unarmedattack="0" unarmeddefense="0" attackmodifier="3" defensemodifier="1" walk="yes" teach="no" getitem="yes" equipment="yes">
|
||||
<race name="nymph" magres="0.900000" maxaura="1.000000" regaura="1.500000" weight="1000" capacity="540" speed="1.000000" hp="15" damage="1d4" unarmedattack="0" unarmeddefense="0" attackmodifier="3" defensemodifier="1" walk="yes" teach="no" getitem="yes" equipment="yes">
|
||||
<ai splitsize="9999"/>
|
||||
<function name="initfamiliar" value="oldfamiliars"/>
|
||||
<skill name="mining" modifier="-99"/>
|
||||
|
@ -431,7 +431,7 @@
|
|||
<attack type="1" damage="1d4"/>
|
||||
<attack type="2" damage="2d20"/>
|
||||
</race>
|
||||
<race name="songdragon" magres="0.990000" maxaura="1.000000" regaura="1.000000" recruitcost="50" weight="1000" capacity="600" speed="1.500000" hp="40" ac="1" damage="2d4" unarmedattack="0" unarmeddefense="0" attackmodifier="3" defensemodifier="1" fly="yes" walk="yes" teach="no" getitem="yes" unarmedguard="yes">
|
||||
<race name="songdragon" magres="0.990000" maxaura="1.000000" regaura="1.000000" weight="1000" capacity="600" speed="1.500000" hp="40" ac="1" damage="2d4" unarmedattack="0" unarmeddefense="0" attackmodifier="3" defensemodifier="1" fly="yes" walk="yes" teach="no" getitem="yes" unarmedguard="yes">
|
||||
<ai splitsize="9999"/>
|
||||
<function name="initfamiliar" value="oldfamiliars"/>
|
||||
<skill name="alchemy" modifier="-99"/>
|
||||
|
@ -463,7 +463,7 @@
|
|||
<attack type="4" damage="2d4"/>
|
||||
<attack type="6" spell="fiery_dragonbreath" level="3" />
|
||||
</race>
|
||||
<race name="rat" magres="0.000000" maxaura="0.000000" regaura="0.000000" recruitcost="50" weight="100" capacity="540" speed="1.000000" hp="10" damage="1d4" unarmedattack="0" unarmeddefense="0" attackmodifier="1" defensemodifier="1" walk="yes" teach="no" getitem="yes">
|
||||
<race name="rat" magres="0.000000" maxaura="0.000000" regaura="0.000000" weight="100" capacity="540" speed="1.000000" hp="10" damage="1d4" unarmedattack="0" unarmeddefense="0" attackmodifier="1" defensemodifier="1" walk="yes" teach="no" getitem="yes">
|
||||
<ai splitsize="9999"/>
|
||||
<function name="initfamiliar" value="oldfamiliars"/>
|
||||
<skill name="espionage" modifier="5"/>
|
||||
|
@ -495,7 +495,7 @@
|
|||
<attack type="4" damage="1d4"/>
|
||||
<attack type="4" damage="1d4"/>
|
||||
</race>
|
||||
<race name="eagle" magres="0.000000" maxaura="0.000000" regaura="0.000000" recruitcost="50" weight="500" capacity="540" speed="1.500000" hp="15" damage="2d3" unarmedattack="0" unarmeddefense="0" attackmodifier="6" defensemodifier="2" fly="yes" walk="yes" teach="no" getitem="yes">
|
||||
<race name="eagle" magres="0.000000" maxaura="0.000000" regaura="0.000000" weight="500" capacity="540" speed="1.500000" hp="15" damage="2d3" unarmedattack="0" unarmeddefense="0" attackmodifier="6" defensemodifier="2" fly="yes" walk="yes" teach="no" getitem="yes">
|
||||
<ai splitsize="9999"/>
|
||||
<function name="initfamiliar" value="oldfamiliars"/>
|
||||
<skill name="alchemy" modifier="-99"/>
|
||||
|
@ -525,7 +525,7 @@
|
|||
<skill name="taxation" modifier="-99"/>
|
||||
<attack type="4" damage="2d3"/>
|
||||
</race>
|
||||
<race name="tunnelworm" magres="0.800000" maxaura="0.000000" regaura="0.000000" recruitcost="50" weight="30000" capacity="10000" speed="1.000000" hp="300" ac="6" damage="3d20" unarmedattack="0" unarmeddefense="0" attackmodifier="6" defensemodifier="1" scarepeasants="yes" walk="yes" teach="no" getitem="yes">
|
||||
<race name="tunnelworm" magres="0.800000" maxaura="0.000000" regaura="0.000000" weight="30000" capacity="10000" speed="1.000000" hp="300" ac="6" damage="3d20" unarmedattack="0" unarmeddefense="0" attackmodifier="6" defensemodifier="1" scarepeasants="yes" walk="yes" teach="no" getitem="yes">
|
||||
<ai splitsize="99999"/>
|
||||
<function name="initfamiliar" value="oldfamiliars"/>
|
||||
<skill name="alchemy" modifier="-99"/>
|
||||
|
@ -558,7 +558,7 @@
|
|||
<attack type="4" damage="3d20"/>
|
||||
<attack type="8" damage="1d10"/>
|
||||
</race>
|
||||
<race name="lynx" magres="0.000000" maxaura="0.000000" regaura="0.000000" recruitcost="50" weight="500" capacity="540" speed="1.000000" hp="20" damage="2d3" unarmedattack="0" unarmeddefense="0" attackmodifier="4" defensemodifier="5" walk="yes" teach="no" getitem="yes">
|
||||
<race name="lynx" magres="0.000000" maxaura="0.000000" regaura="0.000000" weight="500" capacity="540" speed="1.000000" hp="20" damage="2d3" unarmedattack="0" unarmeddefense="0" attackmodifier="4" defensemodifier="5" walk="yes" teach="no" getitem="yes">
|
||||
<ai splitsize="99999"/>
|
||||
<function name="initfamiliar" value="oldfamiliars"/>
|
||||
<skill name="alchemy" modifier="-99"/>
|
||||
|
@ -589,25 +589,25 @@
|
|||
<skill name="taxation" modifier="-99"/>
|
||||
<attack type="4" damage="2d3"/>
|
||||
</race>
|
||||
<race name="direwolf" magres="0.000000" maxaura="0.000000" regaura="0.000000" recruitcost="50" weight="500" capacity="540" speed="1.000000" hp="20" damage="2d4" unarmedattack="0" unarmeddefense="0" attackmodifier="3" defensemodifier="1" walk="yes" teach="no" giveperson="yes">
|
||||
<race name="direwolf" magres="0.000000" maxaura="0.000000" regaura="0.000000" weight="500" capacity="540" speed="1.000000" hp="20" damage="2d4" unarmedattack="0" unarmeddefense="0" attackmodifier="3" defensemodifier="1" walk="yes" teach="no" giveperson="yes">
|
||||
<function name="initfamiliar" value="oldfamiliars"/>
|
||||
<ai splitsize="5000"/>
|
||||
<attack type="4" damage="2d4"/>
|
||||
</race>
|
||||
<race name="peasant" magres="0.000000" maxaura="1.000000" regaura="1.000000" recruitcost="50" weight="1000" capacity="540" speed="1.000000" hp="20" damage="1d6" unarmedattack="0" unarmeddefense="0" cannotmove="yes" teach="no">
|
||||
<race name="peasant" magres="0.000000" maxaura="1.000000" regaura="1.000000" weight="1000" capacity="540" speed="1.000000" hp="20" damage="1d6" unarmedattack="0" unarmeddefense="0" cannotmove="yes" teach="no">
|
||||
<ai splitsize="10000"/>
|
||||
<attack type="1" damage="1d6"/>
|
||||
</race>
|
||||
<race name="braineater" magres="0.900000" maxaura="1.000000"
|
||||
regaura="1.000000" recruitcost="50000" weight="100" capacity="540" speed="1.000000" hp="20" damage="0d0" unarmedattack="0" unarmeddefense="0" attackmodifier="6" defensemodifier="10" scarepeasants="yes" fly="yes" walk="yes" teach="no" invinciblenonmagic="yes">
|
||||
regaura="1.000000" weight="100" capacity="540" speed="1.000000" hp="20" damage="0d0" unarmedattack="0" unarmeddefense="0" attackmodifier="6" defensemodifier="10" scarepeasants="yes" fly="yes" walk="yes" teach="no" invinciblenonmagic="yes">
|
||||
<ai splitsize="500" killpeasants="yes" moverandom="yes" learn="yes"/>
|
||||
<function name="name" value="namegeneric"/>
|
||||
<function name="describe" value="describe_braineater"/>
|
||||
<function name="describe" value="describe_race"/>
|
||||
<attack type="2" damage="3d15"/>
|
||||
<attack type="3" damage="1d1"/>
|
||||
<attack type="4" damage="1d1"/>
|
||||
</race>
|
||||
<race name="toad" magres="0.200000" maxaura="1.000000" regaura="1.000000" recruitcost="50" maintenance="10" weight="100" capacity="540" speed="1.000000" hp="10" damage="1d2" unarmedattack="-2" unarmeddefense="-2" playerrace="yes" giveperson="yes" giveunit="yes" getitem="yes" walk="yes">
|
||||
<race name="toad" magres="0.200000" maxaura="1.000000" regaura="1.000000" maintenance="10" weight="100" capacity="540" speed="1.000000" hp="10" damage="1d2" unarmedattack="-2" unarmeddefense="-2" playerrace="yes" giveperson="yes" giveunit="yes" getitem="yes" walk="yes">
|
||||
<ai splitsize="1" learn="yes"/>
|
||||
<skill name="alchemy" modifier="-10"/>
|
||||
<skill name="crossbow" modifier="-10"/>
|
||||
|
@ -671,66 +671,66 @@
|
|||
<skill name="stamina" modifier="-10"/>
|
||||
<attack type="4" damage="1d2"/>
|
||||
</race>
|
||||
<race name="mountainguard" unarmedguard="yes" magres="0.500000" maxaura="1.000000" regaura="0.500000" recruitcost="50000" weight="10000" capacity="2000" speed="0.000000" hp="1000" ac="12" damage="2d40" unarmedattack="0" unarmeddefense="0" attackmodifier="6" defensemodifier="8" cannotmove="yes" canlearn="no" teach="no" noweapons="yes">
|
||||
<race name="mountainguard" unarmedguard="yes" magres="0.500000" maxaura="1.000000" regaura="0.500000" weight="10000" capacity="2000" speed="0.000000" hp="1000" ac="12" damage="2d40" unarmedattack="0" unarmeddefense="0" attackmodifier="6" defensemodifier="8" cannotmove="yes" canlearn="no" teach="no" noweapons="yes">
|
||||
<ai splitsize="1"/>
|
||||
<function name="name" value="namegeneric"/>
|
||||
<attack type="4" damage="2d40"/>
|
||||
</race>
|
||||
<race name="shadowmaster" cansail="no" cansteal="no" canlearn="no" magres="0.750000" maxaura="1.000000" regaura="2.000000" recruitcost="50000" weight="500" capacity="540" speed="1.000000" hp="150" ac="4" damage="2d5" unarmedattack="0" unarmeddefense="0" attackmodifier="11" defensemodifier="13" scarepeasants="yes" walk="yes" teach="no" desert="yes">
|
||||
<race name="shadowmaster" cansail="no" cansteal="no" canlearn="no" magres="0.750000" maxaura="1.000000" regaura="2.000000" weight="500" capacity="540" speed="1.000000" hp="150" ac="4" damage="2d5" unarmedattack="0" unarmeddefense="0" attackmodifier="11" defensemodifier="13" scarepeasants="yes" walk="yes" teach="no" desert="yes">
|
||||
<ai splitsize="50" killpeasants="yes" moverandom="yes" learn="yes"/>
|
||||
<function name="name" value="namegeneric"/>
|
||||
<attack type="4" damage="2d4"/>
|
||||
<attack type="2" damage="2d30"/>
|
||||
<attack type="3" damage="1d2"/>
|
||||
</race>
|
||||
<race name="shadowdemon" cansail="no" cansteal="no" canlearn="no" magres="0.750000" maxaura="1.000000" regaura="1.000000" recruitcost="5000" weight="500" capacity="540" speed="1.000000" hp="50" ac="3" damage="2d4" unarmedattack="0" unarmeddefense="0" attackmodifier="8" defensemodifier="11" scarepeasants="yes" walk="yes" teach="no" desert="yes" recruitethereal="yes">
|
||||
<race name="shadowdemon" cansail="no" cansteal="no" canlearn="no" magres="0.750000" maxaura="1.000000" regaura="1.000000" weight="500" capacity="540" speed="1.000000" hp="50" ac="3" damage="2d4" unarmedattack="0" unarmeddefense="0" attackmodifier="8" defensemodifier="11" scarepeasants="yes" walk="yes" teach="no" desert="yes" recruitethereal="yes">
|
||||
<ai splitsize="1000" killpeasants="yes" moverandom="yes" learn="yes"/>
|
||||
<function name="name" value="namegeneric"/>
|
||||
<attack type="4" damage="2d3"/>
|
||||
<attack type="3" damage="1d1"/>
|
||||
</race>
|
||||
<race name="stonegolem" stonegolem="true" magres="0.250000" maxaura="1.000000" regaura="0.100000" recruitcost="5000" weight="10000" capacity="2000" speed="1.000000" hp="60" ac="4" damage="2d12+6" unarmedattack="0" unarmeddefense="0" attackmodifier="4" defensemodifier="2" walk="yes" canlearn="no" teach="no">
|
||||
<race name="stonegolem" stonegolem="true" magres="0.250000" maxaura="1.000000" regaura="0.100000" weight="10000" capacity="2000" speed="1.000000" hp="60" ac="4" damage="2d12+6" unarmedattack="0" unarmeddefense="0" attackmodifier="4" defensemodifier="2" walk="yes" canlearn="no" teach="no">
|
||||
<ai splitsize="50"/>
|
||||
<skill name="building" modifier="14"/>
|
||||
<skill name="roadwork" modifier="14"/>
|
||||
<attack type="4" damage="2d10+4"/>
|
||||
</race>
|
||||
<race name="irongolem" irongolem="true" magres="0.250000" maxaura="1.000000" regaura="0.100000" recruitcost="5000" weight="10000" capacity="2000" speed="1.000000" hp="50" ac="2" damage="2d10+4" unarmedattack="0" unarmeddefense="0" attackmodifier="4" defensemodifier="2" walk="yes" canlearn="no" teach="no">
|
||||
<race name="irongolem" irongolem="true" magres="0.250000" maxaura="1.000000" regaura="0.100000" weight="10000" capacity="2000" speed="1.000000" hp="50" ac="2" damage="2d10+4" unarmedattack="0" unarmeddefense="0" attackmodifier="4" defensemodifier="2" walk="yes" canlearn="no" teach="no">
|
||||
<ai splitsize="50"/>
|
||||
<function name="name" value="namegeneric"/>
|
||||
<skill name="armorer" modifier="14"/>
|
||||
<skill name="weaponsmithing" modifier="14"/>
|
||||
<attack type="4" damage="2d8+4"/>
|
||||
</race>
|
||||
<race name="spell" magres="0.000000" maxaura="1.000000" regaura="0.100000" recruitcost="0" weight="0" capacity="0" speed="0.000000" hp="1" damage="1d4" unarmedattack="-2" unarmeddefense="-2" canlearn="no" noheal="yes" noweapons="yes" illusionary="yes" invisible="yes" fly="yes" swim="yes" walk="yes">
|
||||
<race name="spell" magres="0.000000" maxaura="1.000000" regaura="0.100000" weight="0" capacity="0" speed="0.000000" hp="1" damage="1d4" unarmedattack="-2" unarmeddefense="-2" canlearn="no" noheal="yes" noweapons="yes" illusionary="yes" invisible="yes" fly="yes" swim="yes" walk="yes">
|
||||
<ai splitsize="1"/>
|
||||
<attack type="1" damage="1d4"/>
|
||||
</race>
|
||||
<race name="special" magres="0.000000" maxaura="0.000000" regaura="0.000000" recruitcost="0" weight="0" capacity="0" speed="0.000000" hp="1" damage="1d4" unarmedattack="-2" unarmeddefense="-2">
|
||||
<race name="special" magres="0.000000" maxaura="0.000000" regaura="0.000000" weight="0" capacity="0" speed="0.000000" hp="1" damage="1d4" unarmedattack="-2" unarmeddefense="-2">
|
||||
<ai splitsize="1"/>
|
||||
<attack type="1" damage="1d4"/>
|
||||
</race>
|
||||
<race name="dracoid" magres="0.000000" maxaura="1.000000" regaura="1.000000" recruitcost="50" weight="1000" capacity="540" speed="1.000000" hp="24" damage="1d5" unarmedattack="-2" unarmeddefense="-2" walk="yes" teach="no" giveperson="yes" getitem="yes" equipment="yes">
|
||||
<race name="dracoid" magres="0.000000" maxaura="1.000000" regaura="1.000000" weight="1000" capacity="540" speed="1.000000" hp="24" damage="1d5" unarmedattack="-2" unarmeddefense="-2" walk="yes" teach="no" giveperson="yes" getitem="yes" equipment="yes">
|
||||
<ai splitsize="10000" moverandom="yes" learn="yes"/>
|
||||
<function name="name" value="namedracoid"/>
|
||||
<attack type="4" damage="1d6"/>
|
||||
<attack type="4" damage="1d6"/>
|
||||
<attack type="1" damage="1d5"/>
|
||||
</race>
|
||||
<race name="catdragon" magres="0.900000" maxaura="1.000000" regaura="1.000000" recruitcost="500000" weight="20000" capacity="10000" speed="1.000000" hp="20" damage="2d40" unarmedattack="0" unarmeddefense="0" defensemodifier="50" fly="yes" walk="yes" teach="no" shapeshift="yes" giveperson="yes" getitem="yes">
|
||||
<race name="catdragon" magres="0.900000" maxaura="1.000000" regaura="1.000000" weight="20000" capacity="10000" speed="1.000000" hp="20" damage="2d40" unarmedattack="0" unarmeddefense="0" defensemodifier="50" fly="yes" walk="yes" teach="no" shapeshift="yes" giveperson="yes" getitem="yes" dragon="yes">
|
||||
<ai splitsize="1"/>
|
||||
<attack type="4" damage="2d40"/>
|
||||
<attack type="4" damage="2d40"/>
|
||||
<attack type="4" damage="2d40"/>
|
||||
<attack type="4" damage="2d40"/>
|
||||
</race>
|
||||
<race name="ent" magres="0.250000" maxaura="1.000000" regaura="0.500000" recruitcost="5000" weight="5000" capacity="2500" speed="1.000000" hp="50" ac="4" damage="2d4+12" unarmedattack="0" unarmeddefense="0" attackmodifier="9" defensemodifier="7" scarepeasants="yes" walk="yes" teach="no">
|
||||
<race name="ent" magres="0.250000" maxaura="1.000000" regaura="0.500000" weight="5000" capacity="2500" speed="1.000000" hp="50" ac="4" damage="2d4+12" unarmedattack="0" unarmeddefense="0" attackmodifier="9" defensemodifier="7" scarepeasants="yes" walk="yes" teach="no">
|
||||
<ai splitsize="1000" moverandom="yes" learn="yes"/>
|
||||
<function name="name" value="namegeneric"/>
|
||||
<attack type="4" damage="2d12"/>
|
||||
<attack type="4" damage="2d12"/>
|
||||
</race>
|
||||
<race name="wyrm" magres="0.900000" maxaura="1.000000" regaura="3.000000" recruitcost="250000" weight="18000" capacity="1000000" speed="1.000000" hp="2700" ac="8" damage="2d60" unarmedattack="0" unarmeddefense="0" attackmodifier="10" defensemodifier="10" scarepeasants="yes" fly="yes" walk="yes" teach="no" getitem="yes" resistbash="yes" unarmedguard="yes">
|
||||
<race name="wyrm" magres="0.900000" maxaura="1.000000" regaura="3.000000" weight="18000" capacity="1000000" speed="1.000000" hp="2700" ac="8" damage="2d60" unarmedattack="0" unarmeddefense="0" attackmodifier="10" defensemodifier="10" scarepeasants="yes" fly="yes" walk="yes" teach="no" getitem="yes" resistbash="yes" unarmedguard="yes">
|
||||
<ai splitsize="1" killpeasants="yes" learn="yes"/>
|
||||
<function name="name" value="namedragon"/>
|
||||
<function name="move" value="movedragon"/>
|
||||
|
@ -742,7 +742,7 @@
|
|||
<attack type="4" damage="5d30"/>
|
||||
<attack type="6" spell="powerful_dragonbreath" level="12" />
|
||||
</race>
|
||||
<race name="dragon" magres="0.700000" maxaura="1.000000" regaura="2.000000" recruitcost="50000" weight="10000" capacity="1000000" speed="1.500000" hp="900" ac="6" damage="2d30" unarmedattack="0" unarmeddefense="0" attackmodifier="7" defensemodifier="7" scarepeasants="yes" fly="yes" walk="yes" teach="no" getitem="yes" resistbash="yes" unarmedguard="yes">
|
||||
<race name="dragon" magres="0.700000" maxaura="1.000000" regaura="2.000000" weight="10000" capacity="1000000" speed="1.500000" hp="900" ac="6" damage="2d30" unarmedattack="0" unarmeddefense="0" attackmodifier="7" defensemodifier="7" scarepeasants="yes" fly="yes" walk="yes" teach="no" getitem="yes" resistbash="yes" unarmedguard="yes" dragon="yes">
|
||||
<ai splitsize="2" killpeasants="yes" learn="yes"/>
|
||||
<function name="name" value="namedragon"/>
|
||||
<function name="age" value="agedragon"/>
|
||||
|
@ -755,7 +755,7 @@
|
|||
<attack type="4" damage="3d30"/>
|
||||
<attack type="6" spell="icy_dragonbreath" level="6" />
|
||||
</race>
|
||||
<race name="youngdragon" magres="0.500000" maxaura="1.000000" regaura="1.000000" recruitcost="10000" weight="20000" capacity="10000" speed="1.000000" hp="300" ac="4" damage="2d15" unarmedattack="0" unarmeddefense="0" attackmodifier="4" defensemodifier="4" scarepeasants="yes" fly="yes" walk="yes" teach="no" getitem="yes" resistbash="yes" unarmedguard="yes">
|
||||
<race name="youngdragon" magres="0.500000" maxaura="1.000000" regaura="1.000000" weight="20000" capacity="10000" speed="1.000000" hp="300" ac="4" damage="2d15" unarmedattack="0" unarmeddefense="0" attackmodifier="4" defensemodifier="4" scarepeasants="yes" fly="yes" walk="yes" teach="no" getitem="yes" resistbash="yes" unarmedguard="yes">
|
||||
<ai splitsize="6" killpeasants="yes" learn="yes"/>
|
||||
<function name="name" value="namedragon"/>
|
||||
<function name="age" value="agefiredragon"/>
|
||||
|
@ -769,13 +769,13 @@
|
|||
<attack type="4" damage="1d30"/>
|
||||
<attack type="6" spell="fiery_dragonbreath" level="3" />
|
||||
</race>
|
||||
<race name="illusion" magres="0.000000" maxaura="0.000000" regaura="0.000000" recruitcost="50" weight="0" capacity="0" speed="1.000000" hp="1" damage="1d1" unarmedattack="0" unarmeddefense="0" walk="yes" canlearn="no" teach="no" noweapons="yes" illusionary="yes">
|
||||
<race name="illusion" magres="0.000000" maxaura="0.000000" regaura="0.000000" weight="0" capacity="0" speed="1.000000" hp="1" damage="1d1" unarmedattack="0" unarmeddefense="0" walk="yes" canlearn="no" teach="no" noweapons="yes" illusionary="yes">
|
||||
<ai splitsize="999999"/>
|
||||
<function name="age" value="ageillusion"/>
|
||||
<skill name="unarmed" modifier="-99"/>
|
||||
<attack type="1" damage="1d1"/>
|
||||
</race>
|
||||
<race name="undead" magres="0.000000" maxaura="1.000000" regaura="1.000000" recruitcost="2" weight="1000" capacity="540" speed="1.000000" hp="20" damage="1d7" unarmedattack="0" unarmeddefense="0" attackmodifier="1" defensemodifier="1" scarepeasants="yes" walk="yes" canlearn="no" teach="no" noheal="yes" undead="yes" equipment="yes">
|
||||
<race name="undead" magres="0.000000" maxaura="1.000000" regaura="1.000000" weight="1000" capacity="540" speed="1.000000" hp="20" damage="1d7" unarmedattack="0" unarmeddefense="0" attackmodifier="1" defensemodifier="1" scarepeasants="yes" walk="yes" canlearn="no" teach="no" noheal="yes" undead="yes" equipment="yes">
|
||||
<ai splitsize="20000" moverandom="yes"/>
|
||||
<function name="name" value="nameundead"/>
|
||||
<function name="age" value="ageundead"/>
|
||||
|
@ -978,7 +978,7 @@
|
|||
<familiar race="rat"/>
|
||||
<familiar race="imp"/>
|
||||
</race>
|
||||
<race name="clone" magres="0.900000" maxaura="0.000000" regaura="0.000000" recruitcost="0" weight="1000" capacity="540" speed="1.000000" hp="40" damage="0d0" unarmedattack="-2" unarmeddefense="-2" playerrace="yes" walk="yes" canlearn="no" teach="no" noheal="yes">
|
||||
<race name="clone" magres="0.900000" maxaura="0.000000" regaura="0.000000" weight="1000" capacity="540" speed="1.000000" hp="40" damage="0d0" unarmedattack="-2" unarmeddefense="-2" playerrace="yes" walk="yes" canlearn="no" teach="no" noheal="yes">
|
||||
<ai splitsize="10000"/>
|
||||
<skill name="alchemy" modifier="-99"/>
|
||||
<skill name="crossbow" modifier="-99"/>
|
||||
|
@ -1011,11 +1011,11 @@
|
|||
<skill name="unarmed" modifier="-99"/>
|
||||
<attack type="1" damage="0d0"/>
|
||||
</race>
|
||||
<race name="template" magres="1.000000" maxaura="0.000000" regaura="0.000000" recruitcost="0" weight="0" capacity="1000" speed="10.000000" hp="10" damage="1d4" unarmedattack="-2" unarmeddefense="-2" playerrace="yes" fly="yes" swim="yes" walk="yes" shapeshift="yes" shapeshiftany="yes" giveperson="yes" giveunit="yes" getitem="yes" recruitethereal="yes" recruitunlimited="yes" equipment="yes">
|
||||
<race name="template" magres="1.000000" maxaura="0.000000" regaura="0.000000" weight="0" capacity="1000" speed="10.000000" hp="10" damage="1d4" unarmedattack="-2" unarmeddefense="-2" playerrace="yes" fly="yes" swim="yes" walk="yes" shapeshift="yes" shapeshiftany="yes" giveperson="yes" giveunit="yes" getitem="yes" recruitethereal="yes" recruitunlimited="yes" equipment="yes">
|
||||
<ai splitsize="10000" moverandom="yes" learn="yes"/>
|
||||
<attack type="1" damage="1d4"/>
|
||||
</race>
|
||||
<race name="gnome" magres="1.000000" maxaura="0.000000" regaura="0.000000" recruitcost="5" weight="1000" capacity="540" speed="1.000000" hp="50" damage="1d4" unarmedattack="10" unarmeddefense="10" attackmodifier="10" defensemodifier="10" walk="yes" teach="no">
|
||||
<race name="gnome" magres="1.000000" maxaura="0.000000" regaura="0.000000" weight="1000" capacity="540" speed="1.000000" hp="50" damage="1d4" unarmedattack="10" unarmeddefense="10" attackmodifier="10" defensemodifier="10" walk="yes" teach="no">
|
||||
<ai splitsize="10000"/>
|
||||
<skill name="tactics" modifier="1"/>
|
||||
<skill name="perception" modifier="1"/>
|
||||
|
@ -1023,7 +1023,7 @@
|
|||
<skill name="unarmed" modifier="1"/>
|
||||
<attack type="1" damage="1d4"/>
|
||||
</race>
|
||||
<race name="museumghost" magres="1.000000" maxaura="0.000000" regaura="0.000000" recruitcost="5" weight="1000" capacity="540" speed="1.000000" hp="50" damage="1d4" unarmedattack="10" unarmeddefense="10" attackmodifier="10" defensemodifier="10" walk="yes" teach="no">
|
||||
<race name="museumghost" magres="1.000000" maxaura="0.000000" regaura="0.000000" weight="1000" capacity="540" speed="1.000000" hp="50" damage="1d4" unarmedattack="10" unarmeddefense="10" attackmodifier="10" defensemodifier="10" walk="yes" teach="no">
|
||||
<ai splitsize="10000"/>
|
||||
<skill name="tactics" modifier="1"/>
|
||||
<skill name="perception" modifier="1"/>
|
||||
|
@ -1037,7 +1037,7 @@
|
|||
<attack type="2" damage="5d600"/>
|
||||
<attack type="1" damage="1d4"/>
|
||||
</race>
|
||||
<race name="ghast" magres="0.600000" maxaura="1.000000" regaura="1.000000" recruitcost="5" weight="1000" capacity="540" speed="1.000000" hp="60" ac="2" damage="1d7" unarmedattack="6" unarmeddefense="6" attackmodifier="6" defensemodifier="6" scarepeasants="yes" walk="yes" canlearn="no" teach="no" absorbpeasants="yes" noheal="yes" undead="yes" equipment="yes">
|
||||
<race name="ghast" magres="0.600000" maxaura="1.000000" regaura="1.000000" weight="1000" capacity="540" speed="1.000000" hp="60" ac="2" damage="1d7" unarmedattack="6" unarmeddefense="6" attackmodifier="6" defensemodifier="6" scarepeasants="yes" walk="yes" canlearn="no" teach="no" absorbpeasants="yes" noheal="yes" undead="yes" equipment="yes">
|
||||
<ai splitsize="2000" aggression="0.02" killpeasants="yes" moverandom="yes"/>
|
||||
<function name="name" value="nameghoul"/>
|
||||
<skill name="crossbow" modifier="1"/>
|
||||
|
@ -1055,7 +1055,7 @@
|
|||
<attack type="2" damage="1d30"/>
|
||||
<attack type="2" damage="1d30"/>
|
||||
</race>
|
||||
<race name="ghoul" magres="0.300000" maxaura="1.000000" regaura="1.000000" recruitcost="5" weight="1000" capacity="540" speed="1.000000" hp="30" ac="1" damage="1d7" unarmedattack="3" unarmeddefense="3" attackmodifier="3" defensemodifier="3" scarepeasants="yes" walk="yes" canlearn="no" teach="no" absorbpeasants="yes" noheal="yes" undead="yes" equipment="yes">
|
||||
<race name="ghoul" magres="0.300000" maxaura="1.000000" regaura="1.000000" weight="1000" capacity="540" speed="1.000000" hp="30" ac="1" damage="1d7" unarmedattack="3" unarmeddefense="3" attackmodifier="3" defensemodifier="3" scarepeasants="yes" walk="yes" canlearn="no" teach="no" absorbpeasants="yes" noheal="yes" undead="yes" equipment="yes">
|
||||
<ai splitsize="10000" killpeasants="yes" moverandom="yes"/>
|
||||
<function name="name" value="nameghoul"/>
|
||||
<function name="age" value="ageghoul"/>
|
||||
|
@ -1073,7 +1073,7 @@
|
|||
<attack type="3" damage="1d2"/>
|
||||
<attack type="2" damage="1d30"/>
|
||||
</race>
|
||||
<race name="juju-zombie" magres="0.500000" maxaura="1.000000" regaura="1.000000" recruitcost="8" weight="1000" capacity="540" speed="1.000000" hp="80" ac="2" damage="1d7" unarmedattack="6" unarmeddefense="6" attackmodifier="8" defensemodifier="8" scarepeasants="yes" walk="yes" canlearn="no" teach="no" absorbpeasants="yes" noheal="yes" undead="yes" equipment="yes" resistbash="yes" resistcut="yes" resistpierce="yes">
|
||||
<race name="juju-zombie" magres="0.500000" maxaura="1.000000" regaura="1.000000" weight="1000" capacity="540" speed="1.000000" hp="80" ac="2" damage="1d7" unarmedattack="6" unarmeddefense="6" attackmodifier="8" defensemodifier="8" scarepeasants="yes" walk="yes" canlearn="no" teach="no" absorbpeasants="yes" noheal="yes" undead="yes" equipment="yes" resistbash="yes" resistcut="yes" resistpierce="yes">
|
||||
<ai splitsize="2000" aggression="0.02" killpeasants="yes" moverandom="yes"/>
|
||||
<function name="name" value="namezombie"/>
|
||||
<skill name="crossbow" modifier="1"/>
|
||||
|
@ -1089,7 +1089,7 @@
|
|||
<attack type="3" damage="1d1"/>
|
||||
<attack type="3" damage="1d1"/>
|
||||
</race>
|
||||
<race name="zombie" magres="0.200000" maxaura="1.000000" regaura="1.000000" recruitcost="4" weight="1000" capacity="540" speed="1.000000" hp="40" ac="1" damage="1d7" unarmedattack="2" unarmeddefense="2" attackmodifier="5" defensemodifier="5" scarepeasants="yes" walk="yes" canlearn="no" teach="no" noheal="yes" undead="yes" equipment="yes" resistcut="yes" resistpierce="yes">
|
||||
<race name="zombie" magres="0.200000" maxaura="1.000000" regaura="1.000000" weight="1000" capacity="540" speed="1.000000" hp="40" ac="1" damage="1d7" unarmedattack="2" unarmeddefense="2" attackmodifier="5" defensemodifier="5" scarepeasants="yes" walk="yes" canlearn="no" teach="no" noheal="yes" undead="yes" equipment="yes" resistcut="yes" resistpierce="yes">
|
||||
<ai splitsize="10000" killpeasants="yes" moverandom="yes"/>
|
||||
<function name="name" value="namezombie"/>
|
||||
<function name="age" value="agezombie"/>
|
||||
|
@ -1104,7 +1104,7 @@
|
|||
<skill name="unarmed" modifier="1"/>
|
||||
<attack type="1" damage="1d7"/>
|
||||
</race>
|
||||
<race name="skeletonlord" magres="0.300000" maxaura="1.000000" regaura="1.000000" recruitcost="2" weight="1000" capacity="540" speed="1.000000" hp="60" ac="4" damage="1d7" unarmedattack="6" unarmeddefense="6" attackmodifier="8" defensemodifier="8" scarepeasants="yes" walk="yes" canlearn="no" teach="no" absorbpeasants="yes" noheal="yes" undead="yes" equipment="yes" resistcut="yes" resistpierce="yes">
|
||||
<race name="skeletonlord" magres="0.300000" maxaura="1.000000" regaura="1.000000" weight="1000" capacity="540" speed="1.000000" hp="60" ac="4" damage="1d7" unarmedattack="6" unarmeddefense="6" attackmodifier="8" defensemodifier="8" scarepeasants="yes" walk="yes" canlearn="no" teach="no" absorbpeasants="yes" noheal="yes" undead="yes" equipment="yes" resistcut="yes" resistpierce="yes">
|
||||
<ai splitsize="2000" aggression="0.02" killpeasants="yes" moverandom="yes"/>
|
||||
<function name="name" value="nameskeleton"/>
|
||||
<skill name="crossbow" modifier="1"/>
|
||||
|
@ -1119,7 +1119,7 @@
|
|||
<attack type="1" damage="1d7"/>
|
||||
<attack type="1" damage="1d7"/>
|
||||
</race>
|
||||
<race name="skeleton" magres="0.100000" maxaura="1.000000" regaura="1.000000" recruitcost="0" weight="500" capacity="540" speed="1.000000" hp="20" ac="1" damage="1d7" unarmedattack="1" unarmeddefense="1" attackmodifier="6" defensemodifier="6" scarepeasants="yes" walk="yes" canlearn="no" teach="no" noheal="yes" undead="yes" equipment="yes" resistcut="yes" resistpierce="yes">
|
||||
<race name="skeleton" magres="0.100000" maxaura="1.000000" regaura="1.000000" weight="500" capacity="540" speed="1.000000" hp="20" ac="1" damage="1d7" unarmedattack="1" unarmeddefense="1" attackmodifier="6" defensemodifier="6" scarepeasants="yes" walk="yes" canlearn="no" teach="no" noheal="yes" undead="yes" equipment="yes" resistcut="yes" resistpierce="yes">
|
||||
<ai splitsize="10000" killpeasants="yes" moverandom="yes"/>
|
||||
<function name="name" value="nameskeleton"/>
|
||||
<function name="age" value="ageskeleton"/>
|
||||
|
@ -1134,40 +1134,12 @@
|
|||
<skill name="unarmed" modifier="1"/>
|
||||
<attack type="1" damage="1d7"/>
|
||||
</race>
|
||||
<race name="centaur" magres="0.000000" maxaura="0.750000" regaura="0.750000" recruitcost="100" maintenance="10" weight="5000" capacity="2040" speed="1.000000" hp="30" damage="2d5" unarmedattack="0" unarmeddefense="0" playerrace="yes" walk="yes" horse="yes" giveperson="yes" giveunit="yes" getitem="yes" recruithorses="yes" equipment="yes">
|
||||
<ai splitsize="10000" moverandom="yes" learn="yes"/>
|
||||
<skill name="crossbow" modifier="1"/>
|
||||
<skill name="mining" modifier="-3"/>
|
||||
<skill name="bow" modifier="1"/>
|
||||
<skill name="building" modifier="-2"/>
|
||||
<skill name="trade" modifier="1"/>
|
||||
<skill name="catapult" modifier="-2"/>
|
||||
<skill name="herbalism" modifier="1"/>
|
||||
<skill name="training" modifier="4"/>
|
||||
<skill name="armorer" modifier="-1"/>
|
||||
<skill name="shipcraft" modifier="-4"/>
|
||||
<skill name="sailing" modifier="-4"/>
|
||||
<skill name="polearm" modifier="1"/>
|
||||
<skill name="espionage" modifier="-1"/>
|
||||
<skill name="quarrying" modifier="-1"/>
|
||||
<skill name="stealth" modifier="-1"/>
|
||||
<skill name="weaponsmithing" modifier="1"/>
|
||||
<skill name="cartmaking" modifier="1"/>
|
||||
<skill name="taxation" modifier="1"/>
|
||||
<attack type="1" damage="2d5"/>
|
||||
<familiar race="eagle" default="yes"/>
|
||||
<familiar race="fairy"/>
|
||||
<familiar race="owl"/>
|
||||
<familiar race="unicorn"/>
|
||||
<familiar race="nymph"/>
|
||||
<familiar race="imp"/>
|
||||
</race>
|
||||
<race name="shadowknight" magres="0.000000" maxaura="0.000000" regaura="0.000000" recruitcost="5" weight="1000" capacity="540" speed="1.000000" hp="1" damage="1d1" unarmedattack="0" unarmeddefense="0" attackmodifier="1" defensemodifier="1" scarepeasants="yes" walk="yes" canlearn="no" teach="no" noblock="yes">
|
||||
<race name="shadowknight" magres="0.000000" maxaura="0.000000" regaura="0.000000" weight="1000" capacity="540" speed="1.000000" hp="1" damage="1d1" unarmedattack="0" unarmeddefense="0" attackmodifier="1" defensemodifier="1" scarepeasants="yes" walk="yes" canlearn="no" teach="no" noblock="yes">
|
||||
<ai splitsize="20000" moverandom="yes"/>
|
||||
<function name="name" value="namegeneric"/>
|
||||
<attack type="1" damage="1d1"/>
|
||||
</race>
|
||||
<race name="seaserpent" magres="0.500000" maxaura="1.000000" regaura="1.000000" recruitcost="5000" weight="20000" capacity="5000" speed="1.000000" hp="600" ac="3" damage="2d15" unarmedattack="0" unarmeddefense="0" attackmodifier="4" defensemodifier="4" scarepeasants="yes" swim="yes" teach="no" getitem="yes" resistbash="yes" unarmedguard="yes">
|
||||
<race name="seaserpent" magres="0.500000" maxaura="1.000000" regaura="1.000000" weight="20000" capacity="5000" speed="1.000000" hp="600" ac="3" damage="2d15" unarmedattack="0" unarmeddefense="0" attackmodifier="4" defensemodifier="4" scarepeasants="yes" swim="yes" teach="no" getitem="yes" resistbash="yes" unarmedguard="yes">
|
||||
<ai splitsize="6" killpeasants="yes" moverandom="yes" learn="yes" moveattack="yes"/>
|
||||
<function name="name" value="namegeneric"/>
|
||||
<function name="move" value="moveswimming"/>
|
||||
|
@ -1209,36 +1181,6 @@
|
|||
<familiar race="demon"/>
|
||||
</race>
|
||||
|
||||
<!-- race name="old_orc" magres="-0.050000" maxaura="1.000000" regaura="1.000000" recruitcost="50" maintenance="10" weight="1000" capacity="540" speed="1.000000" hp="24" damage="1d5" unarmedattack="-2" unarmeddefense="-2" walk="yes" giveperson="yes" giveunit="yes" getitem="yes" equipment="yes">
|
||||
<ai splitsize="10000" moverandom="yes" learn="yes"/>
|
||||
<function name="itemdrop" value="defaultdrops"/>
|
||||
<skill name="alchemy" modifier="1"/>
|
||||
<skill name="mining" modifier="1"/>
|
||||
<skill name="building" modifier="1"/>
|
||||
<skill name="trade" modifier="-3"/>
|
||||
<skill name="forestry" modifier="1"/>
|
||||
<skill name="herbalism" modifier="-2"/>
|
||||
<skill name="magic" modifier="-1"/>
|
||||
<skill name="training" modifier="-1"/>
|
||||
<skill name="armorer" modifier="1"/>
|
||||
<skill name="shipcraft" modifier="-1"/>
|
||||
<skill name="sailing" modifier="-1"/>
|
||||
<skill name="espionage" modifier="-1"/>
|
||||
<skill name="quarrying" modifier="1"/>
|
||||
<skill name="tactics" modifier="1"/>
|
||||
<skill name="entertainment" modifier="-2"/>
|
||||
<skill name="weaponsmithing" modifier="2"/>
|
||||
<skill name="cartmaking" modifier="-1"/>
|
||||
<skill name="taxation" modifier="1"/>
|
||||
<skill name="unarmed" modifier="-99"/>
|
||||
<attack type="1" damage="1d5"/>
|
||||
<familiar race="goblin" default="yes"/>
|
||||
<familiar race="ghost"/>
|
||||
<familiar race="imp"/>
|
||||
<familiar race="rat"/>
|
||||
<familiar race="wolf"/>
|
||||
<familiar race="demon"/>
|
||||
</race -->
|
||||
<race name="elf" magres="0.100000" maxaura="1.000000" regaura="1.250000" recruitcost="130" maintenance="10" weight="1000" capacity="540" speed="1.000000" hp="18" damage="1d5" unarmedattack="-2" unarmeddefense="-2" playerrace="yes" walk="yes" giveperson="yes" giveunit="yes" getitem="yes" equipment="yes">
|
||||
<ai splitsize="10000" moverandom="yes" learn="yes"/>
|
||||
<function name="itemdrop" value="defaultdrops"/>
|
||||
|
@ -1328,7 +1270,7 @@
|
|||
<familiar race="wolf"/>
|
||||
<familiar race="demon"/>
|
||||
</race>
|
||||
<race name="shadowdragon" magres="0.950000" maxaura="1.000000" regaura="3.000000" recruitcost="2500000" weight="100" capacity="100000" speed="1.000000" hp="2700" ac="10" damage="2d60" unarmedattack="0" unarmeddefense="0" attackmodifier="10" defensemodifier="12" scarepeasants="yes" fly="yes" walk="yes" teach="no" getitem="yes" resistbash="yes">
|
||||
<race name="shadowdragon" magres="0.950000" maxaura="1.000000" regaura="3.000000" weight="100" capacity="100000" speed="1.000000" hp="2700" ac="10" damage="2d60" unarmedattack="0" unarmeddefense="0" attackmodifier="10" defensemodifier="12" scarepeasants="yes" fly="yes" walk="yes" teach="no" getitem="yes" resistbash="yes">
|
||||
<ai splitsize="1" killpeasants="yes" learn="yes"/>
|
||||
<function name="name" value="namedragon"/>
|
||||
<function name="move" value="movedragon"/>
|
||||
|
@ -1342,13 +1284,13 @@
|
|||
<attack type="6" spell="aura_of_fear" level="12"/>
|
||||
<precombatspell spell="shadowcall"/>
|
||||
</race>
|
||||
<race name="shadowbat" magres="0.800000" maxaura="0.000000" regaura="0.000000" recruitcost="500" weight="500" capacity="540" speed="1.000000" hp="1" ac="4" damage="2d4" unarmedattack="0" unarmeddefense="0" attackmodifier="3" defensemodifier="3" scarepeasants="yes" fly="yes" walk="yes" teach="no" getitem="yes">
|
||||
<race name="shadowbat" magres="0.800000" maxaura="0.000000" regaura="0.000000" weight="500" capacity="540" speed="1.000000" hp="1" ac="4" damage="2d4" unarmedattack="0" unarmeddefense="0" attackmodifier="3" defensemodifier="3" scarepeasants="yes" fly="yes" walk="yes" teach="no" getitem="yes">
|
||||
<ai splitsize="5000" killpeasants="yes"/>
|
||||
<function name="name" value="namegeneric"/>
|
||||
<attack type="4" damage="1d6"/>
|
||||
<attack type="3" damage="1d1"/>
|
||||
</race>
|
||||
<race name="nightmare" magres="0.500000" maxaura="0.000000" regaura="0.000000" recruitcost="500" weight="100" capacity="540" speed="1.000000" hp="80" ac="10" damage="2d4" unarmedattack="0" unarmeddefense="0" attackmodifier="3" defensemodifier="3" scarepeasants="yes" fly="yes" walk="yes" teach="no" getitem="yes" invinciblenonmagic="yes">
|
||||
<race name="nightmare" magres="0.500000" maxaura="0.000000" regaura="0.000000" weight="100" capacity="540" speed="1.000000" hp="80" ac="10" damage="2d4" unarmedattack="0" unarmeddefense="0" attackmodifier="3" defensemodifier="3" scarepeasants="yes" fly="yes" walk="yes" teach="no" getitem="yes" invinciblenonmagic="yes">
|
||||
<ai splitsize="500" killpeasants="yes"/>
|
||||
<function name="name" value="namegeneric"/>
|
||||
<attack type="4" damage="1d4"/>
|
||||
|
@ -1357,7 +1299,7 @@
|
|||
<attack type="3" damage="1d4"/>
|
||||
<attack type="2" damage="1d10"/>
|
||||
</race>
|
||||
<race name="vampunicorn" magres="1.000000" maxaura="0.000000" regaura="0.000000" recruitcost="500" weight="5000" capacity="2000" speed="1.000000" hp="30" ac="4" damage="2d4" unarmedattack="0" unarmeddefense="0" attackmodifier="3" defensemodifier="3" scarepeasants="yes" walk="yes" teach="no" getitem="yes">
|
||||
<race name="vampunicorn" magres="1.000000" maxaura="0.000000" regaura="0.000000" weight="5000" capacity="2000" speed="1.000000" hp="30" ac="4" damage="2d4" unarmedattack="0" unarmeddefense="0" attackmodifier="3" defensemodifier="3" scarepeasants="yes" walk="yes" teach="no" getitem="yes">
|
||||
<ai splitsize="5000" killpeasants="yes"/>
|
||||
<function name="name" value="namegeneric"/>
|
||||
<attack type="4" damage="2d10"/>
|
||||
|
|
|
@ -268,13 +268,7 @@
|
|||
<text locale="de">Muscheln</text>
|
||||
<text locale="en">seashells</text>
|
||||
</string>
|
||||
|
||||
<string name="newbie_info_2">
|
||||
<text locale="de">Die ersten beiden Züge mußt du abgeben, sonst wird deine
|
||||
Partei sofort wieder gelöscht, um Karteileichen zu vermeiden.</text>
|
||||
<text locale="en">If you fail to send in orders for one of the first two turns, your faction will be erased from the game to reduce the number of inactive players in Eressea.</text>
|
||||
</string>
|
||||
<string name="newbie_info_3">
|
||||
<string name="newbie_info_cr">
|
||||
<text locale="de">Mit der ersten Auswertung bekommst du einen
|
||||
Computerreport, den du mit vielen Tools wie z.B. Magellan benutzen kannst. Wenn du ihn
|
||||
weiterhin bekommen willst, gib einer deiner Einheiten den Befehl OPTION
|
||||
|
|
|
@ -1,5 +1,10 @@
|
|||
<?xml version="1.0" ?>
|
||||
<race name="demon" magres="0.150000" maxaura="1.000000" regaura="1.250000" recruitcost="150" maintenance="10" weight="1000" capacity="540" speed="1.000000" hp="50" ac="2" damage="1d5" unarmedattack="-2" unarmeddefense="-2" playerrace="yes" walk="yes" shapeshift="yes" giveperson="yes" giveunit="yes" getitem="yes" recruitethereal="yes" equipment="yes">
|
||||
<race name="demon" magres="0.150000" maxaura="1.000000"
|
||||
regaura="1.250000" recruitcost="150" maintenance="10" weight="1000"
|
||||
capacity="540" speed="1.000000" hp="50" ac="2" damage="1d5"
|
||||
unarmedattack="-2" unarmeddefense="-2" playerrace="yes" walk="yes"
|
||||
shapeshift="yes" giveperson="yes" giveunit="yes" getitem="yes"
|
||||
recruitethereal="yes" equipment="yes" healing="1.5">
|
||||
<ai splitsize="10000" moverandom="yes" learn="yes"/>
|
||||
<function name="itemdrop" value="defaultdrops"/>
|
||||
<skill name="alchemy" modifier="2"/>
|
||||
|
|
|
@ -1,6 +1,9 @@
|
|||
<race name="dragon" magres="0.700000" maxaura="1.0" regaura="2.000000" weight="10000" capacity="1000000" speed="1.500000" hp="900" ac=
|
||||
"6" damage="2d30" unarmedattack="0" unarmeddefense="0" attackmodifier="7" defensemodifier="7" scarepeasants="yes" fly="yes" walk="yes" teach="no" getitem="yes" resistbash="yes">
|
||||
<ai splitsize="2" killpeasants="yes" learn="yes"/>
|
||||
"6" damage="2d30" unarmedattack="0" unarmeddefense="0"
|
||||
attackmodifier="7" defensemodifier="7" scarepeasants="yes" fly="yes"
|
||||
income="1000" walk="yes" teach="no" getitem="yes" resistbash="yes"
|
||||
dragon="yes">
|
||||
<ai splitsize="2" killpeasants="yes" learn="yes" scare="400"/>
|
||||
<function name="name" value="namedragon"/>
|
||||
<function name="age" value="agedragon"/>
|
||||
<function name="move" value="movedragon"/>
|
||||
|
|
|
@ -1,5 +1,9 @@
|
|||
<?xml version="1.0" ?>
|
||||
<race name="goblin" magres="-0.05" maxaura="1.0" regaura="1.0" recruitcost="60" maintenance="6" weight="600" capacity="440" speed="1.0" hp="16" damage="1d5" unarmedattack="-2" unarmeddefense="0" playerrace="yes" walk="yes" giveperson="yes" giveunit="yes" getitem="yes" equipment="yes">
|
||||
<race name="goblin" magres="-0.05" maxaura="1.0" regaura="1.0"
|
||||
recruitcost="60" maintenance="6" weight="600" capacity="440"
|
||||
speed="1.0" hp="16" damage="1d5" unarmedattack="-2" unarmeddefense="0"
|
||||
playerrace="yes" walk="yes" giveperson="yes" giveunit="yes"
|
||||
getitem="yes" equipment="yes" healing="2.0">
|
||||
<ai splitsize="10000" moverandom="yes" learn="yes"/>
|
||||
<function name="itemdrop" value="defaultdrops"/>
|
||||
<param name="hunger.damage" value="1d8+7"/>
|
||||
|
|
|
@ -1,5 +1,9 @@
|
|||
<?xml version="1.0" ?>
|
||||
<race name="goblin" magres="-0.05" maxaura="1.0" regaura="1.0" recruitcost="60" maintenance="6" weight="600" capacity="440" speed="1.0" hp="16" damage="1d5" unarmedattack="-2" unarmeddefense="0" playerrace="yes" walk="yes" giveperson="yes" giveunit="yes" getitem="yes" equipment="yes">
|
||||
<race name="goblin" magres="-0.05" maxaura="1.0" regaura="1.0"
|
||||
recruitcost="60" maintenance="6" weight="600" capacity="440"
|
||||
speed="1.0" hp="16" damage="1d5" unarmedattack="-2" unarmeddefense="0"
|
||||
playerrace="yes" walk="yes" giveperson="yes" giveunit="yes"
|
||||
getitem="yes" equipment="yes" healing="2.0">
|
||||
<ai splitsize="10000" moverandom="yes" learn="yes"/>
|
||||
<function name="itemdrop" value="defaultdrops"/>
|
||||
<param name="hunger.damage" value="1d8+7"/>
|
||||
|
|
|
@ -1,5 +1,10 @@
|
|||
<?xml version="1.0" ?>
|
||||
<race name="goblin" magres="-0.050000" maxaura="1.000000" regaura="1.000000" recruitcost="40" maintenance="10" weight="600" capacity="440" speed="1.000000" hp="16" damage="1d5" unarmedattack="-2" unarmeddefense="0" playerrace="yes" walk="yes" giveperson="yes" giveunit="yes" getitem="yes" equipment="yes">
|
||||
<race name="goblin" magres="-0.050000" maxaura="1.000000"
|
||||
regaura="1.000000" recruitcost="40" maintenance="10" weight="600"
|
||||
capacity="440" speed="1.000000" hp="16" damage="1d5"
|
||||
unarmedattack="-2" unarmeddefense="0" playerrace="yes" walk="yes"
|
||||
giveperson="yes" giveunit="yes" getitem="yes" equipment="yes"
|
||||
healing="2.0">
|
||||
<ai splitsize="10000" moverandom="yes" learn="yes"/>
|
||||
<function name="itemdrop" value="defaultdrops"/>
|
||||
<skill name="alchemy" modifier="1"/>
|
||||
|
|
|
@ -1,5 +1,10 @@
|
|||
<?xml version="1.0" ?>
|
||||
<race name="troll" magres="0.100000" maxaura="1.000000" regaura="1.000000" recruitcost="90" maintenance="10" weight="2000" capacity="1080" speed="1.000000" hp="30" ac="1" damage="1d5+3" unarmedattack="-2" unarmeddefense="-2" playerrace="yes" walk="yes" giveperson="yes" giveunit="yes" getitem="yes" equipment="yes">
|
||||
<race name="troll" magres="0.100000" maxaura="1.000000"
|
||||
regaura="1.000000" recruitcost="90" maintenance="10" weight="2000"
|
||||
capacity="1080" speed="1.000000" hp="30" ac="1" damage="1d5+3"
|
||||
unarmedattack="-2" unarmeddefense="-2" playerrace="yes" walk="yes"
|
||||
giveperson="yes" giveunit="yes" getitem="yes" equipment="yes"
|
||||
healing="1.5">
|
||||
<ai splitsize="10000" moverandom="yes" learn="yes"/>
|
||||
<function name="itemdrop" value="defaultdrops"/>
|
||||
<skill name="mining" modifier="2"/>
|
||||
|
|
|
@ -1,5 +1,9 @@
|
|||
<race name="wyrm" magres="0.900000" maxaura="1.0" regaura="3.000000" weight="18000" capacity="1000000" speed="1.0" hp="2700" ac="8" damage="2d60" unarmedattack="0" unarmeddefense="0" attackmodifier="10" defensemodifier="10" scarepeasants="yes" fly="yes" walk="yes" teach="no" getitem="yes" resistbash="yes">
|
||||
<ai splitsize="1" killpeasants="yes" learn="yes"/>
|
||||
<race name="wyrm" magres="0.900000" maxaura="1.0" regaura="3.000000"
|
||||
weight="18000" capacity="1000000" speed="1.0" hp="2700" ac="8"
|
||||
damage="2d60" unarmedattack="0" unarmeddefense="0" attackmodifier="10"
|
||||
defensemodifier="10" scarepeasants="yes" fly="yes" walk="yes"
|
||||
teach="no" getitem="yes" resistbash="yes" dragon="yes" income="5000">
|
||||
<ai splitsize="1" killpeasants="yes" learn="yes" scare="1000"/>
|
||||
<function name="name" value="namedragon"/>
|
||||
<function name="move" value="movedragon"/>
|
||||
<skill name="magic" modifier="12"/>
|
||||
|
|
|
@ -1,5 +1,9 @@
|
|||
<race name="youngdragon" magres="0.500000" maxaura="1.0" regaura="1.0" weight="8000" capacity="10000" speed="1.0" hp="300" ac="4" damage="2d15" unarmedattack="0" unarmeddefense="0" attackmodifier="4" defensemodifier="4" scarepeasants="yes" fly="yes" walk="yes" teach="no" getitem="yes" resistbash="yes">
|
||||
<ai splitsize="6" killpeasants="yes" learn="yes"/>
|
||||
<race name="youngdragon" magres="0.500000" maxaura="1.0" regaura="1.0"
|
||||
weight="8000" capacity="10000" speed="1.0" hp="300" ac="4"
|
||||
damage="2d15" unarmedattack="0" unarmeddefense="0" attackmodifier="4"
|
||||
defensemodifier="4" scarepeasants="yes" fly="yes" walk="yes"
|
||||
teach="no" getitem="yes" resistbash="yes" dragon="yes" income="150">
|
||||
<ai splitsize="6" killpeasants="yes" learn="yes" scare="160"/>
|
||||
<function name="name" value="namedragon"/>
|
||||
<function name="age" value="agefiredragon"/>
|
||||
<function name="move" value="movedragon"/>
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
recruitcost="-1" maintenance="0" weight="1000" capacity="440" speed="1.000000"
|
||||
hp="20" damage="1d5" unarmedattack="-2" unarmeddefense="-2" playerrace="no"
|
||||
walk="yes" shapeshift="no" giveperson="no" giveunit="no"
|
||||
getitem="no" recruitethereal="no" equipment="yes" scarepeasants="yes"
|
||||
getitem="no" equipment="yes" scarepeasants="yes"
|
||||
cansteal="no" unarmedguard="yes" absorbpeasants="yes" noheal="yes"
|
||||
undead="yes" resistpierce="yes">
|
||||
<ai splitsize="1000" moverandom="yes" learn="yes" />
|
||||
|
|
7
s/build
7
s/build
|
@ -35,12 +35,9 @@ fi
|
|||
|
||||
git submodule update
|
||||
|
||||
if [ -z `which tolua` ]; then
|
||||
echo "build tolua"
|
||||
cd $ROOT/tolua ; make
|
||||
fi
|
||||
|
||||
echo "build eressea"
|
||||
cd $ROOT/$BUILD
|
||||
VERSION=$(git describe --match 'v*.*.*' --tags | sed 's/^v//')
|
||||
cmake -DERESSEA_VERSION="$VERSION" ..
|
||||
make $MAKEOPTS && make test
|
||||
cd $OLDPWD
|
||||
|
|
20
s/cmake-init
20
s/cmake-init
|
@ -9,17 +9,18 @@ while [ ! -d $ROOT/.git ]; do
|
|||
done
|
||||
|
||||
[ -z $BUILD ] && BUILD=Debug
|
||||
MACHINE=`uname -m`
|
||||
[ -z "$CC" ] && [ ! -z `which clang` ] && CC="clang"
|
||||
[ -z "$CC" ] && [ ! -z `which gcc` ] && CC="gcc"
|
||||
[ -z "$CC" ] && [ ! -z `which tcc` ] && CC="tcc"
|
||||
[ -z "$CC" ] && [ ! -z `which cc` ] && CC="cc"
|
||||
|
||||
MACHINE=`$CC -dumpmachine`
|
||||
[ -z $MACHINE ] && MACHINE=`uname -m`
|
||||
BIN_DIR="$ROOT/build-$MACHINE-$CC-$BUILD"
|
||||
mkdir -p $BIN_DIR
|
||||
rm -f $BUILD
|
||||
ln -sf $BIN_DIR $BUILD
|
||||
|
||||
MACHINE=$(gcc -dumpmachine)
|
||||
rm -f CMakeCache.txt
|
||||
|
||||
# use anything installed in /opt or /usr
|
||||
|
@ -41,10 +42,23 @@ ARGS=" -DCMAKE_MODULE_PATH=$ROOT/cmake/Modules \
|
|||
-DCMAKE_PREFIX_PATH=$PREFIX_PATH \
|
||||
-DCMAKE_INSTALL_PREFIX=$HOME/eressea/server"
|
||||
|
||||
git submodule update --init
|
||||
|
||||
path="$(which tolua)"
|
||||
if [ "$HAVE_TOLUA" = "0" ] || [ -z $path ] ; then
|
||||
echo "tolua is not installed, building from source"
|
||||
cd $ROOT/tolua ; make
|
||||
cd $ROOT
|
||||
if [ ! -d tolua ]; then
|
||||
LUA_VERSION="5.2"
|
||||
if [ -d /usr/include/lua5.1 ] || [ -d /usr/local/include/lua5.1 ]; then
|
||||
LUA_VERSION="5.1"
|
||||
fi
|
||||
echo "fetching tolua ${LUA_VERSION} from github..."
|
||||
git clone https://github.com/ennorehling/tolua-${LUA_VERSION}.git tolua
|
||||
fi
|
||||
echo "building tolua..."
|
||||
cd tolua
|
||||
make
|
||||
ARGS="$ARGS -DPC_TOLUA_DIR=$ROOT/tolua"
|
||||
else
|
||||
echo "tolua is $path"
|
||||
|
|
|
@ -1,9 +1,7 @@
|
|||
#!/bin/bash
|
||||
set -e
|
||||
VERSION="$1"
|
||||
#set -e
|
||||
VERSION=$(git describe --tags --match 'v*.*.*')
|
||||
echo "submitting version $VERSION"
|
||||
shift
|
||||
DESC="$*"
|
||||
cd Debug
|
||||
make clean
|
||||
../../coverity/bin/cov-build --dir cov-int make eressea
|
||||
|
@ -12,5 +10,5 @@ curl --form token=IISXKH3A1ngZGfFmBz_aSA \
|
|||
--form email=enno.rehling@gmail.com \
|
||||
--form file=@eressea.tgz \
|
||||
--form version="$VERSION" \
|
||||
--form description="$DESC" \
|
||||
--form description="Eressea coverity check" \
|
||||
https://scan.coverity.com/builds?project=eressea%2Fserver
|
||||
|
|
11
s/preview
11
s/preview
|
@ -22,6 +22,7 @@ exit $2 # otherwise
|
|||
function build() {
|
||||
assert_dir $SOURCE
|
||||
cd $SOURCE
|
||||
rm -rf crypto tolua
|
||||
git fetch || abort "failed to update source. do you have local changes?"
|
||||
[ -z $1 ] || git checkout $1
|
||||
git pull
|
||||
|
@ -44,13 +45,6 @@ function assert_dir() {
|
|||
[ -d $1 ] || abort "missing directory: $1"
|
||||
}
|
||||
|
||||
function version() {
|
||||
assert_dir $SOURCE
|
||||
cd $SOURCE
|
||||
build=$(grep BUILD src/buildno.h | awk '{ print $3 }')
|
||||
echo "eressea build $build"
|
||||
}
|
||||
|
||||
function setup() {
|
||||
assert_dir $SOURCE
|
||||
assert_dir $LIVE
|
||||
|
@ -137,9 +131,6 @@ shift $((OPTIND-1))
|
|||
|
||||
while [ ! -z $1 ]; do
|
||||
case "$1" in
|
||||
"version")
|
||||
version
|
||||
;;
|
||||
"build")
|
||||
shift
|
||||
build $*
|
||||
|
|
13
s/release
13
s/release
|
@ -3,19 +3,8 @@
|
|||
import os
|
||||
import sys
|
||||
|
||||
template="""#define VERSION_MAJOR %s
|
||||
#define VERSION_MINOR %s
|
||||
#define VERSION_BUILD %s
|
||||
"""
|
||||
|
||||
def new_version(ver):
|
||||
sp = ver.split(".")
|
||||
sp = (sp[0], sp[1], sp[2])
|
||||
file = open("src/buildno.h", "w")
|
||||
file.write(template % sp)
|
||||
file.close()
|
||||
os.system("git add src/buildno.h")
|
||||
os.system("git commit -m 'release version %s'" % ver)
|
||||
os.system("git tag -f v%s" % ver)
|
||||
os.system("git push --tags")
|
||||
|
||||
new_version(sys.argv[1])
|
||||
|
|
10
s/runtests
10
s/runtests
|
@ -16,10 +16,10 @@ fi
|
|||
$ROOT/$BUILD/eressea/test_eressea
|
||||
cd $ROOT
|
||||
[ -e eressea.ini ] || ln -sf conf/eressea.ini
|
||||
$ROOT/$BUILD/eressea/eressea -v0 scripts/run-tests.lua
|
||||
$ROOT/$BUILD/eressea/eressea -v0 scripts/run-tests-e2.lua
|
||||
$ROOT/$BUILD/eressea/eressea -v0 scripts/run-tests-e3.lua
|
||||
$ROOT/$BUILD/eressea/eressea -v0 scripts/run-tests-e4.lua
|
||||
rm -rf data reports orders.txt score score.alliances
|
||||
$ROOT/$BUILD/eressea/eressea -v1 scripts/run-tests.lua
|
||||
$ROOT/$BUILD/eressea/eressea -v1 scripts/run-tests-e2.lua
|
||||
$ROOT/$BUILD/eressea/eressea -v1 scripts/run-tests-e3.lua
|
||||
$ROOT/$BUILD/eressea/eressea -v1 scripts/run-tests-e4.lua
|
||||
rm -rf data reports orders.txt score score.alliances datum turn
|
||||
|
||||
cd $OLDWPD
|
||||
|
|
|
@ -10,6 +10,12 @@ $BUILD/iniparser/inifile eressea.ini add lua:paths lunit:scripts
|
|||
fi
|
||||
}
|
||||
|
||||
integration_tests() {
|
||||
cd tests
|
||||
./write-reports.sh
|
||||
./run-turn.sh
|
||||
}
|
||||
|
||||
set -e
|
||||
[ -z $BUILD ] && BUILD=Debug ; export BUILD
|
||||
s/cmake-init
|
||||
|
@ -17,6 +23,5 @@ s/build
|
|||
cd $ROOT
|
||||
inifile
|
||||
s/runtests
|
||||
cd tests
|
||||
./write-reports.sh
|
||||
./run-turn.sh
|
||||
|
||||
integration_tests
|
||||
|
|
|
@ -43,13 +43,17 @@ local function read_players()
|
|||
-- return {{ email = "noreply@mailinator.com", race = "dwarf", lang = "de" }}
|
||||
local players = {}
|
||||
local input = io.open("newfactions", "r")
|
||||
while input do
|
||||
if input then
|
||||
local str = input:read("*line")
|
||||
while str do
|
||||
if str==nil then break end
|
||||
local email, race, lang = str:match("([^ ]*) ([^ ]*) ([^ ]*)")
|
||||
if email and string.char(string.byte(email, 1))~='#' then
|
||||
table.insert(players, { race = race, lang = lang, email = email })
|
||||
end
|
||||
str = input:read("*line")
|
||||
end
|
||||
input:close()
|
||||
end
|
||||
return players
|
||||
end
|
||||
|
|
|
@ -23,6 +23,7 @@ function cursed.init()
|
|||
if f then
|
||||
print("found cursed.txt")
|
||||
curse(f)
|
||||
f:close()
|
||||
end
|
||||
end
|
||||
|
||||
|
|
|
@ -25,11 +25,10 @@ function ponnuki.init()
|
|||
local home = get_region(-67, -5)
|
||||
local f = get_faction(666)
|
||||
if home and f then
|
||||
u = add_unit(f, home)
|
||||
u = unit.create(f, home, 1, "illusion")
|
||||
u.id = atoi36("ponn")
|
||||
u.name = "Ponnuki"
|
||||
u.info = "Go, Ponnuki, Go!"
|
||||
u.race = "illusion"
|
||||
u:set_racename("Ritter von Go")
|
||||
else
|
||||
eressea.log.error("Ponnuki cannot find Magrathea")
|
||||
|
|
|
@ -62,9 +62,7 @@ end
|
|||
|
||||
function use_snowman(u, amount)
|
||||
if amount>0 and u.region.terrain == "glacier" then
|
||||
local man = unit.create(u.faction, u.region)
|
||||
man.race = "snowman"
|
||||
man.number = amount
|
||||
local man = unit.create(u.faction, u.region, amount, "snowman")
|
||||
return amount
|
||||
end
|
||||
return -4
|
||||
|
|
|
@ -34,7 +34,6 @@ function test_process()
|
|||
assert_equal("function", _G.type(eressea.process.siege))
|
||||
assert_equal("function", _G.type(eressea.process.leave))
|
||||
assert_equal("function", _G.type(eressea.process.promote))
|
||||
assert_equal("function", _G.type(eressea.process.renumber))
|
||||
assert_equal("function", _G.type(eressea.process.restack))
|
||||
assert_equal("function", _G.type(eressea.process.set_spells))
|
||||
assert_equal("function", _G.type(eressea.process.set_help))
|
||||
|
|
|
@ -380,6 +380,21 @@ function test_events()
|
|||
assert(fail==0)
|
||||
end
|
||||
|
||||
function test_renumber_ship()
|
||||
local r = region.create(0, 0, "plain")
|
||||
local f = faction.create("noreply4@eressea.de", "human", "de")
|
||||
local u = unit.create(f, r)
|
||||
local s = ship.create(r, config.ships[1])
|
||||
u.ship = s
|
||||
u:add_order("NUMMER SCHIFF 1")
|
||||
process_orders()
|
||||
assert_equal(1, s.id)
|
||||
u:clear_orders()
|
||||
u:add_order("NUMMER SCHIFF 2")
|
||||
process_orders()
|
||||
assert_equal(2, s.id)
|
||||
end
|
||||
|
||||
function test_recruit2()
|
||||
local r = region.create(0, 0, "plain")
|
||||
local f = faction.create("noreply4@eressea.de", "human", "de")
|
||||
|
@ -673,8 +688,6 @@ function test_laen2()
|
|||
local laen = r:get_resource("laen")
|
||||
|
||||
process_orders()
|
||||
init_reports()
|
||||
-- write_report(u1.faction)
|
||||
assert_equal(laen - 2, r:get_resource("laen"))
|
||||
assert_equal(2, u1:get_item("laen"))
|
||||
end
|
||||
|
@ -965,120 +978,6 @@ function test_bug_1795_demons()
|
|||
assert_equal(peasants, r:get_resource("peasant"))
|
||||
end
|
||||
|
||||
module("tests.report", package.seeall, lunit.testcase)
|
||||
|
||||
function setup()
|
||||
eressea.free_game()
|
||||
eressea.settings.set("nmr.timeout", "0")
|
||||
eressea.settings.set("rules.food.flags", "4")
|
||||
end
|
||||
|
||||
local function find_in_report(f, pattern, extension)
|
||||
extension = extension or "nr"
|
||||
local filename = config.reportpath .. "/" .. get_turn() .. "-" .. itoa36(f.id) .. "." .. extension
|
||||
local report = io.open(filename, 'r');
|
||||
assert_not_nil(report)
|
||||
t = report:read("*all")
|
||||
report:close()
|
||||
|
||||
local start, _ = string.find(t, pattern)
|
||||
return start~=nil
|
||||
end
|
||||
|
||||
local function remove_report(faction)
|
||||
local filetrunk = config.reportpath .. "/" .. get_turn() .. "-" .. itoa36(faction.id)
|
||||
os.remove(filetrunk .. ".nr")
|
||||
os.remove(filetrunk .. ".cr")
|
||||
os.remove(filetrunk .. ".txt")
|
||||
end
|
||||
|
||||
function test_coordinates_no_plane()
|
||||
local r = region.create(0, 0, "mountain")
|
||||
local f = faction.create("noplane@eressea.de", "human", "de")
|
||||
local u = unit.create(f, r, 1)
|
||||
init_reports()
|
||||
write_report(f)
|
||||
assert_true(find_in_report(f, r.name .. " %(0,0%), Berg"))
|
||||
remove_report(f)
|
||||
end
|
||||
|
||||
function test_show_shadowmaster_attacks()
|
||||
local r = region.create(0, 0, "plain")
|
||||
local f = faction.create("noreply@eressea.de", "human", "de")
|
||||
local u = unit.create(f, r, 1)
|
||||
u.race = "shadowmaster"
|
||||
u:clear_orders()
|
||||
u:add_order("ZEIGE Schattenmeister")
|
||||
process_orders()
|
||||
init_reports()
|
||||
write_report(f)
|
||||
assert_false(find_in_report(f, ", ,"))
|
||||
remove_report(f)
|
||||
end
|
||||
|
||||
function test_coordinates_named_plane()
|
||||
local p = plane.create(0, -3, -3, 7, 7, "Hell")
|
||||
local r = region.create(0, 0, "mountain")
|
||||
local f = faction.create("noreply@eressea.de", "human", "de")
|
||||
local u = unit.create(f, r, 1)
|
||||
init_reports()
|
||||
write_report(f)
|
||||
assert_true(find_in_report(f, r.name .. " %(0,0,Hell%), Berg"))
|
||||
remove_report(f)
|
||||
end
|
||||
|
||||
function test_coordinates_unnamed_plane()
|
||||
local p = plane.create(0, -3, -3, 7, 7)
|
||||
local r = region.create(0, 0, "mountain")
|
||||
local f = faction.create("noreply@eressea.de", "human", "de")
|
||||
local u = unit.create(f, r, 1)
|
||||
init_reports()
|
||||
write_report(f)
|
||||
assert_true(find_in_report(f, r.name .. " %(0,0%), Berg"))
|
||||
remove_report(f)
|
||||
end
|
||||
|
||||
function test_coordinates_noname_plane()
|
||||
local p = plane.create(0, -3, -3, 7, 7, "")
|
||||
local r = region.create(0, 0, "mountain")
|
||||
local f = faction.create("noreply@eressea.de", "human", "de")
|
||||
local u = unit.create(f, r, 1)
|
||||
init_reports()
|
||||
write_report(f)
|
||||
assert_true(find_in_report(f, r.name .. " %(0,0%), Berg"))
|
||||
remove_report(f)
|
||||
end
|
||||
|
||||
function test_lighthouse()
|
||||
eressea.free_game()
|
||||
local r = region.create(0, 0, "mountain")
|
||||
local f = faction.create("noreply@eressea.de", "human", "de")
|
||||
region.create(1, 0, "mountain")
|
||||
region.create(2, 0, "ocean")
|
||||
region.create(0, 1, "firewall")
|
||||
region.create(3, 0, "mountain")
|
||||
region.create(4, 0, "plain")
|
||||
local u = unit.create(f, r, 1)
|
||||
local b = building.create(r, "lighthouse")
|
||||
b.size = 100
|
||||
b.working = true
|
||||
u.building = b
|
||||
u:set_skill("perception", 9)
|
||||
u:add_item("money", 1000)
|
||||
assert_not_nil(b)
|
||||
|
||||
init_reports()
|
||||
write_report(f)
|
||||
assert_true(find_in_report(f, " %(1,0%) %(vom Turm erblickt%)"))
|
||||
assert_true(find_in_report(f, " %(2,0%) %(vom Turm erblickt%)"))
|
||||
assert_true(find_in_report(f, " %(3,0%) %(vom Turm erblickt%)"))
|
||||
|
||||
assert_false(find_in_report(f, " %(0,0%) %(vom Turm erblickt%)"))
|
||||
assert_false(find_in_report(f, " %(0,1%) %(vom Turm erblickt%)"))
|
||||
assert_false(find_in_report(f, " %(4,0%) %(vom Turm erblickt%)"))
|
||||
remove_report(f)
|
||||
end
|
||||
|
||||
module("tests.parser", package.seeall, lunit.testcase)
|
||||
|
||||
function setup()
|
||||
|
@ -1139,3 +1038,16 @@ function test_prefix()
|
|||
u1.faction.locale = "en"
|
||||
assert_not_nil(u1:show():find("archelf"))
|
||||
end
|
||||
|
||||
function test_recruit()
|
||||
local r = region.create(0, 0, "plain")
|
||||
local f = faction.create("noreply@eressea.de", "human", "de")
|
||||
local u = unit.create(f, r, 1)
|
||||
|
||||
u:add_item("money", 1000)
|
||||
set_order(u, "REKRUTIERE 5")
|
||||
process_orders()
|
||||
for u in f.units do
|
||||
assert_equal(6, u.number)
|
||||
end
|
||||
end
|
||||
|
|
|
@ -9,19 +9,15 @@ end
|
|||
function test_read_race()
|
||||
local f
|
||||
eressea.free_game()
|
||||
f = faction.create("orc@example.com", "orc", "en")
|
||||
assert_equal(nil, f)
|
||||
assert_not_nil(eressea.config)
|
||||
eressea.config.parse('{ "races": { "orc" : {}}}')
|
||||
f = faction.create("orc@example.com", "orc", "en")
|
||||
assert_not_nil(f)
|
||||
end
|
||||
|
||||
function test_read_ship()
|
||||
function disable_test_read_ship()
|
||||
local s
|
||||
eressea.free_game()
|
||||
s = ship.create(nil, "boat")
|
||||
assert_equal(nil, s)
|
||||
assert_not_nil(eressea.config)
|
||||
conf = [[{
|
||||
"ships": {
|
||||
|
|
|
@ -215,7 +215,8 @@ function test_snowman()
|
|||
process_orders()
|
||||
for u2 in r.units do
|
||||
if u2.id~=u.id then
|
||||
assert_equal(u2.race, "snowman")
|
||||
assert_equal("snowman", u2.race)
|
||||
assert_equal(1000, u2.hp)
|
||||
u = nil
|
||||
break
|
||||
end
|
||||
|
|
|
@ -13,24 +13,24 @@ function test_guard_unarmed()
|
|||
local r1 = region.create(0, 0, "plain")
|
||||
local f1 = faction.create("hodor@eressea.de", "human", "de")
|
||||
local u1 = unit.create(f1, r1, 1)
|
||||
assert_equal(nil, u1.guard)
|
||||
assert_equal(false, u1.guard)
|
||||
u1:clear_orders()
|
||||
u1:add_order("BEWACHE")
|
||||
process_orders()
|
||||
assert_equal(nil, u1.guard)
|
||||
assert_equal(false, u1.guard)
|
||||
end
|
||||
|
||||
function test_guard_armed()
|
||||
local r1 = region.create(0, 0, "plain")
|
||||
local f1 = faction.create("hodor@eressea.de", "human", "de")
|
||||
local u1 = unit.create(f1, r1, 1)
|
||||
assert_equal(nil, u1.guard)
|
||||
assert_equal(false, u1.guard)
|
||||
u1:add_item("sword", 1)
|
||||
u1:set_skill("melee", 2)
|
||||
u1:clear_orders()
|
||||
u1:add_order("BEWACHE")
|
||||
process_orders()
|
||||
assert_equal(249, u1.guard)
|
||||
assert_equal(true, u1.guard)
|
||||
end
|
||||
|
||||
function test_guard_allows_move_after_combat() -- bug 1493
|
||||
|
@ -47,7 +47,7 @@ function test_guard_allows_move_after_combat() -- bug 1493
|
|||
u1:clear_orders()
|
||||
u1:add_order("BEWACHE")
|
||||
process_orders()
|
||||
assert_equal(249, u1.guard)
|
||||
assert_equal(true, u1.guard)
|
||||
u1:clear_orders()
|
||||
u1:add_order("NACH O")
|
||||
u1:add_order("ATTACKIERE " .. itoa36(u2.id))
|
||||
|
@ -67,7 +67,7 @@ function test_no_guard_no_move_after_combat() -- bug 1493
|
|||
u1:add_order("BEWACHE")
|
||||
u1:add_item("sword", 10)
|
||||
u1:set_skill("melee", 2)
|
||||
assert_equal(nil, u1.guard)
|
||||
assert_equal(false, u1.guard)
|
||||
u1:clear_orders()
|
||||
u1:add_order("NACH O")
|
||||
u1:add_order("ATTACKIERE " .. itoa36(u2.id))
|
||||
|
|
|
@ -1,3 +1,5 @@
|
|||
require 'tests.economy'
|
||||
|
||||
require 'tests.e2.undead'
|
||||
require 'tests.e2.shiplanding'
|
||||
require 'tests.e2.e2features'
|
||||
|
@ -8,6 +10,7 @@ require 'tests.e2.spells'
|
|||
require 'tests.e2.stealth'
|
||||
require 'tests.orders'
|
||||
require 'tests.common'
|
||||
require 'tests.report'
|
||||
require 'tests.storage'
|
||||
require 'tests.magicbag'
|
||||
require 'tests.process'
|
||||
|
|
|
@ -4,6 +4,7 @@ module("tests.e2.movement", package.seeall, lunit.testcase)
|
|||
|
||||
function setup()
|
||||
eressea.free_game()
|
||||
eressea.settings.set("rules.food.flags", "4")
|
||||
eressea.settings.set("nmr.timeout", "0")
|
||||
eressea.settings.set("NewbieImmunity", "0")
|
||||
end
|
||||
|
@ -29,7 +30,9 @@ end
|
|||
|
||||
process_orders()
|
||||
|
||||
-- write_reports()
|
||||
if r2~=u1.region then
|
||||
write_reports()
|
||||
end
|
||||
assert_equal(r2, u1.region) -- should pass, but fails!!!
|
||||
end
|
||||
|
||||
|
|
|
@ -6,5 +6,6 @@ require 'tests.e3.parser'
|
|||
require 'tests.e3.morale'
|
||||
require 'tests.orders'
|
||||
require 'tests.common'
|
||||
-- require 'tests.report'
|
||||
require 'tests.magicbag'
|
||||
require 'tests.process'
|
||||
|
|
|
@ -0,0 +1,146 @@
|
|||
require "lunit"
|
||||
|
||||
module("tests.economy", package.seeall, lunit.testcase)
|
||||
|
||||
function setup()
|
||||
eressea.free_game()
|
||||
eressea.settings.set("NewbieImmunity", "0")
|
||||
eressea.settings.set("study.produceexp", "0")
|
||||
eressea.settings.set("nmr.timeout", "0")
|
||||
eressea.settings.set("rules.food.flags", "4") -- FOOD_IS_FREE
|
||||
eressea.settings.set("rules.encounters", "0")
|
||||
end
|
||||
|
||||
function test_no_guards()
|
||||
local r = region.create(0, 0, "plain")
|
||||
r:set_resource("tree", 100)
|
||||
local u = unit.create(faction.create("human"), r)
|
||||
u:set_skill("forestry", 1)
|
||||
u:add_order("MACHE HOLZ")
|
||||
process_orders()
|
||||
assert_equal(1, u:get_item("log"))
|
||||
process_orders()
|
||||
assert_equal(2, u:get_item("log"))
|
||||
end
|
||||
|
||||
function test_elf_guards_trees()
|
||||
local r = region.create(0, 0, "plain")
|
||||
r:set_resource("tree", 100)
|
||||
local u = unit.create(faction.create("human"), r)
|
||||
u:set_skill("forestry", 1)
|
||||
local guard = unit.create(faction.create("elf"), r, 1, "elf")
|
||||
guard:add_order("BEWACHEN") -- fails, because unarmed
|
||||
u:add_order("MACHE HOLZ")
|
||||
process_orders()
|
||||
assert_equal(1, u:get_item("log"))
|
||||
guard:add_item("sword", 1)
|
||||
guard:set_skill("melee", 1)
|
||||
guard:add_order("BEWACHEN") -- success
|
||||
process_orders()
|
||||
-- GUARD starts after MAKE:
|
||||
assert_equal(2, u:get_item("log"))
|
||||
process_orders()
|
||||
-- GUARD was active this turn:
|
||||
assert_equal(2, u:get_item("log"))
|
||||
end
|
||||
|
||||
function test_catapults_dont_guard()
|
||||
local r = region.create(0, 0, "plain")
|
||||
r:set_resource("tree", 100)
|
||||
local u = unit.create(faction.create("human"), r)
|
||||
u:set_skill("forestry", 1)
|
||||
local guard = unit.create(faction.create("elf"), r, 1, "elf")
|
||||
guard:add_order("BEWACHEN")
|
||||
u:add_order("MACHE HOLZ")
|
||||
process_orders()
|
||||
assert_equal(1, u:get_item("log"))
|
||||
guard:add_item("catapult", 1)
|
||||
guard:set_skill("catapult", 1)
|
||||
guard:add_order("BEWACHEN")
|
||||
process_orders()
|
||||
-- GUARD starts after MAKE:
|
||||
assert_equal(2, u:get_item("log"))
|
||||
process_orders()
|
||||
-- GUARD was active this turn, but catapults do not count:
|
||||
assert_equal(3, u:get_item("log"))
|
||||
end
|
||||
|
||||
function test_ent_guards_trees()
|
||||
local r = region.create(0, 0, "plain")
|
||||
r:set_resource("tree", 100)
|
||||
local u = unit.create(faction.create("human"), r)
|
||||
u:set_skill("forestry", 1)
|
||||
local guard = unit.create(get_monsters(), r, 1, "ent")
|
||||
guard:add_order("BEWACHEN")
|
||||
u:add_order("MACHE HOLZ")
|
||||
process_orders()
|
||||
assert_equal(1, u:get_item("log"))
|
||||
process_orders()
|
||||
assert_equal(1, u:get_item("log"))
|
||||
end
|
||||
|
||||
function test_guard_stops_recruit()
|
||||
local r = region.create(0, 0, "plain")
|
||||
r:set_resource("peasant", 100)
|
||||
local u = unit.create(faction.create("human"), r)
|
||||
local guard = unit.create(get_monsters(), r, 1)
|
||||
guard:add_order("BEWACHEN")
|
||||
|
||||
u:add_item("money", 1000)
|
||||
assert_equal(1, u.number)
|
||||
u:add_order("REKRUTIERE 1")
|
||||
process_orders()
|
||||
assert_equal(2, u.number)
|
||||
u:add_order("REKRUTIERE 1")
|
||||
process_orders()
|
||||
assert_equal(2, u.number)
|
||||
end
|
||||
|
||||
function test_guard_protects_iron()
|
||||
local r = region.create(0, 0, "plain")
|
||||
r:set_resource("iron", 100)
|
||||
local level = r:get_resourcelevel("iron")
|
||||
local u = unit.create(faction.create("human"), r)
|
||||
u:set_skill("mining", level)
|
||||
local guard = unit.create(get_monsters(), r, 1)
|
||||
guard:add_order("BEWACHEN")
|
||||
|
||||
u:add_order("MACHE EISEN")
|
||||
process_orders()
|
||||
assert_equal(level, u:get_item("iron"))
|
||||
process_orders()
|
||||
assert_equal(level, u:get_item("iron"))
|
||||
end
|
||||
|
||||
function test_ironkeeper_guards_iron()
|
||||
local r = region.create(0, 0, "plain")
|
||||
r:set_resource("iron", 100)
|
||||
local level = r:get_resourcelevel("iron")
|
||||
local u = unit.create(faction.create("human"), r)
|
||||
u:set_skill("mining", level)
|
||||
local guard = unit.create(faction.create("mountainguard"), r, 1, "mountainguard")
|
||||
guard:add_order("BEWACHEN")
|
||||
u:add_order("MACHE EISEN")
|
||||
process_orders()
|
||||
assert_equal(level, u:get_item("iron"))
|
||||
process_orders()
|
||||
assert_equal(level, u:get_item("iron"))
|
||||
end
|
||||
|
||||
function test_ent_guards_trees()
|
||||
local r = region.create(0, 0, "plain")
|
||||
r:set_resource("tree", 100)
|
||||
local u = unit.create(faction.create("human"), r)
|
||||
u:set_skill("mining", 1)
|
||||
local guard = unit.create(get_monsters(), r, 1, "ent")
|
||||
u:set_skill("forestry", 1)
|
||||
guard:clear_orders()
|
||||
u:clear_orders()
|
||||
|
||||
guard:add_order("BEWACHEN")
|
||||
u:add_order("MACHE HOLZ")
|
||||
process_orders()
|
||||
assert_equal(1, u:get_item("log"))
|
||||
process_orders()
|
||||
assert_equal(1, u:get_item("log"))
|
||||
end
|
|
@ -17,7 +17,7 @@ function setup()
|
|||
end
|
||||
|
||||
function test_faction_flags()
|
||||
assert_equal(0, f.flags)
|
||||
assert_equal(2, f.flags) -- FFL_ISNEW
|
||||
f.flags = 42
|
||||
assert_equal(42, f.flags)
|
||||
end
|
||||
|
|
|
@ -165,7 +165,7 @@ end
|
|||
|
||||
function test_process_renumber()
|
||||
u:add_order("NUMMER EINHEIT 'ii'")
|
||||
eressea.process.renumber()
|
||||
process_orders()
|
||||
assert_equal(666, u.id)
|
||||
end
|
||||
|
||||
|
|
|
@ -0,0 +1,122 @@
|
|||
require "lunit"
|
||||
|
||||
module("tests.report", package.seeall, lunit.testcase)
|
||||
|
||||
function setup()
|
||||
eressea.free_game()
|
||||
eressea.settings.set("nmr.timeout", "0")
|
||||
eressea.settings.set("rules.food.flags", "4")
|
||||
end
|
||||
|
||||
local function find_in_report(f, pattern, extension)
|
||||
extension = extension or "nr"
|
||||
local filename = config.reportpath .. "/" .. get_turn() .. "-" .. itoa36(f.id) .. "." .. extension
|
||||
local report = io.open(filename, 'r');
|
||||
assert_not_nil(report)
|
||||
t = report:read("*all")
|
||||
report:close()
|
||||
|
||||
local start, _ = string.find(t, pattern)
|
||||
return start~=nil
|
||||
end
|
||||
|
||||
local function remove_report(faction)
|
||||
local filetrunk = config.reportpath .. "/" .. get_turn() .. "-" .. itoa36(faction.id)
|
||||
os.remove(filetrunk .. ".nr")
|
||||
os.remove(filetrunk .. ".cr")
|
||||
os.remove(filetrunk .. ".txt")
|
||||
end
|
||||
|
||||
function setup()
|
||||
eressea.free_game()
|
||||
eressea.settings.set("nmr.timeout", "0")
|
||||
eressea.settings.set("rules.food.flags", "4")
|
||||
end
|
||||
|
||||
function test_coordinates_unnamed_plane()
|
||||
local p = plane.create(0, -3, -3, 7, 7)
|
||||
local r = region.create(0, 0, "mountain")
|
||||
local f = faction.create("unnamed@eressea.de", "human", "de")
|
||||
local u = unit.create(f, r, 1)
|
||||
init_reports()
|
||||
write_report(f)
|
||||
assert_true(find_in_report(f, r.name .. " %(0,0%), Berg"))
|
||||
remove_report(f)
|
||||
end
|
||||
|
||||
function test_coordinates_no_plane()
|
||||
local r = region.create(0, 0, "mountain")
|
||||
local f = faction.create("noplane@eressea.de", "human", "de")
|
||||
local u = unit.create(f, r, 1)
|
||||
init_reports()
|
||||
write_report(f)
|
||||
assert_true(find_in_report(f, r.name .. " %(0,0%), Berg"))
|
||||
remove_report(f)
|
||||
end
|
||||
|
||||
function test_show_shadowmaster_attacks()
|
||||
local r = region.create(0, 0, "plain")
|
||||
local f = faction.create("noreply@eressea.de", "human", "de")
|
||||
local u = unit.create(f, r, 1)
|
||||
u.race = "shadowmaster"
|
||||
u:clear_orders()
|
||||
u:add_order("ZEIGE Schattenmeister")
|
||||
process_orders()
|
||||
init_reports()
|
||||
write_report(f)
|
||||
assert_false(find_in_report(f, ", ,"))
|
||||
remove_report(f)
|
||||
end
|
||||
|
||||
function test_coordinates_named_plane()
|
||||
local p = plane.create(0, -3, -3, 7, 7, "Hell")
|
||||
local r = region.create(0, 0, "mountain")
|
||||
local f = faction.create("noreply@eressea.de", "human", "de")
|
||||
local u = unit.create(f, r, 1)
|
||||
init_reports()
|
||||
write_report(f)
|
||||
assert_true(find_in_report(f, r.name .. " %(0,0,Hell%), Berg"))
|
||||
remove_report(f)
|
||||
end
|
||||
|
||||
function test_coordinates_noname_plane()
|
||||
local p = plane.create(0, -3, -3, 7, 7, "")
|
||||
local r = region.create(0, 0, "mountain")
|
||||
local f = faction.create("noreply@eressea.de", "human", "de")
|
||||
local u = unit.create(f, r, 1)
|
||||
init_reports()
|
||||
write_report(f)
|
||||
assert_true(find_in_report(f, r.name .. " %(0,0%), Berg"))
|
||||
remove_report(f)
|
||||
end
|
||||
|
||||
function test_lighthouse()
|
||||
eressea.free_game()
|
||||
local r = region.create(0, 0, "mountain")
|
||||
local f = faction.create("noreply@eressea.de", "human", "de")
|
||||
region.create(1, 0, "mountain")
|
||||
region.create(2, 0, "ocean")
|
||||
region.create(0, 1, "firewall")
|
||||
region.create(3, 0, "mountain")
|
||||
region.create(4, 0, "plain")
|
||||
local u = unit.create(f, r, 1)
|
||||
local b = building.create(r, "lighthouse")
|
||||
b.size = 100
|
||||
b.working = true
|
||||
u.building = b
|
||||
u:set_skill("perception", 9)
|
||||
u:add_item("money", 1000)
|
||||
assert_not_nil(b)
|
||||
|
||||
init_reports()
|
||||
write_report(f)
|
||||
assert_true(find_in_report(f, " %(1,0%) %(vom Turm erblickt%)"))
|
||||
assert_true(find_in_report(f, " %(2,0%) %(vom Turm erblickt%)"))
|
||||
assert_true(find_in_report(f, " %(3,0%) %(vom Turm erblickt%)"))
|
||||
|
||||
assert_false(find_in_report(f, " %(0,0%) %(vom Turm erblickt%)"))
|
||||
assert_false(find_in_report(f, " %(0,1%) %(vom Turm erblickt%)"))
|
||||
assert_false(find_in_report(f, " %(4,0%) %(vom Turm erblickt%)"))
|
||||
remove_report(f)
|
||||
end
|
||||
|
|
@ -6,6 +6,8 @@ function setup()
|
|||
eressea.free_game()
|
||||
eressea.settings.set("nmr.timeout", "0")
|
||||
eressea.settings.set("rules.grow.formula", "0")
|
||||
eressea.settings.set("rules.peasants.growth.factor", "0")
|
||||
eressea.settings.set("volcano.active.percent", "0")
|
||||
end
|
||||
|
||||
function test_snowglobe_fail()
|
||||
|
@ -51,7 +53,7 @@ function test_snowglobe()
|
|||
for k, v in pairs(xform) do
|
||||
r2.terrain = k
|
||||
process_orders()
|
||||
-- TODO: re-enable! assert_equal(v, r2.terrain)
|
||||
assert_equal(v, r2.terrain)
|
||||
if k~=v then
|
||||
have=have - 1
|
||||
else
|
||||
|
|
|
@ -124,6 +124,7 @@ end
|
|||
|
||||
function seed()
|
||||
local input = io.open(config.basepath .. "/parteien.txt")
|
||||
if input then
|
||||
for f in factions() do
|
||||
if f.race=="vampunicorn" then
|
||||
local str = input:read("*line")
|
||||
|
@ -149,6 +150,8 @@ function seed()
|
|||
end
|
||||
end
|
||||
end
|
||||
input:close()
|
||||
end
|
||||
for r in regions() do
|
||||
r:set_resource("sapling", r:get_resource("tree")/4)
|
||||
r:set_resource("seed", 0)
|
||||
|
|
|
@ -27,12 +27,13 @@ else
|
|||
end
|
||||
|
||||
local f=assert(io.open("factions", "r"))
|
||||
line=f:read("*line")
|
||||
players = {}
|
||||
emails = {}
|
||||
patrons = {}
|
||||
nplayers = 0
|
||||
while line~=nil do
|
||||
if f then
|
||||
line=f:read("*line")
|
||||
players = {}
|
||||
emails = {}
|
||||
patrons = {}
|
||||
nplayers = 0
|
||||
while line~=nil do
|
||||
fields = {}
|
||||
line:gsub("([^\t]*)\t*", function(c) table.insert(fields, c) end)
|
||||
line=f:read("*line")
|
||||
|
@ -46,8 +47,9 @@ while line~=nil do
|
|||
race=string.gsub(fields[4], "/.*", ''):lower()
|
||||
players[email] = { ['lang'] = lang, ['race'] = race }
|
||||
nplayers = nplayers + 1
|
||||
end
|
||||
f:close()
|
||||
end
|
||||
|
||||
for k, r in ipairs(homes) do
|
||||
print(k, r)
|
||||
end
|
||||
|
|
|
@ -27,12 +27,13 @@ else
|
|||
end
|
||||
|
||||
local f=assert(io.open("factions", "r"))
|
||||
line=f:read("*line")
|
||||
players = {}
|
||||
emails = {}
|
||||
patrons = {}
|
||||
nplayers = 0
|
||||
while line~=nil do
|
||||
if f then
|
||||
line=f:read("*line")
|
||||
players = {}
|
||||
emails = {}
|
||||
patrons = {}
|
||||
nplayers = 0
|
||||
while line~=nil do
|
||||
fields = {}
|
||||
line:gsub("([^\t]*)\t*", function(c) table.insert(fields, c) end)
|
||||
line=f:read("*line")
|
||||
|
@ -46,8 +47,9 @@ while line~=nil do
|
|||
race=string.gsub(fields[4], "/.*", ''):lower()
|
||||
players[email] = { ['lang'] = lang, ['race'] = race }
|
||||
nplayers = nplayers + 1
|
||||
end
|
||||
f:close()
|
||||
end
|
||||
|
||||
for k, r in ipairs(homes) do
|
||||
print(k, r)
|
||||
end
|
||||
|
|
|
@ -1,11 +1,10 @@
|
|||
cmake_minimum_required(VERSION 2.6)
|
||||
cmake_minimum_required(VERSION 2.8)
|
||||
project (server C)
|
||||
|
||||
include_directories (${CMAKE_CURRENT_SOURCE_DIR})
|
||||
include_directories (${CRITBIT_INCLUDE_DIR})
|
||||
include_directories (${CJSON_INCLUDE_DIR})
|
||||
include_directories (${STORAGE_INCLUDE_DIR})
|
||||
include_directories (${CRYPTO_INCLUDE_DIR})
|
||||
include_directories (${QUICKLIST_INCLUDE_DIR})
|
||||
include_directories (${CUTEST_INCLUDE_DIR})
|
||||
include_directories (${LUA_INCLUDE_DIR})
|
||||
|
@ -13,11 +12,19 @@ include_directories (${TOLUA_INCLUDE_DIR})
|
|||
include_directories (${BSON_INCLUDE_DIR})
|
||||
include_directories (${INIPARSER_INCLUDE_DIR})
|
||||
|
||||
IF(CMAKE_COMPILER_IS_GNUCC OR CMAKE_COMPILER_IS_CLANG)
|
||||
SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wconversion -Wno-sign-conversion")
|
||||
SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -pedantic -Wsign-compare -Wall -Werror -Wno-unknown-pragmas -Wstrict-prototypes -Wpointer-arith -Wno-char-subscripts -Wno-long-long")
|
||||
IF(DEFINED ERESSEA_VERSION)
|
||||
set_source_files_properties(kernel/version.c PROPERTIES
|
||||
COMPILE_DEFINITIONS ERESSEA_VERSION="${ERESSEA_VERSION}")
|
||||
ENDIF()
|
||||
|
||||
IF (CMAKE_COMPILER_IS_GNUCC)
|
||||
SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wno-error=unused-but-set-variable")
|
||||
SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -std=c99 -DHAVE__BOOL")
|
||||
ENDIF()
|
||||
IF (CMAKE_COMPILER_IS_GNUCC OR CMAKE_C_COMPILER_ID MATCHES "Clang")
|
||||
# SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wconversion -Wno-sign-conversion")
|
||||
SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -pedantic -Wsign-compare -Wall -Werror -Wno-unknown-pragmas -Wstrict-prototypes -Wpointer-arith -Wno-char-subscripts -Wno-long-long")
|
||||
SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -std=c99")
|
||||
add_definitions(-DHAVE__BOOL)
|
||||
ELSEIF(MSVC)
|
||||
SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} /Wall /WX /MP")
|
||||
set(CMAKE_EXE_LINKER_FLAGS_DEBUG
|
||||
|
@ -77,6 +84,7 @@ TOLUA_BINDING(settings.pkg kenel/config.h)
|
|||
ENDIF()
|
||||
|
||||
set (ERESSEA_SRC
|
||||
vortex.c
|
||||
calendar.c
|
||||
move.c
|
||||
piracy.c
|
||||
|
@ -85,7 +93,6 @@ set (ERESSEA_SRC
|
|||
alchemy.c
|
||||
academy.c
|
||||
upkeep.c
|
||||
vortex.c
|
||||
names.c
|
||||
lighthouse.c
|
||||
reports.c
|
||||
|
@ -93,15 +100,13 @@ set (ERESSEA_SRC
|
|||
guard.c
|
||||
prefix.c
|
||||
donations.c
|
||||
seen.c
|
||||
eressea.c
|
||||
callback.c
|
||||
direction.c
|
||||
keyword.c
|
||||
skill.c
|
||||
json.c
|
||||
creport.c
|
||||
jsreport.c
|
||||
report.c
|
||||
economy.c
|
||||
give.c
|
||||
items.c
|
||||
|
@ -111,8 +116,9 @@ set (ERESSEA_SRC
|
|||
morale.c
|
||||
monster.c
|
||||
randenc.c
|
||||
renumber.c
|
||||
volcano.c
|
||||
chaos.c
|
||||
report.c
|
||||
spy.c
|
||||
study.c
|
||||
summary.c
|
||||
|
@ -167,8 +173,10 @@ set (SERVER_SRC ${SERVER_SRC}
|
|||
)
|
||||
endif(CURSES_FOUND)
|
||||
|
||||
add_library(version STATIC ${VERSION_SRC})
|
||||
add_library(game ${ERESSEA_SRC})
|
||||
add_executable(eressea ${SERVER_SRC})
|
||||
target_link_libraries(game version)
|
||||
target_link_libraries(eressea
|
||||
game
|
||||
${TOLUA_LIBRARIES}
|
||||
|
@ -176,37 +184,42 @@ target_link_libraries(eressea
|
|||
${QUICKLIST_LIBRARIES}
|
||||
${STORAGE_LIBRARIES}
|
||||
${CRITBIT_LIBRARIES}
|
||||
${CRYPTO_LIBRARIES}
|
||||
${CJSON_LIBRARIES}
|
||||
${INIPARSER_LIBRARIES}
|
||||
)
|
||||
|
||||
set(TESTS_SRC
|
||||
monsters.test.c
|
||||
names.test.c
|
||||
donations.test.c
|
||||
wormhole.test.c
|
||||
alchemy.test.c
|
||||
guard.test.c
|
||||
test_eressea.c
|
||||
tests.c
|
||||
battle.test.c
|
||||
vortex.test.c
|
||||
tests.test.c
|
||||
volcano.test.c
|
||||
reports.test.c
|
||||
seen.test.c
|
||||
creport.test.c
|
||||
report.test.c
|
||||
summary.test.c
|
||||
travelthru.test.c
|
||||
callback.test.c
|
||||
direction.test.c
|
||||
economy.test.c
|
||||
json.test.c
|
||||
keyword.test.c
|
||||
give.test.c
|
||||
laws.test.c
|
||||
lighthouse.test.c
|
||||
magic.test.c
|
||||
market.test.c
|
||||
monsters.test.c
|
||||
move.test.c
|
||||
piracy.test.c
|
||||
prefix.test.c
|
||||
renumber.test.c
|
||||
skill.test.c
|
||||
spells.test.c
|
||||
spy.test.c
|
||||
|
@ -229,7 +242,6 @@ target_link_libraries(test_eressea
|
|||
${QUICKLIST_LIBRARIES}
|
||||
${STORAGE_LIBRARIES}
|
||||
${CRITBIT_LIBRARIES}
|
||||
${CRYPTO_LIBRARIES}
|
||||
${CJSON_LIBRARIES}
|
||||
${INIPARSER_LIBRARIES}
|
||||
)
|
||||
|
@ -246,18 +258,18 @@ install(TARGETS eressea DESTINATION "bin")
|
|||
|
||||
if (SQLITE3_FOUND)
|
||||
target_link_libraries(eressea ${SQLITE3_LIBRARIES})
|
||||
SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -DUSE_SQLITE")
|
||||
add_definitions(-DUSE_SQLITE)
|
||||
endif(SQLITE3_FOUND)
|
||||
|
||||
if (CURSES_FOUND)
|
||||
include_directories (${CURSES_INCLUDE_DIR})
|
||||
target_link_libraries(eressea ${CURSES_LIBRARIES})
|
||||
SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -DUSE_CURSES")
|
||||
add_definitions(-DUSE_CURSES)
|
||||
endif(CURSES_FOUND)
|
||||
|
||||
if (LIBXML2_FOUND)
|
||||
include_directories (${LIBXML2_INCLUDE_DIR})
|
||||
target_link_libraries(eressea ${LIBXML2_LIBRARIES})
|
||||
target_link_libraries(test_eressea ${LIBXML2_LIBRARIES})
|
||||
SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -DUSE_LIBXML2")
|
||||
add_definitions(-DUSE_LIBXML2)
|
||||
endif (LIBXML2_FOUND)
|
||||
|
|
|
@ -19,7 +19,7 @@ OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
|||
#include <platform.h>
|
||||
#include <kernel/config.h>
|
||||
#include "alchemy.h"
|
||||
#include "move.h"
|
||||
#include "guard.h"
|
||||
#include "skill.h"
|
||||
#include "study.h"
|
||||
|
||||
|
@ -61,7 +61,7 @@ void herbsearch(unit * u, int max)
|
|||
return;
|
||||
}
|
||||
|
||||
if (is_guarded(r, u, GUARD_PRODUCE)) {
|
||||
if (is_guarded(r, u)) {
|
||||
cmistake(u, u->thisorder, 70, MSG_EVENT);
|
||||
return;
|
||||
}
|
||||
|
@ -123,9 +123,14 @@ static void end_potion(unit * u, const potion_type * ptype, int amount)
|
|||
}
|
||||
|
||||
static int potion_water_of_life(unit * u, region *r, int amount) {
|
||||
static int config;
|
||||
static int tree_type, tree_count;
|
||||
int wood = 0;
|
||||
int tree_type = config_get_int("rules.magic.wol_type", 1);
|
||||
int tree_count = config_get_int("rules.magic.wol_effect", 10);
|
||||
|
||||
if (config_changed(&config)) {
|
||||
tree_type = config_get_int("rules.magic.wol_type", 1);
|
||||
tree_count = config_get_int("rules.magic.wol_effect", 10);
|
||||
}
|
||||
/* mallorn is required to make mallorn forests, wood for regular ones */
|
||||
if (fval(r, RF_MALLORN)) {
|
||||
wood = use_pooled(u, rt_find("mallorn"),
|
||||
|
@ -165,7 +170,8 @@ static int potion_luck(unit *u, region *r, attrib_type *atype, int amount) {
|
|||
}
|
||||
|
||||
static int potion_truth(unit *u) {
|
||||
fset(u, UFL_DISBELIEVES);
|
||||
// TODO: this potion does nothing!
|
||||
// fset(u, UFL_DISBELIEVES);
|
||||
return 1;
|
||||
}
|
||||
|
||||
|
@ -175,7 +181,7 @@ static int potion_power(unit *u, int amount) {
|
|||
if (u->number % 10 > 0) ++use;
|
||||
amount = use;
|
||||
}
|
||||
/* Verfünffacht die HP von max. 10 Personen in der Einheit */
|
||||
/* Verf<EFBFBD>nffacht die HP von max. 10 Personen in der Einheit */
|
||||
u->hp += _min(u->number, 10 * amount) * unit_max_hp(u) * 4;
|
||||
return amount;
|
||||
}
|
||||
|
@ -235,8 +241,7 @@ static void init_potiondelay(attrib * a)
|
|||
a->data.v = malloc(sizeof(potiondelay));
|
||||
}
|
||||
|
||||
static void free_potiondelay(attrib * a)
|
||||
{
|
||||
static void free_potiondelay(attrib * a) {
|
||||
free(a->data.v);
|
||||
}
|
||||
|
||||
|
@ -290,7 +295,7 @@ static void a_initeffect(attrib * a)
|
|||
a->data.v = calloc(sizeof(effect_data), 1);
|
||||
}
|
||||
|
||||
static void a_finalizeeffect(attrib * a)
|
||||
static void a_finalizeeffect(attrib * a) //-V524
|
||||
{
|
||||
free(a->data.v);
|
||||
}
|
||||
|
|
|
@ -25,12 +25,12 @@ static void test_herbsearch(CuTest * tc)
|
|||
region *r;
|
||||
const item_type *itype;
|
||||
|
||||
test_cleanup();
|
||||
test_setup();
|
||||
r = test_create_region(0, 0, 0);
|
||||
rc = rc_get_or_create("dragon");
|
||||
rc->flags |= RCF_UNARMEDGUARD;
|
||||
u2 = test_create_unit(test_create_faction(rc), r);
|
||||
guard(u2, GUARD_PRODUCE);
|
||||
setguard(u2, true);
|
||||
|
||||
f = test_create_faction(0);
|
||||
u = test_create_unit(f, r);
|
||||
|
@ -41,14 +41,14 @@ static void test_herbsearch(CuTest * tc)
|
|||
test_clear_messages(f);
|
||||
|
||||
set_level(u, SK_HERBALISM, 1);
|
||||
CuAssertPtrEquals(tc, u2, is_guarded(r, u, GUARD_PRODUCE));
|
||||
CuAssertPtrEquals(tc, u2, is_guarded(r, u));
|
||||
herbsearch(u, INT_MAX);
|
||||
CuAssertPtrNotNull(tc, test_find_messagetype(f->msgs, "error70"));
|
||||
CuAssertPtrEquals(tc, 0, test_find_messagetype(f->msgs, "error59"));
|
||||
test_clear_messages(f);
|
||||
|
||||
guard(u2, GUARD_NONE);
|
||||
CuAssertPtrEquals(tc, 0, is_guarded(r, u, GUARD_PRODUCE));
|
||||
setguard(u2, false);
|
||||
CuAssertPtrEquals(tc, 0, is_guarded(r, u));
|
||||
CuAssertPtrEquals(tc, 0, (void *)rherbtype(r));
|
||||
herbsearch(u, INT_MAX);
|
||||
CuAssertPtrNotNull(tc, test_find_messagetype(f->msgs, "error108"));
|
||||
|
|
|
@ -16,7 +16,6 @@ matmod.c
|
|||
moved.c
|
||||
movement.c
|
||||
dict.c
|
||||
orcification.c
|
||||
otherfaction.c
|
||||
overrideroads.c
|
||||
racename.c
|
||||
|
|
|
@ -22,7 +22,6 @@ OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
|||
|
||||
#include "laws.h"
|
||||
#include "move.h"
|
||||
#include "guard.h"
|
||||
|
||||
/* attributes includes */
|
||||
#include "follow.h"
|
||||
|
@ -34,7 +33,6 @@ OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
|||
#include "moved.h"
|
||||
#include "movement.h"
|
||||
#include "dict.h"
|
||||
#include "orcification.h"
|
||||
#include "otherfaction.h"
|
||||
#include "overrideroads.h"
|
||||
#include "racename.h"
|
||||
|
@ -50,7 +48,6 @@ OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
|||
#include <kernel/faction.h>
|
||||
#include <kernel/group.h>
|
||||
#include <kernel/region.h>
|
||||
#include <kernel/save.h>
|
||||
#include <kernel/ship.h>
|
||||
#include <kernel/building.h>
|
||||
|
||||
|
@ -61,6 +58,10 @@ OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
|||
|
||||
#include <storage.h>
|
||||
|
||||
attrib_type at_scare = { // monster scares peasants
|
||||
"scare", NULL, NULL, NULL, a_writeint, a_readint
|
||||
};
|
||||
|
||||
attrib_type at_unitdissolve = {
|
||||
"unitdissolve", NULL, NULL, NULL, a_writechars, a_readchars
|
||||
};
|
||||
|
@ -77,6 +78,7 @@ static int read_ext(attrib * a, void *owner, gamedata *data)
|
|||
void register_attributes(void)
|
||||
{
|
||||
/* Alle speicherbaren Attribute müssen hier registriert werden */
|
||||
at_register(&at_scare);
|
||||
at_register(&at_shiptrail);
|
||||
at_register(&at_familiar);
|
||||
at_register(&at_familiarmage);
|
||||
|
@ -100,7 +102,6 @@ void register_attributes(void)
|
|||
at_register(&at_private);
|
||||
|
||||
at_register(&at_icastle);
|
||||
at_register(&at_guard);
|
||||
at_register(&at_group);
|
||||
|
||||
at_register(&at_building_generic_type);
|
||||
|
@ -117,8 +118,10 @@ void register_attributes(void)
|
|||
at_register(&at_germs);
|
||||
|
||||
at_deprecate("xontormiaexpress", a_readint); /* required for old datafiles */
|
||||
at_deprecate("orcification", a_readint); /* required for old datafiles */
|
||||
at_deprecate("lua", read_ext); /* required for old datafiles */
|
||||
at_deprecate("gm", a_readint);
|
||||
at_deprecate("guard", a_readint); /* used to contain guard-flags (v3.10.0-259-g8597e8b) */
|
||||
at_register(&at_stealth);
|
||||
at_register(&at_dict);
|
||||
at_register(&at_unitdissolve);
|
||||
|
@ -129,7 +132,6 @@ void register_attributes(void)
|
|||
at_register(&at_keys);
|
||||
at_register(&at_follow);
|
||||
at_register(&at_targetregion);
|
||||
at_register(&at_orcification);
|
||||
at_register(&at_hate);
|
||||
at_register(&at_reduceproduction);
|
||||
at_register(&at_otherfaction);
|
||||
|
|
|
@ -22,6 +22,8 @@ OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
|||
extern "C" {
|
||||
#endif
|
||||
|
||||
struct attrib_type;
|
||||
extern struct attrib_type at_scare;
|
||||
extern void register_attributes(void);
|
||||
|
||||
#ifdef __cplusplus
|
||||
|
|
|
@ -24,10 +24,8 @@ OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
|||
#include <kernel/building.h>
|
||||
#include <kernel/faction.h>
|
||||
#include <kernel/region.h>
|
||||
#include <kernel/save.h>
|
||||
#include <kernel/ship.h>
|
||||
#include <kernel/unit.h>
|
||||
#include <kernel/version.h>
|
||||
|
||||
/* util includes */
|
||||
#include <util/attrib.h>
|
||||
|
|
|
@ -21,6 +21,8 @@ OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
|||
|
||||
#include <util/attrib.h>
|
||||
|
||||
#include <stdlib.h>
|
||||
|
||||
attrib_type at_fleechance = {
|
||||
"fleechance",
|
||||
NULL,
|
||||
|
|
|
@ -21,7 +21,6 @@ OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
|||
#include "hate.h"
|
||||
|
||||
#include <kernel/unit.h>
|
||||
#include <kernel/version.h>
|
||||
|
||||
#include <util/attrib.h>
|
||||
#include <util/gamedata.h>
|
||||
|
|
|
@ -20,7 +20,6 @@ OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
|||
#include <kernel/config.h>
|
||||
#include "iceberg.h"
|
||||
|
||||
#include <kernel/save.h>
|
||||
#include <util/attrib.h>
|
||||
|
||||
attrib_type at_iceberg = {
|
||||
|
|
|
@ -20,7 +20,6 @@ OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
|||
#include <kernel/config.h>
|
||||
#include "key.h"
|
||||
|
||||
#include <kernel/save.h>
|
||||
#include <util/attrib.h>
|
||||
#include <util/gamedata.h>
|
||||
#include <storage.h>
|
||||
|
|
|
@ -3,6 +3,7 @@
|
|||
|
||||
#include <util/attrib.h>
|
||||
#include <CuTest.h>
|
||||
#include <stdlib.h>
|
||||
|
||||
static void test_get_set_keys(CuTest *tc) {
|
||||
attrib *a = 0;
|
||||
|
|
|
@ -20,6 +20,7 @@ OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
|||
#include "matmod.h"
|
||||
|
||||
#include <util/attrib.h>
|
||||
#include <stddef.h>
|
||||
|
||||
attrib_type at_matmod = {
|
||||
"matmod",
|
||||
|
|
|
@ -20,7 +20,6 @@ OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
|||
#include <kernel/config.h>
|
||||
#include "movement.h"
|
||||
|
||||
#include <kernel/save.h>
|
||||
#include <util/attrib.h>
|
||||
#include <util/gamedata.h>
|
||||
|
||||
|
|
|
@ -1,39 +0,0 @@
|
|||
/*
|
||||
Copyright (c) 1998-2015, Enno Rehling <enno@eressea.de>
|
||||
Katja Zedel <katze@felidae.kn-bremen.de
|
||||
Christian Schlittchen <corwin@amber.kn-bremen.de>
|
||||
|
||||
Permission to use, copy, modify, and/or distribute this software for any
|
||||
purpose with or without fee is hereby granted, provided that the above
|
||||
copyright notice and this permission notice appear in all copies.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
|
||||
WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
|
||||
MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
|
||||
ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
|
||||
WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
|
||||
ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
|
||||
OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
||||
**/
|
||||
|
||||
#include <platform.h>
|
||||
#include <kernel/config.h>
|
||||
#include "orcification.h"
|
||||
|
||||
#include <kernel/save.h>
|
||||
#include <util/attrib.h>
|
||||
|
||||
/*
|
||||
* simple attributes that do not yet have their own file
|
||||
*/
|
||||
|
||||
attrib_type at_orcification = {
|
||||
"orcification", NULL, NULL, NULL, a_writeint, a_readint, NULL, ATF_UNIQUE
|
||||
};
|
||||
|
||||
attrib *make_orcification(int orcification)
|
||||
{
|
||||
attrib *a = a_new(&at_orcification);
|
||||
a->data.i = orcification;
|
||||
return a;
|
||||
}
|
|
@ -1,28 +0,0 @@
|
|||
/*
|
||||
Copyright (c) 1998-2015, Enno Rehling <enno@eressea.de>
|
||||
Katja Zedel <katze@felidae.kn-bremen.de
|
||||
Christian Schlittchen <corwin@amber.kn-bremen.de>
|
||||
|
||||
Permission to use, copy, modify, and/or distribute this software for any
|
||||
purpose with or without fee is hereby granted, provided that the above
|
||||
copyright notice and this permission notice appear in all copies.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
|
||||
WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
|
||||
MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
|
||||
ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
|
||||
WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
|
||||
ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
|
||||
OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
||||
**/
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
extern struct attrib_type at_orcification;
|
||||
|
||||
extern struct attrib *make_orcification(int orcification);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
|
@ -16,7 +16,7 @@
|
|||
#include <assert.h>
|
||||
|
||||
static void test_rules(CuTest *tc) {
|
||||
test_cleanup();
|
||||
test_setup();
|
||||
config_set("stealth.faction.other", NULL);
|
||||
CuAssertIntEquals(tc, true, rule_stealth_other());
|
||||
config_set("stealth.faction.other", "0");
|
||||
|
@ -37,7 +37,7 @@ static void test_otherfaction(CuTest *tc) {
|
|||
unit *u;
|
||||
faction *f;
|
||||
|
||||
test_cleanup();
|
||||
test_setup();
|
||||
u = test_create_unit(test_create_faction(0), test_create_region(0, 0, 0));
|
||||
f = test_create_faction(0);
|
||||
config_set("stealth.faction.other", "1");
|
||||
|
|
|
@ -20,9 +20,8 @@ OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
|||
#include <kernel/config.h>
|
||||
#include "overrideroads.h"
|
||||
|
||||
#include <kernel/save.h>
|
||||
#include <util/attrib.h>
|
||||
|
||||
attrib_type at_overrideroads = {
|
||||
"roads_override", NULL, NULL, NULL, &a_writestring, &a_readstring
|
||||
"roads_override", NULL, NULL, NULL, a_writestring, a_readstring
|
||||
};
|
||||
|
|
|
@ -20,7 +20,6 @@ OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
|||
#include <kernel/config.h>
|
||||
#include "racename.h"
|
||||
|
||||
#include <kernel/save.h>
|
||||
#include <util/attrib.h>
|
||||
|
||||
/* libc includes */
|
||||
|
|
|
@ -19,7 +19,6 @@ OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
|||
#include <platform.h>
|
||||
#include <kernel/config.h>
|
||||
#include "raceprefix.h"
|
||||
#include <kernel/save.h>
|
||||
|
||||
#include <util/attrib.h>
|
||||
|
||||
|
|
|
@ -19,7 +19,6 @@ OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
|||
#include <platform.h>
|
||||
#include <kernel/config.h>
|
||||
#include "reduceproduction.h"
|
||||
#include <kernel/save.h>
|
||||
#include <kernel/region.h>
|
||||
#include <kernel/messages.h>
|
||||
#include <util/message.h>
|
||||
|
|
|
@ -1,7 +1,6 @@
|
|||
#include <platform.h>
|
||||
#include <kernel/unit.h>
|
||||
#include <kernel/region.h>
|
||||
#include <kernel/save.h>
|
||||
#include <util/attrib.h>
|
||||
#include <attributes/stealth.h>
|
||||
|
||||
|
|
|
@ -21,8 +21,6 @@ OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
|||
|
||||
#include <kernel/config.h>
|
||||
#include <kernel/region.h>
|
||||
#include <kernel/save.h>
|
||||
#include <kernel/version.h>
|
||||
|
||||
#include <util/attrib.h>
|
||||
#include <util/gamedata.h>
|
||||
|
|
315
src/battle.c
315
src/battle.c
|
@ -21,11 +21,11 @@ OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
|||
#include "battle.h"
|
||||
#include "alchemy.h"
|
||||
#include "chaos.h"
|
||||
#include "move.h"
|
||||
#include "guard.h"
|
||||
#include "laws.h"
|
||||
#include "seen.h"
|
||||
#include "skill.h"
|
||||
#include "monster.h"
|
||||
#include "move.h"
|
||||
#include "skill.h"
|
||||
|
||||
#include <kernel/ally.h>
|
||||
#include <kernel/alliance.h>
|
||||
|
@ -56,10 +56,12 @@ OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
|||
#include <attributes/moved.h>
|
||||
|
||||
/* util includes */
|
||||
#include <util/assert.h>
|
||||
#include <util/attrib.h>
|
||||
#include <util/base36.h>
|
||||
#include <util/bsdstring.h>
|
||||
#include <util/language.h>
|
||||
#include <util/lists.h>
|
||||
#include <util/log.h>
|
||||
#include <util/parser.h>
|
||||
#include <quicklist.h>
|
||||
|
@ -67,7 +69,6 @@ OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
|||
#include <util/rng.h>
|
||||
|
||||
/* libc includes */
|
||||
#include <assert.h>
|
||||
#include <ctype.h>
|
||||
#include <limits.h>
|
||||
#include <math.h>
|
||||
|
@ -75,19 +76,16 @@ OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
|||
#include <stdlib.h>
|
||||
#include <sys/stat.h>
|
||||
|
||||
static FILE *bdebug;
|
||||
|
||||
#define TACTICS_BONUS 1 /* when undefined, we have a tactics round. else this is the bonus tactics give */
|
||||
#define TACTICS_MODIFIER 1 /* modifier for generals in the front/rear */
|
||||
|
||||
#define CATAPULT_INITIAL_RELOAD 4 /* erster schuss in runde 1 + rng_int() % INITIAL */
|
||||
#define CATAPULT_STRUCTURAL_DAMAGE
|
||||
|
||||
#define BASE_CHANCE 70 /* 70% Basis-Überlebenschance */
|
||||
#define TDIFF_CHANGE 5 /* 5% höher pro Stufe */
|
||||
#define BASE_CHANCE 70 /* 70% Basis-<EFBFBD>berlebenschance */
|
||||
#define TDIFF_CHANGE 5 /* 5% h<EFBFBD>her pro Stufe */
|
||||
#define DAMAGE_QUOTIENT 2 /* damage += skilldiff/DAMAGE_QUOTIENT */
|
||||
|
||||
#undef DEBUG_FAST /* should be disabled when b->fast and b->rowcache works */
|
||||
#define DEBUG_SELECT /* should be disabled if select_enemy works */
|
||||
|
||||
typedef enum combatmagic {
|
||||
|
@ -96,7 +94,10 @@ typedef enum combatmagic {
|
|||
} combatmagic_t;
|
||||
|
||||
/* globals */
|
||||
bool battledebug = false;
|
||||
|
||||
static int obs_count = 0;
|
||||
static FILE *bdebug;
|
||||
|
||||
#define MINSPELLRANGE 1
|
||||
#define MAXSPELLRANGE 7
|
||||
|
@ -140,6 +141,7 @@ static int rule_goblin_bonus;
|
|||
static int rule_tactics_formula;
|
||||
static int rule_nat_armor;
|
||||
static int rule_cavalry_mode;
|
||||
static int rule_vampire;
|
||||
|
||||
static const curse_type *peace_ct, *slave_ct, *calm_ct;
|
||||
|
||||
|
@ -158,6 +160,7 @@ static void init_rules(void)
|
|||
rule_anon_battle = config_get_int("rules.stealth.anon_battle", 1) != 0;
|
||||
rule_cavalry_mode = config_get_int("rules.cavalry.mode", 1);
|
||||
rule_cavalry_skill = config_get_int("rules.cavalry.skill", 2);
|
||||
rule_vampire = config_get_int("rules.combat.demon_vampire", 0);
|
||||
rule_loot = config_get_int("rules.combat.loot",
|
||||
LOOT_MONSTERS | LOOT_OTHERS | LOOT_KEEPLOOT);
|
||||
/* new formula to calculate to-hit-chance */
|
||||
|
@ -202,12 +205,7 @@ static const char *sideabkz(side * s, bool truename)
|
|||
const faction *f = (s->stealthfaction
|
||||
&& !truename) ? s->stealthfaction : s->faction;
|
||||
|
||||
#undef SIDE_ABKZ
|
||||
#ifdef SIDE_ABKZ
|
||||
abkz(f->name, sideabkz_buf, sizeof(sideabkz_buf), 3);
|
||||
#else
|
||||
strlcpy(sideabkz_buf, itoa36(f->no), sizeof(sideabkz_buf));
|
||||
#endif
|
||||
return sideabkz_buf;
|
||||
}
|
||||
|
||||
|
@ -218,6 +216,7 @@ static void message_faction(battle * b, faction * f, struct message *m)
|
|||
assert(f);
|
||||
if (f->battles == NULL || f->battles->r != r) {
|
||||
struct bmsg *bm = (struct bmsg *)calloc(1, sizeof(struct bmsg));
|
||||
assert_alloc(bm);
|
||||
bm->next = f->battles;
|
||||
f->battles = bm;
|
||||
bm->r = r;
|
||||
|
@ -251,6 +250,7 @@ static void fbattlerecord(battle * b, faction * f, const char *s)
|
|||
static bool set_enemy(side * as, side * ds, bool attacking)
|
||||
{
|
||||
int i;
|
||||
assert(as && ds);
|
||||
for (i = 0; i != MAXSIDES; ++i) {
|
||||
if (ds->enemies[i] == NULL)
|
||||
ds->enemies[i] = as;
|
||||
|
@ -304,11 +304,11 @@ static int dead_fighters(const fighter * df)
|
|||
}
|
||||
|
||||
fighter *select_corpse(battle * b, fighter * af)
|
||||
/* Wählt eine Leiche aus, der af hilft. casualties ist die Anzahl der
|
||||
/* W<EFBFBD>hlt eine Leiche aus, der af hilft. casualties ist die Anzahl der
|
||||
* Toten auf allen Seiten (im Array). Wenn af == NULL, wird die
|
||||
* Parteizugehörigkeit ignoriert, und irgendeine Leiche genommen.
|
||||
* Parteizugeh<EFBFBD>rigkeit ignoriert, und irgendeine Leiche genommen.
|
||||
*
|
||||
* Untote werden nicht ausgewählt (casualties, not dead) */
|
||||
* Untote werden nicht ausgew<EFBFBD>hlt (casualties, not dead) */
|
||||
{
|
||||
int si, maxcasualties = 0;
|
||||
fighter *df;
|
||||
|
@ -324,7 +324,7 @@ fighter *select_corpse(battle * b, fighter * af)
|
|||
side *s;
|
||||
for (s = b->sides; s != b->sides + b->nsides; ++s) {
|
||||
for (df = s->fighters; df; df = df->next) {
|
||||
/* Geflohene haben auch 0 hp, dürfen hier aber nicht ausgewählt
|
||||
/* Geflohene haben auch 0 hp, d<EFBFBD>rfen hier aber nicht ausgew<65>hlt
|
||||
* werden! */
|
||||
int dead = dead_fighters(df);
|
||||
if (!playerrace(u_race(df->unit)))
|
||||
|
@ -466,12 +466,6 @@ static int get_unitrow(const fighter * af, const side * vs)
|
|||
b->rowcache.result = get_row(af->side, row, vs);
|
||||
return b->rowcache.result;
|
||||
}
|
||||
#ifdef DEBUG_FAST /* validation code */
|
||||
{
|
||||
int i = get_row(af->side, row, vs);
|
||||
assert(i == b->rowcache.result);
|
||||
}
|
||||
#endif
|
||||
return b->rowcache.result;
|
||||
}
|
||||
}
|
||||
|
@ -624,7 +618,7 @@ weapon_skill(const weapon_type * wtype, const unit * u, bool attacking)
|
|||
}
|
||||
}
|
||||
else {
|
||||
/* der rassen-defaultwert kann höher sein als der Talentwert von
|
||||
/* der rassen-defaultwert kann h<EFBFBD>her sein als der Talentwert von
|
||||
* waffenloser kampf */
|
||||
if (attacking) {
|
||||
if (skill < u_race(u)->at_default)
|
||||
|
@ -712,7 +706,7 @@ static int CavalryBonus(const unit * u, troop enemy, int type)
|
|||
static int
|
||||
weapon_effskill(troop t, troop enemy, const weapon * w, bool attacking,
|
||||
bool missile)
|
||||
/* effektiver Waffenskill während des Kampfes */
|
||||
/* effektiver Waffenskill w<EFBFBD>hrend des Kampfes */
|
||||
{
|
||||
/* In dieser Runde alle die Modifier berechnen, die fig durch die
|
||||
* Waffen bekommt. */
|
||||
|
@ -771,22 +765,22 @@ bool missile)
|
|||
skill += CavalryBonus(tu, enemy, BONUS_SKILL);
|
||||
if (wtype)
|
||||
skill =
|
||||
skillmod(urace(tu)->attribs, tu, tu->region, wtype->skill, skill,
|
||||
skillmod(u_race(tu)->attribs, tu, tu->region, wtype->skill, skill,
|
||||
SMF_RIDING);
|
||||
}
|
||||
|
||||
if (t.index < tf->elvenhorses) {
|
||||
/* Elfenpferde: Helfen dem Reiter, egal ob und welche Waffe. Das ist
|
||||
* eleganter, und vor allem einfacher, sonst muß man noch ein
|
||||
* eleganter, und vor allem einfacher, sonst mu<EFBFBD> man noch ein
|
||||
* WMF_ELVENHORSE einbauen. */
|
||||
skill += 2;
|
||||
}
|
||||
|
||||
if (skill > 0 && !attacking && missile) {
|
||||
/*
|
||||
* Wenn ich verteidige, und nicht direkt meinem Feind gegenüberstehe,
|
||||
* halbiert sich mein Skill: (z.B. gegen Fernkämpfer. Nahkämpfer
|
||||
* können mich eh nicht treffen)
|
||||
* Wenn ich verteidige, und nicht direkt meinem Feind gegen<EFBFBD>berstehe,
|
||||
* halbiert sich mein Skill: (z.B. gegen Fernk<EFBFBD>mpfer. Nahk<EFBFBD>mpfer
|
||||
* k<EFBFBD>nnen mich eh nicht treffen)
|
||||
*/
|
||||
skill /= 2;
|
||||
}
|
||||
|
@ -822,9 +816,9 @@ static const armor_type *select_armor(troop t, bool shield)
|
|||
}
|
||||
|
||||
/* Hier ist zu beachten, ob und wie sich Zauber und Artefakte, die
|
||||
* Rüstungschutz geben, addieren.
|
||||
* - Artefakt "trollbelt" gibt Rüstung +1
|
||||
* - Zauber Rindenhaut gibt Rüstung +3
|
||||
* R<EFBFBD>stungschutz geben, addieren.
|
||||
* - Artefakt "trollbelt" gibt R<EFBFBD>stung +1
|
||||
* - Zauber Rindenhaut gibt R<EFBFBD>stung +3
|
||||
*/
|
||||
static int trollbelts(const unit *u) {
|
||||
const struct resource_type *belt = rt_find("trollbelt");
|
||||
|
@ -842,7 +836,7 @@ int select_magicarmor(troop t)
|
|||
return ma;
|
||||
}
|
||||
|
||||
/* Sind side ds und Magier des meffect verbündet, dann return 1*/
|
||||
/* Sind side ds und Magier des meffect verb<EFBFBD>ndet, dann return 1*/
|
||||
bool meffect_protection(battle * b, meffect * s, side * ds)
|
||||
{
|
||||
if (!s->magician->alive)
|
||||
|
@ -878,7 +872,7 @@ void rmfighter(fighter * df, int i)
|
|||
assert(df->alive >= i);
|
||||
assert(df->alive <= df->unit->number);
|
||||
|
||||
/* erst ziehen wir die Anzahl der Personen von den Kämpfern in der
|
||||
/* erst ziehen wir die Anzahl der Personen von den K<EFBFBD>mpfern in der
|
||||
* Schlacht, dann von denen auf dieser Seite ab*/
|
||||
df->side->alive -= i;
|
||||
df->side->battle->alive -= i;
|
||||
|
@ -1006,11 +1000,10 @@ const char *rel_dam(int dam, int hp)
|
|||
|
||||
static void vampirism(troop at, int damage)
|
||||
{
|
||||
int vampire = config_get_int("rules.combat.demon_vampire", 0);
|
||||
if (vampire > 0) {
|
||||
int gain = damage / vampire;
|
||||
int chance = damage - vampire * gain;
|
||||
if (chance > 0 && (rng_int() % vampire < chance))
|
||||
if (rule_vampire > 0) {
|
||||
int gain = damage / rule_vampire;
|
||||
int chance = damage - rule_vampire * gain;
|
||||
if (chance > 0 && (rng_int() % rule_vampire < chance))
|
||||
++gain;
|
||||
if (gain > 0) {
|
||||
int maxhp = unit_max_hp(at.fighter->unit);
|
||||
|
@ -1029,33 +1022,33 @@ static int armor_bonus(const race *rc) {
|
|||
int natural_armor(unit * du)
|
||||
{
|
||||
const race *rc = u_race(du);
|
||||
int bonus, an = rc->armor;
|
||||
int an;
|
||||
|
||||
assert(rc);
|
||||
bonus = armor_bonus(rc);
|
||||
if (bonus > 0) {
|
||||
an = armor_bonus(rc);
|
||||
if (an > 0) {
|
||||
int sk = effskill(du, SK_STAMINA, 0);
|
||||
sk /= bonus;
|
||||
an += sk;
|
||||
return rc->armor + sk / an;
|
||||
}
|
||||
return an;
|
||||
return rc->armor;
|
||||
}
|
||||
|
||||
static int rc_specialdamage(const unit *au, const unit *du, const struct weapon_type *wtype)
|
||||
{
|
||||
const race *ar = u_race(au);
|
||||
int m, modifier = 0;
|
||||
|
||||
switch (old_race(ar)) {
|
||||
case RC_HALFLING:
|
||||
if (wtype != NULL && dragonrace(u_race(du))) {
|
||||
if (wtype != NULL) {
|
||||
if (fval(u_race(du), RCF_DRAGON)) {
|
||||
static int cache;
|
||||
static const race *rc_halfling;
|
||||
if (rc_changed(&cache)) {
|
||||
rc_halfling = get_race(RC_HALFLING);
|
||||
}
|
||||
if (ar == rc_halfling) {
|
||||
modifier += 5;
|
||||
}
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
if (wtype != NULL && wtype->modifiers != NULL) {
|
||||
if (wtype->modifiers != NULL) {
|
||||
for (m = 0; wtype->modifiers[m].value; ++m) {
|
||||
/* weapon damage for this weapon, possibly by race */
|
||||
if (wtype->modifiers[m].flags & WMF_DAMAGE) {
|
||||
|
@ -1073,6 +1066,7 @@ static int rc_specialdamage(const unit *au, const unit *du, const struct weapon_
|
|||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
return modifier;
|
||||
}
|
||||
|
||||
|
@ -1097,15 +1091,15 @@ int calculate_armor(troop dt, const weapon_type *dwtype, const weapon_type *awty
|
|||
}
|
||||
}
|
||||
|
||||
/* natürliche Rüstung */
|
||||
/* nat<EFBFBD>rliche R<>stung */
|
||||
an = natural_armor(du);
|
||||
|
||||
/* magische Rüstung durch Artefakte oder Sprüche */
|
||||
/* Momentan nur Trollgürtel und Werwolf-Eigenschaft */
|
||||
/* magische R<EFBFBD>stung durch Artefakte oder Spr<70>che */
|
||||
/* Momentan nur Trollg<EFBFBD>rtel und Werwolf-Eigenschaft */
|
||||
am = select_magicarmor(dt);
|
||||
|
||||
if (rule_nat_armor == 0) {
|
||||
/* natürliche Rüstung ist halbkumulativ */
|
||||
/* nat<EFBFBD>rliche R<>stung ist halbkumulativ */
|
||||
if (ar > 0) {
|
||||
ar += an / 2;
|
||||
}
|
||||
|
@ -1139,7 +1133,7 @@ int calculate_armor(troop dt, const weapon_type *dwtype, const weapon_type *awty
|
|||
res *= (1 - dwtype->magres);
|
||||
}
|
||||
|
||||
/* gegen Magie wirkt nur natürliche und magische Rüstung */
|
||||
/* gegen Magie wirkt nur nat<EFBFBD>rliche und magische R<>stung */
|
||||
ar = an + am;
|
||||
*magres = res > 0 ? res : 0;
|
||||
}
|
||||
|
@ -1221,7 +1215,7 @@ terminate(troop dt, troop at, int type, const char *damage, bool missile)
|
|||
|
||||
while (chance(kritchance)) {
|
||||
if (bdebug) {
|
||||
fprintf(bdebug, "%s/%d lands a critical hit\n", unitid(au), at.index);
|
||||
fprintf(bdebug, "%s/%d lands a critical hit\n", itoa36(au->no), at.index);
|
||||
}
|
||||
da += dice_rand(damage);
|
||||
}
|
||||
|
@ -1279,7 +1273,7 @@ terminate(troop dt, troop at, int type, const char *damage, bool missile)
|
|||
rda -= hp;
|
||||
me->duration -= hp;
|
||||
}
|
||||
/* gibt Rüstung +effect für duration Treffer */
|
||||
/* gibt R<EFBFBD>stung +effect f<>r duration Treffer */
|
||||
if (me->typ == SHIELD_ARMOR) {
|
||||
rda = _max(rda - me->effect, 0);
|
||||
me->duration--;
|
||||
|
@ -1302,7 +1296,7 @@ terminate(troop dt, troop at, int type, const char *damage, bool missile)
|
|||
}
|
||||
|
||||
}
|
||||
if (df->person[dt.index].hp > 0) { /* Hat überlebt */
|
||||
if (df->person[dt.index].hp > 0) { /* Hat <EFBFBD>berlebt */
|
||||
if (bdebug) {
|
||||
fprintf(bdebug, "Damage %d, armor %d: %d -> %d HP\n",
|
||||
da, ar, df->person[dt.index].hp + rda, df->person[dt.index].hp);
|
||||
|
@ -1441,18 +1435,10 @@ int select)
|
|||
if (b->alive == b->fast.alive && as == b->fast.side && sr == b->fast.status
|
||||
&& minrow == b->fast.minrow && maxrow == b->fast.maxrow) {
|
||||
if (b->fast.enemies[select] >= 0) {
|
||||
#ifdef DEBUG_FAST
|
||||
int i = count_enemies_i(b, af, minrow, maxrow, select);
|
||||
assert(i == b->fast.enemies[select]);
|
||||
#endif
|
||||
return b->fast.enemies[select];
|
||||
}
|
||||
else if (select & SELECT_FIND) {
|
||||
if (b->fast.enemies[select - SELECT_FIND] >= 0) {
|
||||
#ifdef DEBUG_FAST
|
||||
int i = count_enemies_i(b, af, minrow, maxrow, select);
|
||||
assert((i > 0) == (b->fast.enemies[select - SELECT_FIND] > 0));
|
||||
#endif
|
||||
return b->fast.enemies[select - SELECT_FIND];
|
||||
}
|
||||
}
|
||||
|
@ -1716,7 +1702,7 @@ void do_combatmagic(battle * b, combatmagic_t was)
|
|||
unit *mage = fig->unit;
|
||||
|
||||
if (fig->alive <= 0)
|
||||
continue; /* fighter kann im Kampf getötet worden sein */
|
||||
continue; /* fighter kann im Kampf get<EFBFBD>tet worden sein */
|
||||
|
||||
level = effskill(mage, SK_MAGIC, r);
|
||||
if (level > 0) {
|
||||
|
@ -1825,12 +1811,12 @@ static void do_combatspell(troop at)
|
|||
|
||||
sp = get_combatspell(caster, 1);
|
||||
if (sp == NULL) {
|
||||
fi->magic = 0; /* Hat keinen Kampfzauber, kämpft nichtmagisch weiter */
|
||||
fi->magic = 0; /* Hat keinen Kampfzauber, k<EFBFBD>mpft nichtmagisch weiter */
|
||||
return;
|
||||
}
|
||||
ord = create_order(K_CAST, lang, "'%s'", spell_name(sp, lang));
|
||||
if (!cancast(caster, sp, 1, 1, ord)) {
|
||||
fi->magic = 0; /* Kann nicht mehr Zaubern, kämpft nichtmagisch weiter */
|
||||
fi->magic = 0; /* Kann nicht mehr Zaubern, k<EFBFBD>mpft nichtmagisch weiter */
|
||||
return;
|
||||
}
|
||||
|
||||
|
@ -1854,7 +1840,7 @@ static void do_combatspell(troop at)
|
|||
}
|
||||
}
|
||||
|
||||
/* Antimagie die Fehlschlag erhöht */
|
||||
/* Antimagie die Fehlschlag erh<EFBFBD>ht */
|
||||
if (rng_int() % 100 < fumblechance) {
|
||||
report_failed_spell(b, caster, sp);
|
||||
pay_spell(caster, sp, level, 1);
|
||||
|
@ -1878,7 +1864,7 @@ static void do_combatspell(troop at)
|
|||
}
|
||||
|
||||
/* Sonderattacken: Monster patzern nicht und zahlen auch keine
|
||||
* Spruchkosten. Da die Spruchstärke direkt durch den Level bestimmt
|
||||
* Spruchkosten. Da die Spruchst<EFBFBD>rke direkt durch den Level bestimmt
|
||||
* wird, wirkt auch keine Antimagie (wird sonst in spellpower
|
||||
* gemacht) */
|
||||
|
||||
|
@ -1901,7 +1887,13 @@ int skilldiff(troop at, troop dt, int dist)
|
|||
unit *au = af->unit, *du = df->unit;
|
||||
int is_protected = 0, skdiff = 0;
|
||||
weapon *awp = select_weapon(at, true, dist > 1);
|
||||
static int rc_cache;
|
||||
static const race *rc_halfling, *rc_goblin;
|
||||
|
||||
if (rc_changed(&rc_cache)) {
|
||||
rc_halfling = get_race(RC_HALFLING);
|
||||
rc_goblin = get_race(RC_GOBLIN);
|
||||
}
|
||||
skdiff += af->person[at.index].attack;
|
||||
skdiff -= df->person[dt.index].defence;
|
||||
|
||||
|
@ -1909,49 +1901,43 @@ int skilldiff(troop at, troop dt, int dist)
|
|||
skdiff += 2;
|
||||
|
||||
/* Effekte durch Rassen */
|
||||
if (awp != NULL && u_race(au) == get_race(RC_HALFLING) && dragonrace(u_race(du))) {
|
||||
if (awp != NULL && u_race(au) == rc_halfling && dragonrace(u_race(du))) {
|
||||
skdiff += 5;
|
||||
}
|
||||
|
||||
if (u_race(au) == get_race(RC_GOBLIN)) {
|
||||
else if (u_race(au) == rc_goblin) {
|
||||
if (af->side->size[SUM_ROW] >= df->side->size[SUM_ROW] * rule_goblin_bonus) {
|
||||
skdiff += 1;
|
||||
}
|
||||
}
|
||||
|
||||
if (df->building) {
|
||||
bool init = false;
|
||||
static const curse_type *strongwall_ct, *magicwalls_ct;
|
||||
if (!init) {
|
||||
strongwall_ct = ct_find("strongwall");
|
||||
magicwalls_ct = ct_find("magicwalls");
|
||||
init = true;
|
||||
if (df->building->attribs) {
|
||||
const curse_type *strongwall_ct = ct_find("strongwall");
|
||||
if (strongwall_ct) {
|
||||
curse *c = get_curse(df->building->attribs, strongwall_ct);
|
||||
if (curse_active(c)) {
|
||||
/* wirkt auf alle Geb<65>ude */
|
||||
skdiff -= curse_geteffect_int(c);
|
||||
is_protected = 2;
|
||||
}
|
||||
}
|
||||
}
|
||||
if (df->building->type->protection) {
|
||||
int beff = df->building->type->protection(df->building, du, DEFENSE_BONUS);
|
||||
if (beff) {
|
||||
skdiff -= beff;
|
||||
is_protected = 2;
|
||||
}
|
||||
}
|
||||
if (strongwall_ct) {
|
||||
curse *c = get_curse(df->building->attribs, strongwall_ct);
|
||||
if (curse_active(c)) {
|
||||
/* wirkt auf alle Gebäude */
|
||||
skdiff -= curse_geteffect_int(c);
|
||||
is_protected = 2;
|
||||
}
|
||||
}
|
||||
if (df->building->attribs) {
|
||||
const curse_type *magicwalls_ct = ct_find("magicwalls");
|
||||
if (magicwalls_ct
|
||||
&& curse_active(get_curse(df->building->attribs, magicwalls_ct))) {
|
||||
/* Verdoppelt Burgenbonus */
|
||||
skdiff -= df->building->type->protection(df->building, du, DEFENSE_BONUS);
|
||||
skdiff -= beff;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
/* Goblin-Verteidigung
|
||||
* ist direkt in der Rassentabelle als df_default
|
||||
*/
|
||||
|
||||
/* Effekte der Waffen */
|
||||
skdiff += weapon_effskill(at, dt, awp, true, dist > 1);
|
||||
if (awp && fval(awp->type, WTF_MISSILE)) {
|
||||
|
@ -1993,10 +1979,10 @@ debug_hit(troop at, const weapon * awp, troop dt, const weapon * dwp,
|
|||
int skdiff, int dist, bool success)
|
||||
{
|
||||
fprintf(bdebug, "%.4s/%d [%6s/%d] %s %.4s/%d [%6s/%d] with %d, distance %d\n",
|
||||
unitid(at.fighter->unit), at.index,
|
||||
itoa36(at.fighter->unit->no), at.index,
|
||||
LOC(default_locale, awp ? resourcename(awp->type->itype->rtype,
|
||||
0) : "unarmed"), weapon_effskill(at, dt, awp, true, dist > 1),
|
||||
success ? "hits" : "misses", unitid(dt.fighter->unit), dt.index,
|
||||
success ? "hits" : "misses", itoa36(dt.fighter->unit->no), dt.index,
|
||||
LOC(default_locale, dwp ? resourcename(dwp->type->itype->rtype,
|
||||
0) : "unarmed"), weapon_effskill(dt, at, dwp, false, dist > 1), skdiff,
|
||||
dist);
|
||||
|
@ -2035,7 +2021,7 @@ int hits(troop at, troop dt, weapon * awp)
|
|||
}
|
||||
|
||||
skdiff = skilldiff(at, dt, dist);
|
||||
/* Verteidiger bekommt eine Rüstung */
|
||||
/* Verteidiger bekommt eine R<EFBFBD>stung */
|
||||
armor = select_armor(dt, true);
|
||||
if (dwp == NULL || (dwp->type->flags & WTF_USESHIELD)) {
|
||||
shield = select_armor(dt, false);
|
||||
|
@ -2055,19 +2041,12 @@ int hits(troop at, troop dt, weapon * awp)
|
|||
void dazzle(battle * b, troop * td)
|
||||
{
|
||||
/* Nicht kumulativ ! */
|
||||
if (td->fighter->person[td->index].flags & FL_DAZZLED)
|
||||
return;
|
||||
|
||||
#ifdef TODO_RUNESWORD
|
||||
if (td->fighter->weapon[WP_RUNESWORD].count > td->index) {
|
||||
return;
|
||||
}
|
||||
#endif
|
||||
if (td->fighter->person[td->index].flags & FL_COURAGE) {
|
||||
return;
|
||||
}
|
||||
|
||||
if (td->fighter->person[td->index].flags & FL_DAZZLED) {
|
||||
if (td->fighter->person[td->index].flags & (FL_COURAGE|FL_DAZZLED)) {
|
||||
return;
|
||||
}
|
||||
|
||||
|
@ -2079,7 +2058,7 @@ void damage_building(battle * b, building * bldg, int damage_abs)
|
|||
{
|
||||
bldg->size = _max(1, bldg->size - damage_abs);
|
||||
|
||||
/* Wenn Burg, dann gucken, ob die Leute alle noch in das Gebäude passen. */
|
||||
/* Wenn Burg, dann gucken, ob die Leute alle noch in das Geb<EFBFBD>ude passen. */
|
||||
|
||||
if (bldg->type->protection) {
|
||||
side *s;
|
||||
|
@ -2137,7 +2116,7 @@ static void attack(battle * b, troop ta, const att * a, int numattack)
|
|||
switch (a->type) {
|
||||
case AT_COMBATSPELL:
|
||||
/* Magier versuchen immer erstmal zu zaubern, erst wenn das
|
||||
* fehlschlägt, wird af->magic == 0 und der Magier kämpft
|
||||
* fehlschl<EFBFBD>gt, wird af->magic == 0 und der Magier k<EFBFBD>mpft
|
||||
* konventionell weiter */
|
||||
if (numattack == 0 && af->magic > 0) {
|
||||
/* wenn der magier in die potenzielle Reichweite von Attacken des
|
||||
|
@ -2149,7 +2128,7 @@ static void attack(battle * b, troop ta, const att * a, int numattack)
|
|||
}
|
||||
}
|
||||
break;
|
||||
case AT_STANDARD: /* Waffen, mag. Gegenstände, Kampfzauber */
|
||||
case AT_STANDARD: /* Waffen, mag. Gegenst<EFBFBD>nde, Kampfzauber */
|
||||
if (numattack > 0 || af->magic <= 0) {
|
||||
weapon *wp = ta.fighter->person[ta.index].missile;
|
||||
int melee =
|
||||
|
@ -2166,7 +2145,7 @@ static void attack(battle * b, troop ta, const att * a, int numattack)
|
|||
bool standard_attack = true;
|
||||
bool reload = false;
|
||||
/* spezialattacken der waffe nur, wenn erste attacke in der runde.
|
||||
* sonst helden mit feuerschwertern zu mächtig */
|
||||
* sonst helden mit feuerschwertern zu m<EFBFBD>chtig */
|
||||
if (numattack == 0 && wp && wp->type->attack) {
|
||||
int dead = 0;
|
||||
standard_attack = wp->type->attack(&ta, wp->type, &dead);
|
||||
|
@ -2207,14 +2186,14 @@ static void attack(battle * b, troop ta, const att * a, int numattack)
|
|||
if (reload && wp && wp->type->reload && !getreload(ta)) {
|
||||
int i = setreload(ta);
|
||||
if (bdebug) {
|
||||
fprintf(bdebug, "%s/%d reloading %d turns\n", unitid(au),
|
||||
fprintf(bdebug, "%s/%d reloading %d turns\n", itoa36(au->no),
|
||||
ta.index, i);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
break;
|
||||
case AT_SPELL: /* Extra-Sprüche. Kampfzauber in AT_COMBATSPELL! */
|
||||
case AT_SPELL: /* Extra-Spr<EFBFBD>che. Kampfzauber in AT_COMBATSPELL! */
|
||||
do_extra_spell(ta, a);
|
||||
break;
|
||||
case AT_NATURAL:
|
||||
|
@ -2299,14 +2278,14 @@ void do_attack(fighter * af)
|
|||
|
||||
assert(au && au->number);
|
||||
/* Da das Zuschlagen auf Einheiten und nicht auf den einzelnen
|
||||
* Kämpfern beruht, darf die Reihenfolge und Größe der Einheit keine
|
||||
* K<EFBFBD>mpfern beruht, darf die Reihenfolge und Gr<EFBFBD><EFBFBD>e der Einheit keine
|
||||
* Rolle spielen, Das tut sie nur dann, wenn jeder, der am Anfang der
|
||||
* Runde lebte, auch zuschlagen darf. Ansonsten ist der, der zufällig
|
||||
* mit einer großen Einheit zuerst drankommt, extrem bevorteilt. */
|
||||
* Runde lebte, auch zuschlagen darf. Ansonsten ist der, der zuf<EFBFBD>llig
|
||||
* mit einer gro<EFBFBD>en Einheit zuerst drankommt, extrem bevorteilt. */
|
||||
ta.index = af->fighting;
|
||||
|
||||
while (ta.index--) {
|
||||
/* Wir suchen eine beliebige Feind-Einheit aus. An der können
|
||||
/* Wir suchen eine beliebige Feind-Einheit aus. An der k<EFBFBD>nnen
|
||||
* wir feststellen, ob noch jemand da ist. */
|
||||
int apr, attacks = attacks_per_round(ta);
|
||||
if (!count_enemies(b, af, FIGHT_ROW, LAST_ROW, SELECT_FIND))
|
||||
|
@ -2331,7 +2310,7 @@ void do_attack(fighter * af)
|
|||
}
|
||||
}
|
||||
}
|
||||
/* Der letzte Katapultschütze setzt die
|
||||
/* Der letzte Katapultsch<EFBFBD>tze setzt die
|
||||
* Ladezeit neu und generiert die Meldung. */
|
||||
if (af->catmsg >= 0) {
|
||||
struct message *m =
|
||||
|
@ -2405,7 +2384,7 @@ double fleechance(unit * u)
|
|||
{
|
||||
double c = 0.20; /* Fluchtwahrscheinlichkeit in % */
|
||||
attrib *a = a_find(u->attribs, &at_fleechance);
|
||||
/* Einheit u versucht, dem Getümmel zu entkommen */
|
||||
/* Einheit u versucht, dem Get<EFBFBD>mmel zu entkommen */
|
||||
|
||||
c += (effskill(u, SK_STEALTH, 0) * 0.05);
|
||||
c += horse_fleeing_bonus(u);
|
||||
|
@ -2440,7 +2419,7 @@ side *make_side(battle * b, const faction * f, const group * g,
|
|||
else {
|
||||
unit *u;
|
||||
for (u = b->region->units; u; u = u->next) {
|
||||
if (is_guard(u, HELP_ALL)) {
|
||||
if (is_guard(u)) {
|
||||
if (alliedunit(u, f, HELP_GUARD)) {
|
||||
flags |= SIDE_HASGUARDS;
|
||||
break;
|
||||
|
@ -2510,7 +2489,7 @@ static int loot_quota(const unit * src, const unit * dst,
|
|||
{
|
||||
if (dst && src && src->faction != dst->faction) {
|
||||
double divisor = config_get_flt("rules.items.loot_divisor", 1);
|
||||
assert(divisor == 0 || divisor >= 1);
|
||||
assert(divisor <= 0 || divisor >= 1);
|
||||
if (divisor >= 1) {
|
||||
double r = n / divisor;
|
||||
int x = (int)r;
|
||||
|
@ -2693,7 +2672,7 @@ static void aftermath(battle * b)
|
|||
for (s = b->sides; s != b->sides + b->nsides; ++s) {
|
||||
int snumber = 0;
|
||||
fighter *df;
|
||||
bool relevant = false; /* Kampf relevant für diese Partei? */
|
||||
bool relevant = false; /* Kampf relevant f<EFBFBD>r diese Partei? */
|
||||
if (!fval(s, SIDE_HASGUARDS)) {
|
||||
relevant = true;
|
||||
}
|
||||
|
@ -2733,7 +2712,7 @@ static void aftermath(battle * b)
|
|||
/* Report the casualties */
|
||||
reportcasualties(b, df, dead);
|
||||
|
||||
/* Zuerst dürfen die Feinde plündern, die mitgenommenen Items
|
||||
/* Zuerst d<EFBFBD>rfen die Feinde pl<70>ndern, die mitgenommenen Items
|
||||
* stehen in fig->run.items. Dann werden die Fliehenden auf
|
||||
* die leere (tote) alte Einheit gemapt */
|
||||
if (!fval(df, FIG_NOLOOT)) {
|
||||
|
@ -2741,7 +2720,7 @@ static void aftermath(battle * b)
|
|||
}
|
||||
scale_number(du, df->run.number);
|
||||
du->hp = df->run.hp;
|
||||
setguard(du, GUARD_NONE);
|
||||
setguard(du, false);
|
||||
/* must leave ships or buildings, or a stealthy hobbit
|
||||
* can hold castles indefinitely */
|
||||
if (!fval(r->terrain, SEA_REGION)) {
|
||||
|
@ -2768,7 +2747,7 @@ static void aftermath(battle * b)
|
|||
}
|
||||
else {
|
||||
if (df->alive == 0) {
|
||||
/* alle sind tot, niemand geflohen. Einheit auflösen */
|
||||
/* alle sind tot, niemand geflohen. Einheit aufl<EFBFBD>sen */
|
||||
df->run.number = 0;
|
||||
df->run.hp = 0;
|
||||
|
||||
|
@ -2778,7 +2757,7 @@ static void aftermath(battle * b)
|
|||
/* Distribute Loot */
|
||||
loot_items(df);
|
||||
|
||||
setguard(du, GUARD_NONE);
|
||||
setguard(du, false);
|
||||
scale_number(du, 0);
|
||||
}
|
||||
else {
|
||||
|
@ -2830,7 +2809,7 @@ static void aftermath(battle * b)
|
|||
|
||||
/* Wir benutzen drifted, um uns zu merken, ob ein Schiff
|
||||
* schonmal Schaden genommen hat. (moved und drifted
|
||||
* sollten in flags überführt werden */
|
||||
* sollten in flags <EFBFBD>berf<EFBFBD>hrt werden */
|
||||
|
||||
for (s = b->sides; s != b->sides + b->nsides; ++s) {
|
||||
fighter *df;
|
||||
|
@ -2851,7 +2830,7 @@ static void aftermath(battle * b)
|
|||
}
|
||||
|
||||
/* Wenn sich die Einheit auf einem Schiff befindet, wird
|
||||
* dieses Schiff beschädigt. Andernfalls ein Schiff, welches
|
||||
* dieses Schiff besch<EFBFBD>digt. Andernfalls ein Schiff, welches
|
||||
* evt. zuvor verlassen wurde. */
|
||||
if (ships_damaged) {
|
||||
if (du->ship)
|
||||
|
@ -2905,7 +2884,7 @@ static void battle_punit(unit * u, battle * b)
|
|||
faction *f = bf->faction;
|
||||
strlist *S = 0, *x;
|
||||
|
||||
spunit(&S, f, u, 4, see_battle);
|
||||
spunit(&S, f, u, 4, seen_battle);
|
||||
for (x = S; x; x = x->next) {
|
||||
fbattlerecord(b, f, x->s);
|
||||
if (bdebug && u->faction == f) {
|
||||
|
@ -3143,7 +3122,7 @@ static void print_stats(battle * b)
|
|||
|
||||
static int weapon_weight(const weapon * w, bool missile)
|
||||
{
|
||||
if (missile == i2b(fval(w->type, WTF_MISSILE))) {
|
||||
if (missile == !!(fval(w->type, WTF_MISSILE))) {
|
||||
return w->attackskill + w->defenseskill;
|
||||
}
|
||||
return 0;
|
||||
|
@ -3224,8 +3203,8 @@ fighter *make_fighter(battle * b, unit * u, side * s1, bool attack)
|
|||
else if (!stealthfaction) {
|
||||
s1->stealthfaction = NULL;
|
||||
}
|
||||
/* Zu diesem Zeitpunkt ist attacked noch 0, da die Einheit für noch
|
||||
* keinen Kampf ausgewählt wurde (sonst würde ein fighter existieren) */
|
||||
/* Zu diesem Zeitpunkt ist attacked noch 0, da die Einheit f<EFBFBD>r noch
|
||||
* keinen Kampf ausgew<EFBFBD>hlt wurde (sonst w<EFBFBD>rde ein fighter existieren) */
|
||||
}
|
||||
fig = (struct fighter*)calloc(1, sizeof(struct fighter));
|
||||
|
||||
|
@ -3233,8 +3212,8 @@ fighter *make_fighter(battle * b, unit * u, side * s1, bool attack)
|
|||
s1->fighters = fig;
|
||||
|
||||
fig->unit = u;
|
||||
/* In einer Burg muß man a) nicht Angreifer sein, und b) drin sein, und
|
||||
* c) noch Platz finden. d) menschanähnlich sein */
|
||||
/* In einer Burg mu<EFBFBD> man a) nicht Angreifer sein, und b) drin sein, und
|
||||
* c) noch Platz finden. d) menschan<EFBFBD>hnlich sein */
|
||||
if (attack) {
|
||||
set_attacker(fig);
|
||||
}
|
||||
|
@ -3260,10 +3239,10 @@ fighter *make_fighter(battle * b, unit * u, side * s1, bool attack)
|
|||
assert(h);
|
||||
rest = u->hp % u->number;
|
||||
|
||||
/* Effekte von Sprüchen */
|
||||
/* Effekte von Spr<EFBFBD>chen */
|
||||
|
||||
{
|
||||
static const curse_type *speed_ct;
|
||||
if (u->attribs) {
|
||||
const curse_type *speed_ct;
|
||||
speed_ct = ct_find("speed");
|
||||
if (speed_ct) {
|
||||
curse *c = get_curse(u->attribs, speed_ct);
|
||||
|
@ -3281,7 +3260,7 @@ fighter *make_fighter(battle * b, unit * u, side * s1, bool attack)
|
|||
/* Effekte von Artefakten */
|
||||
strongmen = _min(fig->unit->number, trollbelts(u));
|
||||
|
||||
/* Hitpoints, Attack- und Defence-Boni für alle Personen */
|
||||
/* Hitpoints, Attack- und Defence-Boni f<EFBFBD>r alle Personen */
|
||||
for (i = 0; i < fig->alive; i++) {
|
||||
assert(i < fig->unit->number);
|
||||
fig->person[i].hp = h;
|
||||
|
@ -3302,8 +3281,8 @@ fighter *make_fighter(battle * b, unit * u, side * s1, bool attack)
|
|||
}
|
||||
}
|
||||
|
||||
/* Für alle Waffengattungen wird bestimmt, wie viele der Personen mit
|
||||
* ihr kämpfen könnten, und was ihr Wert darin ist. */
|
||||
/* F<EFBFBD>r alle Waffengattungen wird bestimmt, wie viele der Personen mit
|
||||
* ihr k<EFBFBD>mpfen k<EFBFBD>nnten, und was ihr Wert darin ist. */
|
||||
if (u_race(u)->battle_flags & BF_EQUIPMENT) {
|
||||
int oi = 0, di = 0, w = 0;
|
||||
for (itm = u->items; itm && w != WMAX; itm = itm->next) {
|
||||
|
@ -3421,12 +3400,12 @@ fighter *make_fighter(battle * b, unit * u, side * s1, bool attack)
|
|||
}
|
||||
}
|
||||
|
||||
/* Jetzt muß noch geschaut werden, wo die Einheit die jeweils besten
|
||||
* Werte hat, das kommt aber erst irgendwo später. Ich entscheide
|
||||
* wärend des Kampfes, welche ich nehme, je nach Gegner. Deswegen auch
|
||||
/* Jetzt mu<EFBFBD> noch geschaut werden, wo die Einheit die jeweils besten
|
||||
* Werte hat, das kommt aber erst irgendwo sp<EFBFBD>ter. Ich entscheide
|
||||
* w<EFBFBD>rend des Kampfes, welche ich nehme, je nach Gegner. Deswegen auch
|
||||
* keine addierten boni. */
|
||||
|
||||
/* Zuerst mal die Spezialbehandlung gewisser Sonderfälle. */
|
||||
/* Zuerst mal die Spezialbehandlung gewisser Sonderf<EFBFBD>lle. */
|
||||
fig->magic = effskill(u, SK_MAGIC, 0);
|
||||
|
||||
if (fig->horses) {
|
||||
|
@ -3591,7 +3570,7 @@ battle *make_battle(region * r)
|
|||
|
||||
b->region = r;
|
||||
b->plane = getplane(r);
|
||||
/* Finde alle Parteien, die den Kampf beobachten können: */
|
||||
/* Finde alle Parteien, die den Kampf beobachten k<EFBFBD>nnen: */
|
||||
for (u = r->units; u; u = u->next) {
|
||||
if (u->number > 0) {
|
||||
if (!fval(u->faction, FFL_MARK)) {
|
||||
|
@ -3780,18 +3759,18 @@ static void join_allies(battle * b)
|
|||
|
||||
for (s = b->sides; s != s_end; ++s) {
|
||||
side *se;
|
||||
/* Wenn alle attackierten noch FFL_NOAID haben, dann kämpfe nicht mit. */
|
||||
/* Wenn alle attackierten noch FFL_NOAID haben, dann k<EFBFBD>mpfe nicht mit. */
|
||||
if (fval(s->faction, FFL_NOAID))
|
||||
continue;
|
||||
if (s->faction != f) {
|
||||
/* Wenn wir attackiert haben, kommt niemand mehr hinzu: */
|
||||
if (s->bf->attacker)
|
||||
continue;
|
||||
/* alliiert müssen wir schon sein, sonst ist's eh egal : */
|
||||
/* alliiert m<EFBFBD>ssen wir schon sein, sonst ist's eh egal : */
|
||||
if (!alliedunit(u, s->faction, HELP_FIGHT))
|
||||
continue;
|
||||
/* wenn die partei verborgen ist, oder gar eine andere
|
||||
* vorgespiegelt wird, und er sich uns gegenüber nicht zu
|
||||
* vorgespiegelt wird, und er sich uns gegen<EFBFBD>ber nicht zu
|
||||
* erkennen gibt, helfen wir ihm nicht */
|
||||
if (s->stealthfaction) {
|
||||
if (!allysfm(s, u->faction, HELP_FSTEALTH)) {
|
||||
|
@ -3799,7 +3778,7 @@ static void join_allies(battle * b)
|
|||
}
|
||||
}
|
||||
}
|
||||
/* einen alliierten angreifen dürfen sie nicht, es sei denn, der
|
||||
/* einen alliierten angreifen d<EFBFBD>rfen sie nicht, es sei denn, der
|
||||
* ist mit einem alliierten verfeindet, der nicht attackiert
|
||||
* hat: */
|
||||
for (se = b->sides; se != s_end; ++se) {
|
||||
|
@ -3813,7 +3792,7 @@ static void join_allies(battle * b)
|
|||
}
|
||||
if (se == s_end)
|
||||
continue;
|
||||
/* Wenn die Einheit belagert ist, muß auch einer der Alliierten belagert sein: */
|
||||
/* Wenn die Einheit belagert ist, mu<EFBFBD> auch einer der Alliierten belagert sein: */
|
||||
if (besieged(u)) {
|
||||
fighter *ally;
|
||||
for (ally = s->fighters; ally; ally = ally->next) {
|
||||
|
@ -3824,7 +3803,7 @@ static void join_allies(battle * b)
|
|||
if (ally == NULL)
|
||||
continue;
|
||||
}
|
||||
/* keine Einwände, also soll er mitmachen: */
|
||||
/* keine Einw<EFBFBD>nde, also soll er mitmachen: */
|
||||
if (c == NULL) {
|
||||
if (join_battle(b, u, false, &c)) {
|
||||
if (battledebug) {
|
||||
|
@ -3893,7 +3872,7 @@ static void flee(const troop dt)
|
|||
fig->run.hp += fig->person[dt.index].hp;
|
||||
++fig->run.number;
|
||||
|
||||
setguard(u, GUARD_NONE);
|
||||
setguard(u, false);
|
||||
|
||||
kill_troop(dt);
|
||||
}
|
||||
|
@ -3940,7 +3919,7 @@ static bool start_battle(region * r, battle ** bp)
|
|||
continue;
|
||||
}
|
||||
|
||||
/* ist ein Flüchtling aus einem andern Kampf */
|
||||
/* ist ein Fl<EFBFBD>chtling aus einem andern Kampf */
|
||||
if (fval(u, UFL_LONGACTION))
|
||||
continue;
|
||||
|
||||
|
@ -3956,12 +3935,12 @@ static bool start_battle(region * r, battle ** bp)
|
|||
|
||||
if ((u->ship != NULL && !fval(r->terrain, SEA_REGION))
|
||||
|| (lsh = leftship(u)) != NULL) {
|
||||
if (is_guarded(r, u, GUARD_TRAVELTHRU)) {
|
||||
if (is_guarded(r, u)) {
|
||||
if (lsh) {
|
||||
cmistake(u, ord, 234, MSG_BATTLE);
|
||||
}
|
||||
else {
|
||||
/* Fehler: "Das Schiff muß erst verlassen werden" */
|
||||
/* Fehler: "Das Schiff mu<EFBFBD> erst verlassen werden" */
|
||||
cmistake(u, ord, 19, MSG_BATTLE);
|
||||
}
|
||||
continue;
|
||||
|
@ -4005,7 +3984,7 @@ static bool start_battle(region * r, battle ** bp)
|
|||
while (a && a->type == &at_curse) {
|
||||
curse *c = (curse *)a->data.v;
|
||||
if (c->type == calm_ct
|
||||
&& curse_geteffect(c) == u2->faction->subscription) {
|
||||
&& curse_geteffect_int(c) == u2->faction->subscription) {
|
||||
if (curse_active(c)) {
|
||||
calm = true;
|
||||
break;
|
||||
|
@ -4046,8 +4025,8 @@ static bool start_battle(region * r, battle ** bp)
|
|||
freset(u2->faction, FFL_NOAID);
|
||||
|
||||
if (c1 != NULL && c2 != NULL) {
|
||||
/* Merken, wer Angreifer ist, für die Rückzahlung der
|
||||
* Präcombataura bei kurzem Kampf. */
|
||||
/* Merken, wer Angreifer ist, f<EFBFBD>r die R<>ckzahlung der
|
||||
* Pr<EFBFBD>combataura bei kurzem Kampf. */
|
||||
c1->side->bf->attacker = true;
|
||||
|
||||
if (set_enemy(c1->side, c2->side, true) && battledebug) {
|
||||
|
@ -4080,7 +4059,7 @@ static void battle_attacks(battle * b)
|
|||
&& get_tactics(s, NULL) == b->max_tactics)) {
|
||||
for (fig = s->fighters; fig; fig = fig->next) {
|
||||
|
||||
/* ist in dieser Einheit noch jemand handlungsfähig? */
|
||||
/* ist in dieser Einheit noch jemand handlungsf<EFBFBD>hig? */
|
||||
if (fig->fighting <= 0)
|
||||
continue;
|
||||
|
||||
|
@ -4124,7 +4103,7 @@ static void battle_flee(battle * b)
|
|||
unit *u = fig->unit;
|
||||
troop dt;
|
||||
int runners = 0;
|
||||
/* Flucht nicht bei mehr als 600 HP. Damit Wyrme tötbar bleiben. */
|
||||
/* Flucht nicht bei mehr als 600 HP. Damit Wyrme t<EFBFBD>tbar bleiben. */
|
||||
int runhp = _min(600, (int)(0.9 + unit_max_hp(u) * hpflee(u->status)));
|
||||
|
||||
if (u->ship && fval(u->region->terrain, SEA_REGION)) {
|
||||
|
@ -4244,7 +4223,7 @@ void do_battle(region * r)
|
|||
return;
|
||||
|
||||
/* Bevor wir die alliierten hineinziehen, sollten wir schauen, *
|
||||
* Ob jemand fliehen kann. Dann erübrigt sich das ganze ja
|
||||
* Ob jemand fliehen kann. Dann er<EFBFBD>brigt sich das ganze ja
|
||||
* vielleicht schon. */
|
||||
print_header(b);
|
||||
if (!fighting) {
|
||||
|
@ -4293,12 +4272,10 @@ void do_battle(region * r)
|
|||
if (rule_force_leave(FORCE_LEAVE_POSTCOMBAT)) {
|
||||
force_leave(b->region, b);
|
||||
}
|
||||
/* Hier ist das Gefecht beendet, und wir können die
|
||||
* Hilfsstrukturen * wieder löschen: */
|
||||
/* Hier ist das Gefecht beendet, und wir k<EFBFBD>nnen die
|
||||
* Hilfsstrukturen * wieder l<EFBFBD>schen: */
|
||||
|
||||
if (b) {
|
||||
free_battle(b);
|
||||
}
|
||||
}
|
||||
|
||||
void do_battles(void) {
|
||||
|
|
21
src/battle.h
21
src/battle.h
|
@ -30,7 +30,7 @@ extern "C" {
|
|||
#define FS_HELP 2
|
||||
|
||||
/***** Verteidigungslinien.
|
||||
* Eressea hat 4 Verteidigungslinien. 1 ist vorn, 5. enthält Summen
|
||||
* Eressea hat 4 Verteidigungslinien. 1 ist vorn, 5. enthaelt Summen
|
||||
*/
|
||||
|
||||
#define NUMROWS 5
|
||||
|
@ -72,9 +72,9 @@ extern "C" {
|
|||
unsigned char relations[MAXSIDES];
|
||||
struct side *enemies[MAXSIDES];
|
||||
struct fighter *fighters;
|
||||
int index; /* Eintrag der Fraktion in b->matrix/b->enemies */
|
||||
unsigned int index; /* Eintrag der Fraktion in b->matrix/b->enemies */
|
||||
int size[NUMROWS]; /* Anzahl Personen in Reihe X. 0 = Summe */
|
||||
int nonblockers[NUMROWS]; /* Anzahl nichtblockierender Kämpfer, z.B. Schattenritter. */
|
||||
int nonblockers[NUMROWS]; /* Anzahl nichtblockierender Kaempfer, z.B. Schattenritter. */
|
||||
int alive; /* Die Partei hat den Kampf verlassen */
|
||||
int removed; /* stoned */
|
||||
int flee;
|
||||
|
@ -131,7 +131,7 @@ extern "C" {
|
|||
|
||||
/*** fighter::person::flags ***/
|
||||
#define FL_TIRED 1
|
||||
#define FL_DAZZLED 2 /* durch Untote oder Dämonen eingeschüchtert */
|
||||
#define FL_DAZZLED 2 /* durch Untote oder Daemonen eingeschuechtert */
|
||||
#define FL_PANICED 4
|
||||
#define FL_COURAGE 8 /* Helden fliehen nie */
|
||||
#define FL_SLEEPING 16
|
||||
|
@ -156,17 +156,17 @@ extern "C" {
|
|||
typedef struct fighter {
|
||||
struct fighter *next;
|
||||
struct side *side;
|
||||
struct unit *unit; /* Die Einheit, die hier kämpft */
|
||||
struct building *building; /* Gebäude, in dem die Einheit evtl. steht */
|
||||
struct unit *unit; /* Die Einheit, die hier kaempft */
|
||||
struct building *building; /* Gebaeude, in dem die Einheit evtl. steht */
|
||||
status_t status; /* Kampfstatus */
|
||||
struct weapon *weapons;
|
||||
struct armor *armors; /* Anzahl Rüstungen jeden Typs */
|
||||
struct armor *armors; /* Anzahl Ruestungen jeden Typs */
|
||||
int alive; /* Anzahl der noch nicht Toten in der Einheit */
|
||||
int fighting; /* Anzahl der Kämpfer in der aktuellen Runde */
|
||||
int fighting; /* Anzahl der Kaempfer in der aktuellen Runde */
|
||||
int removed; /* Anzahl Kaempfer, die nicht tot sind, aber
|
||||
aus dem Kampf raus sind (zB weil sie
|
||||
versteinert wurden). Diese werden auch
|
||||
in alive noch mitgezählt! */
|
||||
in alive noch mitgezaehlt! */
|
||||
int magic; /* Magietalent der Einheit */
|
||||
int horses; /* Anzahl brauchbarer Pferde der Einheit */
|
||||
int elvenhorses; /* Anzahl brauchbarer Elfenpferde der Einheit */
|
||||
|
@ -179,7 +179,7 @@ extern "C" {
|
|||
int defence : 8; /* (Magie) Paradenbonus der Personen */
|
||||
int damage : 8; /* (Magie) Schadensbonus der Personen im Nahkampf */
|
||||
int damage_rear : 8; /* (Magie) Schadensbonus der Personen im Fernkampf */
|
||||
int flags : 8; /* (Magie) Diverse Flags auf Kämpfern */
|
||||
int flags : 8; /* (Magie) Diverse Flags auf Kaempfern */
|
||||
int speed : 8; /* (Magie) Geschwindigkeitsmultiplkator. */
|
||||
int reload : 4; /* Anzahl Runden, die die Waffe x noch laden muss.
|
||||
* dahinter steckt ein array[RL_MAX] wenn er min. eine hat. */
|
||||
|
@ -224,6 +224,7 @@ extern "C" {
|
|||
} meffect;
|
||||
|
||||
extern const troop no_troop;
|
||||
extern bool battledebug;
|
||||
|
||||
/* BEGIN battle interface */
|
||||
side * find_side(battle * b, const struct faction * f, const struct group * g, unsigned int flags, const struct faction * stealthfaction);
|
||||
|
|
|
@ -6,6 +6,7 @@
|
|||
#include <kernel/config.h>
|
||||
#include <kernel/building.h>
|
||||
#include <kernel/faction.h>
|
||||
#include <kernel/curse.h>
|
||||
#include <kernel/item.h>
|
||||
#include <kernel/race.h>
|
||||
#include <kernel/region.h>
|
||||
|
@ -59,7 +60,7 @@ static void test_make_fighter(CuTest * tc)
|
|||
test_cleanup();
|
||||
}
|
||||
|
||||
static int add_two(building * b, unit * u, building_bonus bonus) {
|
||||
static int add_two(const building * b, const unit * u, building_bonus bonus) {
|
||||
return 2;
|
||||
}
|
||||
|
||||
|
@ -187,7 +188,7 @@ static void test_building_defence_bonus(CuTest * tc)
|
|||
test_cleanup();
|
||||
r = test_create_region(0, 0, 0);
|
||||
btype = test_create_buildingtype("castle");
|
||||
btype->protection = (int(*)(struct building *, struct unit *, building_bonus))get_function("building_protection");
|
||||
btype->protection = (int(*)(const struct building *, const struct unit *, building_bonus))get_function("building_protection");
|
||||
btype->construction->defense_bonus = 3;
|
||||
bld = test_create_building(r, btype);
|
||||
bld->size = 1;
|
||||
|
@ -203,10 +204,14 @@ static void test_building_defence_bonus(CuTest * tc)
|
|||
}
|
||||
|
||||
static fighter *setup_fighter(battle **bp, unit *u) {
|
||||
battle *b;
|
||||
battle *b = *bp;
|
||||
side *s;
|
||||
|
||||
if (!b) {
|
||||
*bp = b = make_battle(u->region);
|
||||
return make_fighter(b, u, make_side(b, u->faction, 0, 0, 0), false);
|
||||
}
|
||||
s = make_side(b, u->faction, 0, 0, 0);
|
||||
return make_fighter(b, u, s, false);
|
||||
}
|
||||
|
||||
static void test_natural_armor(CuTest * tc)
|
||||
|
@ -229,7 +234,7 @@ static void test_natural_armor(CuTest * tc)
|
|||
static void test_calculate_armor(CuTest * tc)
|
||||
{
|
||||
troop dt;
|
||||
battle *b;
|
||||
battle *b = NULL;
|
||||
region *r;
|
||||
unit *du;
|
||||
weapon_type *wtype;
|
||||
|
@ -255,6 +260,7 @@ static void test_calculate_armor(CuTest * tc)
|
|||
CuAssertDblEquals_Msg(tc, "magres unmodified", 1.0, magres, 0.01);
|
||||
free_battle(b);
|
||||
|
||||
b = NULL;
|
||||
i_change(&du->items, ibelt, 1);
|
||||
dt.fighter = setup_fighter(&b, du);
|
||||
CuAssertIntEquals_Msg(tc, "magical armor", 1, calculate_armor(dt, 0, 0, 0));
|
||||
|
@ -263,6 +269,7 @@ static void test_calculate_armor(CuTest * tc)
|
|||
rc->armor = 0;
|
||||
free_battle(b);
|
||||
|
||||
b = NULL;
|
||||
i_change(&du->items, ishield, 1);
|
||||
i_change(&du->items, ichain, 1);
|
||||
dt.fighter = setup_fighter(&b, du);
|
||||
|
@ -270,6 +277,7 @@ static void test_calculate_armor(CuTest * tc)
|
|||
CuAssertIntEquals_Msg(tc, "require BF_EQUIPMENT", 1, calculate_armor(dt, 0, 0, 0));
|
||||
free_battle(b);
|
||||
|
||||
b = NULL;
|
||||
rc->battle_flags |= BF_EQUIPMENT;
|
||||
dt.fighter = setup_fighter(&b, du);
|
||||
CuAssertIntEquals_Msg(tc, "stack equipment rc", 5, calculate_armor(dt, 0, 0, 0));
|
||||
|
@ -296,7 +304,7 @@ static void test_calculate_armor(CuTest * tc)
|
|||
static void test_magic_resistance(CuTest *tc)
|
||||
{
|
||||
troop dt;
|
||||
battle *b;
|
||||
battle *b = NULL;
|
||||
region *r;
|
||||
unit *du;
|
||||
armor_type *ashield, *achain;
|
||||
|
@ -324,6 +332,7 @@ static void test_magic_resistance(CuTest *tc)
|
|||
calculate_armor(dt, 0, 0, &magres);
|
||||
free_battle(b);
|
||||
|
||||
b = NULL;
|
||||
i_change(&du->items, ishield, 1);
|
||||
i_change(&du->items, ichain, 1);
|
||||
achain->flags |= ATF_LAEN;
|
||||
|
@ -335,6 +344,7 @@ static void test_magic_resistance(CuTest *tc)
|
|||
CuAssertDblEquals_Msg(tc, "laen reduction", 0.81, magres, 0.01);
|
||||
free_battle(b);
|
||||
|
||||
b = NULL;
|
||||
i_change(&du->items, ishield, -1);
|
||||
i_change(&du->items, ichain, -1);
|
||||
set_level(du, SK_MAGIC, 2);
|
||||
|
@ -359,7 +369,7 @@ static void test_magic_resistance(CuTest *tc)
|
|||
static void test_projectile_armor(CuTest * tc)
|
||||
{
|
||||
troop dt;
|
||||
battle *b;
|
||||
battle *b = NULL;
|
||||
region *r;
|
||||
unit *du;
|
||||
weapon_type *wtype;
|
||||
|
@ -394,10 +404,88 @@ static void test_projectile_armor(CuTest * tc)
|
|||
test_cleanup();
|
||||
}
|
||||
|
||||
static void test_battle_skilldiff(CuTest *tc)
|
||||
{
|
||||
troop ta, td;
|
||||
region *r;
|
||||
unit *ua, *ud;
|
||||
battle *b = NULL;
|
||||
|
||||
test_cleanup();
|
||||
|
||||
r = test_create_region(0, 0, 0);
|
||||
ud = test_create_unit(test_create_faction(0), r);
|
||||
ua = test_create_unit(test_create_faction(0), r);
|
||||
td.fighter = setup_fighter(&b, ud);
|
||||
td.index = 0;
|
||||
ta.fighter = setup_fighter(&b, ua);
|
||||
ta.index = 0;
|
||||
ua = test_create_unit(test_create_faction(0), r);
|
||||
CuAssertIntEquals(tc, 0, skilldiff(ta, td, 0));
|
||||
|
||||
ta.fighter->person[0].attack = 2;
|
||||
td.fighter->person[0].defence = 1;
|
||||
CuAssertIntEquals(tc, 1, skilldiff(ta, td, 0));
|
||||
|
||||
td.fighter->person[0].flags |= FL_SLEEPING;
|
||||
CuAssertIntEquals(tc, 3, skilldiff(ta, td, 0));
|
||||
|
||||
// TODO: unarmed halfling vs. dragon: +5
|
||||
// TODO: rule_goblin_bonus
|
||||
// TODO: weapon modifiers, missiles, skill_formula
|
||||
|
||||
free_battle(b);
|
||||
test_cleanup();
|
||||
}
|
||||
|
||||
static int protect(const building *b, const unit *u, building_bonus bonus) {
|
||||
return (bonus == DEFENSE_BONUS) ? 4 : 0;
|
||||
}
|
||||
|
||||
static void test_battle_skilldiff_building(CuTest *tc)
|
||||
{
|
||||
troop ta, td;
|
||||
region *r;
|
||||
unit *ua, *ud;
|
||||
battle *b = NULL;
|
||||
building_type *btype;
|
||||
const curse_type *strongwall_ct, *magicwalls_ct;
|
||||
|
||||
test_cleanup();
|
||||
btype = test_create_buildingtype("castle");
|
||||
strongwall_ct = ct_find("strongwall");
|
||||
magicwalls_ct = ct_find("magicwalls");
|
||||
|
||||
r = test_create_region(0, 0, 0);
|
||||
ud = test_create_unit(test_create_faction(0), r);
|
||||
ud->building = test_create_building(ud->region, btype);
|
||||
ua = test_create_unit(test_create_faction(0), r);
|
||||
td.fighter = setup_fighter(&b, ud);
|
||||
td.index = 0;
|
||||
ta.fighter = setup_fighter(&b, ua);
|
||||
ta.index = 0;
|
||||
ua = test_create_unit(test_create_faction(0), r);
|
||||
CuAssertIntEquals(tc, 0, skilldiff(ta, td, 0));
|
||||
|
||||
btype->protection = protect;
|
||||
CuAssertIntEquals(tc, -4, skilldiff(ta, td, 0));
|
||||
|
||||
create_curse(NULL, &ud->building->attribs, magicwalls_ct, 1, 1, 1, 1);
|
||||
CuAssertIntEquals(tc, -8, skilldiff(ta, td, 0));
|
||||
|
||||
create_curse(NULL, &ud->building->attribs, strongwall_ct, 1, 1, 2, 1);
|
||||
CuAssertIntEquals(tc, -10, skilldiff(ta, td, 0));
|
||||
|
||||
free_battle(b);
|
||||
test_cleanup();
|
||||
}
|
||||
|
||||
CuSuite *get_battle_suite(void)
|
||||
{
|
||||
CuSuite *suite = CuSuiteNew();
|
||||
SUITE_ADD_TEST(suite, test_make_fighter);
|
||||
SUITE_ADD_TEST(suite, test_battle_skilldiff);
|
||||
SUITE_ADD_TEST(suite, test_battle_skilldiff_building);
|
||||
SUITE_ADD_TEST(suite, test_defenders_get_building_bonus);
|
||||
SUITE_ADD_TEST(suite, test_attackers_get_no_building_bonus);
|
||||
SUITE_ADD_TEST(suite, test_building_bonus_respects_size);
|
||||
|
|
|
@ -19,7 +19,7 @@ void eressea_free_game(void) {
|
|||
}
|
||||
|
||||
int eressea_read_game(const char * filename) {
|
||||
return readgame(filename, false);
|
||||
return readgame(filename);
|
||||
}
|
||||
|
||||
int eressea_write_game(const char * filename) {
|
||||
|
|
|
@ -19,7 +19,6 @@ without prior permission by the authors of Eressea.
|
|||
|
||||
#include <kernel/alliance.h>
|
||||
#include <kernel/faction.h>
|
||||
#include <kernel/config.h>
|
||||
#include <kernel/unit.h>
|
||||
#include <kernel/item.h>
|
||||
#include <kernel/faction.h>
|
||||
|
@ -38,6 +37,23 @@ without prior permission by the authors of Eressea.
|
|||
#include <tolua.h>
|
||||
#include <string.h>
|
||||
|
||||
typedef struct helpmode {
|
||||
const char *name;
|
||||
int status;
|
||||
} helpmode;
|
||||
|
||||
static helpmode helpmodes[] = {
|
||||
{ "all", HELP_ALL },
|
||||
{ "money", HELP_MONEY },
|
||||
{ "fight", HELP_FIGHT },
|
||||
{ "observe", HELP_OBSERVE },
|
||||
{ "give", HELP_GIVE },
|
||||
{ "guard", HELP_GUARD },
|
||||
{ "stealth", HELP_FSTEALTH },
|
||||
{ "travel", HELP_TRAVEL },
|
||||
{ NULL, 0 }
|
||||
};
|
||||
|
||||
int tolua_factionlist_next(lua_State * L)
|
||||
{
|
||||
faction **faction_ptr = (faction **)lua_touserdata(L, lua_upvalueindex(1));
|
||||
|
@ -376,7 +392,7 @@ static int tolua_faction_create(lua_State * L)
|
|||
f = addfaction(email, NULL, frace, loc, 0);
|
||||
}
|
||||
if (!f) {
|
||||
log_error("faction.create(%s, %s, %s)\n", email, racename, locale_name(loc));
|
||||
log_error("cannot create %s faction for %s, unknown race.", racename, email);
|
||||
}
|
||||
tolua_pushusertype(L, f, TOLUA_CAST "faction");
|
||||
return 1;
|
||||
|
|
|
@ -1,6 +1,4 @@
|
|||
#include <platform.h>
|
||||
#include <kernel/config.h>
|
||||
|
||||
#include "spells.h"
|
||||
|
||||
/* kernel includes */
|
||||
|
|
|
@ -47,6 +47,12 @@ static int tolua_spawn_dragons(lua_State * L)
|
|||
return 0;
|
||||
}
|
||||
|
||||
static int tolua_get_monsters(lua_State * L)
|
||||
{
|
||||
tolua_pushusertype(L, get_monsters(), "faction");
|
||||
return 1;
|
||||
}
|
||||
|
||||
static int tolua_spawn_undead(lua_State * L)
|
||||
{
|
||||
spawn_undead();
|
||||
|
@ -90,7 +96,8 @@ void bind_monsters(struct lua_State *L)
|
|||
tolua_function(L, TOLUA_CAST "plan_monsters", tolua_planmonsters);
|
||||
tolua_function(L, TOLUA_CAST "spawn_undead", tolua_spawn_undead);
|
||||
tolua_function(L, TOLUA_CAST "spawn_dragons", tolua_spawn_dragons);
|
||||
tolua_function(L, TOLUA_CAST "fix_familiars", &fix_familiars);
|
||||
tolua_function(L, TOLUA_CAST "fix_familiars", fix_familiars);
|
||||
tolua_function(L, TOLUA_CAST "get_monsters", tolua_get_monsters);
|
||||
}
|
||||
tolua_endmodule(L);
|
||||
}
|
||||
|
|
|
@ -1,5 +1,4 @@
|
|||
#include <platform.h>
|
||||
#include <kernel/config.h>
|
||||
|
||||
/* kernel includes */
|
||||
#include <kernel/order.h>
|
||||
|
|
|
@ -182,11 +182,6 @@ void process_promote(void) {
|
|||
process_cmd(K_PROMOTION, promotion_cmd, 0);
|
||||
}
|
||||
|
||||
void process_renumber(void) {
|
||||
process_cmd(K_NUMBER, renumber_cmd, 0);
|
||||
renumber_factions();
|
||||
}
|
||||
|
||||
void process_restack(void) {
|
||||
restack_units();
|
||||
}
|
||||
|
|
|
@ -474,9 +474,6 @@ static int tolua_region_create(lua_State * L)
|
|||
}
|
||||
if (result) {
|
||||
terraform_region(result, terrain);
|
||||
if (result->land) {
|
||||
fix_demand(result);
|
||||
}
|
||||
}
|
||||
|
||||
tolua_pushusertype(L, result, TOLUA_CAST "region");
|
||||
|
|
|
@ -233,14 +233,6 @@ void tolua_ship_open(lua_State * L)
|
|||
tolua_variable(L, TOLUA_CAST "type", tolua_ship_get_type, 0);
|
||||
tolua_variable(L, TOLUA_CAST "damage", tolua_ship_get_damage,
|
||||
tolua_ship_set_damage);
|
||||
|
||||
#ifdef TODO
|
||||
.property("weight", &ship_getweight)
|
||||
.property("capacity", &ship_getcapacity)
|
||||
.property("maxsize", &ship_maxsize)
|
||||
.def_readwrite("damage", &ship::damage)
|
||||
.def_readwrite("size", &ship::size)
|
||||
#endif
|
||||
tolua_variable(L, TOLUA_CAST "objects", tolua_ship_get_objects, 0);
|
||||
|
||||
tolua_function(L, TOLUA_CAST "create", tolua_ship_create);
|
||||
|
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue