예제 #1
0
 def _transform(self, data):
     data["iconPath"] = cdragon_url(data["iconPath"])
     data["cleanedDescription"] = cdragon_sanitize(data["description"])
     if data["requiredChampion"] == "":
         data["requiredChampion"] = None
     if data["requiredBuffCurrencyName"] == "":
         data["requiredBuffCurrencyName"] = "GOLD"
         data["requiredBuffCurrencyCost"] = data["price"]
     return data
예제 #2
0
 def _transform(self, data):
     data["squarePortraitPath"] = cdragon_url(data["squarePortraitPath"])
     data["tacticalInfo"]["damageType"] = start_k(
         data["tacticalInfo"]["damageType"])
     skins = []
     for skin in data["skins"]:
         skin["splashPath"] = cdragon_url(skin.pop("splashPath", None))
         skin["uncenteredSplashPath"] = cdragon_url(
             skin.pop("uncenteredSplashPath", None))
         skin["tilePath"] = cdragon_url(skin.pop("tilePath", None))
         skin["loadScreenPath"] = cdragon_url(
             skin.pop("loadScreenPath", None))
         skin["rarity"] = start_k(skin.pop("rarity", None))
         skin["chromaPath"] = cdragon_url(skin.pop("chromaPath", None))
         if "chromas" in skin:
             chromas = []
             for chroma in skin["chromas"]:
                 chroma["chromaPath"] = cdragon_url(
                     chroma.pop("chromaPath", None))
                 chromas.append(chroma)
             skin["chromas"] = chromas
         if skin["skinLines"] is not None:
             skin["skinLines"] = skin["skinLines"][0]["id"]
         skins.append(skin)
     data["skins"] = skins
     data["passive"]["abilityIconPath"] = cdragon_url(
         data["passive"]["abilityIconPath"])
     spells = {}
     for spell in data["spells"]:
         spell["abilityIconPath"] = cdragon_url(spell["abilityIconPath"])
         spell["cost"] = spell.pop("costCoefficients")[:5]
         spell["cooldown"] = spell.pop("cooldownCoefficients")[:5]
         spell["cleanedDescription"] = cdragon_sanitize(
             spell["dynamicDescription"])
         spell.pop("formulas", None)
         spell.pop("coefficients", None)
         spell.pop("effectAmounts", None)
         spell.pop("ammo", None)
         spell.pop("maxLevel", None)
         spells[spell["spellKey"]] = spell
     spells["p"] = data.pop("passive")
     data["spells"] = spells
     return data
예제 #3
0
파일: spell.py 프로젝트: sousa-andre/Pyot
 def _transform(self, data):
     data["iconPath"] = cdragon_url(data["iconPath"])
     return data
예제 #4
0
파일: champion.py 프로젝트: filipkhan/Pyot
 def chroma_abspath(self) -> str:
     return cdragon_url(self.chroma_path)
예제 #5
0
파일: champion.py 프로젝트: filipkhan/Pyot
 def load_screen_vintage_abspath(self) -> str:
     return cdragon_url(self.load_screen_vintage_path)
예제 #6
0
파일: champion.py 프로젝트: filipkhan/Pyot
 def tile_abspath(self) -> str:
     return cdragon_url(self.tile_path)
예제 #7
0
파일: champion.py 프로젝트: filipkhan/Pyot
 def uncentered_splash_abspath(self) -> str:
     return cdragon_url(self.uncentered_splash_path)
예제 #8
0
파일: champion.py 프로젝트: filipkhan/Pyot
 def splash_abspath(self) -> str:
     return cdragon_url(self.splash_path)
예제 #9
0
파일: champion.py 프로젝트: filipkhan/Pyot
 def ban_vo_abspath(self) -> str:
     return cdragon_url(self.ban_vo_path)
예제 #10
0
파일: champion.py 프로젝트: filipkhan/Pyot
 def choose_vo_abspath(self) -> str:
     return cdragon_url(self.choose_vo_path)
예제 #11
0
파일: champion.py 프로젝트: filipkhan/Pyot
 def stinger_sfx_abspath(self) -> str:
     return cdragon_url(self.stinger_sfx_path)
예제 #12
0
파일: champion.py 프로젝트: filipkhan/Pyot
 def square_abspath(self) -> str:
     return cdragon_url(self.square_path)
예제 #13
0
파일: champion.py 프로젝트: filipkhan/Pyot
 def icon_abspath(self) -> str:
     return cdragon_url(self.icon_path)
예제 #14
0
파일: champion.py 프로젝트: filipkhan/Pyot
 def collection_splash_video_abspath(self) -> str:
     return cdragon_url(self.collection_splash_video_path)