Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #enemy
- res = 10
- level = 90
- enemy_level = 90
- reduction = 0
- defense = (level + 100) / ((1 - reduction) * (enemy_level + 100) + level + 100)
- #weapon
- class Weapon:
- def __init__(self, name, b_atk, ctr, cdm, atk_p, em, dmg, normal_dmg, charged_dmg, skill_dmg, burst_dmg, atk_spd, em_to_atk, songs):
- 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.charged_dmg = charged_dmg
- self.skill_dmg = skill_dmg
- self.burst_dmg = burst_dmg
- self.atk_spd = atk_spd
- self.em_to_atk = em_to_atk
- self.songs = songs
- #weapons
- TheWidsithRecitative = Weapon("The Widsith - Recitative", 509.61, 0, 55.13, 20, 0, 0, 0, 0, 0, 0, 0, 0, [])
- TheWidsithAria = Weapon("The Widsith - Aria", 509.61, 0, 55.13, 0, 0, 16, 0, 0, 0, 0, 0, 0, [])
- TheWidsithInterlude = Weapon("The Widsith - Interlude", 509.61, 0, 55.13, 0, 80, 0, 0, 0, 0, 0, 0, 0, [])
- TheWidsith = Weapon("The Widsith", 509.61, 0, 55.13, 0, 0, 0, 0, 0, 0, 0, 0, 0, [TheWidsithRecitative,TheWidsithAria,TheWidsithInterlude])
- TheWidsithRecitativeR5 = Weapon("The Widsith R5 - Recitative", 509.61, 0, 55.13, 40, 0, 0, 0, 0, 0, 0, 0, 0, [])
- TheWidsithAriaR5 = Weapon("The Widsith R5 - Aria", 509.61, 0, 55.13, 0, 0, 32, 0, 0, 0, 0, 0, 0, [])
- TheWidsithInterludeR5 = Weapon("The Widsith R5 - Interlude", 509.61, 0, 55.13, 0, 160, 0, 0, 0, 0, 0, 0, 0, [])
- TheWidsithR5 = Weapon("The Widsith R5", 509.61, 0, 55.13, 0, 0, 0, 0, 0, 0, 0, 0, 0, [TheWidsithRecitativeR5,TheWidsithAriaR5,TheWidsithInterludeR5])
- SacrificialFragments = Weapon("Sacrificial Fragments", 454.36, 0, 0, 0, 220.51, 0, 0, 0, 0, 0, 0, 0, [])
- SolarPearl = Weapon("Solar Pearl", 509.61, 27.56, 0, 0, 0, 0, 20, 0, 20, 20, 0, 0, [])
- SolarPearlR5 = Weapon("Solar Pearl R5", 509.61, 27.56, 0, 0, 0, 0, 40, 0, 40, 40, 0, 0, [])
- MappaMare = Weapon("Mappa Mare", 564.78, 0, 0, 0, 110.26, 16, 0, 0, 0, 0, 0, 0, [])
- MappaMareR5 = Weapon("Mappa Mare R5", 564.78, 0, 0, 0, 110.26, 32, 0, 0, 0, 0, 0, 0, [])
- BlackcliffAgate = Weapon("Blackcliff Agate", 509.61, 0, 55.13, 0, 0, 0, 0, 0, 0, 0, 0, 0, [])
- BlackcliffAgateMax = Weapon("Blackcliff Agate - Max stacks", 509.61, 0, 55.13, 36, 0, 0, 0, 0, 0, 0, 0, 0, [])
- BlackcliffAgateMaxR5 = Weapon("Blackcliff Agate R5 - Max stacks", 509.61, 0, 55.13, 72, 0, 0, 0, 0, 0, 0, 0, 0, [])
- HakushinRing = Weapon("Hakushin Ring", 564.78, 0, 0, 0, 0, 10, 0, 0, 0, 0, 0, 0, [])
- HakushinRingR5 = Weapon("Hakushin Ring R5", 564.78, 0, 0, 0, 0, 20, 0, 0, 0, 0, 0, 0, [])
- OathswornsEye = Weapon("Oathsworn’s Eye R5", 564.78, 0, 0, 27.56, 0, 0, 0, 0, 0, 0, 0, 0, [])
- WanderingEvenstar = Weapon("Wandering Evenstar", 509.61, 0, 0, 0, 165.38, 0, 0, 0, 0, 0, 0, 24, [])
- WanderingEvenstarR5 = Weapon("Wandering Evenstar R5", 509.61, 0, 0, 0, 165.38, 0, 0, 0, 0, 0, 0, 48, [])
- DodocoTales = Weapon("Dodoco Tales R5", 454.36, 0, 0, 71.13, 0, 0, 0, 32, 0, 0, 0, 0, [])
- SkywardAtlas = Weapon("Skyward Atlas", 674.33, 0, 0, 33.08, 0, 12, 0, 0, 0, 0, 0, 0, [])
- SkywardAtlasR5 = Weapon("Skyward Atlas R5", 674.33, 0, 0, 33.08, 0, 24, 0, 0, 0, 0, 0, 0, [])
- LostPrayertotheSacredWinds = Weapon("Lost Prayer to the Sacred Winds", 608.07, 33.08, 0, 0, 0, 8, 0, 0, 0, 0, 0, 0, [])
- LostPrayertotheSacredWindsR5 = Weapon("Lost Prayer to the Sacred Winds R5", 608.07, 33.08, 0, 0, 0, 16, 0, 0, 0, 0, 0, 0, [])
- MemoryofDustNo = Weapon("Memory of Dust - No stacks", 608.07, 0, 0, 49.62, 0, 0, 0, 0, 0, 0, 0, 0, [])
- MemoryofDust = Weapon("Memory of Dust - 5 stacks + shield", 608.07, 0, 0, 89.62, 0, 0, 0, 0, 0, 0, 0, 0, [])
- MemoryofDustR5 = Weapon("Memory of Dust R5 - 5 stacks + shield", 608.07, 0, 0, 129.62, 0, 0, 0, 0, 0, 0, 0, 0, [])
- KagurasVerityNo = Weapon("Kagura’s Verity - No stacks", 608.07, 0, 66.15, 0, 0, 0, 0, 0, 0, 0, 0, 0, [])
- KagurasVerity = Weapon("Kagura’s Verity - all stacks", 608.07, 0, 66.15, 0, 0, 12, 0, 0, 36, 0, 0, 0, [])
- KagurasVerityR5 = Weapon("Kagura’s Verity R5 - all stacks", 608.07, 0, 66.15, 0, 0, 24, 0, 0, 72, 0, 0, 0, [])
- AThousandFloatingDreams = Weapon("A Thousand Floating Dreams - No same elements", 541.83, 0, 0, 0, 264.61, 30, 0, 0, 0, 0, 0, 0, [])
- AThousandFloatingDreamsSame = Weapon("A Thousand Floating Dreams - One same element", 541.83, 0, 0, 0, 296.61, 20, 0, 0, 0, 0, 0, 0, [])
- AThousandFloatingDreamsR5 = Weapon("A Thousand Floating Dreams R5 - No same elements", 541.83, 0, 0, 0, 264.61, 78, 0, 0, 0, 0, 0, 0, [])
- AThousandFloatingDreamsSameR5 = Weapon("A Thousand Floating Dreams R5 - One same element", 541.83, 0, 0, 0, 328.61, 52, 0, 0, 0, 0, 0, 0, [])
- TullaytullahsRemembrance = Weapon("Tullaytullah's Remembrance", 674.33, 0, 44.1, 0, 0, 0, 42, 0, 0, 0, 10, 0, [])
- TullaytullahsRemembranceR5 = Weapon("Tullaytullah's Remembrance R5", 674.33, 0, 44.1, 0, 0, 84, 0, 0, 0, 0, 20, 0, [])
- books = [TheWidsith,TheWidsithR5,SacrificialFragments,SolarPearl,SolarPearlR5,MappaMare,MappaMareR5,BlackcliffAgate,BlackcliffAgateMax,BlackcliffAgateMaxR5,HakushinRing,HakushinRingR5,OathswornsEye,WanderingEvenstar,WanderingEvenstarR5,DodocoTales,SkywardAtlas,SkywardAtlasR5,LostPrayertotheSacredWinds,LostPrayertotheSacredWindsR5,MemoryofDustNo,MemoryofDust,MemoryofDustR5,KagurasVerityNo,KagurasVerity,KagurasVerityR5,AThousandFloatingDreams,AThousandFloatingDreamsSame,AThousandFloatingDreamsR5,AThousandFloatingDreamsSameR5,TullaytullahsRemembrance,TullaytullahsRemembranceR5]
- #substats
- start_rolls = 3
- max_rolls_p_art = 4
- 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 += max(0, min(start_rolls, 2 + sands[0] + cup[0] + cap[0])) * atk_p_roll
- self.ctr += max(0, min(start_rolls, 2 + sands[1] + cup[1] + cap[1])) * ctr_roll
- self.cdm += max(0, min(start_rolls, 2 + sands[2] + cup[2] + cap[2])) * cdm_roll
- self.em += max(0, min(start_rolls, 2 + sands[3] + cup[3] + cap[3])) * em_roll
- AtkElCtr = Stats(True, "ATK%/Elemental/Crit Rate", 46.6, 31.1, 0, 0, 46.6, [0,1,1,1], [1,1,1,1], [1,0,1,1])
- AtkElCdm = Stats(True, "ATK%/Elemental/Crit DMG", 46.6, 0, 62.2, 0, 46.6, [0,1,1,1], [1,1,1,1], [1,1,0,1])
- AtkElCrt = Stats(True, "ATK%/Elemental/Crit", 46.6, 15.55, 31.1, 0, 46.6, [0,1,1,1], [1,1,1,1], [1,1,1,1])
- EmElCtr = Stats(True, "EM/Elemental/Crit Rate", 0, 31.1, 0, 187, 46.6, [1,1,1,0], [1,1,1,1], [1,0,1,1])
- EmElCdm = Stats(True, "EM/Elemental/Crit DMG", 0, 0, 62.2, 187, 46.6, [1,1,1,0], [1,1,1,1], [1,1,0,1])
- EmElCrt = Stats(True, "EM/Elemental/Crit", 0, 15.55, 31.1, 187, 46.6, [1,1,1,0], [1,1,1,1], [1,1,1,1])
- AtkEmCtr = Stats(True, "ATK%/EM/Crit Rate", 46.6, 31.1, 0, 187, 0, [0,1,1,1], [1,1,1,0], [1,0,1,1])
- AtkEmCdm = Stats(True, "ATK%/EM/Crit DMG", 46.6, 0, 62.2, 187, 0, [0,1,1,1], [1,1,1,0], [1,1,0,1])
- AtkEmCrt = Stats(True, "ATK%/EM/Crit", 46.6, 15.55, 31.1, 187, 0, [0,1,1,1], [1,1,1,0], [1,1,1,1])
- AtkAtkCtr = Stats(True, "ATK%/ATK%/Crit Rate", 93.2, 31.1, 0, 0, 0, [0,1,1,1], [0,1,1,1], [1,0,1,1])
- AtkAtkCdm = Stats(True, "ATK%/ATK%/Crit DMG", 93.2, 0, 62.2, 0, 0, [0,1,1,1], [0,1,1,1], [1,1,0,1])
- AtkAtkCrt = Stats(True, "ATK%/ATK%/Crit", 93.2, 15.55, 31.1, 0, 0, [0,1,1,1], [0,1,1,1], [1,1,1,1])
- stats = [AtkElCrt,EmElCrt,AtkEmCrt,AtkAtkCrt]
- #stats = [AtkElCtr,AtkElCdm,AtkAtkCtr,AtkAtkCdm]
- #stats = [Stats(True, "EM/EM/EM", 0, 0, 0, 561, 0, [1,1,1,0], [1,1,1,0], [1,1,1,0])]
- #buffs
- class Buff:
- def __init__(self, name, atk_p, em, dmg, res):
- self.name = name
- self.atk_p = atk_p
- self.em = em
- self.dmg = dmg
- self.res = res
- ToM = Buff("ToM", 20, 0, 0, 0)
- Zhongli = Buff("Zhongli", 0, 0, 0, -20)
- Instructor = Buff("Instructor", 0, 120, 0, 0)
- Faruzan = Buff("Faruzan", 0, 0, 50.37, -40)
- Diona = Buff("Diona", 0, 200, 0, 0)
- Noblesse = Buff("Noblesse", 20, 0, 0, 0)
- #set
- class Set:
- def __init__(self, name, atk_p, em, dmg, normal_dmg, charged_dmg, atk_spd):
- self.name = name
- self.atk_p = atk_p
- self.f_atk = 311
- self.em = em
- self.dmg = dmg
- self.normal_dmg = normal_dmg
- self.charged_dmg = charged_dmg
- self.atk_spd = atk_spd
- HeartofDepth = Set("Heart of Depth", 0, 0, 0, 30, 30, 0)
- ShimenawasReminiscence = Set("Shimenawa’s Reminiscence", 18, 0, 0, 50, 50, 0)
- EchoesofanOffering = Set("Echoes of an Offering", 18, 0, 0, 0, 0, 0)
- #OldDesertPavilionChronicle = Set("Desert Pavilion Chronicle", 0, 0, 15, 30, 0, 10)
- DesertPavilionChronicle = Set("Desert Pavilion Chronicle", 0, 0, 15, 40, 0, 10)
- Thundersoother = Set("Thundersoother", 0, 0, 35, 0, 0, 0)
- GildedDreamsSame = Set("Gilded Dreams, One same element", 14, 180, 0, 0, 0, 0)
- GildedDreams = Set("Gilded Dreams, No same elements", 0, 230, 0, 0, 0, 0)
- ViridescentVenerer = Set("Viridescent Venerer", 0, 78, 5, 0, 0, 0)
- ElAtk = Set("El/Atk% 2-piece", 18, 0, 15, 0, 0, 0)
- AtkAtk = Set("Atk%/Atk% 2-piece", 36, 0, 0, 0, 0, 0)
- ElEm = Set("El/EM 2-piece", 0, 80, 15, 0, 0, 0)
- EmAtk = Set("EM/Atk% 2-piece", 18, 80, 0, 0, 0, 0)
- EmEm = Set("EM/EM 2-piece", 0, 160, 0, 0, 0, 0)
- sets = [HeartofDepth,ShimenawasReminiscence,EchoesofanOffering,DesertPavilionChronicle,Thundersoother,GildedDreamsSame,ViridescentVenerer]
- sets = [EchoesofanOffering,DesertPavilionChronicle]
- #sets = [GildedDreams,ViridescentVenerer]
- #character
- class Character:
- def __init__(self, name, b_atk, ctr, cdm, atk_p):
- self.name = name
- self.b_atk = b_atk
- self.atk_p = atk_p
- self.ctr = ctr
- self.cdm = cdm
- Wanderer = Character("Wanderer", 327.67, 24.2, 50, 0)
- #Bonuses
- burst_dmg_bonus = 0
- old_normal_dmg_bonus = 68
- old_charged_dmg_bonus = 54.4
- normal_scaling_bonus = 153.7
- charged_scaling_bonus = 143
- C6 = False
- old = [157.72, 137.55, 102.58, 102.58, 35, 0, 237.74, 171.36, 264.96, 40, 0, 0]
- scaling = [130.8, 123.6, 90.4, 90.4, 35, 0, 237.7, 171.4, 265, 40, 0, 0]
- types = ["Normal", "Normal", "Normal", "Normal", "None", "Swirl", "Charged", "Skill", "Burst", "Normal", "Faruzan normal", "Faruzan none"]
- #combo
- import random
- atk_spd_bonus = 0
- E_time = 9
- N_cancle = [False, False, False, False]
- N_times = [0.4875, 0.4875, 0, 1.17]
- A4_initial = 16
- a4_increase = 12
- #hits
- hits = [[],[],[],[],[]]
- hits[0] = [6.0, 6.0, 6.0, 6.0, 0, 9.0, 1, 1, 5, 0, 18.0, 0]
- hits[1] = [7.0, 6.0, 6.0, 6.0, 0, 9.0, 1, 1, 5, 0, 19.0, 0]
- hits[2] = [7.0, 7.0, 7.0, 7.0, 0, 10.0, 1, 1, 5, 0, 21.0, 0]
- hits[3] = [8.0, 8.0, 7.0, 7.0, 0, 11.0, 1, 1, 5, 0, 8.0, 0]
- hits[4] = [8.0, 8.0, 8.0, 8.0, 0, 12.0, 1, 1, 5, 0, 8.0, 0]
- hits_A4 = [[],[],[],[],[]]
- hits_A4[0] = [7.020439000627398, 6.687644000580881, 3.6722580001593963, 3.6722580001593963, 12.06154400027032, 14.418990998197085, 1, 1, 5, 0, 10.259165999073558, 2.627877000013415]
- hits_A4[1] = [7.9316500007547655, 7.306129000667331, 3.7572460001712757, 3.7572460001712757, 13.053432000408964, 14.83579399816392, 1, 1, 5, 0, 11.068102998468149, 2.8701020000472726]
- hits_A4[2] = [8.106480000684629, 8.004960000760606, 4.234097000237929, 4.234097000237929, 14.790132000651717, 16.185478997901967, 1, 1, 5, 0, 11.703012997992982, 3.2379200000986854]
- hits_A4[3] = [8.65426100027467, 8.654244000274682, 4.320009000249938, 4.320009000249938, 15.142060000700909, 16.78571999800034, 1, 1, 5, 0, 8.65426100027467, 0]
- hits_A4[4] = [9.031096999992645, 9.001047000015134, 4.747087000309634, 4.747087000309634, 16.98534000095856, 18.335448998383036, 1, 1, 5, 0, 9.031096999992645, 0]
- def Combo(samples, atk_spd, do_A4):
- #print("Combo, atk speed: " + str(atk_spd))
- counts = [0, 0, 0, 0, 0, 0, 1, 1, 5, 0, 0, 0]
- for i in range(0, samples):
- time = E_time
- n = 0
- A4 = False
- A4_chance = A4_initial
- icd = 0
- icd_c = 0
- faruzan = 0
- while time > 0:
- if A4 and N_cancle[n] and do_A4:
- #print("D")
- time -= 0.5
- icd -= 0.5
- if faruzan <= 0:
- counts[11] += 1 / samples
- faruzan = 0.8
- if faruzan > 0:
- faruzan -= 0.5
- counts[4] += 4 / samples
- counts[5] += 2 / samples
- A4 = False
- n = 0
- else:
- counts[n] += 1 / samples
- if C6:
- counts[9] += 1 / samples
- time -= N_times[n] / atk_spd
- if icd <= 0:
- icd = 2.5
- icd_c = -1
- counts[5] += 1 / samples
- if icd > 0:
- icd -= N_times[n] / atk_spd
- icd_c += 1
- if C6:
- icd_c += 1
- while icd_c >= 3:
- counts[5] += 1 / samples
- icd_c -= 3
- if faruzan >= 0.8:
- counts[10] += 1 / samples
- if faruzan <= 0:
- counts[10] += 1 / samples
- faruzan = 0.8
- if faruzan > 0:
- faruzan -= N_times[n] / atk_spd
- n += 1
- #print("N" + str(n))
- n %= 4
- if not A4 and N_times[n] > 0:
- if random.random() * 100 <= A4_chance:
- A4 = True
- A4_chance = A4_initial
- else:
- A4_chance += a4_increase
- #counts = [round(counts[0], 5), round(counts[1], 5), round(counts[2], 5), round(counts[3], 5), round(counts[4], 5), round(counts[5], 5), round(counts[6], 6), 1, 1, 5]
- #counts[5] = 0
- return counts
- #print(Combo(1, 1.3))
- #c = Combo(100000, 1.2)
- #s = scaling
- #n = c[0] * s[0] + c[1] * s[1] + c[2] * s[2] + c[3] * s[3]
- #n *= 3.0367
- #n += c[4] * s[4]
- #print(n)
- #calculation
- class Result:
- def __init__(self, weapon, artSet, stat, atk, em, ctr, cdm, total, A4):
- self.weapon = weapon
- self.artSet = artSet
- self.stats = [stat.name]
- self.atk = atk
- self.em = em
- self.ctr = ctr
- self.cdm = cdm
- self.total = [total]
- self.second = ""
- self.difference = 2
- self.A4 = A4
- def Swirl(em):
- bonus = 16 * em / (em + 2000)
- return 868.11 * (1 + bonus)
- def evaluate(character, weapon, artSet, stats, buffs):
- stat = Stats(False, stats.name, stats.atk_p, stats.ctr, stats.cdm, stats.em, stats.dmg, stats.sand, stats.cup, stats.cap)
- for i in range(max_rolls_p_art):
- artifact(stat.cap, character, weapon, artSet, stat, buffs)
- artifact(stat.sand, character, weapon, artSet, stat, buffs)
- artifact(stat.cup, character, weapon, artSet, stat, buffs)
- artifact([1,1,1,1], character, weapon, artSet, stat, buffs)
- artifact([1,1,1,1], character, weapon, artSet, stat, buffs)
- result = calculate(character, weapon, artSet, stat, buffs)
- if len(weapon.songs) > 0:
- total = 0
- for song in range(0, len(weapon.songs)):
- newResult = calculate(character, weapon.songs[song], artSet, stat, buffs)
- total += newResult.total[0]
- result.total = [total / len(weapon.songs)]
- return result
- def artifact(weights, character, weapon, artSet, stat, buffs):
- stat.atk_p += atk_p_roll * weights[0]
- dmg1 = test(character, weapon, artSet, stat, buffs)
- stat.atk_p -= atk_p_roll * weights[0]
- stat.ctr += ctr_roll * weights[1]
- dmg2 = test(character, weapon, artSet, stat, buffs)
- stat.ctr -= ctr_roll * weights[1]
- stat.cdm += cdm_roll * weights[2]
- dmg3 = test(character, weapon, artSet, stat, buffs)
- stat.cdm -= cdm_roll * weights[2]
- stat.em += em_roll * weights[3]
- dmg4 = test(character, weapon, artSet, stat, buffs)
- stat.em -= em_roll * weights[3]
- top = max(dmg1, dmg2, dmg3, dmg4)
- if top == dmg1:
- #print("Rolled Atk%!")
- stat.atk_p += atk_p_roll * weights[0]
- elif top == dmg2:
- #print("Rolled Crit Rate!")
- stat.ctr += ctr_roll * weights[1]
- elif top == dmg3:
- #print("Rolled Crit DMG!")
- stat.cdm += cdm_roll * weights[2]
- elif top == dmg4:
- #print("Rolled EM!")
- stat.em += em_roll * weights[3]
- def test(character, weapon, artSet, stat, buffs):
- if len(weapon.songs) <= 0:
- return calculate(character, weapon, artSet, stat, buffs).total
- else:
- dps = 0
- for song in range(0, len(weapon.songs)):
- dps += calculate(character, weapon.songs[song], artSet, stat, buffs).total[0]
- return dps / len(weapon.songs)
- def calculate(character, weapon, artSet, stat, buffs):
- em = weapon.em + stat.em + artSet.em
- bonus_dmg = weapon.dmg + stat.dmg + artSet.dmg
- atk_p = weapon.atk_p + stat.atk_p + artSet.atk_p + character.atk_p
- f_atk = stat.f_atk
- ctr = character.ctr + weapon.ctr + stat.ctr
- cdm = character.cdm + weapon.cdm + stat.cdm
- global res
- resistance = res
- for i in range(0, len(buffs)):
- atk_p += buffs[i].atk_p
- em += buffs[i].em
- bonus_dmg += buffs[i].dmg
- resistance += buffs[i].res
- if resistance < 0:
- resistance /= 2
- ctr = min(ctr, 100)
- atk = (character.b_atk + weapon.b_atk) * (1 + atk_p / 100) + f_atk
- atk += em * weapon.em_to_atk / 100
- atk_spd = weapon.atk_spd + artSet.atk_spd + atk_spd_bonus
- total = 0
- swirl = 0
- combo = hits[int(atk_spd / 10)]
- for i in range(0, len(combo)):
- dmg = 100 + bonus_dmg
- flat = 0
- s = scaling[i] / 100
- if types[i] == "Normal":
- #dmg += weapon.normal_dmg + artSet.normal_dmg + old_normal_dmg_bonus
- dmg += weapon.normal_dmg + artSet.normal_dmg
- s *= normal_scaling_bonus / 100
- if artSet.name == "Echoes of an Offering":
- s += 0.35
- elif types[i] == "Skill":
- dmg += weapon.skill_dmg
- elif types[i] == "Charged":
- #dmg += weapon.charged_dmg + artSet.charged_dmg + charged_dmg_bonus
- dmg += weapon.charged_dmg + artSet.charged_dmg
- s *= charged_scaling_bonus / 100
- flat += faruzan_flat
- elif types[i] == "Burst":
- dmg += weapon.burst_dmg + burst_dmg_bonus
- flat += faruzan_flat
- elif types[i] == "Swirl":
- swirl += Swirl(em) * combo[i] * 2
- continue
- elif types[i] == "Faruzan normal":
- #dmg += weapon.normal_dmg + artSet.normal_dmg + old_normal_dmg_bonus
- dmg += weapon.normal_dmg + artSet.normal_dmg
- flat += faruzan_flat
- elif types[i] == "Faruzan none":
- flat += faruzan_flat
- add = (atk * s + flat) * dmg / 100
- if(add > 0):
- total += add * combo[i]
- total *= 1 + ctr / 100 * cdm / 100
- total /= 2
- total *= 1 - resistance / 100
- if artSet.name == "Viridescent Venerer":
- swirl /= 0.85
- total += swirl
- old = total
- total = 0
- swirl = 0
- if A4:
- combo = hits_A4[int(atk_spd / 10)]
- for i in range(0, len(combo)):
- dmg = 100 + bonus_dmg
- flat = 0
- s = scaling[i] / 100
- if types[i] == "Normal":
- #dmg += weapon.normal_dmg + artSet.normal_dmg + old_normal_dmg_bonus
- dmg += weapon.normal_dmg + artSet.normal_dmg
- s *= normal_scaling_bonus / 100
- if artSet.name == "Echoes of an Offering":
- s += 0.35
- elif types[i] == "Skill":
- dmg += weapon.skill_dmg
- elif types[i] == "Charged":
- #dmg += weapon.charged_dmg + artSet.charged_dmg + charged_dmg_bonus
- dmg += weapon.charged_dmg + artSet.charged_dmg
- s *= charged_scaling_bonus / 100
- flat += faruzan_flat
- elif types[i] == "Burst":
- dmg += weapon.burst_dmg + burst_dmg_bonus
- flat += faruzan_flat
- elif types[i] == "Swirl":
- swirl += Swirl(em) * combo[i] * 2
- continue
- elif types[i] == "Faruzan normal":
- #dmg += weapon.normal_dmg + artSet.normal_dmg + old_normal_dmg_bonus
- dmg += weapon.normal_dmg + artSet.normal_dmg
- flat += faruzan_flat
- elif types[i] == "Faruzan none":
- flat += faruzan_flat
- add = (atk * s + flat) * dmg / 100
- if(add > 0):
- total += add * combo[i]
- total *= 1 + ctr / 100 * cdm / 100
- total /= 2
- total *= 1 - resistance / 100
- if artSet.name == "Viridescent Venerer":
- swirl /= 0.85
- total += swirl
- used_A4 = (total > old)
- total = max(total, old)
- return Result(weapon, artSet, stat, atk, em, ctr, cdm, total, used_A4)
- def printResult(result):
- print("======================================================================")
- print(result.weapon.name)
- print()
- if not result.second == "":
- print("Best set: " + result.artSet.name)
- print("Second best: " + result.second)
- print("Difference: " + str(round(result.difference * 100 - 100, 2)) + "%")
- else:
- print("Artifact set: " + result.artSet.name)
- print()
- if len(result.total) == 1:
- print("Main stats: " + result.stats[0])
- else:
- print("Main stats ranking:")
- for i in range(len(result.stats)):
- print(result.stats[i] + " - dps: " + str(round(result.total[i], 2)))
- print()
- print("Best stats for this weapon:")
- print("Atk: " + str(round(result.atk, 2)))
- print("EM: " + str(round(result.em, 2)))
- print("Crit Rate: " + str(round(result.ctr, 2)))
- print("Crit DMG: " + str(round(result.cdm, 2)))
- print()
- print("Best total DMG: " + str(round(result.total[0], 2)))
- print("Used his A4: " + str(result.A4))
- print()
- def testWeapons(weapons, artSets, stats, buffs):
- results = []
- for i in range(0, len(weapons)):
- results.append(testSets(weapons[i], artSets, stats, buffs))
- if sort:
- results.sort(key=lambda x: x.total[0], reverse=True)
- for results in results:
- printResult(results)
- def testSets(weapon, artSets, stats, buffs):
- result = testStats(weapon, artSets[0], stats, buffs)
- if len(artSets) <= 1:
- return result
- for i in range(1, len(artSets)):
- newResult = testStats(weapon, artSets[i], stats, buffs)
- if newResult.total > result.total:
- newResult.second = result.artSet.name
- newResult.difference = newResult.total[0] / result.total[0]
- result = newResult
- else:
- gain = result.total[0] / newResult.total[0]
- if gain < result.difference:
- result.second = newResult.artSet.name
- result.difference = gain
- return result
- def testStats(weapon, artSet, stats, buffs):
- result = evaluate(Wanderer, weapon, artSet, stats[0], buffs)
- if len(stats) <= 1:
- return result
- for i in range(1, len(stats)):
- newResult = evaluate(Wanderer, weapon, artSet, stats[i], buffs)
- if newResult.total[0] > result.total[0]:
- newResult.total += result.total
- newResult.stats += result.stats
- result = newResult
- else:
- for x in range(0, len(result.stats)):
- if newResult.total[0] > result.total[x]:
- result.total.insert(x, newResult.total[0])
- result.stats.insert(x, newResult.stats[0])
- break
- if x == len(result.stats) - 1:
- result.total.append(newResult.total[0])
- result.stats.append(newResult.stats[0])
- return result
- #A1
- #pyro
- Wanderer.atk_p += 30
- #cryo
- Wanderer.ctr += 20
- #hydro
- E_time += 2
- #charge before_E
- charged_dmg_bonus = 0
- E_time += 1
- #enable A4
- A4 = True
- N_cancle = [False, False, True, False]
- #C1
- #atk_spd_bonus = 10
- #scaling[4] += 25
- #C2
- #burst_dmg_bonus += 200
- #E_time -= 0.5
- #C3
- #scaling[8] = 312.8
- #C5
- #scaling[7] = 202.3
- #old_normal_dmg_bonus = 77.75
- #old_charged_dmg_bonus = 62.2
- #normal_scaling_bonus = 161.4
- #charged_scaling_bonus = 149.1
- #C6
- #C6 = True
- #E_time += 2
- #hits[0] = [7.0, 7.0, 6.0, 6.0, 0, 20.0, 1, 1, 5, 26.0, 19.0, 0]
- #hits[1] = [7.0, 7.0, 7.0, 7.0, 0, 19.0, 1, 1, 5, 28.0, 21.0, 0]
- #hits[2] = [8.0, 8.0, 8.0, 8.0, 0, 22.0, 1, 1, 5, 32.0, 24.0, 0]
- #hits[3] = [9.0, 8.0, 8.0, 8.0, 0, 25.0, 1, 1, 5, 33.0, 9.0, 0]
- #hits[4] = [9.0, 9.0, 9.0, 9.0, 0, 27.0, 1, 1, 5, 36.0, 9.0, 0]
- #hits_A4[1] = [8.6544870002745, 8.105421000685421, 4.24554800023953, 4.24554800023953, 15.037560000686302, 25.191859001367995, 1, 1, 5, 25.25100400428674, 12.013336997760735, 3.300324000107408]
- #hits_A4[2] = [9.031295999992496, 8.994642000019928, 4.650986000296201, 4.650986000296201, 16.015208000822955, 27.067030002332892, 1, 1, 5, 27.32791000642171, 12.873292997117144, 3.486290000133402]
- #hits_A4[3] = [9.897850999343966, 9.321999999774933, 4.771906000313103, 4.771906000313103, 17.037132000965798, 28.42796400296172, 1, 1, 5, 28.763663007897602, 9.897850999343966, 0]
- #hits_A4[4] = [10.126148999173108, 10.008512999261146, 5.249168000379814, 5.249168000379814, 19.003728001240685, 30.527797003780254, 1, 1, 5, 30.632998009819197, 10.126148999173108, 0]
- #Faruzan
- #old_faruzan_flat = 761.25 * 0.459
- faruzan_flat = 761.25 * 0.32
- Wanderer.cdm = 40
- sort = True
- print("Weapon comparison:")
- testWeapons(books, sets, stats, [Faruzan,Noblesse])
- #testWeapons([TullaytullahsRemembrance], [DesertPavilionChronicle], [AtkElCtr], [Faruzan,Noblesse])
- #testWeapons([SolarPearlR5], [DesertPavilionChronicle], [AtkElCtr], [Faruzan,Noblesse])
Advertisement
Add Comment
Please, Sign In to add comment