Commit graph

63 commits

Author SHA1 Message Date
Enno Rehling
533c267b9a Fixed a bug where a missing resource in E3 would crash the server 2012-06-02 12:49:48 -07:00
Enno Rehling
db094810fd removing quicklist, importing it from a submodule 2012-05-30 19:55:17 -07:00
Enno Rehling
6e106c9fc0 out with the old critbit code, in with the new (submodule) 2012-05-30 19:43:11 -07:00
Enno Rehling
9f2e1d475b Moving some things around in the external directory.
I am deliberately breaking the VS2010 projects with this.
I am probably breaking the Eressea server.
2012-05-30 19:17:08 -07:00
Enno Rehling
3e67e7fb4e Lua unit:cast_spell should only cast spells the unit knows.
do not allow payment for spells cast at level <= 0
2012-05-29 20:58:33 -07:00
Enno Rehling
5e26d246a2 more Lua functions using the wrong stack index. 2012-05-29 20:13:54 -07:00
Enno Rehling
cb0e406733 repair lua spells (bad stack index)
add a whole bunch more spell tests
allow spell tests to disable fumbles
2012-05-29 18:45:50 -07:00
Enno Rehling
347ff0dd77 snprintf is evil and dangerous. 2012-05-29 12:17:25 -07:00
Enno Rehling
707262c61d fix region owner when a building transfers 2012-05-26 10:43:05 -07:00
Enno Rehling
998549e687 mages have spellbooks now 2012-05-26 08:20:26 -07:00
Enno Rehling
a015d72add unit_add_spell gets a level
added a test that fails for get_spellfromtoken if spell is not stored with the unit
2012-05-25 21:07:26 -07:00
Enno Rehling
d58e853074 allow setting a faction's magic school from Lua 2012-05-25 20:15:57 -07:00
Enno Rehling
071f67ea7c use the reportpath from the config file, do not build your own 2012-05-25 18:50:14 -07:00
Enno Rehling
ae9f12c904 added a test for pay_spell so I don't break it. 2012-05-25 12:46:00 -07:00
Enno Rehling
6417f55ec6 specify levels with magic attacks (step one to removing spell->level) 2012-05-24 10:24:37 -07:00
Enno Rehling
3514218dba factions have working spellbooks
update of spellbooks for E3 should be functional
old data file is getting read, and levels guessed?
2012-05-24 00:56:54 -07:00
Enno Rehling
92e96689bb spellbooks fully operational (and could be loaded from XML definitions if I had them)
fixed the cleanup between tests to properly free locales
2012-05-23 20:22:12 -07:00
Enno Rehling
31e4a8432b fix find_spell and create_spell to only create each spell once.
kill register_spell
make some critbit changes (need to transfer them upstream)
2012-05-22 18:44:54 -07:00
Enno Rehling
08adc91534 gcc 4.6 is a lot more picky about unused variables, so I shall appease it. 2012-05-20 00:16:12 -07:00
Enno Rehling
775e8edae1 as much as possible, replace the UFL_OWNER flag with checking the owner the canonical way. 2012-05-17 16:40:50 -07:00
Enno Rehling
ff33af3c65 ship and building owners encapsulated in accessors
tests added
2012-05-17 15:23:15 -07:00
Enno Rehling
d12fe2dbed begin making shipowner use ship->owner.
fix a broken test caused by locale_string returning null.
2012-05-17 00:13:30 -07:00
Enno Rehling
ecbe770fce rename _log_error to log_error and get rid of the cumbersome #define 2012-05-16 16:52:01 -07:00
Enno Rehling
14d62afb0d rename _log_warn to log_warning and get rid of the cumbersome #define 2012-05-16 15:52:37 -07:00
Enno Rehling
53b9de957c putting the crit-bit tree to use. finding special region resources is faster this way than doing individual strcmp calls. 2012-05-14 16:36:17 -07:00
Enno Rehling
67ef4c52a3 combat spell functions have the same interface as spells now. 2012-05-09 18:28:33 -07:00
Enno Rehling
06e0d2b3b6 cleaning up castorder, unifying access to target region and caster. 2012-05-09 14:16:41 -07:00
Enno Rehling
02559f6869 refactoring castorder, because it's a bit of a mess of units, fighters, familliars and casters. 2012-05-09 13:46:10 -07:00
Enno Rehling
c10e2552ad get_spellfromtoken needs a mage, not any unit. 2012-05-09 13:06:16 -07:00
Enno Rehling
c22f49ec36 replace spellid_t with unsigned int
fix finding spells by token
make magic_t an enum
2012-05-09 03:14:54 -07:00
Enno Rehling
e01c6bb8b1 make merge request sing with Eressea
added a missing file (move_test.c)
changing the way tests are included
making some lua code prettier (too many parens)
2011-03-08 21:06:38 -08:00
Enno Rehling
8714957a61 fixed two bugs: harbours were not unique and multiple instances of unique buildings could still be built 2011-03-09 00:28:37 +01:00
Enno Rehling
b4c5607747 compiling with -pedantic on linux 2011-03-08 08:44:20 +01:00
Enno Rehling
496aa22e65 fixes for -ansi -pedantic 2011-03-07 17:29:19 +01:00
Enno Rehling
78b7dcd727 more indentation cleanup 2011-03-06 23:40:55 -08:00
Enno Rehling
791e4cd673 fix CRLF massacre 2011-03-07 08:35:23 +01:00
Enno Rehling
610c6799ea fix CRLF massacre 2011-03-07 08:31:59 +01:00
Enno Rehling
9c8779b303 indentation rules, slightly updated 2011-03-07 08:24:52 +01:00
Enno Rehling
9f539b8c12 CRLF confusion? 2011-03-06 23:07:04 -08:00
Enno Rehling
fb7a642d47 indentation rules, strictly applied 2011-03-07 08:02:35 +01:00
Enno Rehling
1be42e9d50 Make all tests for Eressea pass again, using the config module. 2011-03-06 21:49:01 -08:00
Enno Rehling
fb94908014 export resources and shiptypes as part of configuration. 2011-03-06 21:12:55 -08:00
Enno Rehling
b0f1445d68 removed all unused items 2011-03-04 20:44:30 +01:00
Enno Rehling
ca2556c618 fix a segmentation fault when file cannot be opened 2011-02-26 23:52:28 -08:00
Enno Rehling
cc9e95a2ab spells.lua is a bad file for example and meropis, it tests things that not every game has.
lua_pushinteger() must be new, I've never used it before.
all tests in meropis and example pass.
2011-02-26 23:21:12 -08:00
Enno Rehling
665d4aec4d Test framework broken, we were adding the wrong spell with the right name. 2011-02-26 10:07:49 -08:00
Enno Rehling
2e67e9c290 gcc wants us to define this struct, and that's correct 2011-02-26 09:33:20 +01:00
Enno Rehling
b2d6203cec 1. spell_list was pretty much used everywhere in the code, and is now also a quicklist.
2. Cleaned up the bindings for quicklist to Lua.
2011-02-26 00:26:14 -08:00
Enno Rehling
5497875c93 Funny. It turns out that building_list is totally not a thing and never was. 2011-02-25 07:41:51 -08:00
Enno Rehling
efca8cee43 The list of alliance members is now also a quicklist, and the lua binding for faction_list iteration can disappear. 2011-02-25 07:23:02 -08:00