Pokedex: Semicolon before stat total.
[zzz-dywypi.git] / plugins / Pokedex / plugin.py
index 13ce031..a1ebccb 100644 (file)
@@ -172,7 +172,7 @@ class Pokedex(callbacks.Plugin):
                 get_stat_color(stat_total / 6),
                 stat_total,
             )
-            stats = """{0} HP, {1}/{2} phys, {3}/{4} spec, {5} speed, {total} total""" \
+            stats = """{0} HP, {1}/{2} phys, {3}/{4} spec, {5} speed; {total} total""" \
                 .format(*colored_stats, total=colored_stat_total)
             self._reply(irc, reply_template.format(
                 id=obj.national_id,
@@ -258,9 +258,10 @@ class Pokedex(callbacks.Plugin):
         elif isinstance(obj, tables.Item):
             reply_template = \
                 u"""{name}, an item.  """ \
-                """http://veekun.com/dex/items/{link_name}"""
+                """http://veekun.com/dex/items/{link_pocket}/{link_name}"""
             self._reply(irc, reply_template.format(
                 name=obj.name,
+                link_pocket=urllib.quote(obj.pocket.name.lower().encode('utf8')),
                 link_name=urllib.quote(obj.name.lower().encode('utf8')),
                 )
             )
@@ -271,7 +272,20 @@ class Pokedex(callbacks.Plugin):
                 """http://veekun.com/dex/abilities/{link_name}"""
             self._reply(irc, reply_template.format(
                 name=obj.name,
-                effect=obj.effect,
+                effect=obj.short_effect.as_text,
+                link_name=urllib.quote(obj.name.lower().encode('utf8')),
+                )
+            )
+
+        elif isinstance(obj, tables.Nature):
+            reply_template = \
+                u"""{name}, a nature.  """ \
+                u"""Raises \x0303{up}\x0f, lowers \x0304{down}\x0f.  """ \
+                u"""http://veekun.com/dex/natures/{link_name}"""
+            self._reply(irc, reply_template.format(
+                name=obj.name,
+                up=obj.increased_stat.name,
+                down=obj.decreased_stat.name,
                 link_name=urllib.quote(obj.name.lower().encode('utf8')),
                 )
             )