From 402fbb24e5cf80574c2f57910e0964b85f22b820 Mon Sep 17 00:00:00 2001 From: Enno Rehling Date: Sat, 26 Nov 2005 11:03:44 +0000 Subject: [PATCH] - spawning new dragons and undead is now optional (lua function) - battle-effect on peasants is configurable (by XML param) --- src/eressea/lua/eressea.cpp | 4 +++- src/res/kingdoms.xml | 2 ++ src/scripts/default.lua | 9 +++++++++ src/scripts/eressea.lua | 6 ++++++ src/scripts/kingdoms-run.lua | 1 - src/scripts/wdw-run.lua | 7 +++++++ 6 files changed, 27 insertions(+), 2 deletions(-) diff --git a/src/eressea/lua/eressea.cpp b/src/eressea/lua/eressea.cpp index 46a844d64..070903f5a 100644 --- a/src/eressea/lua/eressea.cpp +++ b/src/eressea/lua/eressea.cpp @@ -292,8 +292,10 @@ bind_eressea(lua_State * L) /* scripted monsters */ def("plan_monsters", &lua_planmonsters), - def("spawn_braineaters", &spawn_braineaters), def("set_brain", &race_setscript), + def("spawn_braineaters", &spawn_braineaters), + def("spawn_undead", &spawn_undead), + def("spawn_dragons", &spawn_dragons), /* map making */ def("autoseed", lua_autoseed), diff --git a/src/res/kingdoms.xml b/src/res/kingdoms.xml index 2adfdb5c8..790e5a2bc 100644 --- a/src/res/kingdoms.xml +++ b/src/res/kingdoms.xml @@ -96,6 +96,8 @@ + + diff --git a/src/scripts/default.lua b/src/scripts/default.lua index 6455e02bf..f91fbc4a9 100644 --- a/src/scripts/default.lua +++ b/src/scripts/default.lua @@ -43,9 +43,18 @@ function process(orders) -- run the turn: read_orders(orders) + -- create new monsters: + spawn_dragons() + spawn_undead() spawn_braineaters(0.25) + plan_monsters() process_orders() + + -- post-turn updates: + update_guards() + update_scores() + -- use newfactions file to place out new players autoseed(basepath .. "/newfactions", true) diff --git a/src/scripts/eressea.lua b/src/scripts/eressea.lua index adc5c9324..1e2429c4a 100644 --- a/src/scripts/eressea.lua +++ b/src/scripts/eressea.lua @@ -78,9 +78,15 @@ function process(orders) end run_scripts() + -- create new monsters: + spawn_dragons() + spawn_undead() spawn_braineaters(0.25) + plan_monsters() process_orders() + + -- post-turn updates: update_guards() update_scores() diff --git a/src/scripts/kingdoms-run.lua b/src/scripts/kingdoms-run.lua index dba313716..b54c096e3 100644 --- a/src/scripts/kingdoms-run.lua +++ b/src/scripts/kingdoms-run.lua @@ -58,7 +58,6 @@ function process(orders) -- run the turn: read_orders(orders) - -- DISABLED: plan_monsters() process_orders() update_owners() diff --git a/src/scripts/wdw-run.lua b/src/scripts/wdw-run.lua index 5133422da..5ca23c0a0 100644 --- a/src/scripts/wdw-run.lua +++ b/src/scripts/wdw-run.lua @@ -15,9 +15,16 @@ function process(orders) sphinx_weekly() -- run the turn: + + -- create new monsters: + spawn_dragons() + spawn_undead() -- (no more braineaters) spawn_braineaters(0.25) + plan_monsters() process_orders() + + -- post-turn updates: update_guards() update_scores()