MaxShein

Cyno calculator

Aug 29th, 2022 (edited)
1,969
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 26.15 KB | Gaming | 0 0
  1. #enemy
  2. res = 10
  3. defense = 0.5
  4.  
  5. #weapon
  6. class Weapon:
  7. def __init__(self, name, b_atk, ctr, cdm, atk_p, em, dmg, normal_dmg, burst_dmg, skill_dmg, em_to_atk, hp_to_atk):
  8. self.name = name
  9. self.b_atk = b_atk
  10. self.ctr = ctr
  11. self.cdm = cdm
  12. self.atk_p = atk_p
  13. self.em = em
  14. self.dmg = dmg
  15. self.normal_dmg = normal_dmg
  16. self.burst_dmg = burst_dmg
  17. self.skill_dmg = skill_dmg
  18. self.em_to_atk = em_to_atk
  19. self.hp_to_atk = hp_to_atk
  20.  
  21. TheStringless = Weapon("The Stringless", 509.61, 0, 0, 0, 165.38, 0, 0, 24, 24, 0, 0)
  22. TheStringlessR5 = Weapon("The Stringless R5", 509.61, 0, 0, 0, 165.38, 0, 0, 48, 48, 0, 0)
  23. PrototypeCrescent = Weapon("Prototype Crescent", 509.61, 0, 0, 41.35, 0, 0, 0, 0, 0, 0, 0)
  24. PrototypeCrescentP = Weapon("Prototype Crescent - with passive", 509.61, 0, 0, 77.35, 0, 0, 0, 0, 0, 0, 0)
  25. PrototypeCrescentR5 = Weapon("Prototype Crescent R5 - with passive", 509.61, 0, 0, 113.35, 0, 0, 0, 0, 0, 0, 0)
  26. BlackcliffWarbow = Weapon("Blackcliff Warbow", 564.78, 0, 36.75, 0, 0, 0, 0, 0, 0, 0, 0)
  27. BlackcliffWarbowP = Weapon("Blackcliff Warbow - 3 stacks", 564.78, 0, 36.75, 36, 0, 0, 0, 0, 0, 0, 0)
  28. BlackcliffWarbowR5 = Weapon("Blackcliff Warbow R5 - 3 stacks", 564.78, 0, 36.75, 72, 0, 0, 0, 0, 0, 0, 0)
  29. TheViridescentHunt = Weapon("The Viridescent Hunt", 509.61, 27.56, 0, 0, 0, 0, 0, 0, 0, 0, 0)
  30. AlleyHunter = Weapon("Alley Hunter", 564.78, 0, 0, 27.56, 0, 20, 0, 0, 0, 0, 0)
  31. AlleyHunterR5 = Weapon("Alley Hunter R5", 564.78, 0, 0, 27.56, 0, 40, 0, 0, 0, 0, 0)
  32. WindblumeOde = Weapon("Windblume Ode R5", 509.61, 0, 0, 32, 165.38, 0, 0, 0, 0, 0, 0)
  33. 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)
  34. 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)
  35. KingsSquire = Weapon("King’s Squire", 454.36, 0, 0, 55.13, 0, 0, 0, 0, 0, 0, 0)
  36. SkywardHarp = Weapon("Skyward Harp", 674.33, 22.05, 20, 0, 0, 0, 0, 0, 0, 0, 0)
  37. SkywardHarpR5 = Weapon("Skyward Harp R5", 674.33, 22.05, 40, 0, 0, 0, 0, 0, 0, 0, 0)
  38. ElegyfortheEnd = Weapon("Elegy for the End", 608.07, 0, 0, 20, 100, 0, 0, 0, 0, 0, 0)
  39. ElegyfortheEndR5 = Weapon("Elegy for the End R5", 608.07, 0, 0, 40, 200, 0, 0, 0, 0, 0, 0)
  40. PolarStar = Weapon("Polar Star", 608.07, 33.08, 0, 48, 0, 0, 0, 12, 12, 0, 0)
  41. PolarStarR5 = Weapon("Polar Star R5", 608.07, 33.08, 0, 96, 0, 0, 0, 24, 24, 0, 0)
  42. AquaSimulacra = Weapon("Aqua Simulacra", 541.83, 0, 88.2, 0, 0, 20, 0, 0, 0, 0, 0)
  43. AquaSimulacraR5 = Weapon("Aqua Simulacra R5", 541.83, 0, 88.2, 0, 0, 40, 0, 0, 0, 0, 0)
  44. ThunderingPulse = Weapon("Thundering Pulse", 608.07, 0, 66.15, 20, 0, 0, 24, 0, 0, 0, 0)
  45. ThunderingPulseR5 = Weapon("Thundering Pulse R5", 608.07, 0, 66.15, 40, 0, 0, 48, 0, 0, 0, 0)
  46. 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]
  47. #bows = [TheStringless]
  48.  
  49. WhiteTassel = Weapon("White Tassel R5", 401.29, 23.43, 0, 0, 0, 0, 48, 0, 0, 0, 0)
  50. Deathmatch = Weapon("Deathmatch", 454.36, 36.75, 0, 16, 0, 0, 0, 0, 0, 0, 0)
  51. DeathmatchOneEnemy = Weapon("Deathmatch - One Enemy", 454.36, 36.75, 0, 24, 0, 0, 0, 0, 0, 0, 0)
  52. DeathmatchR5 = Weapon("Deathmatch R5 - One Enemy", 454.36, 36.75, 0, 48, 0, 0, 0, 0, 0, 0, 0)
  53. BlackcliffPole = Weapon("Blackcliff Pole", 509.61, 0, 55.13, 16, 0, 0, 0, 0, 0, 0, 0)
  54. BlackcliffPole3Stacks = Weapon("Blackcliff Pole - 3 stacks", 509.61, 0, 55.13, 24, 0, 0, 0, 0, 0, 0, 0)
  55. BlackcliffPoleR5 = Weapon("Blackcliff Pole R5 - 3 stacks", 509.61, 0, 55.13, 48, 0, 0, 0, 0, 0, 0, 0)
  56. KitainCrossSpear = Weapon("Kitain Cross Spear", 564.78, 0, 0, 0, 110.26, 0, 0, 0, 6, 0, 0)
  57. KitainCrossSpearR5 = Weapon("Kitain Cross Spear R5", 564.78, 0, 0, 0, 110.26, 0, 0, 0, 12, 0, 0)
  58. Moonpiercer = Weapon("Moonpiercer", 564.78, 0, 0, 16, 110.26, 0, 0, 0, 0, 0, 0)
  59. MoonpiercerR5 = Weapon("Moonpiercer R5", 564.78, 0, 0, 32, 110.26, 0, 0, 0, 0, 0, 0)
  60. ShiftingWindblade = Weapon("Shifting Windblade R5", 509.61, 0, 0, 61.35, 80, 0, 0, 0, 0, 0, 0)
  61. StaffofHoma = Weapon("Staff of Homa", 608.07, 0, 66.15, 0, 0, 0, 0, 0, 0, 0, 0.8)
  62. StaffofHomaR5 = Weapon("Staff of Homa R5", 608.07, 0, 66.15, 0, 0, 0, 0, 0, 0, 0, 1.6)
  63. SkywardSpine = Weapon("Skyward Spine", 674.33, 8, 0, 0, 0, 0, 0, 0, 0, 0, 0)
  64. SkywardSpineR5 = Weapon("Skyward Spine R5", 674.33, 16, 0, 0, 0, 0, 0, 0, 0, 0, 0)
  65. VortexVanquisher = Weapon("Vortex Vanquisher", 608.07, 0, 0, 69.62, 0, 0, 0, 0, 0, 0, 0)
  66. VortexVanquisherR5 = Weapon("Vortex Vanquisher R5", 608.07, 0, 0, 89.62, 0, 0, 0, 0, 0, 0, 0)
  67. PrimordialJadeWingedSpear = Weapon("Primordial Jade Winged-Spear", 674.33, 22.05, 0, 22.4, 0, 12, 0, 0, 0, 0, 0)
  68. PrimordialJadeWingedSpearR5 = Weapon("Primordial Jade Winged-Spear R5", 674.33, 22.05, 0, 42, 0, 24, 0, 0, 0, 0, 0)
  69. CalamityQueller = Weapon("Calamity Queller", 740.58, 0, 0, 32.54, 0, 12, 0, 0, 0, 0, 0)
  70. CalamityQuellerR5 = Weapon("Calamity Queller R5", 740.58, 0, 0, 48.54, 0, 24, 0, 0, 0, 0, 0)
  71. StaffoftheScarletSands = Weapon("Staff of the Scarlet Sands", 541.83, 44.1, 0, 0, 0, 0, 0, 0, 0, 102, 0)
  72. StaffoftheScarletSandsR5 = Weapon("Staff of the Scarlet Sands R5", 541.83, 44.1, 0, 0, 0, 0, 0, 0, 0, 204, 0)
  73. 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]
  74. #spears = [StaffoftheScarletSands]
  75.  
  76. OathswornsEye = Weapon("Oathsworn’s Eye R5", 564.78, 0, 0, 27.56, 0, 0, 0, 0, 0, 0, 0)
  77. SolarPearl = Weapon("Solar Pearl", 509.61, 27.56, 0, 0, 0, 0, 10, 10, 10, 0, 0)
  78. SolarPearlR5 = Weapon("Solar Pearl R5", 509.61, 27.56, 0, 0, 0, 0, 20, 20, 20, 0, 0)
  79. HakushinRin = Weapon("Hakushin Ring", 564.78, 0, 0, 0, 5, 0, 0, 0, 0, 0, 0)
  80. HakushinRinR5 = Weapon("Hakushin Ring R5", 564.78, 0, 0, 0, 10, 0, 0, 0, 0, 0, 0)
  81. TheWidsith = Weapon("The Widsith", 509.61, 0, 55.13, 0, 0, 0, 0, 0, 0, 0, 0)
  82. TheWidsithRecitative = Weapon("The Widsith - Recitative", 509.61, 0, 55.13, 48, 0, 0, 0, 0, 0, 0, 0)
  83. TheWidsithAria = Weapon("The Widsith - Aria", 509.61, 0, 55.13, 0, 0, 38.4, 0, 0, 0, 0, 0)
  84. TheWidsithInterlude = Weapon("The Widsith - Interlude", 509.61, 0, 55.13, 0, 0, 192, 0, 0, 0, 0, 0)
  85. TheWidsithRecitativeR5 = Weapon("The Widsith R5 - Recitative", 509.61, 0, 55.13, 96, 0, 0, 0, 0, 0, 0, 0)
  86. TheWidsithAriaR5 = Weapon("The Widsith R5 - Aria", 509.61, 0, 55.13, 0, 0, 76.8, 0, 0, 0, 0, 0)
  87. TheWidsithInterludeR5 = Weapon("The Widsith R5 - Interlude", 509.61, 0, 55.13, 0, 0, 384, 0, 0, 0, 0, 0)
  88. books = [OathswornsEye,SolarPearl,SolarPearlR5,HakushinRin,HakushinRinR5,TheWidsith,TheWidsithRecitative,TheWidsithAria,TheWidsithInterlude,TheWidsithRecitativeR5,TheWidsithAriaR5,TheWidsithInterludeR5]
  89.  
  90. #substats
  91. start_rolls = 4
  92. max_rolls_p_art = 3
  93. atk_p_roll = 5
  94. ctr_roll = 3.3
  95. cdm_roll = 6.6
  96. em_roll = 20
  97. #max_rolls_p_art = 5
  98. #atk_p_roll = 5.8
  99. #ctr_roll = 3.9
  100. #cdm_roll = 7.8
  101. #em_roll = 23
  102.  
  103. #stats
  104. class Stats:
  105. def __init__(self, first, name, atk_p, ctr, cdm, em, dmg, sands, cup, cap):
  106. self.name = name
  107. self.atk_p = atk_p
  108. self.ctr = ctr
  109. self.cdm = cdm
  110. self.f_atk = 311
  111. self.em = em
  112. self.ctr = ctr
  113. self.cdm = cdm
  114. self.dmg = dmg
  115. self.sand = sands
  116. self.cup = cup
  117. self.cap = cap
  118. if first and start_rolls > 0:
  119. self.atk_p += (start_rolls - 1 + sands[0]) * atk_p_roll + 20
  120. self.em += (start_rolls - 1 + sands[3]) * em_roll + 20
  121. self.ctr += (start_rolls - 1 + sands[1]) * ctr_roll
  122. self.cdm += (start_rolls - 1 + sands[2]) * cdm_roll
  123.  
  124. 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])
  125. 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])
  126. 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])
  127. 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])
  128. #stats = [AtkElCtr, AtkElCdm, EmElCtr, EmElCdm]
  129. stats = [AtkElCtr, EmElCtr]
  130. #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])
  131. #stats = [NoSands]
  132.  
  133. #buffs
  134. class Buff:
  135. def __init__(self, name, atk_p, em, dmg, normal_dmg, res, flat_normal):
  136. self.name = name
  137. self.atk_p = atk_p
  138. self.em = em
  139. self.dmg = dmg
  140. self.res = res
  141. self.normal_dmg = normal_dmg
  142. self.flat_normal = flat_normal
  143.  
  144. #Full
  145. ToM = Buff("ToM", 20, 0, 0, 0, 0, 0)
  146. Zhongli = Buff("Zhongli", 0, 0, 0, 0, -20, 0)
  147. Kazuha = Buff("Kazuha", 0, 0, 32, 0, -40, 0)
  148. DMC = Buff("DMC", 20, 60, 12, 0, 0, 0)
  149. DMCEM = Buff("DMC", 0, 300, 12, 0, 0, 0)
  150. Sucrose = Buff("Sucrose", 0, 200, 40, 0, -40, 0)
  151. Yunjin = Buff("Ynjin", 0, 0, 0, 0, 0, 2100)
  152.  
  153. #Cyno
  154. uptime = 18
  155. CynoToM = Buff("ToM", 20, 0, 0, 0, 0, 0)
  156. CynoZhongli = Buff("Zhongli", 0, 0, 0, 0, -20 * min(14, uptime) / uptime, 0)
  157. CynoAlbedo = Buff("Albedo", 0, 125 * 8 / uptime, 0, 0, 0, 0)
  158. CynoKazuha = Buff("Kazuha", 0, 0, 32 * 10 / uptime, 0, -40 * 8 / uptime, 0)
  159. CynoDMC = Buff("DMC", 20 * 12 / uptime, 60 * 12 / uptime, 12 * 8 / uptime, 0, 0, 0)
  160. CynoDMCEM = Buff("DMC", 0, 60 * 12 / uptime + 120 * 6 / uptime + 120, 12 * 8 / uptime, 0, 0, 0)
  161. CynoSucrose = Buff("Hakushin Ring Sucrose", 0, 200 * 10 / uptime, 20 * 2 / uptime, 0, -40 * 4 / uptime, 0)
  162. CynoYunjin = Buff("Ynjin", 0, 0, 0, 15 * 10 / uptime, 0, 2100 * 10 / uptime)
  163. CynoPetraYunjin = Buff("Petra Ynjin", 0, 0, 35 * 4 / uptime, 15 * 6 / uptime, 0, 1800 * 6 / uptime)
  164.  
  165. #teams
  166. ToMZhongliTeam = [DMC,Zhongli,ToM]
  167. KazuhaTeam = [DMC,Kazuha]
  168. SucroseTeam = [DMC,Sucrose]
  169. YunjinTeam = [DMC,Yunjin]
  170. teams = [[], ToMZhongliTeam, KazuhaTeam, SucroseTeam, YunjinTeam]
  171.  
  172. CynoToMZhongliTeam = [CynoDMC,CynoZhongli,CynoToM]
  173. CynoAlbedoTeam = [CynoDMC,CynoAlbedo]
  174. CynoKazuhaTeam = [CynoDMC,CynoKazuha]
  175. CynoSucroseTeam = [CynoDMC,CynoSucrose]
  176. CynoYunjinTeam = [CynoDMC,CynoYunjin]
  177. CynoTeams = [[], CynoToMZhongliTeam, CynoKazuhaTeam, CynoSucroseTeam, CynoYunjinTeam, CynoAlbedoTeam]
  178.  
  179. teamNames = ["No team","ToM Zhongli Team","Kazuha Team", "Hakushin Ring Sucrose Team", "Yunjin Team", "Albedo Team"]
  180.  
  181. #set
  182. class Set:
  183. def __init__(self, name, atk_p, em, dmg, normal_dmg, burst_dmg, skill_dmg, rotation):
  184. self.name = name
  185. self.atk_p = atk_p
  186. self.f_atk = 311
  187. self.em = em
  188. self.dmg = dmg
  189. self.normal_dmg = normal_dmg
  190. self.burst_dmg = burst_dmg
  191. self.skill_dmg = skill_dmg
  192. self.rotation = rotation
  193.  
  194. Thundersoother = Set("Thundersoother", 0, 0, 35, 0, 0, 0, 0)
  195. GladiatorsFinale = Set("Gladiator's Finale", 18, 0, 0, 35, 0, 0, 0)
  196. GildedDreams = Set("Gilded Dreams", 14, 180, 0, 0, 0, 0, 0)
  197. ThunderingFury = Set("Thundering Fury", 0, 0, 15, 0, 0, 0, 0)
  198. ThunderingFuryCyno = Set("Thundering Fury", 0, 0, 15, 0, 0, 0, 1)
  199. TFAtk = Set("TF/Atk% 2-piece", 18, 0, 15, 0, 0, 0, 0)
  200. AtkAtk = Set("Atk%/Atk% 2-piece", 36, 0, 0, 0, 0, 0, 0)
  201. TFEm = Set("TF/EM 2-piece", 0, 80, 15, 0, 0, 0, 0)
  202. EmAtk = Set("EM/Atk% 2-piece", 18, 80, 0, 0, 0, 0, 0)
  203. EmEm = Set("EM/EM 2-piece", 0, 160, 0, 0, 0, 0, 0)
  204.  
  205. #skill
  206. class Rotation:
  207. def __init__(self, names, scaling, aggravate, types, count, em_to_flat, em_to_skill):
  208. self.names = names
  209. self.scaling = scaling
  210. self.aggravate = aggravate
  211. self.type = types
  212. self.count = count
  213. self.em_to_flat = em_to_flat
  214. self.em_to_skill = em_to_skill
  215. #self.time = time
  216.  
  217. FischlNames = ["Oz summon - Aggravate", "Oz attack", "C4 - Burst cast, Aggravate", "Falling Thunder - Aggravate", "Stellar Predator - Aggravate", "C6 - Bolt", "Aggravate"]
  218. FischlScaling = [407.79, 159.84, 222, 374.4, 152.7, 30, 0]
  219. FischlAggravate = [True, False, True, True, True, False, True]
  220. FischlTypes = ["skill", "skill", "burst", "burst", "skill", "skill", "skill"]
  221. ZeroEmToFltat = [0, 0, 0, 0, 0, 0, 0, 0]
  222. FischlFullRotation = [Rotation(FischlNames, FischlScaling, FischlAggravate, FischlTypes, [1, 24, 1, 1, 24, 32, 16], ZeroEmToFltat, 0)]
  223. FischlSkillRotation = [Rotation(FischlNames, FischlScaling, FischlAggravate, FischlTypes, [1, 12, 0, 0, 12, 16, 8], ZeroEmToFltat, 0)]
  224. FischlBurstRotation = [Rotation(FischlNames, FischlScaling, FischlAggravate, FischlTypes, [0, 12, 1, 1, 12, 16, 8], ZeroEmToFltat, 0)]
  225.  
  226. YaeMikoNames = ["Sesshou Sakura", "Sesshou Sakura - Aggravate", "Tenko Kenshin - Aggravate", "Tenko Thunderbolt - Aggravate"]
  227. YaeMikoScaling = [170.64, 170.64, 468, 600.87]
  228. YaeMikoAggravate = [False, True, True, True]
  229. YaeMikoTypes = ["skill", "skill", "burst", "burst"]
  230. YaeMikoFull = [Rotation(YaeMikoNames, YaeMikoScaling, YaeMikoAggravate, YaeMikoTypes, [10, 5, 1, 3], ZeroEmToFltat, 0.15)]
  231. YaeMikoTurrets = [Rotation(YaeMikoNames, YaeMikoScaling, YaeMikoAggravate, YaeMikoTypes, [10, 5, 0, 0], ZeroEmToFltat, 0.15)]
  232.  
  233. CynoNames = ["Skill - Aggravate", "Judication - Aggravate", "Bolt", "Aggravate - Bolt", "N-1", "N-2", "N-3", "N-4", "N-5", "Aggravate"]
  234. CynoScaling = [282.2, 282.2, 100, 100, 154.7, 163, 206.8, 102.2, 258.6, 0]
  235. #C3
  236. #CynoScaling = [282.2, 282.2, 100, 100, 187.52, 197.54, 250.63, 123.83, 313.42, 0]
  237. #C5
  238. #CynoScaling = [333.2, 333.2, 100, 100, 187.52, 197.54, 250.63, 123.83, 313.42, 0]
  239.  
  240. CynoAggravate = [True, True, False, True, False, False, False, False, False, True]
  241. CynoSkill = ["skill", "skill", "skill", "skill", "normal", "normal", "normal", "normal", "normal", "normal"]
  242. CynoEmtoFlat = [0, 0, 250, 250, 150, 150, 150, 150, 150, 0]
  243. CynoNormalFullRotation = Rotation(CynoNames, CynoScaling, CynoAggravate, CynoSkill, [1, 4, 8, 4, 7, 7, 6, 8, 4, 15], CynoEmtoFlat, 0)
  244. CynoNormalMediumRotation = Rotation(CynoNames, CynoScaling, CynoAggravate, CynoSkill, [1, 3, 6, 3, 5, 5, 5, 6, 3, 11], CynoEmtoFlat, 0)
  245. CynoNormalShortRotation = Rotation(CynoNames, CynoScaling, CynoAggravate, CynoSkill, [1, 2, 4, 2, 3, 3, 3, 4, 2, 7], CynoEmtoFlat, 0)
  246. CynoTfFullRotation = Rotation(CynoNames, CynoScaling, CynoAggravate, CynoSkill, [4, 4, 8, 4, 8, 8, 8, 14, 1, 16], CynoEmtoFlat, 0)
  247. CynoTfMediumRotation = Rotation(CynoNames, CynoScaling, CynoAggravate, CynoSkill, [4, 3, 6, 3, 6, 6, 6, 10, 0, 12], CynoEmtoFlat, 0)
  248. CynoTfShortRotation = Rotation(CynoNames, CynoScaling, CynoAggravate, CynoSkill, [3, 2, 4, 2, 4, 4, 4, 8, 0, 8], CynoEmtoFlat, 0)
  249.  
  250. #C1
  251. #CynoNormalFullRotation = Rotation(CynoNames, CynoScaling, CynoAggravate, CynoSkill, [1, 4, 8, 4, 9, 7, 6, 10, 5, 15], CynoEmtoFlat, 0)
  252. #CynoTfFullRotation = Rotation(CynoNames, CynoScaling, CynoAggravate, CynoSkill, [4, 4, 8, 4, 8, 8, 8, 14, 3, 16], CynoEmtoFlat, 0)
  253. #C6
  254. #CynoNormalFullRotation = Rotation(CynoNames, CynoScaling, CynoAggravate, CynoSkill, [1, 4, 16, 12, 9, 7, 6, 10, 5, 15], CynoEmtoFlat, 0)
  255. #CynoTfFullRotation = Rotation(CynoNames, CynoScaling, CynoAggravate, CynoSkill, [4, 4, 16, 12, 8, 8, 8, 14, 3, 16], CynoEmtoFlat, 0)
  256.  
  257. #Cyno rotations
  258. CynoFullRotation = [CynoNormalFullRotation, CynoTfFullRotation]
  259. CynoMediumRotation = [CynoNormalMediumRotation, CynoTfMediumRotation]
  260. CynoShortRotation = [CynoNormalShortRotation, CynoTfShortRotation]
  261. CynoFullRotationNoTf = [CynoNormalFullRotation, CynoNormalFullRotation]
  262.  
  263. #character
  264. class Character:
  265. def __init__(self, name, b_atk, atk_p, ctr, cdm, dmg, em, weapons, sets, stats, teams):
  266. self.name = name
  267. self.b_atk = b_atk
  268. self.atk_p = atk_p
  269. self.f_atk = 0
  270. self.atk = 0
  271. self.dmg = dmg
  272. self.ctr = ctr
  273. self.cdm = cdm
  274. self.em = em
  275. self.weapons = weapons
  276. self.sets = sets
  277. self.stats = stats
  278. self.teams = teams
  279.  
  280. sets = [ThunderingFury,GildedDreams,Thundersoother,TFAtk,AtkAtk,TFEm,EmAtk,EmEm]
  281. Fischl = Character("Fischl", 244.26, 24, 5, 50, 0, 0, bows, sets, stats, teams)
  282. YaeMiko = Character("Yae Miko", 339.63, 0, 24.2, 50, 0, 0, books, sets, stats, teams)
  283.  
  284. CynoSets = [ThunderingFury,ThunderingFuryCyno,GildedDreams,Thundersoother,GladiatorsFinale]
  285. #CynoSets = [GildedDreams]
  286. Cyno = Character("Cyno", 318.11, 0, 5, 88.4, 0, 100, spears, CynoSets, stats, CynoTeams)
  287.  
  288. #calculation
  289. def Aggravate(em, name):
  290. bonus = 5 * em / (em + 1200)
  291. if name == "Thundering Fury":
  292. bonus += 0.2
  293. return 1663.88 * (1 + bonus)
  294.  
  295. class Result:
  296. def __init__(self, artSet, stat, total, atk, ctr, cdm, em, dmg):
  297. self.artSet = artSet
  298. self.stat = stat
  299. self.total = total
  300. self.atk = atk
  301. self.ctr = ctr
  302. self.cdm = cdm
  303. self.em = em
  304. self.dmg = dmg
  305. self.secondBest = ""
  306. self.secondBestTotal = 0
  307.  
  308. def testWeapon(character, rotations, buffs, weapon):
  309. result = Result(character.sets[0], character.stats[0], 0, 0, 0, 0, 0, 0)
  310. for i in range(0, len(character.sets)):
  311. test = testSet(character, rotations, buffs, weapon, character.sets[i])
  312. if test.total > result.total:
  313. test.secondBest = result.artSet.name
  314. test.secondBestTotal = result.total
  315. result = test
  316. elif test.total > result.secondBestTotal:
  317. result.secondBest = test.artSet.name
  318. result.secondBestTotal = test.total
  319. return result
  320.  
  321. def testSet(character, rotations, buffs, weapon, artSet):
  322. result = Result(artSet, character.stats[0], 0, 0, 0, 0, 0, 0)
  323. for i in range(0, len(stats)):
  324. 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)
  325. test = evaluate(character, rotations, buffs, weapon, artSet, stat)
  326. if test.total > result.total:
  327. test.secondBest = result.stat.name
  328. test.secondBestTotal = result.total
  329. result = test
  330. elif test.total > result.secondBestTotal:
  331. result.secondBest = test.stat.name
  332. result.secondBestTotal = test.total
  333. return result
  334.  
  335. def evaluate(character, rotations, buffs, weapon, artSet, stat):
  336. for i in range(max_rolls_p_art):
  337. artifact(stat.cap, character, rotations, buffs, weapon, artSet, stat)
  338. artifact(stat.sand, character, rotations, buffs, weapon, artSet, stat)
  339. artifact(stat.cup, character, rotations, buffs, weapon, artSet, stat)
  340. artifact([1,1,1,1], character, rotations, buffs, weapon, artSet, stat)
  341. artifact([1,1,1,1], character, rotations, buffs, weapon, artSet, stat)
  342. return calculate(character, rotations, buffs, weapon, artSet, stat)
  343.  
  344. def artifact(weights, character, rotations, buffs, weapon, artSet, stat):
  345. stat.atk_p += atk_p_roll * weights[0]
  346. dmg1 = calculate(character, rotations, buffs, weapon, artSet, stat).total
  347. stat.atk_p -= atk_p_roll * weights[0]
  348. stat.ctr += ctr_roll * weights[1]
  349. dmg2 = calculate(character, rotations, buffs, weapon, artSet, stat).total
  350. stat.ctr -= ctr_roll * weights[1]
  351. stat.cdm += cdm_roll * weights[2]
  352. dmg3 = calculate(character, rotations, buffs, weapon, artSet, stat).total
  353. stat.cdm -= cdm_roll * weights[2]
  354. stat.em += em_roll * weights[3]
  355. dmg4 = calculate(character, rotations, buffs, weapon, artSet, stat).total
  356. stat.em -= em_roll * weights[3]
  357.  
  358. top = max(dmg1, dmg2, dmg3, dmg4)
  359. if top == dmg1:
  360. stat.atk_p += atk_p_roll * weights[0]
  361. elif top == dmg2:
  362. stat.ctr += ctr_roll * weights[1]
  363. elif top == dmg3:
  364. stat.cdm += cdm_roll * weights[2]
  365. elif top == dmg4:
  366. stat.em += em_roll * weights[3]
  367.  
  368. def calculate(character, rotations, buffs, weapon, artSet, stat):
  369. total = 0
  370. ctr = character.ctr + weapon.ctr + stat.ctr
  371. cdm = character.cdm + weapon.cdm + stat.cdm
  372. em = character.em + weapon.em + stat.em + artSet.em
  373. bonus_dmg = character.dmg + weapon.dmg + stat.dmg + artSet.dmg
  374. atk_p = character.atk_p + weapon.atk_p + stat.atk_p + artSet.atk_p
  375. f_atk = character.f_atk + stat.f_atk
  376.  
  377. global res
  378. resistance = res
  379. normal_dmg = 0
  380. flat_normal = 0
  381. for i in range(0, len(buffs)):
  382. atk_p += buffs[i].atk_p
  383. em += buffs[i].em
  384. bonus_dmg += buffs[i].dmg
  385. normal_dmg += buffs[i].normal_dmg
  386. resistance += buffs[i].res
  387. flat_normal += buffs[i].flat_normal
  388.  
  389. atk = (character.b_atk + weapon.b_atk) * (1 + atk_p / 100) + f_atk
  390. atk += 19769.2 * weapon.hp_to_atk / 100
  391. atk += em * weapon.em_to_atk / 100
  392.  
  393. aggravate = Aggravate(em, artSet.name)
  394. rotation = rotations[artSet.rotation]
  395. for i in range(0, len(rotation.count)):
  396.  
  397. damage = rotation.scaling[i] / 100 * atk
  398. if rotation.aggravate[i]:
  399. damage += aggravate
  400. damage += em * rotation.em_to_flat[i] / 100
  401.  
  402. dmg = bonus_dmg
  403. if rotation.type[i] == "skill":
  404. dmg += artSet.skill_dmg + weapon.skill_dmg
  405. dmg += em * rotation.em_to_skill
  406. if rotation.names[i] == "Judication - Aggravate":
  407. dmg += 35
  408. elif rotation.type[i] == "burst":
  409. dmg += artSet.burst_dmg + weapon.burst_dmg
  410. elif rotation.type[i] == "normal":
  411. dmg += artSet.normal_dmg + weapon.normal_dmg + normal_dmg
  412. damage += flat_normal
  413.  
  414. damage *= 1 + dmg / 100
  415. damage *= 1 + min(ctr, 100) / 100 * cdm / 100
  416. total += damage * rotation.count[i]
  417.  
  418. if resistance < 0:
  419. resistance /= 2
  420. total *= 1 - resistance / 100
  421. total *= defense
  422. return Result(artSet, stat, total, atk, ctr, cdm, em, bonus_dmg)
  423.  
  424.  
  425.  
  426. def testWeapons(character, rotations, buffs):
  427. print("???????????????????????????????????????????")
  428. print(str(character.name) + " weapon test\n")
  429. for i in range(0, len(character.weapons)):
  430. result = testWeapon(character, rotations, buffs, character.weapons[i])
  431. print("==========" + character.weapons[i].name + "==========")
  432. print("Best Set: " + result.artSet.name)
  433. print("Preffered Main Stats: " + result.stat.name)
  434. print("Second best Set: " + result.secondBest)
  435. print("Gain over second best: " + str(round((result.total / result.secondBestTotal - 1) * 10000) / 100) + "%")
  436. print("Total Rotation DMG: " + str(result.total) + "\n")
  437. print("Total ATK: " + str(round(result.atk)))
  438. print("Total Crit Rate: " + str(round(result.ctr * 10) / 10))
  439. print("Total Crit DMG: " + str(round(result.cdm * 10) / 10))
  440. print("Total EM: " + str(result.em))
  441. print("Total DMG%: " + str(round(result.dmg * 10) / 10) + "\n")
  442. #testWeapons(Fischl, FischlFullRotation, ToMZhongliTeam)
  443. testWeapons(Cyno, CynoFullRotation, CynoToMZhongliTeam)
  444. #testWeapons(YaeMiko, YaeMikoTurrets, [ToM,Zhongli])
  445.  
  446. def testSets(character, rotations, buffs, weapon):
  447. print("???????????????????????????????????????????")
  448. print(str(character.name) + " with The " + str(weapon.name) + " artifact set test\n")
  449. for i in range(0, len(character.sets)):
  450. result = testSet(character, rotations, buffs, weapon, character.sets[i])
  451. print("==========" + character.sets[i].name + "==========")
  452. print("Preffered Main Stats: " + result.stat.name)
  453. print("Second best Main Stats: " + result.secondBest)
  454. print("Gain over second best: " + str(round((result.total / result.secondBestTotal - 1) * 10000) / 100) + "%")
  455. print("Total Rotation DMG: " + str(result.total) + "\n")
  456. print("Total ATK: " + str(round(result.atk)))
  457. print("Total Crit Rate: " + str(round(result.ctr * 10) / 10))
  458. print("Total Crit DMG: " + str(round(result.cdm * 10) / 10))
  459. print("Total EM: " + str(result.em) + "\n")
  460. #testSets(Fischl, FischlFullRotation, ToMZhongliTeam, TheStringless)
  461. testSets(Cyno, CynoFullRotation, ToMZhongliTeam, StaffoftheScarletSands)
  462. #testSets(Cyno, CynoFullRotation, ToMZhongliTeam, WhiteTassel)
  463. #testSets(YaeMiko, YaeMikoTurrets, [ToM,Zhongli], TheWidsith)
  464.  
  465. def testStats(character, rotations, buffs, weapon, artSet):
  466. print("???????????????????????????????????????????")
  467. print(str(character.name) + " with The " + str(weapon.name) + " and " + str(artSet.name) + " set: main stats test\n")
  468. for i in range(0, len(character.stats)):
  469. 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)
  470. result = evaluate(character, rotations, buffs, weapon, artSet, stat)
  471. print("==========" + stat.name + "==========")
  472. print("Total Rotation DMG: " + str(result.total) + "\n")
  473. print("Total ATK: " + str(round(result.atk)))
  474. print("Total Crit Rate: " + str(round(result.ctr * 10) / 10))
  475. print("Total Crit DMG: " + str(round(result.cdm * 10) / 10))
  476. print("Total EM: " + str(result.em) + "\n")
  477. #testStats(Fischl, FischlFullRotation, ToMZhongliTeam, TheStringlessR5, Thundersoother)
  478. #testStats(Cyno, CynoFullRotation, CynoToMZhongliTeam, StaffoftheScarletSands, ThunderingFuryCyno)
  479.  
  480. def testTeams(character, rotations, weapon, artSet, stats):
  481. print("???????????????????????????????????????????")
  482. print(str(character.name) + " with The " + str(weapon.name) + " and " + str(artSet.name) + " set: teams test\n")
  483. for i in range(0, len(character.teams)):
  484. stat = Stats(False, stats.name, stats.atk_p, stats.ctr, stats.cdm, stats.em, stats.dmg, stats.sand, stats.cup, stats.cap)
  485. result = evaluate(character, rotations, character.teams[i], weapon, artSet, stat)
  486. print("========== " + teamNames[i] + " ==========")
  487. print("Total Rotation DMG: " + str(result.total) + "\n")
  488. #testTeams(Fischl, FischlFullRotation, TheStringlessR5, GildedDreams, AtkElCdm)
  489. #testTeams(Cyno, CynoFullRotation, StaffoftheScarletSands, ThunderingFuryCyno, EmElCdm)
Advertisement
Add Comment
Please, Sign In to add comment