Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #enemy
- res = 10
- defense = 0.5
- #weapon
- class Weapon:
- def __init__(self, name, b_atk, ctr, cdm, atk_p, em, dmg, normal_dmg, burst_dmg, skill_dmg, em_to_atk, hp_to_atk):
- self.name = name
- self.b_atk = b_atk
- self.ctr = ctr
- self.cdm = cdm
- self.atk_p = atk_p
- self.em = em
- self.dmg = dmg
- self.normal_dmg = normal_dmg
- self.burst_dmg = burst_dmg
- self.skill_dmg = skill_dmg
- self.em_to_atk = em_to_atk
- self.hp_to_atk = hp_to_atk
- TheStringless = Weapon("The Stringless", 509.61, 0, 0, 0, 165.38, 0, 0, 24, 24, 0, 0)
- TheStringlessR5 = Weapon("The Stringless R5", 509.61, 0, 0, 0, 165.38, 0, 0, 48, 48, 0, 0)
- PrototypeCrescent = Weapon("Prototype Crescent", 509.61, 0, 0, 41.35, 0, 0, 0, 0, 0, 0, 0)
- PrototypeCrescentP = Weapon("Prototype Crescent - with passive", 509.61, 0, 0, 77.35, 0, 0, 0, 0, 0, 0, 0)
- PrototypeCrescentR5 = Weapon("Prototype Crescent R5 - with passive", 509.61, 0, 0, 113.35, 0, 0, 0, 0, 0, 0, 0)
- BlackcliffWarbow = Weapon("Blackcliff Warbow", 564.78, 0, 36.75, 0, 0, 0, 0, 0, 0, 0, 0)
- BlackcliffWarbowP = Weapon("Blackcliff Warbow - 3 stacks", 564.78, 0, 36.75, 36, 0, 0, 0, 0, 0, 0, 0)
- BlackcliffWarbowR5 = Weapon("Blackcliff Warbow R5 - 3 stacks", 564.78, 0, 36.75, 72, 0, 0, 0, 0, 0, 0, 0)
- TheViridescentHunt = Weapon("The Viridescent Hunt", 509.61, 27.56, 0, 0, 0, 0, 0, 0, 0, 0, 0)
- AlleyHunter = Weapon("Alley Hunter", 564.78, 0, 0, 27.56, 0, 20, 0, 0, 0, 0, 0)
- AlleyHunterR5 = Weapon("Alley Hunter R5", 564.78, 0, 0, 27.56, 0, 40, 0, 0, 0, 0, 0)
- WindblumeOde = Weapon("Windblume Ode R5", 509.61, 0, 0, 32, 165.38, 0, 0, 0, 0, 0, 0)
- MouunsMoon = Weapon("Mouun’s Moon - 80/80/60/40 Max Team Energy", 564.78, 0, 0, 27.56, 0, 0, 0, 31.2, 0, 0, 0)
- MouunsMoonR5 = Weapon("Mouun’s Moon R5 - 80/80/60/40 Max Team Energy", 564.78, 0, 0, 27.56, 0, 0, 0, 62.4, 0, 0, 0)
- KingsSquire = Weapon("King’s Squire", 454.36, 0, 0, 55.13, 0, 0, 0, 0, 0, 0, 0)
- SkywardHarp = Weapon("Skyward Harp", 674.33, 22.05, 20, 0, 0, 0, 0, 0, 0, 0, 0)
- SkywardHarpR5 = Weapon("Skyward Harp R5", 674.33, 22.05, 40, 0, 0, 0, 0, 0, 0, 0, 0)
- ElegyfortheEnd = Weapon("Elegy for the End", 608.07, 0, 0, 20, 100, 0, 0, 0, 0, 0, 0)
- ElegyfortheEndR5 = Weapon("Elegy for the End R5", 608.07, 0, 0, 40, 200, 0, 0, 0, 0, 0, 0)
- PolarStar = Weapon("Polar Star", 608.07, 33.08, 0, 48, 0, 0, 0, 12, 12, 0, 0)
- PolarStarR5 = Weapon("Polar Star R5", 608.07, 33.08, 0, 96, 0, 0, 0, 24, 24, 0, 0)
- AquaSimulacra = Weapon("Aqua Simulacra", 541.83, 0, 88.2, 0, 0, 20, 0, 0, 0, 0, 0)
- AquaSimulacraR5 = Weapon("Aqua Simulacra R5", 541.83, 0, 88.2, 0, 0, 40, 0, 0, 0, 0, 0)
- ThunderingPulse = Weapon("Thundering Pulse", 608.07, 0, 66.15, 20, 0, 0, 24, 0, 0, 0, 0)
- ThunderingPulseR5 = Weapon("Thundering Pulse R5", 608.07, 0, 66.15, 40, 0, 0, 48, 0, 0, 0, 0)
- bows = [TheStringless,TheStringlessR5,PrototypeCrescent,PrototypeCrescentP,PrototypeCrescentR5,BlackcliffWarbow,BlackcliffWarbowP,BlackcliffWarbowR5,TheViridescentHunt,AlleyHunter,AlleyHunterR5,WindblumeOde,MouunsMoon,MouunsMoonR5,KingsSquire,SkywardHarp,SkywardHarpR5,ElegyfortheEnd,ElegyfortheEndR5,PolarStar,PolarStarR5,AquaSimulacra,AquaSimulacraR5,ThunderingPulse,ThunderingPulseR5]
- #bows = [TheStringless]
- WhiteTassel = Weapon("White Tassel R5", 401.29, 23.43, 0, 0, 0, 0, 48, 0, 0, 0, 0)
- Deathmatch = Weapon("Deathmatch", 454.36, 36.75, 0, 16, 0, 0, 0, 0, 0, 0, 0)
- DeathmatchOneEnemy = Weapon("Deathmatch - One Enemy", 454.36, 36.75, 0, 24, 0, 0, 0, 0, 0, 0, 0)
- DeathmatchR5 = Weapon("Deathmatch R5 - One Enemy", 454.36, 36.75, 0, 48, 0, 0, 0, 0, 0, 0, 0)
- BlackcliffPole = Weapon("Blackcliff Pole", 509.61, 0, 55.13, 16, 0, 0, 0, 0, 0, 0, 0)
- BlackcliffPole3Stacks = Weapon("Blackcliff Pole - 3 stacks", 509.61, 0, 55.13, 24, 0, 0, 0, 0, 0, 0, 0)
- BlackcliffPoleR5 = Weapon("Blackcliff Pole R5 - 3 stacks", 509.61, 0, 55.13, 48, 0, 0, 0, 0, 0, 0, 0)
- KitainCrossSpear = Weapon("Kitain Cross Spear", 564.78, 0, 0, 0, 110.26, 0, 0, 0, 6, 0, 0)
- KitainCrossSpearR5 = Weapon("Kitain Cross Spear R5", 564.78, 0, 0, 0, 110.26, 0, 0, 0, 12, 0, 0)
- Moonpiercer = Weapon("Moonpiercer", 564.78, 0, 0, 16, 110.26, 0, 0, 0, 0, 0, 0)
- MoonpiercerR5 = Weapon("Moonpiercer R5", 564.78, 0, 0, 32, 110.26, 0, 0, 0, 0, 0, 0)
- ShiftingWindblade = Weapon("Shifting Windblade R5", 509.61, 0, 0, 61.35, 80, 0, 0, 0, 0, 0, 0)
- StaffofHoma = Weapon("Staff of Homa", 608.07, 0, 66.15, 0, 0, 0, 0, 0, 0, 0, 0.8)
- StaffofHomaR5 = Weapon("Staff of Homa R5", 608.07, 0, 66.15, 0, 0, 0, 0, 0, 0, 0, 1.6)
- SkywardSpine = Weapon("Skyward Spine", 674.33, 8, 0, 0, 0, 0, 0, 0, 0, 0, 0)
- SkywardSpineR5 = Weapon("Skyward Spine R5", 674.33, 16, 0, 0, 0, 0, 0, 0, 0, 0, 0)
- VortexVanquisher = Weapon("Vortex Vanquisher", 608.07, 0, 0, 69.62, 0, 0, 0, 0, 0, 0, 0)
- VortexVanquisherR5 = Weapon("Vortex Vanquisher R5", 608.07, 0, 0, 89.62, 0, 0, 0, 0, 0, 0, 0)
- PrimordialJadeWingedSpear = Weapon("Primordial Jade Winged-Spear", 674.33, 22.05, 0, 22.4, 0, 12, 0, 0, 0, 0, 0)
- PrimordialJadeWingedSpearR5 = Weapon("Primordial Jade Winged-Spear R5", 674.33, 22.05, 0, 42, 0, 24, 0, 0, 0, 0, 0)
- CalamityQueller = Weapon("Calamity Queller", 740.58, 0, 0, 32.54, 0, 12, 0, 0, 0, 0, 0)
- CalamityQuellerR5 = Weapon("Calamity Queller R5", 740.58, 0, 0, 48.54, 0, 24, 0, 0, 0, 0, 0)
- StaffoftheScarletSands = Weapon("Staff of the Scarlet Sands", 541.83, 44.1, 0, 0, 0, 0, 0, 0, 0, 102, 0)
- StaffoftheScarletSandsR5 = Weapon("Staff of the Scarlet Sands R5", 541.83, 44.1, 0, 0, 0, 0, 0, 0, 0, 204, 0)
- spears = [WhiteTassel,Deathmatch,DeathmatchOneEnemy,DeathmatchR5,BlackcliffPole,BlackcliffPole3Stacks,BlackcliffPoleR5,KitainCrossSpear,KitainCrossSpearR5,Moonpiercer,MoonpiercerR5,ShiftingWindblade,StaffofHoma,StaffofHomaR5,SkywardSpine,SkywardSpineR5,VortexVanquisher,VortexVanquisherR5,PrimordialJadeWingedSpear,PrimordialJadeWingedSpearR5,CalamityQueller,CalamityQuellerR5,StaffoftheScarletSands,StaffoftheScarletSandsR5]
- #spears = [StaffoftheScarletSands]
- OathswornsEye = Weapon("Oathsworn’s Eye R5", 564.78, 0, 0, 27.56, 0, 0, 0, 0, 0, 0, 0)
- SolarPearl = Weapon("Solar Pearl", 509.61, 27.56, 0, 0, 0, 0, 10, 10, 10, 0, 0)
- SolarPearlR5 = Weapon("Solar Pearl R5", 509.61, 27.56, 0, 0, 0, 0, 20, 20, 20, 0, 0)
- HakushinRin = Weapon("Hakushin Ring", 564.78, 0, 0, 0, 5, 0, 0, 0, 0, 0, 0)
- HakushinRinR5 = Weapon("Hakushin Ring R5", 564.78, 0, 0, 0, 10, 0, 0, 0, 0, 0, 0)
- TheWidsith = Weapon("The Widsith", 509.61, 0, 55.13, 0, 0, 0, 0, 0, 0, 0, 0)
- TheWidsithRecitative = Weapon("The Widsith - Recitative", 509.61, 0, 55.13, 48, 0, 0, 0, 0, 0, 0, 0)
- TheWidsithAria = Weapon("The Widsith - Aria", 509.61, 0, 55.13, 0, 0, 38.4, 0, 0, 0, 0, 0)
- TheWidsithInterlude = Weapon("The Widsith - Interlude", 509.61, 0, 55.13, 0, 0, 192, 0, 0, 0, 0, 0)
- TheWidsithRecitativeR5 = Weapon("The Widsith R5 - Recitative", 509.61, 0, 55.13, 96, 0, 0, 0, 0, 0, 0, 0)
- TheWidsithAriaR5 = Weapon("The Widsith R5 - Aria", 509.61, 0, 55.13, 0, 0, 76.8, 0, 0, 0, 0, 0)
- TheWidsithInterludeR5 = Weapon("The Widsith R5 - Interlude", 509.61, 0, 55.13, 0, 0, 384, 0, 0, 0, 0, 0)
- books = [OathswornsEye,SolarPearl,SolarPearlR5,HakushinRin,HakushinRinR5,TheWidsith,TheWidsithRecitative,TheWidsithAria,TheWidsithInterlude,TheWidsithRecitativeR5,TheWidsithAriaR5,TheWidsithInterludeR5]
- #substats
- start_rolls = 4
- max_rolls_p_art = 3
- atk_p_roll = 5
- ctr_roll = 3.3
- cdm_roll = 6.6
- em_roll = 20
- #max_rolls_p_art = 5
- #atk_p_roll = 5.8
- #ctr_roll = 3.9
- #cdm_roll = 7.8
- #em_roll = 23
- #stats
- class Stats:
- def __init__(self, first, name, atk_p, ctr, cdm, em, dmg, sands, cup, cap):
- self.name = name
- self.atk_p = atk_p
- self.ctr = ctr
- self.cdm = cdm
- self.f_atk = 311
- self.em = em
- self.ctr = ctr
- self.cdm = cdm
- self.dmg = dmg
- self.sand = sands
- self.cup = cup
- self.cap = cap
- if first and start_rolls > 0:
- self.atk_p += (start_rolls - 1 + sands[0]) * atk_p_roll + 20
- self.em += (start_rolls - 1 + sands[3]) * em_roll + 20
- self.ctr += (start_rolls - 1 + sands[1]) * ctr_roll
- self.cdm += (start_rolls - 1 + sands[2]) * cdm_roll
- AtkElCtr = Stats(True, "ATK%/Electro/Crit Rate", 46.6, 31.1, 0, 0, 46.6, [0,1,1,1], [1,1,1,1], [1,0,1,1])
- EmElCtr = Stats(True, "EM/Electro/Crit Rate", 0, 31.1, 0, 187, 46.6, [1,1,1,0], [1,1,1,1], [1,0,1,1])
- AtkElCdm = Stats(True, "ATK%/Electro/Crit DMG", 46.6, 0, 62.2, 0, 46.6, [0,1,1,1], [1,1,1,1], [1,1,0,1])
- EmElCdm = Stats(True, "EM/Electro/Crit DMG", 0, 0, 62.2, 187, 46.6, [1,1,1,0], [1,1,1,1], [1,1,0,1])
- #stats = [AtkElCtr, AtkElCdm, EmElCtr, EmElCdm]
- stats = [AtkElCtr, EmElCtr]
- #NoSands = Stats(True, "NaN/Electro/Crit DMG", 0, 0, 62.2, 0, 46.6, [1,1,1,1], [1,1,1,1], [1,1,0,1])
- #stats = [NoSands]
- #buffs
- class Buff:
- def __init__(self, name, atk_p, em, dmg, normal_dmg, res, flat_normal):
- self.name = name
- self.atk_p = atk_p
- self.em = em
- self.dmg = dmg
- self.res = res
- self.normal_dmg = normal_dmg
- self.flat_normal = flat_normal
- #Full
- ToM = Buff("ToM", 20, 0, 0, 0, 0, 0)
- Zhongli = Buff("Zhongli", 0, 0, 0, 0, -20, 0)
- Kazuha = Buff("Kazuha", 0, 0, 32, 0, -40, 0)
- DMC = Buff("DMC", 20, 60, 12, 0, 0, 0)
- DMCEM = Buff("DMC", 0, 300, 12, 0, 0, 0)
- Sucrose = Buff("Sucrose", 0, 200, 40, 0, -40, 0)
- Yunjin = Buff("Ynjin", 0, 0, 0, 0, 0, 2100)
- #Cyno
- uptime = 18
- CynoToM = Buff("ToM", 20, 0, 0, 0, 0, 0)
- CynoZhongli = Buff("Zhongli", 0, 0, 0, 0, -20 * min(14, uptime) / uptime, 0)
- CynoAlbedo = Buff("Albedo", 0, 125 * 8 / uptime, 0, 0, 0, 0)
- CynoKazuha = Buff("Kazuha", 0, 0, 32 * 10 / uptime, 0, -40 * 8 / uptime, 0)
- CynoDMC = Buff("DMC", 20 * 12 / uptime, 60 * 12 / uptime, 12 * 8 / uptime, 0, 0, 0)
- CynoDMCEM = Buff("DMC", 0, 60 * 12 / uptime + 120 * 6 / uptime + 120, 12 * 8 / uptime, 0, 0, 0)
- CynoSucrose = Buff("Hakushin Ring Sucrose", 0, 200 * 10 / uptime, 20 * 2 / uptime, 0, -40 * 4 / uptime, 0)
- CynoYunjin = Buff("Ynjin", 0, 0, 0, 15 * 10 / uptime, 0, 2100 * 10 / uptime)
- CynoPetraYunjin = Buff("Petra Ynjin", 0, 0, 35 * 4 / uptime, 15 * 6 / uptime, 0, 1800 * 6 / uptime)
- #teams
- ToMZhongliTeam = [DMC,Zhongli,ToM]
- KazuhaTeam = [DMC,Kazuha]
- SucroseTeam = [DMC,Sucrose]
- YunjinTeam = [DMC,Yunjin]
- teams = [[], ToMZhongliTeam, KazuhaTeam, SucroseTeam, YunjinTeam]
- CynoToMZhongliTeam = [CynoDMC,CynoZhongli,CynoToM]
- CynoAlbedoTeam = [CynoDMC,CynoAlbedo]
- CynoKazuhaTeam = [CynoDMC,CynoKazuha]
- CynoSucroseTeam = [CynoDMC,CynoSucrose]
- CynoYunjinTeam = [CynoDMC,CynoYunjin]
- CynoTeams = [[], CynoToMZhongliTeam, CynoKazuhaTeam, CynoSucroseTeam, CynoYunjinTeam, CynoAlbedoTeam]
- teamNames = ["No team","ToM Zhongli Team","Kazuha Team", "Hakushin Ring Sucrose Team", "Yunjin Team", "Albedo Team"]
- #set
- class Set:
- def __init__(self, name, atk_p, em, dmg, normal_dmg, burst_dmg, skill_dmg, rotation):
- self.name = name
- self.atk_p = atk_p
- self.f_atk = 311
- self.em = em
- self.dmg = dmg
- self.normal_dmg = normal_dmg
- self.burst_dmg = burst_dmg
- self.skill_dmg = skill_dmg
- self.rotation = rotation
- Thundersoother = Set("Thundersoother", 0, 0, 35, 0, 0, 0, 0)
- GladiatorsFinale = Set("Gladiator's Finale", 18, 0, 0, 35, 0, 0, 0)
- GildedDreams = Set("Gilded Dreams", 14, 180, 0, 0, 0, 0, 0)
- ThunderingFury = Set("Thundering Fury", 0, 0, 15, 0, 0, 0, 0)
- ThunderingFuryCyno = Set("Thundering Fury", 0, 0, 15, 0, 0, 0, 1)
- TFAtk = Set("TF/Atk% 2-piece", 18, 0, 15, 0, 0, 0, 0)
- AtkAtk = Set("Atk%/Atk% 2-piece", 36, 0, 0, 0, 0, 0, 0)
- TFEm = Set("TF/EM 2-piece", 0, 80, 15, 0, 0, 0, 0)
- EmAtk = Set("EM/Atk% 2-piece", 18, 80, 0, 0, 0, 0, 0)
- EmEm = Set("EM/EM 2-piece", 0, 160, 0, 0, 0, 0, 0)
- #skill
- class Rotation:
- def __init__(self, names, scaling, aggravate, types, count, em_to_flat, em_to_skill):
- self.names = names
- self.scaling = scaling
- self.aggravate = aggravate
- self.type = types
- self.count = count
- self.em_to_flat = em_to_flat
- self.em_to_skill = em_to_skill
- #self.time = time
- FischlNames = ["Oz summon - Aggravate", "Oz attack", "C4 - Burst cast, Aggravate", "Falling Thunder - Aggravate", "Stellar Predator - Aggravate", "C6 - Bolt", "Aggravate"]
- FischlScaling = [407.79, 159.84, 222, 374.4, 152.7, 30, 0]
- FischlAggravate = [True, False, True, True, True, False, True]
- FischlTypes = ["skill", "skill", "burst", "burst", "skill", "skill", "skill"]
- ZeroEmToFltat = [0, 0, 0, 0, 0, 0, 0, 0]
- FischlFullRotation = [Rotation(FischlNames, FischlScaling, FischlAggravate, FischlTypes, [1, 24, 1, 1, 24, 32, 16], ZeroEmToFltat, 0)]
- FischlSkillRotation = [Rotation(FischlNames, FischlScaling, FischlAggravate, FischlTypes, [1, 12, 0, 0, 12, 16, 8], ZeroEmToFltat, 0)]
- FischlBurstRotation = [Rotation(FischlNames, FischlScaling, FischlAggravate, FischlTypes, [0, 12, 1, 1, 12, 16, 8], ZeroEmToFltat, 0)]
- YaeMikoNames = ["Sesshou Sakura", "Sesshou Sakura - Aggravate", "Tenko Kenshin - Aggravate", "Tenko Thunderbolt - Aggravate"]
- YaeMikoScaling = [170.64, 170.64, 468, 600.87]
- YaeMikoAggravate = [False, True, True, True]
- YaeMikoTypes = ["skill", "skill", "burst", "burst"]
- YaeMikoFull = [Rotation(YaeMikoNames, YaeMikoScaling, YaeMikoAggravate, YaeMikoTypes, [10, 5, 1, 3], ZeroEmToFltat, 0.15)]
- YaeMikoTurrets = [Rotation(YaeMikoNames, YaeMikoScaling, YaeMikoAggravate, YaeMikoTypes, [10, 5, 0, 0], ZeroEmToFltat, 0.15)]
- CynoNames = ["Skill - Aggravate", "Judication - Aggravate", "Bolt", "Aggravate - Bolt", "N-1", "N-2", "N-3", "N-4", "N-5", "Aggravate"]
- CynoScaling = [282.2, 282.2, 100, 100, 154.7, 163, 206.8, 102.2, 258.6, 0]
- #C3
- #CynoScaling = [282.2, 282.2, 100, 100, 187.52, 197.54, 250.63, 123.83, 313.42, 0]
- #C5
- #CynoScaling = [333.2, 333.2, 100, 100, 187.52, 197.54, 250.63, 123.83, 313.42, 0]
- CynoAggravate = [True, True, False, True, False, False, False, False, False, True]
- CynoSkill = ["skill", "skill", "skill", "skill", "normal", "normal", "normal", "normal", "normal", "normal"]
- CynoEmtoFlat = [0, 0, 250, 250, 150, 150, 150, 150, 150, 0]
- CynoNormalFullRotation = Rotation(CynoNames, CynoScaling, CynoAggravate, CynoSkill, [1, 4, 8, 4, 7, 7, 6, 8, 4, 15], CynoEmtoFlat, 0)
- CynoNormalMediumRotation = Rotation(CynoNames, CynoScaling, CynoAggravate, CynoSkill, [1, 3, 6, 3, 5, 5, 5, 6, 3, 11], CynoEmtoFlat, 0)
- CynoNormalShortRotation = Rotation(CynoNames, CynoScaling, CynoAggravate, CynoSkill, [1, 2, 4, 2, 3, 3, 3, 4, 2, 7], CynoEmtoFlat, 0)
- CynoTfFullRotation = Rotation(CynoNames, CynoScaling, CynoAggravate, CynoSkill, [4, 4, 8, 4, 8, 8, 8, 14, 1, 16], CynoEmtoFlat, 0)
- CynoTfMediumRotation = Rotation(CynoNames, CynoScaling, CynoAggravate, CynoSkill, [4, 3, 6, 3, 6, 6, 6, 10, 0, 12], CynoEmtoFlat, 0)
- CynoTfShortRotation = Rotation(CynoNames, CynoScaling, CynoAggravate, CynoSkill, [3, 2, 4, 2, 4, 4, 4, 8, 0, 8], CynoEmtoFlat, 0)
- #C1
- #CynoNormalFullRotation = Rotation(CynoNames, CynoScaling, CynoAggravate, CynoSkill, [1, 4, 8, 4, 9, 7, 6, 10, 5, 15], CynoEmtoFlat, 0)
- #CynoTfFullRotation = Rotation(CynoNames, CynoScaling, CynoAggravate, CynoSkill, [4, 4, 8, 4, 8, 8, 8, 14, 3, 16], CynoEmtoFlat, 0)
- #C6
- #CynoNormalFullRotation = Rotation(CynoNames, CynoScaling, CynoAggravate, CynoSkill, [1, 4, 16, 12, 9, 7, 6, 10, 5, 15], CynoEmtoFlat, 0)
- #CynoTfFullRotation = Rotation(CynoNames, CynoScaling, CynoAggravate, CynoSkill, [4, 4, 16, 12, 8, 8, 8, 14, 3, 16], CynoEmtoFlat, 0)
- #Cyno rotations
- CynoFullRotation = [CynoNormalFullRotation, CynoTfFullRotation]
- CynoMediumRotation = [CynoNormalMediumRotation, CynoTfMediumRotation]
- CynoShortRotation = [CynoNormalShortRotation, CynoTfShortRotation]
- CynoFullRotationNoTf = [CynoNormalFullRotation, CynoNormalFullRotation]
- #character
- class Character:
- def __init__(self, name, b_atk, atk_p, ctr, cdm, dmg, em, weapons, sets, stats, teams):
- self.name = name
- self.b_atk = b_atk
- self.atk_p = atk_p
- self.f_atk = 0
- self.atk = 0
- self.dmg = dmg
- self.ctr = ctr
- self.cdm = cdm
- self.em = em
- self.weapons = weapons
- self.sets = sets
- self.stats = stats
- self.teams = teams
- sets = [ThunderingFury,GildedDreams,Thundersoother,TFAtk,AtkAtk,TFEm,EmAtk,EmEm]
- Fischl = Character("Fischl", 244.26, 24, 5, 50, 0, 0, bows, sets, stats, teams)
- YaeMiko = Character("Yae Miko", 339.63, 0, 24.2, 50, 0, 0, books, sets, stats, teams)
- CynoSets = [ThunderingFury,ThunderingFuryCyno,GildedDreams,Thundersoother,GladiatorsFinale]
- #CynoSets = [GildedDreams]
- Cyno = Character("Cyno", 318.11, 0, 5, 88.4, 0, 100, spears, CynoSets, stats, CynoTeams)
- #calculation
- def Aggravate(em, name):
- bonus = 5 * em / (em + 1200)
- if name == "Thundering Fury":
- bonus += 0.2
- return 1663.88 * (1 + bonus)
- class Result:
- def __init__(self, artSet, stat, total, atk, ctr, cdm, em, dmg):
- self.artSet = artSet
- self.stat = stat
- self.total = total
- self.atk = atk
- self.ctr = ctr
- self.cdm = cdm
- self.em = em
- self.dmg = dmg
- self.secondBest = ""
- self.secondBestTotal = 0
- def testWeapon(character, rotations, buffs, weapon):
- result = Result(character.sets[0], character.stats[0], 0, 0, 0, 0, 0, 0)
- for i in range(0, len(character.sets)):
- test = testSet(character, rotations, buffs, weapon, character.sets[i])
- if test.total > result.total:
- test.secondBest = result.artSet.name
- test.secondBestTotal = result.total
- result = test
- elif test.total > result.secondBestTotal:
- result.secondBest = test.artSet.name
- result.secondBestTotal = test.total
- return result
- def testSet(character, rotations, buffs, weapon, artSet):
- result = Result(artSet, character.stats[0], 0, 0, 0, 0, 0, 0)
- for i in range(0, len(stats)):
- stat = Stats(False, character.stats[i].name, character.stats[i].atk_p, character.stats[i].ctr, character.stats[i].cdm, character.stats[i].em, character.stats[i].dmg, character.stats[i].sand, character.stats[i].cup, character.stats[i].cap)
- test = evaluate(character, rotations, buffs, weapon, artSet, stat)
- if test.total > result.total:
- test.secondBest = result.stat.name
- test.secondBestTotal = result.total
- result = test
- elif test.total > result.secondBestTotal:
- result.secondBest = test.stat.name
- result.secondBestTotal = test.total
- return result
- def evaluate(character, rotations, buffs, weapon, artSet, stat):
- for i in range(max_rolls_p_art):
- artifact(stat.cap, character, rotations, buffs, weapon, artSet, stat)
- artifact(stat.sand, character, rotations, buffs, weapon, artSet, stat)
- artifact(stat.cup, character, rotations, buffs, weapon, artSet, stat)
- artifact([1,1,1,1], character, rotations, buffs, weapon, artSet, stat)
- artifact([1,1,1,1], character, rotations, buffs, weapon, artSet, stat)
- return calculate(character, rotations, buffs, weapon, artSet, stat)
- def artifact(weights, character, rotations, buffs, weapon, artSet, stat):
- stat.atk_p += atk_p_roll * weights[0]
- dmg1 = calculate(character, rotations, buffs, weapon, artSet, stat).total
- stat.atk_p -= atk_p_roll * weights[0]
- stat.ctr += ctr_roll * weights[1]
- dmg2 = calculate(character, rotations, buffs, weapon, artSet, stat).total
- stat.ctr -= ctr_roll * weights[1]
- stat.cdm += cdm_roll * weights[2]
- dmg3 = calculate(character, rotations, buffs, weapon, artSet, stat).total
- stat.cdm -= cdm_roll * weights[2]
- stat.em += em_roll * weights[3]
- dmg4 = calculate(character, rotations, buffs, weapon, artSet, stat).total
- stat.em -= em_roll * weights[3]
- top = max(dmg1, dmg2, dmg3, dmg4)
- if top == dmg1:
- stat.atk_p += atk_p_roll * weights[0]
- elif top == dmg2:
- stat.ctr += ctr_roll * weights[1]
- elif top == dmg3:
- stat.cdm += cdm_roll * weights[2]
- elif top == dmg4:
- stat.em += em_roll * weights[3]
- def calculate(character, rotations, buffs, weapon, artSet, stat):
- total = 0
- ctr = character.ctr + weapon.ctr + stat.ctr
- cdm = character.cdm + weapon.cdm + stat.cdm
- em = character.em + weapon.em + stat.em + artSet.em
- bonus_dmg = character.dmg + weapon.dmg + stat.dmg + artSet.dmg
- atk_p = character.atk_p + weapon.atk_p + stat.atk_p + artSet.atk_p
- f_atk = character.f_atk + stat.f_atk
- global res
- resistance = res
- normal_dmg = 0
- flat_normal = 0
- for i in range(0, len(buffs)):
- atk_p += buffs[i].atk_p
- em += buffs[i].em
- bonus_dmg += buffs[i].dmg
- normal_dmg += buffs[i].normal_dmg
- resistance += buffs[i].res
- flat_normal += buffs[i].flat_normal
- atk = (character.b_atk + weapon.b_atk) * (1 + atk_p / 100) + f_atk
- atk += 19769.2 * weapon.hp_to_atk / 100
- atk += em * weapon.em_to_atk / 100
- aggravate = Aggravate(em, artSet.name)
- rotation = rotations[artSet.rotation]
- for i in range(0, len(rotation.count)):
- damage = rotation.scaling[i] / 100 * atk
- if rotation.aggravate[i]:
- damage += aggravate
- damage += em * rotation.em_to_flat[i] / 100
- dmg = bonus_dmg
- if rotation.type[i] == "skill":
- dmg += artSet.skill_dmg + weapon.skill_dmg
- dmg += em * rotation.em_to_skill
- if rotation.names[i] == "Judication - Aggravate":
- dmg += 35
- elif rotation.type[i] == "burst":
- dmg += artSet.burst_dmg + weapon.burst_dmg
- elif rotation.type[i] == "normal":
- dmg += artSet.normal_dmg + weapon.normal_dmg + normal_dmg
- damage += flat_normal
- damage *= 1 + dmg / 100
- damage *= 1 + min(ctr, 100) / 100 * cdm / 100
- total += damage * rotation.count[i]
- if resistance < 0:
- resistance /= 2
- total *= 1 - resistance / 100
- total *= defense
- return Result(artSet, stat, total, atk, ctr, cdm, em, bonus_dmg)
- def testWeapons(character, rotations, buffs):
- print("???????????????????????????????????????????")
- print(str(character.name) + " weapon test\n")
- for i in range(0, len(character.weapons)):
- result = testWeapon(character, rotations, buffs, character.weapons[i])
- print("==========" + character.weapons[i].name + "==========")
- print("Best Set: " + result.artSet.name)
- print("Preffered Main Stats: " + result.stat.name)
- print("Second best Set: " + result.secondBest)
- print("Gain over second best: " + str(round((result.total / result.secondBestTotal - 1) * 10000) / 100) + "%")
- print("Total Rotation DMG: " + str(result.total) + "\n")
- print("Total ATK: " + str(round(result.atk)))
- print("Total Crit Rate: " + str(round(result.ctr * 10) / 10))
- print("Total Crit DMG: " + str(round(result.cdm * 10) / 10))
- print("Total EM: " + str(result.em))
- print("Total DMG%: " + str(round(result.dmg * 10) / 10) + "\n")
- #testWeapons(Fischl, FischlFullRotation, ToMZhongliTeam)
- testWeapons(Cyno, CynoFullRotation, CynoToMZhongliTeam)
- #testWeapons(YaeMiko, YaeMikoTurrets, [ToM,Zhongli])
- def testSets(character, rotations, buffs, weapon):
- print("???????????????????????????????????????????")
- print(str(character.name) + " with The " + str(weapon.name) + " artifact set test\n")
- for i in range(0, len(character.sets)):
- result = testSet(character, rotations, buffs, weapon, character.sets[i])
- print("==========" + character.sets[i].name + "==========")
- print("Preffered Main Stats: " + result.stat.name)
- print("Second best Main Stats: " + result.secondBest)
- print("Gain over second best: " + str(round((result.total / result.secondBestTotal - 1) * 10000) / 100) + "%")
- print("Total Rotation DMG: " + str(result.total) + "\n")
- print("Total ATK: " + str(round(result.atk)))
- print("Total Crit Rate: " + str(round(result.ctr * 10) / 10))
- print("Total Crit DMG: " + str(round(result.cdm * 10) / 10))
- print("Total EM: " + str(result.em) + "\n")
- #testSets(Fischl, FischlFullRotation, ToMZhongliTeam, TheStringless)
- testSets(Cyno, CynoFullRotation, ToMZhongliTeam, StaffoftheScarletSands)
- #testSets(Cyno, CynoFullRotation, ToMZhongliTeam, WhiteTassel)
- #testSets(YaeMiko, YaeMikoTurrets, [ToM,Zhongli], TheWidsith)
- def testStats(character, rotations, buffs, weapon, artSet):
- print("???????????????????????????????????????????")
- print(str(character.name) + " with The " + str(weapon.name) + " and " + str(artSet.name) + " set: main stats test\n")
- for i in range(0, len(character.stats)):
- stat = Stats(False, character.stats[i].name, character.stats[i].atk_p, character.stats[i].ctr, character.stats[i].cdm, character.stats[i].em, character.stats[i].dmg, character.stats[i].sand, character.stats[i].cup, character.stats[i].cap)
- result = evaluate(character, rotations, buffs, weapon, artSet, stat)
- print("==========" + stat.name + "==========")
- print("Total Rotation DMG: " + str(result.total) + "\n")
- print("Total ATK: " + str(round(result.atk)))
- print("Total Crit Rate: " + str(round(result.ctr * 10) / 10))
- print("Total Crit DMG: " + str(round(result.cdm * 10) / 10))
- print("Total EM: " + str(result.em) + "\n")
- #testStats(Fischl, FischlFullRotation, ToMZhongliTeam, TheStringlessR5, Thundersoother)
- #testStats(Cyno, CynoFullRotation, CynoToMZhongliTeam, StaffoftheScarletSands, ThunderingFuryCyno)
- def testTeams(character, rotations, weapon, artSet, stats):
- print("???????????????????????????????????????????")
- print(str(character.name) + " with The " + str(weapon.name) + " and " + str(artSet.name) + " set: teams test\n")
- for i in range(0, len(character.teams)):
- stat = Stats(False, stats.name, stats.atk_p, stats.ctr, stats.cdm, stats.em, stats.dmg, stats.sand, stats.cup, stats.cap)
- result = evaluate(character, rotations, character.teams[i], weapon, artSet, stat)
- print("========== " + teamNames[i] + " ==========")
- print("Total Rotation DMG: " + str(result.total) + "\n")
- #testTeams(Fischl, FischlFullRotation, TheStringlessR5, GildedDreams, AtkElCdm)
- #testTeams(Cyno, CynoFullRotation, StaffoftheScarletSands, ThunderingFuryCyno, EmElCdm)
Advertisement
Add Comment
Please, Sign In to add comment