From aeeb13bb53becc7d1e25cd65ff1615dc782fbe01 Mon Sep 17 00:00:00 2001 From: Enno Rehling Date: Sun, 9 Apr 2017 13:35:55 +0200 Subject: [PATCH] BUG 2318: Go, Ponnuki, Go! https://bugs.eressea.de/view.php?id=2318 --- scripts/eressea/ponnuki.lua | 23 ++++++++++++++++------- src/kernel/config.c | 2 +- 2 files changed, 17 insertions(+), 8 deletions(-) diff --git a/scripts/eressea/ponnuki.lua b/scripts/eressea/ponnuki.lua index 96bb0b5f1..29f882ab5 100644 --- a/scripts/eressea/ponnuki.lua +++ b/scripts/eressea/ponnuki.lua @@ -14,8 +14,10 @@ local function ponnuki_brain(u) u:add_notice("Eine Botschaft von " .. tostring(u) .. ": " ..jokes[i]) local d = math.random(6) local r = u.region:next(d-1) - u:clear_orders() - u:add_order("NACH " .. directions[d]) + if r.terrain == 'glacier' then + u:clear_orders() + u:add_order("NACH " .. directions[d]) + end end function ponnuki.init() @@ -26,11 +28,18 @@ function ponnuki.init() local home = get_region(-67, -5) local f = get_faction(666) if home and f then - u = unit.create(f, home, 1, "illusion") - u.id = atoi36("ponn") - u.name = "Ponnuki" - u.info = "Go, Ponnuki, Go!" - u:set_racename("Ritter von Go") + if home.terrain~="glacier" then + home.terrain="glacier" + home.name = 'Magrathea' + end + u = unit.create(f, home, 1, "template") + if u then + u.id = atoi36("ponn") + u.name = "Ponnuki" + u.info = "Go, Ponnuki, Go!" + u.race_name = "Ritter von Go" + print(u:show()) + end else eressea.log.error("Ponnuki cannot find Magrathea") end diff --git a/src/kernel/config.c b/src/kernel/config.c index 4b3ab5a91..1d005c9c1 100644 --- a/src/kernel/config.c +++ b/src/kernel/config.c @@ -121,7 +121,7 @@ const char *parameters[MAXPARAMS] = { "TEMP", "FLIEHE", "GEBAEUDE", - "GIB", /* F�r HELFE */ + "GIB", /* HELFE GIB */ "KAEMPFE", "DURCHREISE", "BEWACHE",