Phoenixkompass fuer wdw, noch ungetestet

This commit is contained in:
Christian Schlittchen 2006-01-01 15:15:41 +00:00
parent c456b8aceb
commit 29df2263c6
5 changed files with 77 additions and 0 deletions

View File

@ -11,6 +11,7 @@ SOURCES =
artrewards.c artrewards.c
demonseye.c demonseye.c
itemtypes.c itemtypes.c
phoenixcompass.c
seed.c seed.c
weapons.c weapons.c
xerewards.c xerewards.c

View File

@ -6560,4 +6560,27 @@
<text locale="en">"The plank of $ship($ship) are inscribed with strange runes. ($int36($id))"</text> <text locale="en">"The plank of $ship($ship) are inscribed with strange runes. ($int36($id))"</text>
</message> </message>
<message name="phoenixcompass_confusion" section="magic">
<type>
<arg name="unit" type="unit"/>
<arg name="region" type="region"/>
<arg name="command" type="order"/>
</type>
<text locale="de">"$unit($unit) in $region($region): '$order($command)' - Die Kompassnadel springt wild hin und her und es laesst sich keine Richtung erkennen."</text>
<text locale="en">"$unit($unit) in $region($region): '$order($command)' - The needle jumps wildly and there is no specific direction recognizable."</text>
<text locale="fr">"$unit($unit) in $region($region): '$order($command)' - The needle jumps wildly and there is no specific direction recognizable."</text>
</message>
<message name="phoenixcompass_success" section="magic">
<type>
<arg name="unit" type="unit"/>
<arg name="region" type="region"/>
<arg name="command" type="order"/>
<arg name="dir" type="int"/>
</type>
<text locale="de">"$unit($unit) in $region($region): '$order($command)' - Die Kompassnadel zeigt nach $direction($dir)."</text>
<text locale="en">"$unit($unit) in $region($region): '$order($command)' - The needle points $direction($dir)."</text>
<text locale="fr">"$unit($unit) in $region($region): '$order($command)' - The needle points $direction($dir)."</text>
</message>
</messages> </messages>

View File

@ -44,4 +44,16 @@
<item weight="0"/> <item weight="0"/>
</resource> </resource>
<resource name="trappedairelemental">
<item weight="0">
<function name="use" value="use_trappedairelemental"/>
</item>
</resource>
<resource name="phoenixcompass">
<item weight="0">
<function name="use" value="use_phoenixcompass"/>
</item>
</resource>
</resources> </resources>

View File

@ -134,4 +134,20 @@
<text locale="de">Pyramide des Thoth</text> <text locale="de">Pyramide des Thoth</text>
<text locale="en">pyramid of Thoth</text> <text locale="en">pyramid of Thoth</text>
</string> </string>
<string name="trappedairelemental">
<text locale="de">Gefangener Windgeist</text>
<text locale="en">trapped air elemental</text>
</string>
<string name="trappedairelemental_p">
<text locale="de">Gefangene Windgeister</text>
<text locale="en">trapped air elementals</text>
</string>
<string name="phoenixcompass">
<text locale="de">Phoenixkompass</text>
<text locale="en">phoenixcompass</text>
</string>
<string name="phoenixcompass_p">
<text locale="de">Phoenixkompasse</text>
<text locale="en">phoenix compasses</text>
</string>
</strings> </strings>

View File

@ -63,6 +63,31 @@ function sphinx_handler()
send_hint(u2, u) send_hint(u2, u)
end end
end end
tokens = {}
for token in string.gfind(str, "%a+") do
table.insert(tokens, token)
end
-- index starts with 1 in lua
if table.getn(tokens) == 2 and string.lower(tokens[1]) == "antwort" then
if string.lower(tokens[2]) == "insekt" then
-- Botschaft in alle Regionen
local m = message("msg_event")
m:set_string("string", "Das Rätsel der Sphinx ist gelöst! Die Sphinx wird sich eine neue Heimat und ein neues Rätsel suchen.")
for r in regions() do
m:send_region(r)
end
-- Region terraformen
terraform(u2.region.x, u.region.y, "plain")
u2.region.set_resource(u2.region, "tree", 721)
u2.region.set_resource(u2.region, "peasant", 2312)
u2.add_item(u2, "trappedairelemental", 5)
-- Neues Raetsel fuer beide Sphinxe!
-- Sphinx neu platzieren
-- Hint-Attribute von allen Allianzen loeschen
else
end
end
end end
local f = get_faction(atoi36("ycx9")) local f = get_faction(atoi36("ycx9"))