# !/usr/bin/env python3
# proof of conept of calculating combat power exactly
# based on this mule: https://imgur.com/a/HSIHL43
# credits to Ascheric for the info about converting weapon to bow:
# https://www.reddit.com/r/Maplestory/comments/1de4h6p/comment/l89hsqs/
# class innate stats (check class passives or hover stats and see values from
# "skills")
# excluding blessing of the fairy/empress and pet buffs
innateFlatAtt = (
40 + # lune
40 + # Cane Expert
0
)
# excluding reboot final dmg. also add ratio between highest wep multiplier and
# wep multiplier if
# using weapon that isn't the highest possible for the class
innateFinalDmg = (
1.30 * # piercing vision
1.32 * # Cane Expert
1
)
innateDmg = (
30 + # Priere D'Aria
0
)
innateCritDmg = (
15 + # Cane Expert
0
)
innateBossDmg = (
0
)
flatStat1 = 2077 # hover 1st stat, 1st value
stat1 = 129 # hover 1st stat, 2nd value
finalStat1 = 500 # hover 1st stat, 3rd value
innateStat1 = 140 # hover 1st stat, 5th value ("skills")
flatStat2 = 750 # hover 2nd stat, 1st value
stat2 = 48 # hover 2nd stat, 2nd value
finalStat2 = 85 # hover 2nd stat, 3rd value
innateStat2 = 40 # hover 2nd stat, 5th value ("skills")
flatAtt = 484 # hover att, 1st value
att = 6 # hover att, 2nd value
critDmg = 40.50
dmg = 72
bossDmg = 25
finalDmg = 71.60
weaponMul = 1.3
weaponSfAtt = 37 # weapon attack from starforce (orange number)
weaponBaseAtt = 108 # weapon base attack (white number)
bowBaseAtt = 105 # base attack of the equivalent bow (example absolab cane -> absolab bow)
# ------
def toMultiplier(percent):
return 1 + percent / 100.0
import math
attMul = toMultiplier(att)
totalFlatAtt = (
(flatAtt - innateFlatAtt)
+ math.floor((bowBaseAtt / weaponBaseAtt - 1) * (weaponBaseAtt + weaponSfAtt))
# calculated as if you have an equivalently upgraded bow
)
totalStat1 = math.floor((flatStat1 - innateStat1) * toMultiplier(stat1) + finalStat1)
totalStat2 = math.floor((flatStat2 - innateStat2) * toMultiplier(stat2) + finalStat2)
combatPower = math.floor(
(4*totalStat1 + totalStat2) * 0.01 *
math.floor(totalFlatAtt * attMul) *
toMultiplier(critDmg - innateCritDmg + 35) *
toMultiplier(bossDmg - innateBossDmg + dmg - innateDmg) *
(toMultiplier(finalDmg) / innateFinalDmg)
)
print(f"combat power: {combatPower}")
print(" expected: 236118")
Click Run or press shift + ENTER to run code