From 96062f6f85e72805d1381a780d75791f6e24c608 Mon Sep 17 00:00:00 2001 From: Enno Rehling Date: Sat, 17 Feb 2018 10:45:56 +0100 Subject: [PATCH] rename p2->lifepotion (WdL) --- conf/e2/rules.xml | 2 +- res/core/common/potions.xml | 2 +- res/core/de/strings.xml | 4 ++-- res/core/en/strings.xml | 2 +- res/core/fr/strings.xml | 2 +- res/core/spells.xml | 2 +- res/e3a/items.xml | 2 +- res/e3a/strings.xml | 2 +- res/eressea/spells.xml | 14 +++++++------- scripts/eressea/spells.lua | 2 +- scripts/tests/e3/rules.lua | 6 +++--- src/items.c | 4 +--- src/kernel/item.c | 5 +++-- 13 files changed, 24 insertions(+), 25 deletions(-) diff --git a/conf/e2/rules.xml b/conf/e2/rules.xml index 9e40910e0..002c34960 100644 --- a/conf/e2/rules.xml +++ b/conf/e2/rules.xml @@ -15,7 +15,7 @@ - + diff --git a/res/core/common/potions.xml b/res/core/common/potions.xml index bb4556eb7..ab2b8c951 100644 --- a/res/core/common/potions.xml +++ b/res/core/common/potions.xml @@ -34,7 +34,7 @@ - + diff --git a/res/core/de/strings.xml b/res/core/de/strings.xml index 896a7e009..28e524b38 100644 --- a/res/core/de/strings.xml +++ b/res/core/de/strings.xml @@ -1863,7 +1863,7 @@ Goliathwasser - + Wasser des Lebens @@ -3592,7 +3592,7 @@ 'First roast the Gurgelkraut quickly and add some Fjordwuchs to spice it up. Let it all boil slowly until almost all liquid has evaporated. Leave the mash overnight and finally squeeze it the next morning until a thick fluid drips out.' The liquid thus produced, 'Goliath Water' as we call it, is enough for 10 men and gives each man the carrying capacity of a horse for one week. Zuerst brate man das Gurgelkraut leicht an und würze das Zeug mit ein wenig Fjordwuchs. Man lasse alles so lange kochen, bis fast alle Flüssigkeit verdampft ist. Diesen Brei stelle man über Nacht raus. Am nächsten Morgen presse man den Brei aus. Die so gewonnene Flüssigkeit, Goliathwasser genannt, verleiht bis zu zehn Männern die Tragkraft eines Pferdes. - + The "Water of Life" allows living trees to be created from logs. A Knotroot and Elvendear are heated until one can just still keep one's finger in. This is then poured into a jar and allowed to cool slowly. The extract is sufficient for 10 pieces of wood. Das 'Wasser des Lebens' ist in der Lage, aus gefällten Baumstämmen wieder lebende Bäume zu machen. Dazu wird ein knotiger Saugwurz zusammen mit einem Elfenlieb erwärmt, so dass man gerade noch den Finger reinhalten kann. Dies gieße man in ein Gefäß und lasse es langsam abkühlen. Der Extrakt reicht für 10 Holzstämme. diff --git a/res/core/en/strings.xml b/res/core/en/strings.xml index f818a3931..5324b165d 100644 --- a/res/core/en/strings.xml +++ b/res/core/en/strings.xml @@ -1078,7 +1078,7 @@ goliath waters - + water of life diff --git a/res/core/fr/strings.xml b/res/core/fr/strings.xml index 13e6beb25..f81b5fc96 100644 --- a/res/core/fr/strings.xml +++ b/res/core/fr/strings.xml @@ -1085,7 +1085,7 @@ breuvage de Goliath - + élixir de vie diff --git a/res/core/spells.xml b/res/core/spells.xml index c4df3e429..fba087855 100644 --- a/res/core/spells.xml +++ b/res/core/spells.xml @@ -39,7 +39,7 @@ - + diff --git a/res/e3a/items.xml b/res/e3a/items.xml index 1d403cfb4..8f84796be 100644 --- a/res/e3a/items.xml +++ b/res/e3a/items.xml @@ -66,7 +66,7 @@ - + diff --git a/res/e3a/strings.xml b/res/e3a/strings.xml index 2dd79abb6..f68720e6a 100644 --- a/res/e3a/strings.xml +++ b/res/e3a/strings.xml @@ -284,7 +284,7 @@ - + The "Water of Life" allows living trees to be created from logs. A Knotroot and Elvendear are heated until one can just still keep one's finger in. This is then poured into a jar and allowed to cool slowly. The extract is sufficient for five trees to be grown from logs. Das 'Wasser des Lebens' ist in der Lage, aus gefällten Baumstämmen wieder lebende Bäume zu machen. Dazu wird ein knotiger Saugwurz zusammen mit einem Elfenlieb erwärmt, so dass man gerade noch den Finger reinhalten kann. Dies gieße man in ein Gefäß und lasse es langsam abkühlen. Der Extrakt reicht um aus fünf Holzstämmen neue Bäume wachsen zu lassen. diff --git a/res/eressea/spells.xml b/res/eressea/spells.xml index 089ec1a6c..7680f2f3b 100644 --- a/res/eressea/spells.xml +++ b/res/eressea/spells.xml @@ -32,7 +32,7 @@ - + @@ -101,12 +101,12 @@ - + - + @@ -433,7 +433,7 @@ - + @@ -455,7 +455,7 @@ - + @@ -466,7 +466,7 @@ - + @@ -515,7 +515,7 @@ - + diff --git a/scripts/eressea/spells.lua b/scripts/eressea/spells.lua index 5e04c4ed1..5f1507d41 100644 --- a/scripts/eressea/spells.lua +++ b/scripts/eressea/spells.lua @@ -26,7 +26,7 @@ end -- Wasser des Lebens function create_potion_p2(r, mage, level, force) - return create_potion(mage, level, "p2", force) + return create_potion(mage, level, "lifepotion", force) end -- Siebenmeilentee diff --git a/scripts/tests/e3/rules.lua b/scripts/tests/e3/rules.lua index 0888aa0b9..5120fb747 100644 --- a/scripts/tests/e3/rules.lua +++ b/scripts/tests/e3/rules.lua @@ -783,12 +783,12 @@ function test_p2() r:set_resource("tree", 0) u:clear_orders() u:add_order("BENUTZE 'Wasser des Lebens'") - u:add_item("p2", 1) + u:add_item("lifepotion", 1) u:add_item("log", 10) u:add_item("mallorn", 10) process_orders() assert_equal(5, r:get_resource("tree")) - assert_equal(0, u:get_item("p2")) + assert_equal(0, u:get_item("lifepotion")) assert_equal(15, u:get_item("log") + u:get_item("mallorn")) end @@ -803,7 +803,7 @@ function test_p2_move() u:add_order("BENUTZE 'Wasser des Lebens'") u:add_order("NACH OST") u:add_item("horse", 1) - u:add_item("p2", 1) + u:add_item("lifepotion", 1) u:add_item("log", 1) u:add_item("mallorn", 1) process_orders() diff --git a/src/items.c b/src/items.c index 5986675c6..5132b31cb 100644 --- a/src/items.c +++ b/src/items.c @@ -416,7 +416,7 @@ static int use_water_of_life(unit *u, const item_type *itype, void register_itemfunctions(void) { /* have tests: */ - register_item_use(use_water_of_life, "use_p2"); + register_item_use(use_water_of_life, "use_lifepotion"); register_item_use(use_mistletoe, "use_mistletoe"); register_item_use(use_tacticcrystal, "use_dreameye"); register_item_use(use_studypotion, "use_studypotion"); @@ -430,6 +430,4 @@ void register_itemfunctions(void) register_item_use(use_potion, "use_ointment"); register_item_use(use_potion, "use_p14"); register_item_use(use_warmthpotion, "use_nestwarmth"); - /* p2 = P_LIFE = Wasser des Lebens */ - register_item_use(use_potion, "use_p2"); } diff --git a/src/kernel/item.c b/src/kernel/item.c index 74951895a..db551bed3 100644 --- a/src/kernel/item.c +++ b/src/kernel/item.c @@ -208,6 +208,7 @@ static const char *it_aliases[][2] = { { "Runenschwert", "runesword" }, { "p12", "truthpotion" }, { "p1", "goliathwater" }, + { "p2", "lifepotion" }, { "p4", "ointment" }, { "p5", "peasantblood" }, { "p8", "nestwarmth" }, @@ -555,7 +556,7 @@ static const char *resourcenames[MAX_RESOURCES] = { "laen", "fairyboot", "aoc", "pegasus", "elvenhorse", "charger", "dolphin", "roqf", "trollbelt", "aurafocus", "sphereofinv", "magicbag", - "magicherbbag", "dreameye", "p2" + "magicherbbag", "dreameye", "lifepotion" }; const resource_type *get_resourcetype(resource_t type) { @@ -636,7 +637,7 @@ struct order *), const char *name) static void init_oldpotions(void) { const char *potionnames[MAX_POTIONS] = { - "p0", "goliathwater", "p2", "p3", "ointment", "peasantblood", "p6", + "p0", "goliathwater", "lifepotion", "p3", "ointment", "peasantblood", "p6", "p7", "nestwarmth", "p9", "p10", "p11", "truthpotion", "p13", "p14" }; int p;