forked from github/server
moving to a new repository layout.
step 3: the example server that anyone can use
This commit is contained in:
commit
e608d40e7a
|
@ -0,0 +1,33 @@
|
||||||
|
cmake_minimum_required(VERSION 2.4)
|
||||||
|
project (example C)
|
||||||
|
|
||||||
|
if (WIN32)
|
||||||
|
add_definitions(-D_CRT_SECURE_NO_WARNINGS -D_CRT_SECURE_NO_DEPRECATE)
|
||||||
|
else (WIN32)
|
||||||
|
include_directories (/usr/include/lua5.1/ /usr/include/libxml2)
|
||||||
|
set(CMAKE_C_FLAGS "-g -Wall -Werror -Wno-unknown-pragmas -Wstrict-prototypes -Wpointer-arith -Wno-char-subscripts")
|
||||||
|
endif (WIN32)
|
||||||
|
include_directories (../external ../shared/src)
|
||||||
|
|
||||||
|
set (LIB_SRCS
|
||||||
|
../external/sqlite3.c
|
||||||
|
../external/md5.c
|
||||||
|
../external/bson/bson.c
|
||||||
|
../external/bson/numbers.c
|
||||||
|
../external/dlmalloc/malloc.c
|
||||||
|
../external/cutest/CuTest.c
|
||||||
|
../shared/src/build/gamecode.c
|
||||||
|
../shared/src/build/kernel.c
|
||||||
|
../shared/src/build/lib.c
|
||||||
|
../shared/src/build/util.c
|
||||||
|
)
|
||||||
|
|
||||||
|
set (EXE_SRCS
|
||||||
|
src/server.c
|
||||||
|
)
|
||||||
|
|
||||||
|
add_executable (example ${LIB_SRCS} ${EXE_SRCS})
|
||||||
|
if (WIN32)
|
||||||
|
else (WIN32)
|
||||||
|
target_link_libraries (example tolua xml2 ncurses lua5.1 pthread)
|
||||||
|
endif (WIN32)
|
|
@ -0,0 +1,53 @@
|
||||||
|
Microsoft Visual Studio Solution File, Format Version 9.00
|
||||||
|
# Visual Studio 2005
|
||||||
|
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "kernel", "..\server\src\kernel.vcproj", "{6F104C0A-DDF5-A34B-A89C-0DC278DCEF6D}"
|
||||||
|
EndProject
|
||||||
|
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "gamecode", "..\server\src\gamecode.vcproj", "{1E8BFF9E-3044-0742-992F-C5765B80FE65}"
|
||||||
|
EndProject
|
||||||
|
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "util", "..\server\src\util.vcproj", "{F70CFB27-8A2F-E447-B452-4E1C590EDA6D}"
|
||||||
|
EndProject
|
||||||
|
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "lua-bindings", "..\server\src\lua-bindings.vcproj", "{75501170-51C2-E641-BA8B-EDC008184192}"
|
||||||
|
EndProject
|
||||||
|
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "external", "..\external\external.vcproj", "{F9AE4586-8F65-486B-9666-744839E40A54}"
|
||||||
|
EndProject
|
||||||
|
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "amalgamation-example", "src\example.vcproj", "{4A17DAEE-2261-4E2C-96F6-BA4132A09551}"
|
||||||
|
EndProject
|
||||||
|
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "tests", "..\server\src\tests.vcproj", "{228B8781-480F-4608-BA14-1EB82581EADE}"
|
||||||
|
EndProject
|
||||||
|
Global
|
||||||
|
GlobalSection(SubversionScc) = preSolution
|
||||||
|
Svn-Managed = True
|
||||||
|
Manager = AnkhSVN - Subversion Support for Visual Studio
|
||||||
|
EndGlobalSection
|
||||||
|
GlobalSection(SolutionConfigurationPlatforms) = preSolution
|
||||||
|
Debug|Win32 = Debug|Win32
|
||||||
|
Release|Win32 = Release|Win32
|
||||||
|
EndGlobalSection
|
||||||
|
GlobalSection(ProjectConfigurationPlatforms) = postSolution
|
||||||
|
{6F104C0A-DDF5-A34B-A89C-0DC278DCEF6D}.Debug|Win32.ActiveCfg = Debug|Win32
|
||||||
|
{6F104C0A-DDF5-A34B-A89C-0DC278DCEF6D}.Release|Win32.ActiveCfg = Release|Win32
|
||||||
|
{6F104C0A-DDF5-A34B-A89C-0DC278DCEF6D}.Release|Win32.Build.0 = Release|Win32
|
||||||
|
{1E8BFF9E-3044-0742-992F-C5765B80FE65}.Debug|Win32.ActiveCfg = Debug|Win32
|
||||||
|
{1E8BFF9E-3044-0742-992F-C5765B80FE65}.Release|Win32.ActiveCfg = Release|Win32
|
||||||
|
{1E8BFF9E-3044-0742-992F-C5765B80FE65}.Release|Win32.Build.0 = Release|Win32
|
||||||
|
{F70CFB27-8A2F-E447-B452-4E1C590EDA6D}.Debug|Win32.ActiveCfg = Debug|Win32
|
||||||
|
{F70CFB27-8A2F-E447-B452-4E1C590EDA6D}.Release|Win32.ActiveCfg = Release|Win32
|
||||||
|
{F70CFB27-8A2F-E447-B452-4E1C590EDA6D}.Release|Win32.Build.0 = Release|Win32
|
||||||
|
{75501170-51C2-E641-BA8B-EDC008184192}.Debug|Win32.ActiveCfg = Debug|Win32
|
||||||
|
{75501170-51C2-E641-BA8B-EDC008184192}.Release|Win32.ActiveCfg = Release|Win32
|
||||||
|
{75501170-51C2-E641-BA8B-EDC008184192}.Release|Win32.Build.0 = Release|Win32
|
||||||
|
{F9AE4586-8F65-486B-9666-744839E40A54}.Debug|Win32.ActiveCfg = Debug|Win32
|
||||||
|
{F9AE4586-8F65-486B-9666-744839E40A54}.Release|Win32.ActiveCfg = Release|Win32
|
||||||
|
{F9AE4586-8F65-486B-9666-744839E40A54}.Release|Win32.Build.0 = Release|Win32
|
||||||
|
{4A17DAEE-2261-4E2C-96F6-BA4132A09551}.Debug|Win32.ActiveCfg = Debug|Win32
|
||||||
|
{4A17DAEE-2261-4E2C-96F6-BA4132A09551}.Debug|Win32.Build.0 = Debug|Win32
|
||||||
|
{4A17DAEE-2261-4E2C-96F6-BA4132A09551}.Release|Win32.ActiveCfg = Release|Win32
|
||||||
|
{228B8781-480F-4608-BA14-1EB82581EADE}.Debug|Win32.ActiveCfg = Debug|Win32
|
||||||
|
{228B8781-480F-4608-BA14-1EB82581EADE}.Debug|Win32.Build.0 = Debug|Win32
|
||||||
|
{228B8781-480F-4608-BA14-1EB82581EADE}.Release|Win32.ActiveCfg = Release|Win32
|
||||||
|
{228B8781-480F-4608-BA14-1EB82581EADE}.Release|Win32.Build.0 = Release|Win32
|
||||||
|
EndGlobalSection
|
||||||
|
GlobalSection(SolutionProperties) = preSolution
|
||||||
|
HideSolutionNode = FALSE
|
||||||
|
EndGlobalSection
|
||||||
|
EndGlobal
|
|
@ -0,0 +1,47 @@
|
||||||
|
Microsoft Visual Studio Solution File, Format Version 11.00
|
||||||
|
# Visual C++ Express 2010
|
||||||
|
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "kernel", "..\server\src\kernel.vcxproj", "{6F104C0A-DDF5-A34B-A89C-0DC278DCEF6D}"
|
||||||
|
EndProject
|
||||||
|
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "gamecode", "..\server\src\gamecode.vcxproj", "{1E8BFF9E-3044-0742-992F-C5765B80FE65}"
|
||||||
|
EndProject
|
||||||
|
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "util", "..\server\src\util.vcxproj", "{F70CFB27-8A2F-E447-B452-4E1C590EDA6D}"
|
||||||
|
EndProject
|
||||||
|
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "lua-bindings", "..\server\src\lua-bindings.vcxproj", "{75501170-51C2-E641-BA8B-EDC008184192}"
|
||||||
|
EndProject
|
||||||
|
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "external", "..\external\external.vcxproj", "{F9AE4586-8F65-486B-9666-744839E40A54}"
|
||||||
|
EndProject
|
||||||
|
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "amalgamation-example", "src\example.vcxproj", "{4A17DAEE-2261-4E2C-96F6-BA4132A09551}"
|
||||||
|
EndProject
|
||||||
|
Global
|
||||||
|
GlobalSection(SolutionConfigurationPlatforms) = preSolution
|
||||||
|
Debug|Win32 = Debug|Win32
|
||||||
|
Release|Win32 = Release|Win32
|
||||||
|
EndGlobalSection
|
||||||
|
GlobalSection(ProjectConfigurationPlatforms) = postSolution
|
||||||
|
{6F104C0A-DDF5-A34B-A89C-0DC278DCEF6D}.Debug|Win32.ActiveCfg = Debug|Win32
|
||||||
|
{6F104C0A-DDF5-A34B-A89C-0DC278DCEF6D}.Release|Win32.ActiveCfg = Release|Win32
|
||||||
|
{6F104C0A-DDF5-A34B-A89C-0DC278DCEF6D}.Release|Win32.Build.0 = Release|Win32
|
||||||
|
{1E8BFF9E-3044-0742-992F-C5765B80FE65}.Debug|Win32.ActiveCfg = Debug|Win32
|
||||||
|
{1E8BFF9E-3044-0742-992F-C5765B80FE65}.Release|Win32.ActiveCfg = Release|Win32
|
||||||
|
{1E8BFF9E-3044-0742-992F-C5765B80FE65}.Release|Win32.Build.0 = Release|Win32
|
||||||
|
{F70CFB27-8A2F-E447-B452-4E1C590EDA6D}.Debug|Win32.ActiveCfg = Debug|Win32
|
||||||
|
{F70CFB27-8A2F-E447-B452-4E1C590EDA6D}.Release|Win32.ActiveCfg = Release|Win32
|
||||||
|
{F70CFB27-8A2F-E447-B452-4E1C590EDA6D}.Release|Win32.Build.0 = Release|Win32
|
||||||
|
{75501170-51C2-E641-BA8B-EDC008184192}.Debug|Win32.ActiveCfg = Debug|Win32
|
||||||
|
{75501170-51C2-E641-BA8B-EDC008184192}.Release|Win32.ActiveCfg = Release|Win32
|
||||||
|
{75501170-51C2-E641-BA8B-EDC008184192}.Release|Win32.Build.0 = Release|Win32
|
||||||
|
{F9AE4586-8F65-486B-9666-744839E40A54}.Debug|Win32.ActiveCfg = Debug|Win32
|
||||||
|
{F9AE4586-8F65-486B-9666-744839E40A54}.Release|Win32.ActiveCfg = Release|Win32
|
||||||
|
{F9AE4586-8F65-486B-9666-744839E40A54}.Release|Win32.Build.0 = Release|Win32
|
||||||
|
{4A17DAEE-2261-4E2C-96F6-BA4132A09551}.Debug|Win32.ActiveCfg = Debug|Win32
|
||||||
|
{4A17DAEE-2261-4E2C-96F6-BA4132A09551}.Debug|Win32.Build.0 = Debug|Win32
|
||||||
|
{4A17DAEE-2261-4E2C-96F6-BA4132A09551}.Release|Win32.ActiveCfg = Release|Win32
|
||||||
|
EndGlobalSection
|
||||||
|
GlobalSection(SolutionProperties) = preSolution
|
||||||
|
HideSolutionNode = FALSE
|
||||||
|
EndGlobalSection
|
||||||
|
GlobalSection(SubversionScc) = preSolution
|
||||||
|
Svn-Managed = True
|
||||||
|
Manager = AnkhSVN - Subversion Support for Visual Studio
|
||||||
|
EndGlobalSection
|
||||||
|
EndGlobal
|
|
@ -0,0 +1,17 @@
|
||||||
|
[eressea]
|
||||||
|
base = .
|
||||||
|
load = setup.lua
|
||||||
|
report = reports
|
||||||
|
verbose = 0
|
||||||
|
lomem = 0
|
||||||
|
debug = 0
|
||||||
|
memcheck = 0
|
||||||
|
locales = de,en
|
||||||
|
|
||||||
|
[config]
|
||||||
|
game = example
|
||||||
|
source_dir = ../..
|
||||||
|
maxnmrs = 10
|
||||||
|
|
||||||
|
[editor]
|
||||||
|
color = 1
|
|
@ -0,0 +1,15 @@
|
||||||
|
local srcpath = config.source_dir
|
||||||
|
local respath = srcpath .. '/example/res'
|
||||||
|
local paths = {
|
||||||
|
'example/scripts/?.lua',
|
||||||
|
'server/scripts/?.lua',
|
||||||
|
'external/lunit/?.lua'
|
||||||
|
}
|
||||||
|
|
||||||
|
for idx, path in pairs(paths) do
|
||||||
|
package.path = srcpath .. '/' .. path .. ';' .. package.path
|
||||||
|
end
|
||||||
|
|
||||||
|
read_xml(respath..'/config-example.xml', respath..'/catalog-example.xml')
|
||||||
|
|
||||||
|
require "init"
|
|
@ -0,0 +1,13 @@
|
||||||
|
<?xml version="1.0"?>
|
||||||
|
<resources xmlns:xi="http://www.w3.org/2001/XInclude">
|
||||||
|
<!-- this file contains a lot of armor -->
|
||||||
|
|
||||||
|
<xi:include href="eressea:///core/armor/plate.xml"/>
|
||||||
|
<xi:include href="eressea:///core/armor/chainmail.xml"/>
|
||||||
|
<xi:include href="eressea:///core/armor/laenmail.xml"/>
|
||||||
|
<xi:include href="eressea:///core/armor/laenshield.xml"/>
|
||||||
|
<xi:include href="eressea:///core/armor/rustychainmail.xml"/>
|
||||||
|
<xi:include href="eressea:///core/armor/rustyshield.xml"/>
|
||||||
|
<xi:include href="eressea:///core/armor/shield.xml"/>
|
||||||
|
|
||||||
|
</resources>
|
|
@ -0,0 +1,4 @@
|
||||||
|
<?xml version="1.0" encoding="iso-8859-1" ?>
|
||||||
|
<buildings xmlns:xi="http://www.w3.org/2001/XInclude">
|
||||||
|
<xi:include href="buildings/castle.xml"/>
|
||||||
|
</buildings>
|
|
@ -0,0 +1,26 @@
|
||||||
|
<?xml version="1.0"?>
|
||||||
|
<building name="castle" capacity="1">
|
||||||
|
<function name="name" value="castle_name"/>
|
||||||
|
<function name="protection" value="eressea_building_protection"/>
|
||||||
|
<construction skill="building" minskill="1" maxsize="2" reqsize="1">
|
||||||
|
<requirement type="stone" quantity="1"/>
|
||||||
|
</construction>
|
||||||
|
<construction skill="building" minskill="1" maxsize="8" reqsize="1">
|
||||||
|
<requirement type="stone" quantity="1"/>
|
||||||
|
</construction>
|
||||||
|
<construction skill="building" minskill="2" maxsize="40" reqsize="1">
|
||||||
|
<requirement type="stone" quantity="1"/>
|
||||||
|
</construction>
|
||||||
|
<construction skill="building" minskill="3" maxsize="200" reqsize="1">
|
||||||
|
<requirement type="stone" quantity="1"/>
|
||||||
|
</construction>
|
||||||
|
<construction skill="building" minskill="4" maxsize="1000" reqsize="1">
|
||||||
|
<requirement type="stone" quantity="1"/>
|
||||||
|
</construction>
|
||||||
|
<construction skill="building" minskill="5" maxsize="5000" reqsize="1">
|
||||||
|
<requirement type="stone" quantity="1"/>
|
||||||
|
</construction>
|
||||||
|
<construction skill="building" minskill="6" reqsize="1">
|
||||||
|
<requirement type="stone" quantity="1"/>
|
||||||
|
</construction>
|
||||||
|
</building>
|
|
@ -0,0 +1,10 @@
|
||||||
|
<?xml version="1.0"?>
|
||||||
|
<!DOCTYPE catalog
|
||||||
|
PUBLIC "-//OASIS/DTD Entity Resolution XML Catalog V1.0//EN"
|
||||||
|
"http://www.oasis-open.org/committees/entity/release/1.0/catalog.dtd">
|
||||||
|
|
||||||
|
<catalog xmlns="urn:oasis:names:tc:entity:xmlns:xml:catalog">
|
||||||
|
<rewriteURI
|
||||||
|
uriStartString="eressea:///core/"
|
||||||
|
rewritePrefix="../../server/res/" />
|
||||||
|
</catalog>
|
|
@ -0,0 +1,106 @@
|
||||||
|
<?xml version="1.0"?>
|
||||||
|
<eressea xmlns:xi="http://www.w3.org/2001/XInclude">
|
||||||
|
<xi:include href="eressea:///core/messages.xml"/>
|
||||||
|
|
||||||
|
<!-- Localization -->
|
||||||
|
<xi:include href="eressea:///core/de/strings.xml"/>
|
||||||
|
<xi:include href="eressea:///core/en/strings.xml"/>
|
||||||
|
<xi:include href="eressea:///core/prefixes.xml"/>
|
||||||
|
<xi:include href="eressea:///core/calendar.xml"/>
|
||||||
|
<calendar name="secondage" newyear="month_1" start="0" />
|
||||||
|
<xi:include href="eressea:///core/common/resources.xml"/>
|
||||||
|
<xi:include href="armor.xml" />
|
||||||
|
<xi:include href="weapons.xml" />
|
||||||
|
<xi:include href="items.xml" />
|
||||||
|
<xi:include href="races.xml"/>
|
||||||
|
<xi:include href="ships.xml"/>
|
||||||
|
<xi:include href="buildings.xml"/>
|
||||||
|
<xi:include href="spells.xml"/>
|
||||||
|
<xi:include href="terrains.xml"/>
|
||||||
|
|
||||||
|
<equipment>
|
||||||
|
<set name="first_unit">
|
||||||
|
<!-- this is given to a faction's first unit -->
|
||||||
|
<item name="log" amount="30"/>
|
||||||
|
<item name="stone" amount="30"/>
|
||||||
|
<item name="money" amount="4200"/>
|
||||||
|
</set>
|
||||||
|
<set name="new_faction">
|
||||||
|
<!-- this goes into the faction's global pool -->
|
||||||
|
<item name="sword" amount="1"/>
|
||||||
|
</set>
|
||||||
|
</equipment>
|
||||||
|
|
||||||
|
<game name="Demonstration">
|
||||||
|
<!-- Game specific settings -->
|
||||||
|
|
||||||
|
<order name="GM" disable="yes"/>
|
||||||
|
<order name="SPIONIEREN" disable="yes"/>
|
||||||
|
|
||||||
|
<skill name="espionage" enable="false"/>
|
||||||
|
|
||||||
|
<skill name="alchemy" enable="true"/>
|
||||||
|
<skill name="armorer" enable="true"/>
|
||||||
|
<skill name="bow" enable="true"/>
|
||||||
|
<skill name="building" enable="true"/>
|
||||||
|
<skill name="cartmaking" enable="true"/>
|
||||||
|
<skill name="catapult" enable="true"/>
|
||||||
|
<skill name="crossbow" enable="true"/>
|
||||||
|
<skill name="entertainment" enable="true"/>
|
||||||
|
<skill name="espionage" enable="true"/>
|
||||||
|
<skill name="forestry" enable="true"/>
|
||||||
|
<skill name="herbalism" enable="true"/>
|
||||||
|
<skill name="magic" enable="true"/>
|
||||||
|
<skill name="melee" enable="true"/>
|
||||||
|
<skill name="mining" enable="true"/>
|
||||||
|
<skill name="perception" enable="true"/>
|
||||||
|
<skill name="polearm" enable="true"/>
|
||||||
|
<skill name="quarrying" enable="true"/>
|
||||||
|
<skill name="riding" enable="true"/>
|
||||||
|
<skill name="roadwork" enable="true"/>
|
||||||
|
<skill name="sailing" enable="true"/>
|
||||||
|
<skill name="shipcraft" enable="true"/>
|
||||||
|
<skill name="stamina" enable="true"/>
|
||||||
|
<skill name="stealth" enable="true"/>
|
||||||
|
<skill name="tactics" enable="true"/>
|
||||||
|
<skill name="taxation" enable="true"/>
|
||||||
|
<skill name="trade" enable="true"/>
|
||||||
|
<skill name="training" enable="true"/>
|
||||||
|
<skill name="unarmed" enable="true"/>
|
||||||
|
<skill name="weaponsmithing" enable="true"/>
|
||||||
|
|
||||||
|
<param name="NewbieImmunity" value="8"/>
|
||||||
|
<param name="entertain.base" value="0"/>
|
||||||
|
<param name="entertain.perlevel" value="20"/>
|
||||||
|
<param name="nmr.timeout" value="4"/>
|
||||||
|
<param name="nmr.removenewbie" value="2"/>
|
||||||
|
<param name="GiveRestriction" value="3"/>
|
||||||
|
<param name="hunger.long" value="1"/>
|
||||||
|
<param name="rules.limit.faction" value="500"/>
|
||||||
|
|
||||||
|
<param name="modules.astralspace" value="0"/>
|
||||||
|
<param name="modules.wormholes" value="0"/>
|
||||||
|
<param name="modules.markets" value="0"/>
|
||||||
|
</game>
|
||||||
|
|
||||||
|
<strings>
|
||||||
|
<string name="mailto">
|
||||||
|
<text locale="de">eressea-server@example.com</text>
|
||||||
|
<text locale="en">eressea-server@example.com</text>
|
||||||
|
</string>
|
||||||
|
<string name="newbie_info_1">
|
||||||
|
<text locale="de">Bitte denke daran, deine Befehle mit dem Betreff
|
||||||
|
ERESSEA BEFEHLE an eressea-server@example.com zu senden.</text>
|
||||||
|
<text locale="en">Remember to send your orders to
|
||||||
|
eressea-server@example.com with the subject ERESSEA ORDERS.</text>
|
||||||
|
</string>
|
||||||
|
<string name="mailcmd">
|
||||||
|
<text locale="de">ERESSEA BEFEHLE</text>
|
||||||
|
<text locale="en">ERESSEA ORDERS</text>
|
||||||
|
</string>
|
||||||
|
<string name="defaultorder">
|
||||||
|
<text locale="de">ARBEITEN</text>
|
||||||
|
<text locale="en">WORK</text>
|
||||||
|
</string>
|
||||||
|
</strings>
|
||||||
|
</eressea>
|
|
@ -0,0 +1,3 @@
|
||||||
|
<?xml version="1.0" encoding="iso-8859-1" ?>
|
||||||
|
<items>
|
||||||
|
</items>
|
|
@ -0,0 +1,14 @@
|
||||||
|
<?xml version="1.0" encoding="iso-8859-1" ?>
|
||||||
|
<races xmlns:xi="http://www.w3.org/2001/XInclude">
|
||||||
|
<xi:include href="races/aquarian.xml"/>
|
||||||
|
<xi:include href="races/cat.xml"/>
|
||||||
|
<xi:include href="races/demon.xml"/>
|
||||||
|
<xi:include href="races/dwarf.xml"/>
|
||||||
|
<xi:include href="races/elf.xml"/>
|
||||||
|
<xi:include href="races/goblin.xml"/>
|
||||||
|
<xi:include href="races/halfling.xml"/>
|
||||||
|
<xi:include href="races/human.xml"/>
|
||||||
|
<xi:include href="races/insect.xml"/>
|
||||||
|
<xi:include href="races/orc.xml"/>
|
||||||
|
<xi:include href="races/troll.xml"/>
|
||||||
|
</races>
|
|
@ -0,0 +1,20 @@
|
||||||
|
<?xml version="1.0" encoding="iso-8859-1" ?>
|
||||||
|
<race name="aquarian" magres="0.000000" maxaura="1.000000" regaura="1.000000" recruitcost="80" maintenance="10" weight="1000" capacity="540" speed="1.000000" hp="20" damage="1d5" unarmedattack="-2" unarmeddefense="-2" shipspeed="yes" playerrace="yes" coastal="yes" walk="yes" giveitem="yes" giveperson="yes" giveunit="yes" getitem="yes" equipment="yes">
|
||||||
|
<ai splitsize="10000" moverandom="yes" learn="yes"/>
|
||||||
|
<function name="itemdrop" value="defaultdrops"/>
|
||||||
|
<skill name="mining" modifier="-2"/>
|
||||||
|
<skill name="building" modifier="-1"/>
|
||||||
|
<skill name="trade" modifier="2"/>
|
||||||
|
<skill name="armorer" modifier="-1"/>
|
||||||
|
<skill name="shipcraft" modifier="3"/>
|
||||||
|
<skill name="sailing" modifier="3"/>
|
||||||
|
<skill name="roadwork" modifier="-1"/>
|
||||||
|
<skill name="unarmed" modifier="-99"/>
|
||||||
|
<attack type="1" damage="1d5"/>
|
||||||
|
<familiar race="giantturtle" default="yes"/>
|
||||||
|
<familiar race="dolphin"/>
|
||||||
|
<familiar race="giantturtle"/>
|
||||||
|
<familiar race="dolphin"/>
|
||||||
|
<familiar race="dolphin"/>
|
||||||
|
<familiar race="kraken"/>
|
||||||
|
</race>
|
|
@ -0,0 +1,27 @@
|
||||||
|
<?xml version="1.0" encoding="iso-8859-1" ?>
|
||||||
|
<race name="cat" magres="0.000000" maxaura="1.000000" regaura="1.000000" recruitcost="90" maintenance="10" weight="1000" capacity="540" speed="1.000000" hp="20" damage="1d5" unarmedattack="-2" unarmeddefense="-2" defensemodifier="1" playerrace="yes" walk="yes" giveitem="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="-2"/>
|
||||||
|
<skill name="building" modifier="-1"/>
|
||||||
|
<skill name="catapult" modifier="-1"/>
|
||||||
|
<skill name="herbalism" modifier="1"/>
|
||||||
|
<skill name="armorer" modifier="-1"/>
|
||||||
|
<skill name="shipcraft" modifier="-1"/>
|
||||||
|
<skill name="sailing" modifier="-2"/>
|
||||||
|
<skill name="espionage" modifier="2"/>
|
||||||
|
<skill name="quarrying" modifier="-1"/>
|
||||||
|
<skill name="roadwork" modifier="-1"/>
|
||||||
|
<skill name="stealth" modifier="1"/>
|
||||||
|
<skill name="perception" modifier="2"/>
|
||||||
|
<skill name="taxation" modifier="1"/>
|
||||||
|
<skill name="unarmed" modifier="-99"/>
|
||||||
|
<attack type="1" damage="1d5"/>
|
||||||
|
<familiar race="lynx" default="yes"/>
|
||||||
|
<familiar race="dreamcat"/>
|
||||||
|
<familiar race="lynx"/>
|
||||||
|
<familiar race="songdragon"/>
|
||||||
|
<familiar race="tiger"/>
|
||||||
|
<familiar race="hellcat"/>
|
||||||
|
</race>
|
|
@ -0,0 +1,33 @@
|
||||||
|
<?xml version="1.0" encoding="iso-8859-1" ?>
|
||||||
|
<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" giveitem="yes" giveperson="yes" giveunit="yes" getitem="yes" recruitethereal="yes" equipment="yes">
|
||||||
|
<ai splitsize="10000" moverandom="yes" learn="yes"/>
|
||||||
|
<function name="initfamiliar" value="oldfamiliars"/>
|
||||||
|
<function name="itemdrop" value="defaultdrops"/>
|
||||||
|
<skill name="alchemy" modifier="2"/>
|
||||||
|
<skill name="trade" modifier="-3"/>
|
||||||
|
<skill name="forestry" modifier="1"/>
|
||||||
|
<skill name="herbalism" modifier="-3"/>
|
||||||
|
<skill name="magic" modifier="1"/>
|
||||||
|
<skill name="training" modifier="-3"/>
|
||||||
|
<skill name="riding" modifier="-1"/>
|
||||||
|
<skill name="shipcraft" modifier="-1"/>
|
||||||
|
<skill name="melee" modifier="1"/>
|
||||||
|
<skill name="sailing" modifier="-1"/>
|
||||||
|
<skill name="polearm" modifier="1"/>
|
||||||
|
<skill name="tactics" modifier="-1"/>
|
||||||
|
<skill name="stealth" modifier="1"/>
|
||||||
|
<skill name="entertainment" modifier="-3"/>
|
||||||
|
<skill name="weaponsmithing" modifier="1"/>
|
||||||
|
<skill name="cartmaking" modifier="-2"/>
|
||||||
|
<skill name="perception" modifier="1"/>
|
||||||
|
<skill name="taxation" modifier="1"/>
|
||||||
|
<skill name="unarmed" modifier="-99"/>
|
||||||
|
<attack type="1" damage="1d5"/>
|
||||||
|
<attack type="5"/>
|
||||||
|
<familiar race="imp" default="yes"/>
|
||||||
|
<familiar race="imp"/>
|
||||||
|
<familiar race="ghost"/>
|
||||||
|
<familiar race="rat"/>
|
||||||
|
<familiar race="wolf"/>
|
||||||
|
<familiar race="imp"/>
|
||||||
|
</race>
|
|
@ -0,0 +1,33 @@
|
||||||
|
<?xml version="1.0" encoding="iso-8859-1" ?>
|
||||||
|
<race name="dwarf" magres="0.050000" maxaura="1.000000" regaura="0.500000" recruitcost="110" maintenance="10" weight="1000" capacity="540" speed="1.000000" hp="24" damage="1d5" unarmedattack="-2" unarmeddefense="-2" playerrace="yes" walk="yes" giveitem="yes" giveperson="yes" giveunit="yes" getitem="yes" equipment="yes">
|
||||||
|
<ai splitsize="10000" moverandom="yes" learn="yes"/>
|
||||||
|
<function name="itemdrop" value="defaultdrops"/>
|
||||||
|
<skill name="mining" modifier="2"/>
|
||||||
|
<skill name="bow" modifier="-1"/>
|
||||||
|
<skill name="building" modifier="2"/>
|
||||||
|
<skill name="trade" modifier="1"/>
|
||||||
|
<skill name="forestry" modifier="-1"/>
|
||||||
|
<skill name="catapult" modifier="2"/>
|
||||||
|
<skill name="herbalism" modifier="-2"/>
|
||||||
|
<skill name="magic" modifier="-2"/>
|
||||||
|
<skill name="training" modifier="-2"/>
|
||||||
|
<skill name="riding" modifier="-2"/>
|
||||||
|
<skill name="armorer" modifier="2"/>
|
||||||
|
<skill name="shipcraft" modifier="-1"/>
|
||||||
|
<skill name="melee" modifier="1"/>
|
||||||
|
<skill name="sailing" modifier="-2"/>
|
||||||
|
<skill name="quarrying" modifier="2"/>
|
||||||
|
<skill name="roadwork" modifier="2"/>
|
||||||
|
<skill name="stealth" modifier="-1"/>
|
||||||
|
<skill name="entertainment" modifier="-1"/>
|
||||||
|
<skill name="weaponsmithing" modifier="2"/>
|
||||||
|
<skill name="taxation" modifier="1"/>
|
||||||
|
<skill name="unarmed" modifier="-99"/>
|
||||||
|
<attack type="1" damage="1d5"/>
|
||||||
|
<familiar race="tunnelworm" default="yes"/>
|
||||||
|
<familiar race="eagle"/>
|
||||||
|
<familiar race="owl"/>
|
||||||
|
<familiar race="lynx"/>
|
||||||
|
<familiar race="wolf"/>
|
||||||
|
<familiar race="rat"/>
|
||||||
|
</race>
|
|
@ -0,0 +1,29 @@
|
||||||
|
<?xml version="1.0" encoding="iso-8859-1" ?>
|
||||||
|
<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" giveitem="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="-2"/>
|
||||||
|
<skill name="bow" modifier="2"/>
|
||||||
|
<skill name="building" modifier="-1"/>
|
||||||
|
<skill name="catapult" modifier="-2"/>
|
||||||
|
<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="quarrying" modifier="-1"/>
|
||||||
|
<skill name="roadwork" modifier="-1"/>
|
||||||
|
<skill name="stealth" modifier="1"/>
|
||||||
|
<skill name="perception" modifier="1"/>
|
||||||
|
<skill name="unarmed" modifier="-99"/>
|
||||||
|
<attack type="1" damage="1d5"/>
|
||||||
|
<familiar race="lynx" default="yes"/>
|
||||||
|
<familiar race="fairy"/>
|
||||||
|
<familiar race="owl"/>
|
||||||
|
<familiar race="nymph"/>
|
||||||
|
<familiar race="unicorn"/>
|
||||||
|
<familiar race="imp"/>
|
||||||
|
</race>
|
||||||
|
|
|
@ -0,0 +1,27 @@
|
||||||
|
<?xml version="1.0" encoding="iso-8859-1" ?>
|
||||||
|
<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" giveitem="yes" giveperson="yes" giveunit="yes" getitem="yes" equipment="yes">
|
||||||
|
<ai splitsize="10000" moverandom="yes" learn="yes"/>
|
||||||
|
<function name="initfamiliar" value="oldfamiliars"/>
|
||||||
|
<function name="itemdrop" value="defaultdrops"/>
|
||||||
|
<skill name="alchemy" modifier="1"/>
|
||||||
|
<skill name="mining" modifier="1"/>
|
||||||
|
<skill name="building" modifier="1"/>
|
||||||
|
<skill name="trade" modifier="-1"/>
|
||||||
|
<skill name="catapult" modifier="1"/>
|
||||||
|
<skill name="magic" modifier="-1"/>
|
||||||
|
<skill name="shipcraft" modifier="-2"/>
|
||||||
|
<skill name="sailing" modifier="-2"/>
|
||||||
|
<skill name="roadwork" modifier="-2"/>
|
||||||
|
<skill name="tactics" modifier="-2"/>
|
||||||
|
<skill name="stealth" modifier="1"/>
|
||||||
|
<skill name="entertainment" modifier="-1"/>
|
||||||
|
<skill name="cartmaking" modifier="-1"/>
|
||||||
|
<skill name="unarmed" modifier="-99"/>
|
||||||
|
<attack type="1" damage="1d5"/>
|
||||||
|
<familiar race="rat" default="yes"/>
|
||||||
|
<familiar race="songdragon"/>
|
||||||
|
<familiar race="imp"/>
|
||||||
|
<familiar race="rat"/>
|
||||||
|
<familiar race="rat"/>
|
||||||
|
<familiar race="imp"/>
|
||||||
|
</race>
|
|
@ -0,0 +1,34 @@
|
||||||
|
<?xml version="1.0" encoding="iso-8859-1" ?>
|
||||||
|
<race name="halfling" magres="0.050000" maxaura="1.000000" regaura="1.000000" recruitcost="80" maintenance="10" weight="1000" capacity="540" speed="1.000000" hp="18" damage="1d5" unarmedattack="-2" unarmeddefense="-2" playerrace="yes" walk="yes" giveitem="yes" giveperson="yes" giveunit="yes" getitem="yes" equipment="yes">
|
||||||
|
<ai splitsize="10000" moverandom="yes" learn="yes"/>
|
||||||
|
<function name="itemdrop" value="defaultdrops"/>
|
||||||
|
<param name="hunger.damage" value="1d14+14"/>
|
||||||
|
<skill name="crossbow" modifier="1"/>
|
||||||
|
<skill name="mining" modifier="1"/>
|
||||||
|
<skill name="bow" modifier="-1"/>
|
||||||
|
<skill name="building" modifier="1"/>
|
||||||
|
<skill name="trade" modifier="2"/>
|
||||||
|
<skill name="catapult" modifier="-1"/>
|
||||||
|
<skill name="herbalism" modifier="2"/>
|
||||||
|
<skill name="training" modifier="-1"/>
|
||||||
|
<skill name="riding" modifier="-1"/>
|
||||||
|
<skill name="shipcraft" modifier="-1"/>
|
||||||
|
<skill name="melee" modifier="-1"/>
|
||||||
|
<skill name="sailing" modifier="-2"/>
|
||||||
|
<skill name="polearm" modifier="-1"/>
|
||||||
|
<skill name="espionage" modifier="1"/>
|
||||||
|
<skill name="roadwork" modifier="1"/>
|
||||||
|
<skill name="stealth" modifier="1"/>
|
||||||
|
<skill name="entertainment" modifier="1"/>
|
||||||
|
<skill name="cartmaking" modifier="2"/>
|
||||||
|
<skill name="perception" modifier="1"/>
|
||||||
|
<skill name="taxation" modifier="-1"/>
|
||||||
|
<skill name="unarmed" modifier="-99"/>
|
||||||
|
<attack type="1" damage="1d5"/>
|
||||||
|
<familiar race="owl" default="yes"/>
|
||||||
|
<familiar race="rat"/>
|
||||||
|
<familiar race="eagle"/>
|
||||||
|
<familiar race="songdragon"/>
|
||||||
|
<familiar race="eagle"/>
|
||||||
|
<familiar race="rat"/>
|
||||||
|
</race>
|
|
@ -0,0 +1,17 @@
|
||||||
|
<?xml version="1.0" encoding="iso-8859-1" ?>
|
||||||
|
<race name="human" magres="0.000000" maxaura="1.000000" regaura="1.000000" recruitcost="75" maintenance="10" weight="1000" capacity="540" speed="1.000000" hp="20" damage="1d5" unarmedattack="-2" unarmeddefense="-2" playerrace="yes" walk="yes" giveitem="yes" giveperson="yes" giveunit="yes" getitem="yes" equipment="yes">
|
||||||
|
<ai splitsize="10000" moverandom="yes" learn="yes"/>
|
||||||
|
<function name="itemdrop" value="defaultdrops"/>
|
||||||
|
<skill name="trade" modifier="1"/>
|
||||||
|
<skill name="herbalism" modifier="-1"/>
|
||||||
|
<skill name="shipcraft" modifier="1"/>
|
||||||
|
<skill name="sailing" modifier="1"/>
|
||||||
|
<skill name="unarmed" modifier="-99"/>
|
||||||
|
<attack type="1" damage="1d5"/>
|
||||||
|
<familiar race="wolf" default="yes"/>
|
||||||
|
<familiar race="dreamcat"/>
|
||||||
|
<familiar race="owl"/>
|
||||||
|
<familiar race="owl"/>
|
||||||
|
<familiar race="eagle"/>
|
||||||
|
<familiar race="imp"/>
|
||||||
|
</race>
|
|
@ -0,0 +1,30 @@
|
||||||
|
<?xml version="1.0" encoding="iso-8859-1" ?>
|
||||||
|
<race name="insect" magres="0.050000" maxaura="1.000000" regaura="1.000000" recruitcost="80" maintenance="10" weight="1000" capacity="540" speed="1.000000" hp="24" ac="2" damage="1d5" unarmedattack="-2" unarmeddefense="-2" playerrace="yes" walk="yes" giveitem="yes" giveperson="yes" giveunit="yes" getitem="yes" equipment="yes">
|
||||||
|
<ai splitsize="10000" moverandom="yes" learn="yes"/>
|
||||||
|
<function name="itemdrop" value="defaultdrops"/>
|
||||||
|
<skill name="crossbow" modifier="1"/>
|
||||||
|
<skill name="mining" modifier="1"/>
|
||||||
|
<skill name="bow" modifier="-2"/>
|
||||||
|
<skill name="building" modifier="2"/>
|
||||||
|
<skill name="trade" modifier="-1"/>
|
||||||
|
<skill name="forestry" modifier="1"/>
|
||||||
|
<skill name="herbalism" modifier="1"/>
|
||||||
|
<skill name="training" modifier="-3"/>
|
||||||
|
<skill name="riding" modifier="-3"/>
|
||||||
|
<skill name="armorer" modifier="2"/>
|
||||||
|
<skill name="melee" modifier="-1"/>
|
||||||
|
<skill name="polearm" modifier="1"/>
|
||||||
|
<skill name="roadwork" modifier="-1"/>
|
||||||
|
<skill name="tactics" modifier="-1"/>
|
||||||
|
<skill name="stealth" modifier="-1"/>
|
||||||
|
<skill name="entertainment" modifier="-2"/>
|
||||||
|
<skill name="perception" modifier="1"/>
|
||||||
|
<skill name="unarmed" modifier="-99"/>
|
||||||
|
<attack type="1" damage="1d5"/>
|
||||||
|
<familiar race="ghost" default="yes"/>
|
||||||
|
<familiar race="rat"/>
|
||||||
|
<familiar race="owl"/>
|
||||||
|
<familiar race="rat"/>
|
||||||
|
<familiar race="tunnelworm"/>
|
||||||
|
<familiar race="imp"/>
|
||||||
|
</race>
|
|
@ -0,0 +1,31 @@
|
||||||
|
<?xml version="1.0" encoding="iso-8859-1" ?>
|
||||||
|
<race name="orc" magres="-0.050000" maxaura="1.000000" regaura="1.000000" recruitcost="70" maintenance="10" weight="1000" capacity="540" speed="1.000000" hp="24" damage="1d5" unarmedattack="-2" unarmeddefense="-2" playerrace="yes" walk="yes" giveitem="yes" giveperson="yes" giveunit="yes" getitem="yes" equipment="yes">
|
||||||
|
<ai splitsize="10000" moverandom="yes" learn="yes"/>
|
||||||
|
<param name="recruit_multi" value="0.5"/>
|
||||||
|
<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>
|
|
@ -0,0 +1,32 @@
|
||||||
|
<?xml version="1.0" encoding="iso-8859-1" ?>
|
||||||
|
<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" giveitem="yes" giveperson="yes" giveunit="yes" getitem="yes" equipment="yes">
|
||||||
|
<ai splitsize="10000" moverandom="yes" learn="yes"/>
|
||||||
|
<function name="itemdrop" value="defaultdrops"/>
|
||||||
|
<skill name="mining" modifier="2"/>
|
||||||
|
<skill name="bow" modifier="-2"/>
|
||||||
|
<skill name="building" modifier="2"/>
|
||||||
|
<skill name="catapult" modifier="2"/>
|
||||||
|
<skill name="herbalism" modifier="-1"/>
|
||||||
|
<skill name="training" modifier="-1"/>
|
||||||
|
<skill name="riding" modifier="-2"/>
|
||||||
|
<skill name="armorer" modifier="2"/>
|
||||||
|
<skill name="shipcraft" modifier="-1"/>
|
||||||
|
<skill name="melee" modifier="1"/>
|
||||||
|
<skill name="sailing" modifier="-1"/>
|
||||||
|
<skill name="espionage" modifier="-3"/>
|
||||||
|
<skill name="quarrying" modifier="2"/>
|
||||||
|
<skill name="roadwork" modifier="2"/>
|
||||||
|
<skill name="tactics" modifier="-1"/>
|
||||||
|
<skill name="stealth" modifier="-3"/>
|
||||||
|
<skill name="entertainment" modifier="-1"/>
|
||||||
|
<skill name="perception" modifier="-1"/>
|
||||||
|
<skill name="taxation" modifier="1"/>
|
||||||
|
<skill name="unarmed" modifier="-99"/>
|
||||||
|
<attack type="1" damage="1d5+3"/>
|
||||||
|
<familiar race="tunnelworm" default="yes"/>
|
||||||
|
<familiar race="rat"/>
|
||||||
|
<familiar race="rat"/>
|
||||||
|
<familiar race="eagle"/>
|
||||||
|
<familiar race="tunnelworm"/>
|
||||||
|
<familiar race="wolf"/>
|
||||||
|
</race>
|
|
@ -0,0 +1,4 @@
|
||||||
|
<?xml version="1.0" encoding="iso-8859-1" ?>
|
||||||
|
<ships xmlns:xi="http://www.w3.org/2001/XInclude">
|
||||||
|
<xi:include href="ships/boat.xml"/>
|
||||||
|
</ships>
|
|
@ -0,0 +1,18 @@
|
||||||
|
<?xml version="1.0" encoding="iso-8859-1" ?>
|
||||||
|
<ship name="boat" range="2" storm="1.00" damage="1.00" cargo="5000" cptskill="1" minskill="1" sumskill="2" opensea="yes">
|
||||||
|
<coast terrain="ocean"/>
|
||||||
|
<coast terrain="plain"/>
|
||||||
|
<coast terrain="swamp"/>
|
||||||
|
<coast terrain="desert"/>
|
||||||
|
<coast terrain="highland"/>
|
||||||
|
<coast terrain="mountain"/>
|
||||||
|
<coast terrain="glacier"/>
|
||||||
|
<coast terrain="volcano"/>
|
||||||
|
<coast terrain="activevolcano"/>
|
||||||
|
<coast terrain="iceberg_sleep"/>
|
||||||
|
<coast terrain="iceberg"/>
|
||||||
|
<construction skill="shipcraft" minskill="1" maxsize="5" reqsize="1">
|
||||||
|
<requirement type="log" quantity="1"/>
|
||||||
|
</construction>
|
||||||
|
</ship>
|
||||||
|
|
|
@ -0,0 +1,166 @@
|
||||||
|
<?xml version="1.0" encoding="iso-8859-1" ?>
|
||||||
|
<spells>
|
||||||
|
|
||||||
|
<!-- draig spells -->
|
||||||
|
<spell name="create_roi" type="draig" ship="true" rank="5" level="6" index="130">
|
||||||
|
<function name="cast" value="lua_castspell"/>
|
||||||
|
<resource name="aura" amount="50" cost="fixed"/>
|
||||||
|
<resource name="money" amount="3000" cost="fixed"/>
|
||||||
|
<resource name="permaura" amount="1" cost="fixed"/>
|
||||||
|
</spell>
|
||||||
|
|
||||||
|
<spell name="earn_silver#draig" type="draig" ship="true" variable="true" rank="5" level="1" index="159">
|
||||||
|
<function name="cast" value="lua_castspell"/>
|
||||||
|
<resource name="aura" amount="1" cost="level"/>
|
||||||
|
</spell>
|
||||||
|
|
||||||
|
<spell name="create_aots" type="draig" ship="true" rank="5" level="6" index="125">
|
||||||
|
<function name="cast" value="lua_castspell"/>
|
||||||
|
<resource name="aura" amount="50" cost="fixed"/>
|
||||||
|
<resource name="money" amount="3000" cost="fixed"/>
|
||||||
|
<resource name="permaura" amount="1" cost="fixed"/>
|
||||||
|
</spell>
|
||||||
|
|
||||||
|
<spell name="create_firesword" type="draig" ship="true" rank="5" level="12" index="148">
|
||||||
|
<function name="cast" value="lua_castspell"/>
|
||||||
|
<resource name="aura" amount="100" cost="fixed"/>
|
||||||
|
<resource name="p10" amount="1" cost="fixed"/>
|
||||||
|
<resource name="sword" amount="1" cost="fixed"/>
|
||||||
|
<resource name="permaura" amount="1" cost="fixed"/>
|
||||||
|
</spell>
|
||||||
|
|
||||||
|
<spell name="create_trollbelt" type="draig" ship="true" rank="5" level="9" index="48">
|
||||||
|
<function name="cast" value="lua_castspell"/>
|
||||||
|
<resource name="aura" amount="20" cost="fixed"/>
|
||||||
|
<resource name="permaura" amount="1" cost="fixed"/>
|
||||||
|
</spell>
|
||||||
|
|
||||||
|
<!-- gwyrrd spells -->
|
||||||
|
<spell name="create_roi" type="gwyrrd" ship="true" rank="5" level="6" index="129">
|
||||||
|
<function name="cast" value="lua_castspell"/>
|
||||||
|
<resource name="aura" amount="50" cost="fixed"/>
|
||||||
|
<resource name="money" amount="3000" cost="fixed"/>
|
||||||
|
<resource name="permaura" amount="1" cost="fixed"/>
|
||||||
|
</spell>
|
||||||
|
|
||||||
|
<spell name="earn_silver#gwyrrd" type="gwyrrd" ship="true" variable="true" rank="5" level="1" index="159">
|
||||||
|
<function name="cast" value="lua_castspell"/>
|
||||||
|
<resource name="aura" amount="1" cost="level"/>
|
||||||
|
</spell>
|
||||||
|
|
||||||
|
<spell name="create_aots" type="gwyrrd" ship="true" rank="5" level="6" index="124">
|
||||||
|
<function name="cast" value="lua_castspell"/>
|
||||||
|
<resource name="aura" amount="50" cost="fixed"/>
|
||||||
|
<resource name="money" amount="3000" cost="fixed"/>
|
||||||
|
<resource name="permaura" amount="1" cost="fixed"/>
|
||||||
|
</spell>
|
||||||
|
|
||||||
|
<spell name="create_magicherbbag" type="gwyrrd" ship="true" rank="5" level="5" index="165">
|
||||||
|
<function name="cast" value="lua_castspell"/>
|
||||||
|
<resource name="aura" amount="30" cost="fixed"/>
|
||||||
|
<resource name="permaura" amount="1" cost="fixed"/>
|
||||||
|
<resource name="p2" amount="1" cost="fixed"/>
|
||||||
|
</spell>
|
||||||
|
|
||||||
|
<!-- illaun spells -->
|
||||||
|
<spell name="create_roi" type="illaun" ship="true" rank="5" level="6" index="131">
|
||||||
|
<function name="cast" value="lua_castspell"/>
|
||||||
|
<resource name="aura" amount="50" cost="fixed"/>
|
||||||
|
<resource name="money" amount="3000" cost="fixed"/>
|
||||||
|
<resource name="permaura" amount="1" cost="fixed"/>
|
||||||
|
</spell>
|
||||||
|
|
||||||
|
<spell name="earn_silver#illaun" type="illaun" ship="true" variable="true" rank="5" level="1" index="159">
|
||||||
|
<function name="cast" value="lua_castspell"/>
|
||||||
|
<resource name="aura" amount="1" cost="level"/>
|
||||||
|
</spell>
|
||||||
|
|
||||||
|
<spell name="create_aots" type="illaun" ship="true" rank="5" level="6" index="126">
|
||||||
|
<function name="cast" value="lua_castspell"/>
|
||||||
|
<resource name="aura" amount="50" cost="fixed"/>
|
||||||
|
<resource name="money" amount="3000" cost="fixed"/>
|
||||||
|
<resource name="permaura" amount="1" cost="fixed"/>
|
||||||
|
</spell>
|
||||||
|
|
||||||
|
<spell name="create_dreameye" type="illaun" ship="true" rank="5" level="14" index="149">
|
||||||
|
<function name="cast" value="lua_castspell"/>
|
||||||
|
<resource name="dragonhead" amount="1" cost="fixed"/>
|
||||||
|
<resource name="permaura" amount="5" cost="fixed"/>
|
||||||
|
</spell>
|
||||||
|
|
||||||
|
<spell name="create_invisibility_sphere" type="illaun" ship="true" rank="5" level="13" index="178">
|
||||||
|
<function name="cast" value="lua_castspell"/>
|
||||||
|
<resource name="aura" amount="150" cost="fixed"/>
|
||||||
|
<resource name="money" amount="30000" cost="fixed"/>
|
||||||
|
<resource name="permaura" amount="3" cost="fixed"/>
|
||||||
|
</spell>
|
||||||
|
|
||||||
|
<!-- tybied spells -->
|
||||||
|
<spell name="create_roi" type="tybied" ship="true" rank="5" level="6" index="133">
|
||||||
|
<function name="cast" value="lua_castspell"/>
|
||||||
|
<resource name="aura" amount="50" cost="fixed"/>
|
||||||
|
<resource name="money" amount="3000" cost="fixed"/>
|
||||||
|
<resource name="permaura" amount="1" cost="fixed"/>
|
||||||
|
</spell>
|
||||||
|
|
||||||
|
<spell name="earn_silver#tybied" type="tybied" ship="true" variable="true" rank="5" level="1" index="159">
|
||||||
|
<function name="cast" value="lua_castspell"/>
|
||||||
|
<resource name="aura" amount="1" cost="level"/>
|
||||||
|
</spell>
|
||||||
|
|
||||||
|
<spell name="create_aots" type="tybied" ship="true" rank="5" level="6" index="128">
|
||||||
|
<function name="cast" value="lua_castspell"/>
|
||||||
|
<resource name="aura" amount="50" cost="fixed"/>
|
||||||
|
<resource name="money" amount="3000" cost="fixed"/>
|
||||||
|
<resource name="permaura" amount="1" cost="fixed"/>
|
||||||
|
</spell>
|
||||||
|
|
||||||
|
<spell name="create_antimagic" type="tybied" ship="true" rank="5" level="7" index="38">
|
||||||
|
<function name="cast" value="lua_castspell"/>
|
||||||
|
<resource name="aura" amount="50" cost="fixed"/>
|
||||||
|
<resource name="money" amount="3000" cost="fixed"/>
|
||||||
|
</spell>
|
||||||
|
|
||||||
|
<spell name="create_rop" type="tybied" ship="true" rank="5" level="9" index="1">
|
||||||
|
<function name="cast" value="lua_castspell"/>
|
||||||
|
<resource name="aura" amount="100" cost="fixed"/>
|
||||||
|
<resource name="permaura" amount="1" cost="fixed"/>
|
||||||
|
<resource name="money" amount="4000" cost="fixed"/>
|
||||||
|
</spell>
|
||||||
|
|
||||||
|
<spell name="create_bagofholding" type="tybied" ship="true" rank="5" level="10" index="155">
|
||||||
|
<function name="cast" value="lua_castspell"/>
|
||||||
|
<resource name="aura" amount="30" cost="fixed"/>
|
||||||
|
<resource name="permaura" amount="1" cost="fixed"/>
|
||||||
|
<resource name="money" amount="5000" cost="fixed"/>
|
||||||
|
</spell>
|
||||||
|
|
||||||
|
<!-- gray magic -->
|
||||||
|
<spell name="create_runesword" type="gray" ship="true" rank="5" level="6" index="135">
|
||||||
|
<function name="cast" value="lua_castspell"/>
|
||||||
|
<resource name="aura" amount="100" cost="fixed"/>
|
||||||
|
<resource name="permaura" amount="1" cost="fixed"/>
|
||||||
|
<resource name="money" amount="1000" cost="fixed"/>
|
||||||
|
<resource name="laensword" amount="1" cost="fixed"/>
|
||||||
|
</spell>
|
||||||
|
|
||||||
|
<spell name="create_chastitybelt" type="gray" ship="true" rank="5" level="7" index="134">
|
||||||
|
<function name="cast" value="lua_castspell"/>
|
||||||
|
<resource name="aura" amount="50" cost="fixed"/>
|
||||||
|
<resource name="permaura" amount="1" cost="fixed"/>
|
||||||
|
<resource name="money" amount="3000" cost="fixed"/>
|
||||||
|
</spell>
|
||||||
|
|
||||||
|
<spell name="create_focus" type="gray" ship="true" rank="5" level="9" index="2">
|
||||||
|
<function name="cast" value="lua_castspell"/>
|
||||||
|
<resource name="aura" amount="100" cost="fixed"/>
|
||||||
|
<resource name="permaura" amount="1" cost="fixed"/>
|
||||||
|
</spell>
|
||||||
|
|
||||||
|
<spell name="create_ror" type="gray" ship="true" rank="5" level="9" index="3">
|
||||||
|
<function name="cast" value="lua_castspell"/>
|
||||||
|
<resource name="aura" amount="100" cost="fixed"/>
|
||||||
|
<resource name="permaura" amount="1" cost="fixed"/>
|
||||||
|
</spell>
|
||||||
|
|
||||||
|
</spells>
|
|
@ -0,0 +1,57 @@
|
||||||
|
<?xml version="1.0" encoding="ISO-8859-1"?>
|
||||||
|
<terrains>
|
||||||
|
<!-- defaults: walk="yes" sail="yes" fly="yes" shallow="yes" swim="no" forest="no" sea="no" land="yes" forbidden="no" arctic="no" cavalry="no" size="0" -->
|
||||||
|
<terrain name="ocean" size="100" shallow="no" walk="no" swim="yes" land="no" sea="yes" />
|
||||||
|
<terrain name="plain" size="4000" road="50" shallow="no" forest="yes" cavalry="yes" seed="3">
|
||||||
|
<resource name="iron" chance="0.1" level="2d4-1" base="5d8" div="2d20+10" />
|
||||||
|
<resource name="stone" chance="0.15" level="1d4" base="5d8" div="2d30+20" />
|
||||||
|
<resource name="laen" chance="0.01" level="1d4" base="1d4" div="2d20+50" />
|
||||||
|
</terrain>
|
||||||
|
<terrain name="swamp" size="1200" road="75" seed="2">
|
||||||
|
<resource name="iron" chance="0.02" level="2d4-1" base="5d8" div="2d20+10" />
|
||||||
|
<resource name="stone" chance="0.02" level="1d4" base="5d8" div="2d30+20" />
|
||||||
|
<resource name="laen" chance="0.02" level="1d4" base="1d4" div="2d20+50" />
|
||||||
|
</terrain>
|
||||||
|
<terrain name="desert" size="400" road="100" cavalry="yes" seed="2">
|
||||||
|
<resource name="iron" chance="0.15" level="2d4-1" base="5d8" div="2d20+10" />
|
||||||
|
<resource name="stone" chance="0.25" level="1d4" base="5d8" div="2d30+20" />
|
||||||
|
<resource name="laen" chance="0.025" level="1d4" base="1d4" div="2d20+50" />
|
||||||
|
</terrain>
|
||||||
|
<terrain name="highland" size="2300" road="100" cavalry="yes" seed="2">
|
||||||
|
<resource name="iron" chance="0.15" level="2d4-1" base="5d8" div="2d20+10" />
|
||||||
|
<resource name="stone" chance="0.25" level="1d4" base="5d8" div="2d30+20" />
|
||||||
|
<resource name="laen" chance="0.025" level="1d4" base="1d4" div="2d20+50" />
|
||||||
|
</terrain>
|
||||||
|
<terrain name="mountain" size="600" road="250" seed="2">
|
||||||
|
<resource name="iron" chance="1.0" level="1" base="50" div="50" />
|
||||||
|
<resource name="stone" chance="1.0" level="1" base="100" div="100" />
|
||||||
|
<resource name="laen" chance="0.05" level="1" base="4" div="100" />
|
||||||
|
</terrain>
|
||||||
|
<terrain name="glacier" size="150" road="250" arctic="yes" seed="2">
|
||||||
|
<resource name="iron" chance="1.0" level="1" base="3" div="50" />
|
||||||
|
<resource name="stone" chance="1.0" level="1" base="2" div="100" />
|
||||||
|
<resource name="laen" chance="0.05" level="1" base="4" div="100" />
|
||||||
|
</terrain>
|
||||||
|
<terrain name="iceberg_sleep" size="150" road="250" arctic="yes">
|
||||||
|
<resource name="iron" chance="0.9" level="1" base="3" div="50" />
|
||||||
|
<resource name="stone" chance="0.9" level="1" base="2" div="100" />
|
||||||
|
<resource name="laen" chance="0.05" level="1" base="4" div="100" />
|
||||||
|
</terrain>
|
||||||
|
<terrain name="iceberg" size="150" arctic="yes">
|
||||||
|
<resource name="iron" chance="0.9" level="1" base="3" div="50" />
|
||||||
|
<resource name="stone" chance="0.9" level="1" base="2" div="100" />
|
||||||
|
</terrain>
|
||||||
|
<terrain name="firewall" road="250" land="no" walk="no" sail="no" fly="no" forbidden="yes" />
|
||||||
|
<terrain name="fog" sail="no" land="no" />
|
||||||
|
<terrain name="thickfog" forbidden="yes" sail="no" walk="no" fly="no" land="no" />
|
||||||
|
<terrain name="volcano" size="400" road="250" seed="1">
|
||||||
|
<resource name="iron" chance="0.5" level="1" base="50" div="50" />
|
||||||
|
<resource name="stone" chance="0.5" level="1" base="100" div="100" />
|
||||||
|
<resource name="laen" chance="0.075" level="1" base="4" div="100" />
|
||||||
|
</terrain>
|
||||||
|
<terrain name="activevolcano" size="400" road="250">
|
||||||
|
<resource name="iron" chance="0.5" level="1" base="50" div="50" />
|
||||||
|
<resource name="stone" chance="0.5" level="1" base="100" div="100" />
|
||||||
|
<resource name="laen" chance="0.075" level="1" base="4" div="100" />
|
||||||
|
</terrain>
|
||||||
|
</terrains>
|
|
@ -0,0 +1,25 @@
|
||||||
|
<?xml version="1.0"?>
|
||||||
|
<resources xmlns:xi="http://www.w3.org/2001/XInclude">
|
||||||
|
<!-- this file contains a lot of weapons -->
|
||||||
|
<xi:include href="eressea:///core/weapons/axe.xml"/>
|
||||||
|
<xi:include href="eressea:///core/weapons/bow.xml"/>
|
||||||
|
<xi:include href="eressea:///core/weapons/catapult.xml"/>
|
||||||
|
<xi:include href="eressea:///core/weapons/crossbow.xml"/>
|
||||||
|
<xi:include href="eressea:///core/weapons/firesword.xml"/>
|
||||||
|
<xi:include href="eressea:///core/weapons/greatbow.xml"/>
|
||||||
|
<xi:include href="eressea:///core/weapons/greatsword.xml"/>
|
||||||
|
<xi:include href="eressea:///core/weapons/halberd.xml"/>
|
||||||
|
<xi:include href="eressea:///core/weapons/laensword.xml"/>
|
||||||
|
<xi:include href="eressea:///core/weapons/lance.xml"/>
|
||||||
|
<xi:include href="eressea:///core/weapons/mallornbow.xml"/>
|
||||||
|
<xi:include href="eressea:///core/weapons/mallorncrossbow.xml"/>
|
||||||
|
<xi:include href="eressea:///core/weapons/mallornlance.xml"/>
|
||||||
|
<xi:include href="eressea:///core/weapons/mallornspear.xml"/>
|
||||||
|
<xi:include href="eressea:///core/weapons/runesword.xml"/>
|
||||||
|
<xi:include href="eressea:///core/weapons/rustyaxe.xml"/>
|
||||||
|
<xi:include href="eressea:///core/weapons/rustygreatsword.xml"/>
|
||||||
|
<xi:include href="eressea:///core/weapons/rustyhalberd.xml"/>
|
||||||
|
<xi:include href="eressea:///core/weapons/rustysword.xml"/>
|
||||||
|
<xi:include href="eressea:///core/weapons/spear.xml"/>
|
||||||
|
<xi:include href="eressea:///core/weapons/sword.xml"/>
|
||||||
|
</resources>
|
|
@ -0,0 +1,50 @@
|
||||||
|
-- Enno was here
|
||||||
|
require "multis"
|
||||||
|
|
||||||
|
function process(orders)
|
||||||
|
local confirmed_multis = { }
|
||||||
|
local suspected_multis = { }
|
||||||
|
|
||||||
|
if open_game(get_turn())~=0 then
|
||||||
|
print("could not read game")
|
||||||
|
return -1
|
||||||
|
end
|
||||||
|
init_summary()
|
||||||
|
|
||||||
|
-- kill multi-players (external script)
|
||||||
|
kill_multis(confirmed_multis, false)
|
||||||
|
mark_multis(suspected_multis, false)
|
||||||
|
|
||||||
|
-- run the turn:
|
||||||
|
if read_orders(orders) ~= 0 then
|
||||||
|
print("could not read " .. orders)
|
||||||
|
return -1
|
||||||
|
end
|
||||||
|
|
||||||
|
-- plan_monsters()
|
||||||
|
|
||||||
|
if nmr_check(config.maxnmrs or 80)~=0 then
|
||||||
|
return -1
|
||||||
|
end
|
||||||
|
|
||||||
|
process_orders()
|
||||||
|
|
||||||
|
-- create new monsters:
|
||||||
|
spawn_braineaters(0.25)
|
||||||
|
|
||||||
|
-- post-turn updates:
|
||||||
|
update_guards()
|
||||||
|
update_scores()
|
||||||
|
|
||||||
|
local localechange = { de = { "ii" } }
|
||||||
|
change_locales(localechange)
|
||||||
|
|
||||||
|
write_files(config.locales)
|
||||||
|
|
||||||
|
file = "" .. get_turn() .. ".dat"
|
||||||
|
if write_game(file, "binary")~=0 then
|
||||||
|
print("could not write game")
|
||||||
|
return -1
|
||||||
|
end
|
||||||
|
return 0
|
||||||
|
end
|
|
@ -0,0 +1,6 @@
|
||||||
|
require "example.rules"
|
||||||
|
|
||||||
|
local srcpath = config.source_dir
|
||||||
|
tests = {
|
||||||
|
srcpath .. '/server/scripts/tests/common.lua',
|
||||||
|
}
|
|
@ -0,0 +1,8 @@
|
||||||
|
function item_canuse(u, iname)
|
||||||
|
local race = u.race
|
||||||
|
if iname=="greatbow" then
|
||||||
|
-- only elves use greatbow
|
||||||
|
return race=="elf"
|
||||||
|
end
|
||||||
|
return true
|
||||||
|
end
|
|
@ -0,0 +1,276 @@
|
||||||
|
<?xml version="1.0" encoding="Windows-1252"?>
|
||||||
|
<VisualStudioProject
|
||||||
|
ProjectType="Visual C++"
|
||||||
|
Version="8.00"
|
||||||
|
Name="amalgamation-example"
|
||||||
|
ProjectGUID="{4A17DAEE-2261-4E2C-96F6-BA4132A09551}"
|
||||||
|
RootNamespace="build"
|
||||||
|
Keyword="Win32Proj"
|
||||||
|
>
|
||||||
|
<Platforms>
|
||||||
|
<Platform
|
||||||
|
Name="Win32"
|
||||||
|
/>
|
||||||
|
</Platforms>
|
||||||
|
<ToolFiles>
|
||||||
|
</ToolFiles>
|
||||||
|
<Configurations>
|
||||||
|
<Configuration
|
||||||
|
Name="Debug|Win32"
|
||||||
|
OutputDirectory="$(ProjectDir)$(ConfigurationName)"
|
||||||
|
IntermediateDirectory="$(ProjectDir)$(ConfigurationName)"
|
||||||
|
ConfigurationType="1"
|
||||||
|
CharacterSet="1"
|
||||||
|
>
|
||||||
|
<Tool
|
||||||
|
Name="VCPreBuildEventTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCCustomBuildTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCXMLDataGeneratorTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCWebServiceProxyGeneratorTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCMIDLTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCCLCompilerTool"
|
||||||
|
AdditionalOptions="/MP"
|
||||||
|
Optimization="0"
|
||||||
|
AdditionalIncludeDirectories="../../server/src;../../external"
|
||||||
|
PreprocessorDefinitions="WIN32;_DEBUG;_CONSOLE"
|
||||||
|
MinimalRebuild="true"
|
||||||
|
BasicRuntimeChecks="3"
|
||||||
|
RuntimeLibrary="3"
|
||||||
|
UsePrecompiledHeader="2"
|
||||||
|
PrecompiledHeaderThrough="stdafx.h"
|
||||||
|
WarningLevel="4"
|
||||||
|
Detect64BitPortabilityProblems="true"
|
||||||
|
DebugInformationFormat="4"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCManagedResourceCompilerTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCResourceCompilerTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCPreLinkEventTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCLinkerTool"
|
||||||
|
AdditionalDependencies="libxml2.lib pdcurses.lib lua5.1_d.lib tolua.lib"
|
||||||
|
OutputFile="$(OutDir)\eressea.exe"
|
||||||
|
LinkIncremental="2"
|
||||||
|
GenerateDebugInformation="true"
|
||||||
|
SubSystem="1"
|
||||||
|
TargetMachine="1"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCALinkTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCManifestTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCXDCMakeTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCBscMakeTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCFxCopTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCAppVerifierTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCWebDeploymentTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCPostBuildEventTool"
|
||||||
|
/>
|
||||||
|
</Configuration>
|
||||||
|
<Configuration
|
||||||
|
Name="Release|Win32"
|
||||||
|
OutputDirectory="$(ProjectDir)$(ConfigurationName)"
|
||||||
|
IntermediateDirectory="$(ProjectDir)$(ConfigurationName)"
|
||||||
|
ConfigurationType="1"
|
||||||
|
CharacterSet="1"
|
||||||
|
WholeProgramOptimization="1"
|
||||||
|
>
|
||||||
|
<Tool
|
||||||
|
Name="VCPreBuildEventTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCCustomBuildTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCXMLDataGeneratorTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCWebServiceProxyGeneratorTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCMIDLTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCCLCompilerTool"
|
||||||
|
AdditionalIncludeDirectories="../../server/src;../../external"
|
||||||
|
PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE"
|
||||||
|
RuntimeLibrary="2"
|
||||||
|
UsePrecompiledHeader="2"
|
||||||
|
WarningLevel="3"
|
||||||
|
Detect64BitPortabilityProblems="true"
|
||||||
|
DebugInformationFormat="3"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCManagedResourceCompilerTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCResourceCompilerTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCPreLinkEventTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCLinkerTool"
|
||||||
|
AdditionalDependencies="libxml2.lib pdcurses.lib lua5.1.lib tolua.lib"
|
||||||
|
OutputFile="$(OutDir)\eressea.exe"
|
||||||
|
LinkIncremental="1"
|
||||||
|
GenerateDebugInformation="true"
|
||||||
|
SubSystem="1"
|
||||||
|
OptimizeReferences="2"
|
||||||
|
EnableCOMDATFolding="2"
|
||||||
|
TargetMachine="1"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCALinkTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCManifestTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCXDCMakeTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCBscMakeTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCFxCopTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCAppVerifierTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCWebDeploymentTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCPostBuildEventTool"
|
||||||
|
/>
|
||||||
|
</Configuration>
|
||||||
|
</Configurations>
|
||||||
|
<References>
|
||||||
|
</References>
|
||||||
|
<Files>
|
||||||
|
<Filter
|
||||||
|
Name="Source Files"
|
||||||
|
Filter="cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx"
|
||||||
|
UniqueIdentifier="{4FC737F1-C7A5-4376-A066-2A32D752A2FF}"
|
||||||
|
>
|
||||||
|
<File
|
||||||
|
RelativePath=".\main.c"
|
||||||
|
>
|
||||||
|
<FileConfiguration
|
||||||
|
Name="Debug|Win32"
|
||||||
|
ExcludedFromBuild="true"
|
||||||
|
>
|
||||||
|
<Tool
|
||||||
|
Name="VCCLCompilerTool"
|
||||||
|
/>
|
||||||
|
</FileConfiguration>
|
||||||
|
<FileConfiguration
|
||||||
|
Name="Release|Win32"
|
||||||
|
ExcludedFromBuild="true"
|
||||||
|
>
|
||||||
|
<Tool
|
||||||
|
Name="VCCLCompilerTool"
|
||||||
|
/>
|
||||||
|
</FileConfiguration>
|
||||||
|
</File>
|
||||||
|
</Filter>
|
||||||
|
<Filter
|
||||||
|
Name="Header Files"
|
||||||
|
Filter="h;hpp;hxx;hm;inl;inc;xsd"
|
||||||
|
UniqueIdentifier="{93995380-89BD-4b04-88EB-625FBE52EBFB}"
|
||||||
|
>
|
||||||
|
<File
|
||||||
|
RelativePath="..\..\server\src\build\stdafx.h"
|
||||||
|
>
|
||||||
|
</File>
|
||||||
|
</Filter>
|
||||||
|
<Filter
|
||||||
|
Name="Unity Build"
|
||||||
|
>
|
||||||
|
<File
|
||||||
|
RelativePath="..\..\server\src\build\external.c"
|
||||||
|
>
|
||||||
|
</File>
|
||||||
|
<File
|
||||||
|
RelativePath="..\..\server\src\build\gamecode.c"
|
||||||
|
>
|
||||||
|
</File>
|
||||||
|
<File
|
||||||
|
RelativePath="..\..\server\src\build\kernel.c"
|
||||||
|
>
|
||||||
|
</File>
|
||||||
|
<File
|
||||||
|
RelativePath="..\..\server\src\build\lib.c"
|
||||||
|
>
|
||||||
|
</File>
|
||||||
|
<File
|
||||||
|
RelativePath=".\server.c"
|
||||||
|
>
|
||||||
|
</File>
|
||||||
|
<File
|
||||||
|
RelativePath="..\..\server\src\build\stdafx.c"
|
||||||
|
>
|
||||||
|
<FileConfiguration
|
||||||
|
Name="Debug|Win32"
|
||||||
|
>
|
||||||
|
<Tool
|
||||||
|
Name="VCCLCompilerTool"
|
||||||
|
UsePrecompiledHeader="1"
|
||||||
|
PrecompiledHeaderThrough="stdafx.h"
|
||||||
|
/>
|
||||||
|
</FileConfiguration>
|
||||||
|
<FileConfiguration
|
||||||
|
Name="Release|Win32"
|
||||||
|
>
|
||||||
|
<Tool
|
||||||
|
Name="VCCLCompilerTool"
|
||||||
|
UsePrecompiledHeader="1"
|
||||||
|
/>
|
||||||
|
</FileConfiguration>
|
||||||
|
</File>
|
||||||
|
<File
|
||||||
|
RelativePath="..\..\server\src\build\util.c"
|
||||||
|
>
|
||||||
|
<FileConfiguration
|
||||||
|
Name="Debug|Win32"
|
||||||
|
>
|
||||||
|
<Tool
|
||||||
|
Name="VCCLCompilerTool"
|
||||||
|
AdditionalIncludeDirectories="src/util"
|
||||||
|
/>
|
||||||
|
</FileConfiguration>
|
||||||
|
</File>
|
||||||
|
</Filter>
|
||||||
|
</Files>
|
||||||
|
<Globals>
|
||||||
|
</Globals>
|
||||||
|
</VisualStudioProject>
|
|
@ -0,0 +1,114 @@
|
||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||||
|
<ItemGroup Label="ProjectConfigurations">
|
||||||
|
<ProjectConfiguration Include="Debug|Win32">
|
||||||
|
<Configuration>Debug</Configuration>
|
||||||
|
<Platform>Win32</Platform>
|
||||||
|
</ProjectConfiguration>
|
||||||
|
<ProjectConfiguration Include="Release|Win32">
|
||||||
|
<Configuration>Release</Configuration>
|
||||||
|
<Platform>Win32</Platform>
|
||||||
|
</ProjectConfiguration>
|
||||||
|
</ItemGroup>
|
||||||
|
<PropertyGroup Label="Globals">
|
||||||
|
<ProjectName>amalgamation-example</ProjectName>
|
||||||
|
<ProjectGuid>{4A17DAEE-2261-4E2C-96F6-BA4132A09551}</ProjectGuid>
|
||||||
|
<RootNamespace>build</RootNamespace>
|
||||||
|
<Keyword>Win32Proj</Keyword>
|
||||||
|
</PropertyGroup>
|
||||||
|
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
|
||||||
|
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
|
||||||
|
<ConfigurationType>Application</ConfigurationType>
|
||||||
|
<CharacterSet>Unicode</CharacterSet>
|
||||||
|
<WholeProgramOptimization>true</WholeProgramOptimization>
|
||||||
|
</PropertyGroup>
|
||||||
|
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
|
||||||
|
<ConfigurationType>Application</ConfigurationType>
|
||||||
|
<CharacterSet>Unicode</CharacterSet>
|
||||||
|
</PropertyGroup>
|
||||||
|
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
|
||||||
|
<ImportGroup Label="ExtensionSettings">
|
||||||
|
</ImportGroup>
|
||||||
|
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="PropertySheets">
|
||||||
|
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
|
||||||
|
</ImportGroup>
|
||||||
|
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="PropertySheets">
|
||||||
|
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
|
||||||
|
</ImportGroup>
|
||||||
|
<PropertyGroup Label="UserMacros" />
|
||||||
|
<PropertyGroup>
|
||||||
|
<_ProjectFileVersion>10.0.30319.1</_ProjectFileVersion>
|
||||||
|
<OutDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">$(ProjectDir)$(Configuration)\</OutDir>
|
||||||
|
<IntDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">$(ProjectDir)$(Configuration)\</IntDir>
|
||||||
|
<LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">true</LinkIncremental>
|
||||||
|
<OutDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">$(ProjectDir)$(Configuration)\</OutDir>
|
||||||
|
<IntDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">$(ProjectDir)$(Configuration)\</IntDir>
|
||||||
|
<LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">false</LinkIncremental>
|
||||||
|
</PropertyGroup>
|
||||||
|
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
|
||||||
|
<ClCompile>
|
||||||
|
<AdditionalOptions>/MP %(AdditionalOptions)</AdditionalOptions>
|
||||||
|
<Optimization>Disabled</Optimization>
|
||||||
|
<AdditionalIncludeDirectories>../../server/src;../../external;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||||
|
<PreprocessorDefinitions>WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||||
|
<MinimalRebuild>true</MinimalRebuild>
|
||||||
|
<BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
|
||||||
|
<RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>
|
||||||
|
<PrecompiledHeader>Use</PrecompiledHeader>
|
||||||
|
<PrecompiledHeaderFile>stdafx.h</PrecompiledHeaderFile>
|
||||||
|
<WarningLevel>Level4</WarningLevel>
|
||||||
|
<DebugInformationFormat>EditAndContinue</DebugInformationFormat>
|
||||||
|
</ClCompile>
|
||||||
|
<Link>
|
||||||
|
<AdditionalDependencies>libxml2.lib;pdcurses.lib;lua5.1_d.lib;tolua.lib;%(AdditionalDependencies)</AdditionalDependencies>
|
||||||
|
<OutputFile>$(OutDir)eressea.exe</OutputFile>
|
||||||
|
<GenerateDebugInformation>true</GenerateDebugInformation>
|
||||||
|
<SubSystem>Console</SubSystem>
|
||||||
|
<TargetMachine>MachineX86</TargetMachine>
|
||||||
|
</Link>
|
||||||
|
</ItemDefinitionGroup>
|
||||||
|
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
|
||||||
|
<ClCompile>
|
||||||
|
<AdditionalIncludeDirectories>../../server/src;../../external;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||||
|
<PreprocessorDefinitions>WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||||
|
<RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
|
||||||
|
<PrecompiledHeader>Use</PrecompiledHeader>
|
||||||
|
<WarningLevel>Level3</WarningLevel>
|
||||||
|
<DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
|
||||||
|
</ClCompile>
|
||||||
|
<Link>
|
||||||
|
<AdditionalDependencies>libxml2.lib;pdcurses.lib;lua5.1.lib;tolua.lib;%(AdditionalDependencies)</AdditionalDependencies>
|
||||||
|
<OutputFile>$(OutDir)eressea.exe</OutputFile>
|
||||||
|
<GenerateDebugInformation>true</GenerateDebugInformation>
|
||||||
|
<SubSystem>Console</SubSystem>
|
||||||
|
<OptimizeReferences>true</OptimizeReferences>
|
||||||
|
<EnableCOMDATFolding>true</EnableCOMDATFolding>
|
||||||
|
<TargetMachine>MachineX86</TargetMachine>
|
||||||
|
</Link>
|
||||||
|
</ItemDefinitionGroup>
|
||||||
|
<ItemGroup>
|
||||||
|
<ClCompile Include="main.c">
|
||||||
|
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">true</ExcludedFromBuild>
|
||||||
|
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">true</ExcludedFromBuild>
|
||||||
|
</ClCompile>
|
||||||
|
<ClCompile Include="..\..\server\src\build\external.c" />
|
||||||
|
<ClCompile Include="..\..\server\src\build\gamecode.c" />
|
||||||
|
<ClCompile Include="..\..\server\src\build\kernel.c" />
|
||||||
|
<ClCompile Include="..\..\server\src\build\lib.c" />
|
||||||
|
<ClCompile Include="server.c" />
|
||||||
|
<ClCompile Include="..\..\server\src\build\stdafx.c">
|
||||||
|
<PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">Create</PrecompiledHeader>
|
||||||
|
<PrecompiledHeaderFile Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">stdafx.h</PrecompiledHeaderFile>
|
||||||
|
<PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">Create</PrecompiledHeader>
|
||||||
|
</ClCompile>
|
||||||
|
<ClCompile Include="..\..\server\src\build\util.c">
|
||||||
|
<AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">src/util;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||||
|
</ClCompile>
|
||||||
|
</ItemGroup>
|
||||||
|
<ItemGroup>
|
||||||
|
<ClInclude Include="..\..\server\src\build\stdafx.h" />
|
||||||
|
</ItemGroup>
|
||||||
|
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
|
||||||
|
<ImportGroup Label="ExtensionTargets">
|
||||||
|
</ImportGroup>
|
||||||
|
</Project>
|
|
@ -0,0 +1,47 @@
|
||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||||
|
<ItemGroup>
|
||||||
|
<Filter Include="Source Files">
|
||||||
|
<UniqueIdentifier>{4FC737F1-C7A5-4376-A066-2A32D752A2FF}</UniqueIdentifier>
|
||||||
|
<Extensions>cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx</Extensions>
|
||||||
|
</Filter>
|
||||||
|
<Filter Include="Header Files">
|
||||||
|
<UniqueIdentifier>{93995380-89BD-4b04-88EB-625FBE52EBFB}</UniqueIdentifier>
|
||||||
|
<Extensions>h;hpp;hxx;hm;inl;inc;xsd</Extensions>
|
||||||
|
</Filter>
|
||||||
|
<Filter Include="Unity Build">
|
||||||
|
<UniqueIdentifier>{28903f02-8887-4f37-9579-228fe73a2dcd}</UniqueIdentifier>
|
||||||
|
</Filter>
|
||||||
|
</ItemGroup>
|
||||||
|
<ItemGroup>
|
||||||
|
<ClCompile Include="main.c">
|
||||||
|
<Filter>Source Files</Filter>
|
||||||
|
</ClCompile>
|
||||||
|
<ClCompile Include="..\..\server\src\build\external.c">
|
||||||
|
<Filter>Unity Build</Filter>
|
||||||
|
</ClCompile>
|
||||||
|
<ClCompile Include="..\..\server\src\build\gamecode.c">
|
||||||
|
<Filter>Unity Build</Filter>
|
||||||
|
</ClCompile>
|
||||||
|
<ClCompile Include="..\..\server\src\build\kernel.c">
|
||||||
|
<Filter>Unity Build</Filter>
|
||||||
|
</ClCompile>
|
||||||
|
<ClCompile Include="..\..\server\src\build\lib.c">
|
||||||
|
<Filter>Unity Build</Filter>
|
||||||
|
</ClCompile>
|
||||||
|
<ClCompile Include="server.c">
|
||||||
|
<Filter>Unity Build</Filter>
|
||||||
|
</ClCompile>
|
||||||
|
<ClCompile Include="..\..\server\src\build\stdafx.c">
|
||||||
|
<Filter>Unity Build</Filter>
|
||||||
|
</ClCompile>
|
||||||
|
<ClCompile Include="..\..\server\src\build\util.c">
|
||||||
|
<Filter>Unity Build</Filter>
|
||||||
|
</ClCompile>
|
||||||
|
</ItemGroup>
|
||||||
|
<ItemGroup>
|
||||||
|
<ClInclude Include="..\..\server\src\build\stdafx.h">
|
||||||
|
<Filter>Header Files</Filter>
|
||||||
|
</ClInclude>
|
||||||
|
</ItemGroup>
|
||||||
|
</Project>
|
|
@ -0,0 +1,171 @@
|
||||||
|
/*
|
||||||
|
Copyright (c) 1998-2010, 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 <util/log.h>
|
||||||
|
|
||||||
|
#include <kernel/types.h>
|
||||||
|
#include <eressea.h>
|
||||||
|
#include <gmtool.h>
|
||||||
|
#include <kernel/config.h>
|
||||||
|
#include <kernel/save.h>
|
||||||
|
#include <iniparser/iniparser.h>
|
||||||
|
|
||||||
|
#include <assert.h>
|
||||||
|
#include <locale.h>
|
||||||
|
#include <wctype.h>
|
||||||
|
|
||||||
|
#include <tests.h>
|
||||||
|
|
||||||
|
static const char * luafile = "setup.lua";
|
||||||
|
static const char * entry_point = NULL;
|
||||||
|
static const char * inifile = "eressea.ini";
|
||||||
|
static int memdebug = 0;
|
||||||
|
|
||||||
|
static void parse_config(const char * filename)
|
||||||
|
{
|
||||||
|
dictionary * d = iniparser_new(filename);
|
||||||
|
if (d) {
|
||||||
|
load_inifile(d);
|
||||||
|
|
||||||
|
memdebug = iniparser_getint(d, "eressea:memcheck", memdebug);
|
||||||
|
entry_point = iniparser_getstring(d, "eressea:run", entry_point);
|
||||||
|
luafile = iniparser_getstring(d, "eressea:load", luafile);
|
||||||
|
|
||||||
|
/* only one value in the [editor] section */
|
||||||
|
force_color = iniparser_getint(d, "editor:color", force_color);
|
||||||
|
}
|
||||||
|
global.inifile = d;
|
||||||
|
}
|
||||||
|
|
||||||
|
static int
|
||||||
|
usage(const char * prog, const char * arg)
|
||||||
|
{
|
||||||
|
if (arg) {
|
||||||
|
fprintf(stderr, "unknown argument: %s\n\n", arg);
|
||||||
|
}
|
||||||
|
fprintf(stderr, "Usage: %s [options]\n"
|
||||||
|
"-t <turn> : read this datafile, not the most current one\n"
|
||||||
|
"-q : be quite (same as -v 0)\n"
|
||||||
|
"-v <level> : verbosity level\n"
|
||||||
|
"-C : run in interactive mode\n"
|
||||||
|
"--color : force curses to use colors even when not detected\n"
|
||||||
|
"--tests : run test suite\n"
|
||||||
|
"--help : help\n", prog);
|
||||||
|
return -1;
|
||||||
|
}
|
||||||
|
|
||||||
|
static int
|
||||||
|
parse_args(int argc, char **argv, int * exitcode)
|
||||||
|
{
|
||||||
|
int i, run_tests = 0;
|
||||||
|
|
||||||
|
for (i=1;i!=argc;++i) {
|
||||||
|
if (argv[i][0]!='-') {
|
||||||
|
return usage(argv[0], argv[i]);
|
||||||
|
} else if (argv[i][1]=='-') { /* long format */
|
||||||
|
if (strcmp(argv[i]+2, "version")==0) {
|
||||||
|
printf("\n%s PBEM host\n"
|
||||||
|
"Copyright (C) 1996-2005 C. Schlittchen, K. Zedel, E. Rehling, H. Peters.\n\n"
|
||||||
|
"Compilation: " __DATE__ " at " __TIME__ "\nVersion: %f\n\n", global.gamename, version());
|
||||||
|
}
|
||||||
|
else if (strcmp(argv[i]+2, "color")==0) {
|
||||||
|
/* force the editor to have colors */
|
||||||
|
force_color = 1;
|
||||||
|
}
|
||||||
|
else if (strcmp(argv[i]+2, "help")==0) {
|
||||||
|
return usage(argv[0], NULL);
|
||||||
|
}
|
||||||
|
else if (strcmp(argv[i]+2, "tests")==0) {
|
||||||
|
run_tests = 1;
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
return usage(argv[0], argv[i]);
|
||||||
|
}
|
||||||
|
} else switch(argv[i][1]) {
|
||||||
|
case 'C':
|
||||||
|
entry_point = NULL;
|
||||||
|
break;
|
||||||
|
case 'e':
|
||||||
|
entry_point = argv[++i];
|
||||||
|
break;
|
||||||
|
case 't':
|
||||||
|
turn = atoi(argv[++i]);
|
||||||
|
break;
|
||||||
|
case 'q':
|
||||||
|
verbosity = 0;
|
||||||
|
break;
|
||||||
|
case 'v':
|
||||||
|
verbosity = atoi(argv[++i]);
|
||||||
|
break;
|
||||||
|
case 'h':
|
||||||
|
usage(argv[0], NULL);
|
||||||
|
return 1;
|
||||||
|
default:
|
||||||
|
*exitcode = -1;
|
||||||
|
usage(argv[0], argv[i]);
|
||||||
|
return 1;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if (run_tests) {
|
||||||
|
*exitcode = RunAllTests();
|
||||||
|
return 1;
|
||||||
|
}
|
||||||
|
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
void locale_init(void)
|
||||||
|
{
|
||||||
|
setlocale(LC_CTYPE, "");
|
||||||
|
setlocale(LC_NUMERIC, "C");
|
||||||
|
assert(towlower(0xC4)==0xE4); /* Ä => ä */
|
||||||
|
}
|
||||||
|
|
||||||
|
int main(int argc, char ** argv)
|
||||||
|
{
|
||||||
|
int err, result = 0;
|
||||||
|
|
||||||
|
parse_config(inifile);
|
||||||
|
|
||||||
|
log_open("eressea.log");
|
||||||
|
locale_init();
|
||||||
|
|
||||||
|
err = parse_args(argc, argv, &result);
|
||||||
|
if (err) {
|
||||||
|
return result;
|
||||||
|
}
|
||||||
|
|
||||||
|
err = eressea_init();
|
||||||
|
if (err) {
|
||||||
|
log_error(("initialization failed with code %d\n", err));
|
||||||
|
return err;
|
||||||
|
}
|
||||||
|
|
||||||
|
err = eressea_run(luafile, entry_point);
|
||||||
|
if (err) {
|
||||||
|
log_error(("server execution failed with code %d\n", err));
|
||||||
|
return err;
|
||||||
|
}
|
||||||
|
|
||||||
|
eressea_done();
|
||||||
|
log_close();
|
||||||
|
return 0;
|
||||||
|
}
|
|
@ -0,0 +1,3 @@
|
||||||
|
#include "stdafx.h"
|
||||||
|
#include "main.c"
|
||||||
|
#include "tests.c"
|
Loading…
Reference in New Issue