changeset 1307:351fafb5e1fb

Fix handling of water lilies.
author Matti Hamalainen <ccr@tnsp.org>
date Mon, 31 Jan 2011 03:25:50 +0200
parents 0377397445ef
children 7249a3babbb3
files gm-alchemist.tf
diffstat 1 files changed, 4 insertions(+), 3 deletions(-) [+]
line wrap: on
line diff
--- a/gm-alchemist.tf	Mon Jan 31 03:07:14 2011 +0200
+++ b/gm-alchemist.tf	Mon Jan 31 03:25:50 2011 +0200
@@ -90,7 +90,7 @@
 
 /def -i galch_herb_fixes =\
 	/if (regmatch("^vine|^seed", {1})) /return "vine_seed"%;\
-	/elseif (regmatch("lily", {1})) /return "lily"%;\
+	/elseif (regmatch("lily", {1})) /return "water_lily"%;\
 	/elseif (regmatch("mushroom", {1})) /return "mushroom"%;\
 	/else /return {1}%;/endif
 
@@ -295,13 +295,14 @@
 	/else \
 		/let _count=%;\
 	/endif%;\
-	/let _item=$[galch_herb_fixes({*})]%;\
+	/let _itemcnt=$[galch_herb_fixes({*})]%;\
+	/let _item=$[replace("_"," ",_itemcnt)]%;\
 	/if (_count!~"")\
 		/let _tgt=%{_count} %{_item}%;\
 	/else \
 		/let _tgt=%{_item}%;\
 	/endif%;\
-	/let _cont=$(/galch_get_item %{_item} %{galch_jars})%;\
+	/let _cont=$(/galch_get_item %{_itemcnt} %{galch_jars})%;\
 	/if (_cont!~"")\
 		@@%{_cmd} %{_tgt} %{_arg} %{_cont}%;\
 	/else \