summaryrefslogtreecommitdiff
path: root/wiki/wikigen.py
diff options
context:
space:
mode:
authorJesusaves <cpntb1@ymail.com>2018-06-25 18:56:38 -0300
committerJesusaves <cpntb1@ymail.com>2018-06-25 18:56:38 -0300
commit978ee958d2c9d6e4c7ff4355c350336c07f8111b (patch)
tree7cee9435af5a6477d8062b1d235abe5a982b41a7 /wiki/wikigen.py
parent5ecc4b32901acafa41a48dff43095268a8037251 (diff)
downloadtools-978ee958d2c9d6e4c7ff4355c350336c07f8111b.tar.gz
tools-978ee958d2c9d6e4c7ff4355c350336c07f8111b.tar.bz2
tools-978ee958d2c9d6e4c7ff4355c350336c07f8111b.tar.xz
tools-978ee958d2c9d6e4c7ff4355c350336c07f8111b.zip
Update wikigen. Key features are listing drop by % on item list, and ChangeChase report
Diffstat (limited to 'wiki/wikigen.py')
-rwxr-xr-xwiki/wikigen.py11
1 files changed, 9 insertions, 2 deletions
diff --git a/wiki/wikigen.py b/wiki/wikigen.py
index ad937c9..c34172b 100755
--- a/wiki/wikigen.py
+++ b/wiki/wikigen.py
@@ -10,7 +10,8 @@ import datetime
wikia=open("Items.md", "w")
wikib=open("Monsters.md", "w")
-wikic=open("../../client-data/x.diff", "w")
+wikic=open("../../client-data/x.diff", "w") # Dye Report
+wikid=open("../../server-data/x.diff", "w") # ChangeChase Report
# the TYPEs we use to determine where to pack things
IT_HEALING=[]
@@ -70,6 +71,7 @@ class Mob:
#self.aegis="UnknownMonster" # SpriteName is not used anywhere, we are using its ID
self.name="Unknown Monster Name"
self.view="1"
+ self.chch=False
# Defensive
self.mobpt="0" # Mob Points “Level”
@@ -148,6 +150,8 @@ def testMobs():
x.st+="Ass,"
elif " Aggressive: true" in a:
x.st+="Agr,"
+ elif " ChangeChase: true" in a:
+ x.chch=True
elif 'Drops: ' in a:
dropper=True
elif dropper and '}' in a:
@@ -175,6 +179,8 @@ def MonsterWrite(tbl):
wikib.write("<table border=1>\n")
wikib.write("<tr><th>ID</th><th>Name</th><th>HP</th><th>Atk</th><th>Delay</th><th>Modes</th><th>Misc Info</th><th>Rewards</th><th>Drops</th></tr>\n")
for i in tbl:
+ if not i.chch:
+ wikid.write("%s:%s\n" % (i.id, i.name))
wikib.write('<tr><td><a name="' + i.id + '"></a>' +
i.id +"</td><td>"+
i.name +"</td><td>HP: "+
@@ -595,7 +601,7 @@ def ItemWrite(tbl, ID=False, AEGIS=False, NAME=False, PRICE=False, WEIGHT=False,
if ax[0] == i.aegis:
tmp_drpalign.append([ax[2], ax[1]])
if len(tmp_drpalign) > 0:
- for a in sorted(tmp_drpalign, key=lambda xcv: xcv[1], reverse=True):
+ for a in sorted(tmp_drpalign, key=lambda xcv: float(xcv[1]), reverse=True):
try:
ppm=int(a[1])/100.0
tmp_droppers+=("%s: %.2f %% \n" % (a[0], ppm))
@@ -785,6 +791,7 @@ DoQuest()
wikia.close()
wikib.close()
wikic.close()
+wikid.close()
#print(str(SysDrops))
showFooter()