Skip to content

Instantly share code, notes, and snippets.

@Papersman
Last active September 30, 2022 12:22
Show Gist options
  • Save Papersman/e471ec33a06c69978b2965f6deeac1dd to your computer and use it in GitHub Desktop.
Save Papersman/e471ec33a06c69978b2965f6deeac1dd to your computer and use it in GitHub Desktop.
GI 3.1.51 v2 / 3.1.50 v1
# Nahida - V1
# 26 subs = EM*10 / ATK*2 / CritRate*11 / CritDmg*3
# Gilded Dreams 4
# Nahida / Pyro / Electro / Hydro
# CHARACTER BASE STATS #
baseATK = 299
baseHP = 10360
baseEM = 115
baseER = 1
baseCritRate = 0.05
baseCritDmg = 0.5
baseDmgBonus = 1
skill = 1
# lamp - WEAPON BASE STATS #
weaponATK = 542
weaponHP = 0
weaponEM = 265
weaponER = 0
weaponCritRate = 0
weaponCritDmg = 0
weaponDmgBonus = 0.3 # 3 different elements
# ARTI #
artiATK = 311+(baseATK+weaponATK)*0.05*2
artiHP = 4780+(baseHP+weaponHP)*0.05*0
artiEM = 187+20*10+80+150
artiER = 0.055*0
artiCritRate = 0.033*11
artiCritDmg = 0.622+0.066*3
artiDmgBonus = 0.466
# STATS #
ATK = baseATK + weaponATK +artiATK
HP = baseHP + weaponHP + artiHP
EM = baseEM + weaponEM + artiEM
ER = baseER + weaponER + artiER
critRate = baseCritRate + weaponCritRate + artiCritRate
critDmg = baseCritDmg + weaponCritDmg + artiCritDmg
dmgBonus = baseDmgBonus + weaponDmgBonus + artiDmgBonus
# reaction cal
def spread(EM=EM):
spreadMvBonus = 1.25*1805*((1+5*EM)/(1200+EM))
return spreadMvBonus
# Dmg simulate
def E_OffFieldDmgSim(skillName='默认',skill=skill,ATK=ATK,HP=HP,EM=EM,ER=ER,critRate=critRate,critDmg=critDmg,dmgBonus=dmgBonus):
if (EM-200)>800:
eEM = 800
else:
eEM = EM - 200
mvBonus = 3.715*EM + spread(EM)
# mvBonus = 3.715*EM
totaldmgBonus = dmgBonus + eEM*0.001 + 0.2 # Q: +0.2
totalCritRate = critRate + eEM*0.0003
crit = totalCritRate*critDmg + 1
enemyRes = 0.9
enemyDEF = 0.5
avgskillDmg = (skill*ATK + mvBonus)*totaldmgBonus*crit*enemyRes*enemyDEF
avgskillDmg_wioSpread = (skill*ATK + 3.715*EM)*totaldmgBonus*crit*enemyRes*enemyDEF
maxskillDmg = (skill*ATK + mvBonus)*totaldmgBonus*(critDmg+1)*enemyRes*enemyDEF
maxskillDmg_wioSpread = (skill*ATK + 3.715*EM)*totaldmgBonus*(critDmg+1)*enemyRes*enemyDEF
DPS = (avgskillDmg + avgskillDmg_wioSpread)/3.2 # Q: -0.3*2
print('\n')
print('\033[44m DmgCal For '+str(skillName)+' with ATK multiplier = '+ '{:.2%}'.format(skill)+' : '+'\033[0m')
print('\033[32mDPS期望 = ' + str(DPS)+'\033[0m')
print('E期望_蔓激化 = '+ str(avgskillDmg))
print('E期望_直伤 = '+ str(avgskillDmg_wioSpread))
print('E暴击_蔓激化 = '+ str(maxskillDmg))
print('E暴击_直伤 = '+ str(maxskillDmg_wioSpread)+'\n')
print('\033[32m--- 角色面板 ---\033[0m')
print('\033[32m攻击力 = '+ str(ATK)+'\033[0m')
print('攻击力*攻击倍率 = '+ str(skill*ATK))
print('精通转化攻击乘区加数 = '+ str(3.715*EM))
print('蔓激化攻击乘区加数 = '+str(spread(EM)))
print('\033[32m精通 = '+ str(EM)+'\033[0m')
print('\033[32m增伤乘区 = '+ str('{:.2%}'.format(totaldmgBonus))+'\033[0m')
print('暴击乘区 = '+ str('{:.2%}'.format(crit)))
print('\033[32m暴击率 = '+ str('{:.2%}'.format(totalCritRate))+'\033[0m')
print('\33[32m暴击伤害 = '+ str('{:.2%}'.format(critDmg))+'\033[0m\n')
if __name__ == "__main__":
E_OffFieldDmgSim('E_OffField',1.858)
print('蔓激化攻击乘区加数 = '+str(spread(EM)))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment