mirror of
https://github.com/gooba42/adventureland.git
synced 2026-10-14 18:39:27 -05:00
python3 compatibility + webapp to flask refactoring
This commit is contained in:
@@ -538,7 +538,10 @@ animations={
|
||||
},
|
||||
}
|
||||
|
||||
from projectiles import projectiles
|
||||
try:
|
||||
from projectiles import projectiles
|
||||
except:
|
||||
from design.projectiles import projectiles
|
||||
for id in projectiles:
|
||||
if projectiles[id].has_key("animation") and animations[projectiles[id]["animation"]].has_key("speed"):
|
||||
if "animation" in projectiles[id] and "speed" in animations[projectiles[id]["animation"]]:
|
||||
animations[projectiles[id]["animation"]]["speed"]=projectiles[id]["speed"]
|
||||
+7
-4
@@ -1,5 +1,8 @@
|
||||
import copy
|
||||
from items import items
|
||||
try:
|
||||
from items import items
|
||||
except:
|
||||
from design.items import items
|
||||
|
||||
drops={
|
||||
"gold":{
|
||||
@@ -1222,7 +1225,7 @@ drops={
|
||||
}
|
||||
|
||||
for n,nm in [[1,25],[2,25],[3,25],[4,25],[5,22]]:
|
||||
for num in xrange(nm):
|
||||
for num in range(nm):
|
||||
if "%s%.2d"%(n,num) in ["122","203","404"]: continue
|
||||
drops["cosmo2"].append([1,"cx","hairdo%s%.2d"%(n,num)])
|
||||
|
||||
@@ -1231,7 +1234,7 @@ drops["cosmo2"].append([1.0/3,"cx","hairdo404"])
|
||||
drops["cosmo2"].append([1.0/10,"cx","hairdo203"])
|
||||
|
||||
for n,nm in [[1,16],[2,25],[3,24],[4,8]]:
|
||||
for num in xrange(nm):
|
||||
for num in range(nm):
|
||||
if "%s%.2d"%(n,num) in ["100","114","115","102","106","113","310","309","318","400","405"]: continue
|
||||
drops["cosmo3"].append([1,"cx","hat%s%.2d"%(n,num)])
|
||||
|
||||
@@ -1264,7 +1267,7 @@ for name in items:
|
||||
drops["glitch"].append([1,name])
|
||||
|
||||
for name in items:
|
||||
if not items[name].has_key("g"):
|
||||
if "g" not in items[name]:
|
||||
import logging
|
||||
logging.error(name)
|
||||
if not items[name].get("ignore") and not items[name].get("exclusive"):
|
||||
|
||||
+8
-8
@@ -1739,11 +1739,11 @@ for name in armor.keys():
|
||||
res_gains=[0,0.5,2.5,5.5,7.5]
|
||||
xtier=([0.5,0.5,2,3.4,4.5,6][ftier]+[0.5,0.5,2,4,5,6][ctier]+tier)/3.0
|
||||
#if not current.has_key("edge") and tier>1: current["edge"]=(tier-1)*2
|
||||
if tier<=1.25 and not current.has_key("grades"): current["grades"]=[7,9]
|
||||
elif tier<=1.5 and not current.has_key("grades"): current["grades"]=[4,8]
|
||||
elif tier<=2.4 and not current.has_key("grades"): current["grades"]=[0,7]
|
||||
elif tier<=2.75 and not current.has_key("grades"): current["grades"]=[0,5]
|
||||
elif not current.has_key("grades"): current["grades"]=[0,0]
|
||||
if tier<=1.25 and "grades" not in current: current["grades"]=[7,9]
|
||||
elif tier<=1.5 and "grades" not in current: current["grades"]=[4,8]
|
||||
elif tier<=2.4 and "grades" not in current: current["grades"]=[0,7]
|
||||
elif tier<=2.75 and "grades" not in current: current["grades"]=[0,5]
|
||||
elif "grades" not in current: current["grades"]=[0,0]
|
||||
if len(current["grades"])==2:
|
||||
current["grades"].append(10); current["grades"].append(12)
|
||||
if tier>=4:
|
||||
@@ -2583,7 +2583,7 @@ accessories={
|
||||
|
||||
for name in accessories.keys():
|
||||
current=accessories[name]
|
||||
if not current.has_key("grades"): current["grades"]=[3,5]
|
||||
if "grades" not in current: current["grades"]=[3,5]
|
||||
|
||||
#Ring of Mage PVP: 30 Armor, 10 Res. Piercing, 120HP
|
||||
#Ring of Warrior PVP: 20 Res, 10 Armor, 10 Armor. Piercing
|
||||
@@ -3839,8 +3839,8 @@ weapons={
|
||||
|
||||
for name in weapons.keys():
|
||||
current=weapons[name]; tier=current.get("tier",1)
|
||||
if not current.has_key("upgrade"): continue
|
||||
if not current.has_key("grades"):
|
||||
if "upgrade" not in current: continue
|
||||
if "grades" not in current:
|
||||
if tier<1: current["grades"]=[8,9]
|
||||
elif tier<=1: current["grades"]=[7,9]
|
||||
elif tier<=1.5: current["grades"]=[5,8]
|
||||
|
||||
+3
-3
@@ -3,7 +3,7 @@
|
||||
# if 1:
|
||||
# if 1:
|
||||
# if 1:
|
||||
# for i in xrange(200):
|
||||
# for i in range(200):
|
||||
# new_xp=xp
|
||||
# while new_xp>=100: new_xp/=10
|
||||
# new_xp=int(new_xp)
|
||||
@@ -25,7 +25,7 @@
|
||||
# if 1:
|
||||
# if 1:
|
||||
# if 1:
|
||||
# for i in xrange(200):
|
||||
# for i in range(200):
|
||||
# new_xp=xp
|
||||
# while new_xp>=100: new_xp/=10
|
||||
# new_xp=int(new_xp)
|
||||
@@ -46,7 +46,7 @@
|
||||
# if 1:
|
||||
# if 1:
|
||||
# if 1:
|
||||
# for i in xrange(200):
|
||||
# for i in range(200):
|
||||
# new_xp=xp
|
||||
# while new_xp>=100: new_xp/=10
|
||||
# new_xp=int(new_xp)
|
||||
|
||||
+1
-1
@@ -1169,7 +1169,7 @@ skills={
|
||||
}
|
||||
}
|
||||
for name in skills:
|
||||
if skills[name].has_key("condition") and not skills[name].has_key("duration") and conditions.has_key(skills[name]["condition"]) and conditions[skills[name]["condition"]]:
|
||||
if "condition" in skills[name] and "duration" not in skills[name] and skills[name]["condition"] in conditions and conditions[skills[name]["condition"]]:
|
||||
try:
|
||||
skills[name]["duration"]=conditions[skills[name]["condition"]]["duration"]
|
||||
except:
|
||||
|
||||
+7
-7
@@ -1016,8 +1016,8 @@ for s in bodysets:
|
||||
}
|
||||
last=0
|
||||
nmap={0:"a",1:"b",2:"c",3:"d",4:"e",5:"f",6:"g",7:"h"}
|
||||
for i in xrange(2):
|
||||
for j in xrange(4):
|
||||
for i in range(2):
|
||||
for j in range(4):
|
||||
if last<s[3]:
|
||||
sprites[s[0]]["matrix"][i][j]="%s%s"%(s[0],nmap[last])
|
||||
last+=1
|
||||
@@ -1062,7 +1062,7 @@ for s in rowsets:
|
||||
"columns":s[2],
|
||||
"matrix":[[None]*s[2]],
|
||||
}
|
||||
for i in xrange(s[2]):
|
||||
for i in range(s[2]):
|
||||
name="%s%.2d"%(s[0],i)
|
||||
if s[1]=="hat": name=name.replace("hats","hat")
|
||||
if i<s[3]:
|
||||
@@ -1070,16 +1070,16 @@ for s in rowsets:
|
||||
else:
|
||||
sprites[s[0]]["matrix"][0][i]=None
|
||||
|
||||
for i in xrange(42):
|
||||
for i in range(42):
|
||||
sprites["makeup1"]["matrix"][0].append("makeup1%.2d"%i)
|
||||
|
||||
#for i in xrange(25):
|
||||
#for i in range(25):
|
||||
# sprites["hairdo2"]["matrix"][0].append("hair2%.2d"%i)
|
||||
|
||||
# for i in xrange(41):
|
||||
# for i in range(41):
|
||||
# sprites["hairs2"]["matrix"][0].append("hair2%.2d"%i)
|
||||
|
||||
# for i in xrange(41):
|
||||
# for i in range(41):
|
||||
# sprites["hairs3"]["matrix"][0].append("hair3%.2d"%i)
|
||||
|
||||
imagesets={
|
||||
|
||||
Reference in New Issue
Block a user