Commit Graph

36 Commits

Author SHA1 Message Date
Enno Rehling a9a0455207 reorganized directory structure.
flattening the directory structure, moving some modules to the src/ directory.
making stealth a separate file, under test.
more tests for some stuff.
2014-08-27 06:40:35 +02:00
Enno Rehling 808f343e34 make getstrtoken() return null at EOL, kill init_tokens.
init_order all the things!
added a bunch of new assertions to cover for oversights.
added some new tests for order parsing.
2014-08-23 09:17:58 +02:00
Enno Rehling 61ebd1d6b7 fix accidental assignment instead of comparison. 2014-08-14 20:08:29 +02:00
Enno Rehling fa0c999d3e Merge branch 'Bug-1525-and-1872' of github.com:CTD1/eressea-server-bugfixing into CTD1-Bug-1525-and-1872 2014-08-14 20:06:14 +02:00
Enno Rehling 158d4f8d4b MSVC: compile cleanly with level 4 warnings 2014-08-14 19:39:45 +02:00
CTD 7dd86959a9 Bewegung durch Region blockieren
Etwas größerer Umbau. Befreundete Wachen erlauben nicht mehr automatisch
die Durchreise.  Es werden sowohl die Befreundeten als auch die
Feindlichen Bewacher in der Region gezählt, und die Differenz mit
rules.guard.guard_number_stop_prob multipliziert. Bei 700 Feindlichen
und keinen freundlichen Wachen ist die Chance dann 100%. Bei 100
Feindlichen und 400 freundlichen ist sie 0.
Zusätzlich gibt rules.guard.castle_stop_prob 10% pro Burgenlevel für den
Burgenbesitzer.
rules.guard.region_type_stop_prob gibt 10% für Regionen mit weniger
Begehbaren Pfaden (Berge und Vulkane) und das doppelte für sehr schwer
passierbare Regionen (Sümpfe und Gletscher).

Für Spiele mit Wahrnehmung (E2) sollten die Werte für:
rules.guard.skill_stop_prob
rules.guard.castle_stop_prob
rules.guard.region_type_stop_prob

auf 5% Angepasst werden.
2014-08-14 12:37:59 +02:00
Enno Rehling 45a16681c4 logic fix for FOLLOW (if we are not following a ship, and cannot see the target unit, then exit). 2014-08-08 18:18:17 +02:00
Enno Rehling 8dd4b783b1 fix gcc error 2014-08-08 01:26:35 +02:00
Enno Rehling 3767957caa indentation + whitespace changes 2014-08-08 01:24:12 +02:00
Enno Rehling 1918f56990 indentation + whitespace changes 2014-08-08 01:16:35 +02:00
CTD bf4bda36a2 Bug 1610 FOLGE SCHIFF und andere lange Befehle
FOLGE SCHIFF ist genau wie FOLGE EINHEIT jetzt ein Halblanger Befehl.
Das ist konsequent und entfernt an einigen Stellen Spezialbehandlungen.
2014-08-08 01:14:58 +02:00
CTD f33de38812 Piraterie repariert
Die Piraten sind oftmals einfach in ein falsches (leeres) Ozeanfeld
gesegelt, wenn es irgendwo ein Opfer gab.
2014-08-08 01:14:57 +02:00
CTD 549a4fbe5b Bug 1857 abtreiben trotz leuchtturmüberwachung e2
Leuchttürme verhindern nicht das Abtreiben sondern reduzieren nur die
Chance auf 1/3.
Das ist für Automatisierung schlecht, daher Reduzieren Leuchttürme das
Abtreiben jetzt auf 0.
Für E4 oder zukünftige Spiele habe ich das auch gleich konfigurierbar
gemacht.
rules.lighthous.stormchancedevisor gibt den Wert an durch den die
Sturmchance geteilt wird, 0 = kein Abtreiben wenn Leuchtturm in
Reichweite.
2014-08-08 01:14:55 +02:00
Enno Rehling 13ba2b8362 Merge pull request #24 from CTD1/Bug-1610
Bug 1610 FOLGE SCHIFF und andere lange Befehle
2014-08-08 01:11:31 +02:00
Enno Rehling 1470b56253 Merge pull request #23 from CTD1/Piraterie
Piraterie repariert
2014-08-08 01:06:49 +02:00
CTD c49c3af1d9 Bug 1610 FOLGE SCHIFF und andere lange Befehle
FOLGE SCHIFF ist genau wie FOLGE EINHEIT jetzt ein Halblanger Befehl.
Das ist konsequent und entfernt an einigen Stellen Spezialbehandlungen.
2014-08-07 18:53:29 +02:00
CTD 7ac56b3fbf Piraterie repariert
Die Piraten sind oftmals einfach in ein falsches (leeres) Ozeanfeld
gesegelt, wenn es irgendwo ein Opfer gab.
2014-08-07 16:02:47 +02:00
CTD 37e0226e5b Bug 1857 abtreiben trotz leuchtturmüberwachung e2
Leuchttürme verhindern nicht das Abtreiben sondern reduzieren nur die
Chance auf 1/3.
Das ist für Automatisierung schlecht, daher Reduzieren Leuchttürme das
Abtreiben jetzt auf 0.
Für E4 oder zukünftige Spiele habe ich das auch gleich konfigurierbar
gemacht.
rules.lighthous.stormchancedevisor gibt den Wert an durch den die
Sturmchance geteilt wird, 0 = kein Abtreiben wenn Leuchtturm in
Reichweite.
2014-08-07 14:04:03 +02:00
Enno Rehling c3dfbdea18 eliminate new_race array in favor of a function (TODO: make it fast) 2014-06-29 18:10:02 -07:00
Enno Rehling 7249630e3c Eliminate some Visual Studio warnings, rename itemnames->resourcenames. 2014-06-29 15:41:04 -07:00
Enno Rehling 92f43a7b51 eliminate it_find calls, replace it_find with something backed by rt_find 2014-06-24 22:44:05 -07:00
Enno Rehling d581737744 optimization: caching resource types in get_resourcetype.
eliminate some it_find calls.
eliminate static variables, they make testing hard.
2014-06-24 07:42:45 -07:00
Enno Rehling 7adb8498aa Merge branch 'fix_block_movement' of github.com:stm2/server into stm2-fix_block_movement
Conflicts:
	scripts/tests/eressea.lua
	src/kernel/move.c
