Author: elias
Date: Sun Apr 27 22:28:24 2008
New Revision: 26178
URL: http://svn.gna.org/viewcvs/wesnoth?rev=26178&view=rev
Log:
wmlunits: display attacks also in the overview tree
Modified:
trunk/data/tools/wmlunits
Modified: trunk/data/tools/wmlunits
URL:
http://svn.gna.org/viewcvs/wesnoth/trunk/data/tools/wmlunits?rev=26178&r1=26177&r2=26178&view=diff
==============================================================================
--- trunk/data/tools/wmlunits (original)
+++ trunk/data/tools/wmlunits Sun Apr 27 22:28:24 2008
@@ -356,7 +356,6 @@
xp = self.wesnoth.get_unit_value(u, "experience")
level = self.wesnoth.get_unit_value(u, "level")
-
write("<div class=\"l\">L%s</div>" % level)
link = "../%s/%s.html" % (self.isocode, uid)
write("<a href=\"%s\">%s</a><br/>" % (link, name))
@@ -375,6 +374,33 @@
self.get_translation("wesnoth", "MP: "), mp))
write("%s%s<br />" % (
self.get_translation("wesnoth", "XP: "), xp))
+
+ write("\n<div style=\"clear:both\">")
+ # Write info about attacks.
+ for attack in u.get_all("attack"):
+ t = attack.get_text_val("type")
+ write("%s " % self.get_translation("wesnoth", t))
+
+ n = attack.get_text_val("number")
+ x = attack.get_text_val("damage")
+ x = "%s - %s" % (x, n)
+ write("%s " % x)
+
+ r = attack.get_text_val("range")
+ write("%s" % self.get_translation("wesnoth", r))
+
+ s = []
+ specials = attack.get_first("specials")
+ if specials:
+ for special in specials.children():
+ sname = special.get_text_val("name")
+ if sname:
+ s.append(sname)
+ s = ", ".join(s)
+ write(" (%s)" % s)
+ write("<br />")
+ write("</div>")
+
write("</div>")
write("</td>\n")
else:
_______________________________________________
Wesnoth-commits mailing list
[email protected]
https://mail.gna.org/listinfo/wesnoth-commits