2014-06-23 20:34:07 -07:00
Enno Rehling 73da14e305 getting rid of the olditemtypes[] array
reduce use of statics
reduce use of item_t enum
2014-06-23 07:28:10 -07:00
Enno Rehling 3625ba6a95 remove static variables optimizations, they create global state that is bad for testing 2014-06-17 23:10:55 -07:00
Enno Rehling 8166519d30 add a list of valid coasts to ship definition in JSON.
fix endless loop in error-line counting.
2014-06-17 21:33:42 -07:00
Enno Rehling 0675c50c7f keyword lookup macro 2014-06-16 23:05:39 -07:00
Enno Rehling 33928568cf finally have all the scaffolding to write a test with ships.
configure terrain flags from json.
ships are always allowed to enter SEA regions.
2014-06-16 22:19:19 -07:00
Enno Rehling c8dc6be6f2 rename get_keyword, because something else should have that name. 2014-06-16 07:19:22 -07:00
Enno Rehling 64e0c221ec directions can now be read from json configuration.
rename a couple of functions for more consistency across modules.
2014-06-15 22:17:08 -07:00
Enno Rehling a9f0538d8e keyword_t and direction_t are moving into their own module.
direction parser gets new initialization function, for use in jsonconf later.
add unit tests for directions.
2014-06-15 18:34:39 -07:00
Enno Rehling 3c4b6b9dd4 rename message.[hc] to messages.[hc] in kernel because of naming conflict with util/
begin json config files (WIP)
2014-06-09 09:56:49 -07:00
Steffen Mecke dc3eea0c70 take best unit and count amulet at most once for guards blocking movement 2014-06-04 11:04:17 +02:00
Enno Rehling 0ae8737062 rename MIN/MAX to _min/_max 2014-03-16 05:03:17 +01:00
Enno Rehling 1a7d892a96 use cmake for autoconf, slim down platform.h 2014-03-15 19:29:11 +01:00
Enno Rehling 03c247c788 I am killing the core/ directory.
Lots of files are moving to a new location in src/
Some intersting CMake changes.
2014-02-18 05:45:00 +01:00
Renamed from core/src/kernel/move.c (Browse further)