dmgt

Privateunrated

Content

224 lines
{=(COMMENT):Calc eAtk using atk/crit/cdmg/dmg. "sep" is the separator you want to use "/" by default. Don't use space as a separator.}
{=(prefix):!}
{=(sep):/}
{=(embedcolor):#60CFB7}
{=(charlevel):80}
{=(targetlevel):90}
{=(defaultres):10}
{=(TCNName):TCN}
{=(HUBLink):}

{=(NO-TOUCHY-BELOW-THIS): Everything configurable is above ^ this line.}

{=():}
{=(Lwr):{replace({sep}, ):{lower:{args}}}}
{=(jargs):{join(~):{args}}}
{=(arg1):{list(0):{jargs}}}
{=(arg2):{list(1):{jargs}}}
{=(arg3):{list(2):{jargs}}}
{=(arg4):{list(3):{jargs}}}
{=(arg5):{list(4):{jargs}}}
{=(arg9):}
{=(mvy):{contains(mv):{args}}}{=(fly):{contains(flat):{args}}}
{=(emy):{or({contains(em):{args}}==true|{contains(r):{args}}==true|{contains(f):{args}}==true):true|false}}
{{or({emy}==true|{fly}==true):=(mvy):true}}
{=(react):{or({contains(em):{args}}==true|{contains(r):{args}}==true):Reverse|{if({contains(f):{args}}==true):Forward|None}}}
{=(None):0}{=(Reverse):1.5}{=(Forward):2}

{=(j):{if({in(/):{arg3}}==true):2|{if({m:trunc({list(0):{replace({sep},~):{arg2}}})}>100):2|{if({m:trunc({list(0):{replace({sep},~):{arg1}}})}<=100):2|9}}}}
{=(atk1):{m:{list(0):{replace({sep},~):{arg1}}}}}
{{all({atk1}<0|{atk1}!=):=(atk1):0}}
{=(crate1):{m:{list(1):{replace({sep},~):{arg1}}}}}
{{all({crate1}<0|{crate1}!=):=(crate1):0}}{{all({crate1}>100|{crate1}!=):=(crate1):100}}
{=(cdmg1):{m:{list(2):{replace({sep},~):{arg1}}}}}
{{all({cdmg1}<0|{cdmg1}!=):=(cdmg1):0}}
{=(dmg1):{m:{list(3):{replace({sep},~):{arg1}}}}}
{{all({dmg1}<0|{dmg1}!=):=(dmg1):0}}
{=(atk2):{m:{list(0):{replace({sep},~):{arg{j}}}}}}
{{all({atk2}<0|{atk2}!=):=(atk2):0}}
{=(crate2):{m:{list(1):{replace({sep},~):{arg{j}}}}}}
{{all({crate2}<0|{crate2}!=):=(crate2):0}}{{all({crate2}>100|{crate2}!=):=(crate2):100}}
{=(cdmg2):{m:{list(2):{replace({sep},~):{arg{j}}}}}}
{{all({cdmg2}<0|{cdmg2}!=):=(cdmg2):0}}
{=(dmg2):{m:{list(3):{replace({sep},~):{arg{j}}}}}}
{{all({dmg2}<0|{dmg2}!=):=(dmg2):0}}
{=(mv):{list(0):{replace({sep},~):{list({math:trunc({index(mv):{args}}+1)}):{replace( ,~):{args}}}}}}
{{if({in({sep}):{mv}}==true):=(mv):100}}
{=(spmult):{m:100+{list(1):{replace({sep},~):{list({math:trunc({index(mv):{args}}+1)}):{replace( ,~):{args}}}}}}}
{{or({in(m):{spmult}}==true|{spmult}==):=(spmult):100}}
{=(flat):{list({math:trunc({index(flat):{args}}+1)}):{replace( ,~):{args}}}}
{{if({in({sep}):{flat}}==true):=(flat):0}}
{=(em):{list(0):{replace({sep},~):{list({math:trunc({index(em):{args}}+1)}):{replace( ,~):{args}}}}}}
{{or({in(m):{em}}==true|{em}==):=(em):0}}
{=(bonus):{list(1):{replace({sep},~):{list({math:trunc({index(em):{args}}+1)}):{replace( ,~):{args}}}}}}
{{or({in(m):{bonus}}==true|{bonus}==):=(bonus):0}}
{=(tbonus):{list(2):{replace({sep},~):{list({math:trunc({index(em):{args}}+1)}):{replace( ,~):{args}}}}}}
{{or({in(m):{tbonus}}==true|{tbonus}==):=(tbonus):0}}
{embed(color):{embedcolor}}

{=(kbork):{list({math:trunc({index(em):{args}}+1)}):{replace( ,~):{args}}}!={arg3}}
{{if({kbork}!=true):=(kbork):{list({math:trunc({index(mv):{args}}+1)}):{replace( ,~):{args}}}!={arg3}}}
{=(k):{and({in(/):{arg3}}==true|{kbork}!=true):3|{and({m:trunc({list(0):{replace({sep},~):{arg2}}})}<=100|{m:trunc({list(0):{replace({sep},~):{arg1}}})}>100):2|9}}}
{=(res):{m:trunc({list(0):{replace({sep},~):{arg{k}}}})}}
{=(clvl):{m:trunc({list(1):{replace({sep},~):{arg{k}}}})}}
{{all({clvl}<0|{clvl}!=):=(clvl):1}}{{all({clvl}>90|{clvl}!=):=(clvl):90}}
{=(elvl):{m:trunc({list(2):{replace({sep},~):{arg{k}}}})}}
{{all({elvl}<0|{elvl}!=):=(elvl):1}}{{all({elvl}>100|{elvl}!=):=(elvl):100}}
{=(defred):{m:trunc({list(3):{replace({sep},~):{arg{k}}}})}}
{{all({defred}>90|{defred}!=):=(defred):90}}

{{if({in(m:):{res}}==true):=(res):{defaultres}}}
{{if({in(m:):{clvl}}==true):=(clvl):{charlevel}}}
{{if({in(m:):{elvl}}==true):=(elvl):{targetlevel}}}
{{if({in(m:):{defred}}==true):=(defred):0}}

{=(resd):{m:{res}/100}}
{=(resmult):{if({resd}<0):{m:1-({resd}/2)}|{if({resd}<0.75):{m:1-{resd}}|{m:1/(4*{resd}+1)}}}}
{=(def):{m:1-({defred}/100)}}
{=(defmult):{m:({clvl}+100)/({clvl}+100+({elvl}+100)*{def})}}

{=(debug):false}
{=(help):{if({args}==):1|0}}
{=(helpall):{if({contains(help):{Lwr}}==true):1|0}}

{=(null):null}
{{if({in(m):{atk1}}==true):=(atk1):null}}
{{if({in(m):{crate1}}==true):=(crate1):null}}
{{if({in(m):{cdmg1}}==true):=(cdmg1):null}}
{{if({in(m):{dmg1}}==true):=(dmg1):null}}
{{if({in(m):{atk2}}==true):=(atk2):null}}
{{if({in(m):{crate2}}==true):=(crate2):null}}
{{if({in(m):{cdmg2}}==true):=(cdmg2):null}}
{{if({in(m):{dmg2}}==true):=(dmg2):null}}
{{if({emy}==false):=(em):0}}{{if({emy}==false):=(bonus):0}}{{if({emy}==false):=(tbonus):0}}
{{if({fly}==false):=(flat):0}}

{=(emb):{m:(2.78*{em})/({em}+1400)}}
{=(amp):{m:1+{emb}+({bonus}/100)}}
{=(trans):{m:(16*{em})/({em}+2000)}}

{=(eatkc1):{m:{atk1}*(1+{crate1}*{cdmg1}/100^2)}}
{=(eatkc1):{m:round({eatkc1}*10^2)/10^2}}
{=(eatkc2):{m:{atk2}*(1+{crate2}*{cdmg2}/100^2)}}
{=(eatkc2):{m:round({eatkc2}*10^2)/10^2}}

{=(midd1):{m:{atk1}*(1+{dmg1}/100)}}{=(flat1):{m:{flat}*(1+{dmg1}/100)*(1+({crate1}*{cdmg1}/100^2))}}
{=(eatkd1):{m:{midd1}+{midd1}*({crate1}*{cdmg1}/100^2)}}
{{if({mvy}==true):=(eatkd1):{math:{eatkd1}*{mv}/100*{spmult}/100}}}
{{if({emy}==true):=(eatkd1):{math:{eatkd1}*1.5*{amp}}}}
{{if({emy}==true):=(flat1):{math:{flat1}*1.5*{amp}}}}
{=(eatkd1):{m:round(({eatkd1}+{flat1})*10^2)/10^2}}

{=(midd2):{m:{atk2}*(1+{dmg2}/100)}}{=(flat2):{m:{flat}*(1+{dmg2}/100)*(1+({crate2}*{cdmg2}/100^2))}}
{=(eatkd2):{m:{midd2}+{midd2}*({crate2}*{cdmg2}/100^2)}}
{{if({mvy}==true):=(eatkd2):{math:{eatkd2}*{mv}/100*{spmult}/100}}}
{{if({emy}==true):=(eatkd2):{math:{eatkd2}*1.5*{amp}}}}
{{if({emy}==true):=(flat2):{math:{flat2}*1.5*{amp}}}}
{=(eatkd2):{m:round(({eatkd2}+{flat2})*10^2)/10^2}}

{=(form):null}
{{if({in(m):{eatkd2}}==true):{if({in(m):{eatkd1}}==true):{if({in(m):{eatkc2}}==true):{if({in(m):{eatkc1}}==true):=(help):1|=(form):c1}|=(form):c2}|=(form):d1}|=(form):d2}}

{=(cahigher):{m:{eatkc1}*100/{eatkc2}-100}}
{=(cahigher):{m:round({cahigher}*10^2)/10^2}}
{=(cbhigher):{m:{eatkc2}*100/{eatkc1}-100}}
{=(cbhigher):{m:round({cbhigher}*10^2)/10^2}}
{=(dahigher):{m:{eatkd1}*100/{eatkd2}-100}}
{=(dahigher):{m:round({dahigher}*10^2)/10^2}}
{=(dbhigher):{m:{eatkd2}*100/{eatkd1}-100}}
{=(dbhigher):{m:round({dbhigher}*10^2)/10^2}}

{=(flat1):{m:{flat}*(1+{dmg1}/100)}}{=(flat2):{m:{flat}*(1+{dmg2}/100)}}
{=(dmgfinal11):{m:round(({midd1}*({mv}/100)*({spmult}/100)+{flat1})*{resmult}*{defmult})}}
{=(dmgfinal12):{m:round(({midd1}*({mv}/100)*({spmult}/100)+{flat1})*(1+{cdmg1}/100)*{resmult}*{defmult})}}
{=(dmgfinal21):{m:round(({midd2}*({mv}/100)*({spmult}/100)+{flat2})*{resmult}*{defmult})}}
{=(dmgfinal22):{m:round(({midd2}*({mv}/100)*({spmult}/100)+{flat2})*(1+{cdmg2}/100)*{resmult}*{defmult})}}

{=(amp1rn):{m:round({dmgfinal11}*1.5*{amp})}}
{=(amp1rc):{m:round({dmgfinal12}*1.5*{amp})}}
{=(amp1fn):{m:round({dmgfinal11}*2*{amp})}}
{=(amp1fc):{m:round({dmgfinal12}*2*{amp})}}
{=(amp2rn):{m:round({dmgfinal21}*1.5*{amp})}}
{=(amp2rc):{m:round({dmgfinal22}*1.5*{amp})}}
{=(amp2fn):{m:round({dmgfinal21}*2*{amp})}}
{=(amp2fc):{m:round({dmgfinal22}*2*{amp})}}

{=(msgc1):{target(mention)}, your {if({mvy}==true):output damage|effective Atk}: **{eatkc1}**}
{=(msgd1):{target(mention)}, your {if({mvy}==true):output damage|effective Atk}: **{eatkd1}**}

{=(msgc2):{target(mention)}, {if({mvy}==true):output damage|effective Atk} for
Set 1: **{eatkc1}** {if({eatkc1}>{eatkc2}):(+{cahigher}%)} 
Set 2: **{eatkc2}** {if({eatkc2}>{eatkc1}):(+{cbhigher}%)} }

{=(msgd2):{target(mention)}, {if({mvy}==true):output damage|effective Atk} for
Set 1: **{eatkd1}** {if({eatkd1}>{eatkd2}):(+{dahigher}%)} 
Set 2: **{eatkd2}** {if({eatkd2}>{eatkd1}):(+{dbhigher}%)}}

{=(helpmv):0}
{{if({help}==1):=(helpmv):1}}
{{and({mvy}==true|{or({form}==c1|{form}==c2):true}==true):=(helpmv):1}}
{=(c1):One set w/o dmg%}{=(d1):One set w/ dmg%}{=(c2):Two sets w/o dmg%}{=(d2):Two sets w/ dmg%}

{{if({in(m):{eatkc1}}==true):=(eatkc1):null}}
{{if({in(m):{eatkc2}}==true):=(eatkc2):null}}
{{if({in(m):{eatkd1}}==true):=(eatkd1):null}}
{{if({in(m):{eatkd2}}==true):=(eatkd2):null}}

{=(estats):With lvl {clvl} character and lvl {elvl} target, with {if({res}<0):{m:trunc({res}/2)}|{res}}% RES and {defred}% DEF shred.}
{=(helpmsg):__**Syntax**__:
● **<atk>** - Total attack, or base+bonus attack
● **<crit>**  - Crit Rate%
● **<cdmg>** - Crit Damage%
● **<dmg>** - Elemental and other Damage%

● For single sets: `{prefix}dmgcalc atk{sep}crit{sep}cdmg`
● Comparing sets and DMG%: 
`{prefix}dmgcalc atk1{sep}crit1{sep}cdmg1{sep}dmg1 atk2{sep}crit2{sep}cdmg2{sep}dmg2`

__**Examples**__:
● 1 set with atk crit cdmg dmg : `{prefix}dmgcalc 100{sep}5{sep}50{sep}40`
● 2 sets comparison with only atk and crit: `{prefix}dmgcalc 100{sep}5{sep}50 110{sep}10{sep}80`

__**Notes**:__
● Add ` mv 525` to the end to multiply by your talent value%, 525 in this case.}
{{if({in(target):{Lwr}}==true):=(targetinfo):1}}
{=(targetmsg):__**Syntax**:__
● **<res>** - Final RES of the enemy after shredding – Do not halve negative values.
● **<charlvl>** - Your character's level.
● **<targetlvl>** - The target's level.
● **<defshred>** - Any Defense shred the target is afflicted with.

__**Example**__:
● 1 set with atk crit cdmg dmg : 
`{prefix}dmgcalc 2100{sep}65{sep}130{sep}90 -30{sep}90{sep}100{sep}15 mv 240`
Shows a regular dmgcalc with target stats, in this case
`10` RES target, VV shredded for a total of `-30` RES, which the formula will halve to `-15`.
`90` character and `100` target level.
And `15`% DEF shred (eg. Lisa A4).
● You can add this target info with 2 set calculation as well.}
{{if({in(moreinfo):{Lwr}}==true):=(moreinfo):1}}
{=(infomsg):● You can add your stats by simply typing them out: `740+890` (say, for buffs).
● You can add a ` debug` at the end on the input to check if the command saw the stats correctly.
● Try adding the ` mv %` to see an estimation of the final damage you'd do on targets (without reactions).

● Advanced: You can also use the mv% to check different parts of your kit with differing stats in a rotation, for example:

Heart of Depth set only provides extra dmg% for Normal and Charged attacks, and not Skill or Burst attacks.
Say if 40% of your damage comes from burst and 60% from Normals, you can calc with ` mv 40` with regular stats and ` mv 60` with the added dmg% from HoD set.
This can help tell the difference certain set bonuses give you. 

Orrrr at this point, use a stat optimizer website.

● Hope this tag can save you some time!
— Kai, made for [Jean Mains](https://discord.gg/fSw9xXSyTe), and [{TCNName}]({HUBLink}).
DM for issues with the command.}
{=(helpmvmsg):Be sure to include dmg% values when also including mv%, flat dmg, or em, otherwise you get a meaningless value.}
{{and({dmg1}==null|{dmg2}!=null):=(help):1}}
{{and({dmg1}==null|{dmg2}!=null):=(debug):true}}
{{and({or({crate1}==null|{cdmg1}==null):true}==true|{atk1}!=null):=(help):1}}
{{and({or({crate1}==null|{cdmg1}==null):true}==true|{atk1}!=null):=(debug):true}}
{{and({or({emy}==true|{fly}==true):true}==true|{dmg1}==null):=(helpmv):1}}
{{and({or({emy}==true|{fly}==true):true}==true|{dmg1}==null):=(debug):true}}
{{and({help}==1|{atk1}!=null):=(debug):true}}
{{if({contains(debug):{Lwr}}==true):=(debug):true}}
{{and({or({moreinfo}==1|{help}==1):true|false}==true|{debug}==false):=(jean):1|=(jean):0}}

Embed

1 line
{"color": 5198940, "title": "{if({helpall}==1):Information overload? Try {prefix}dmgcalc for only the basics.}", "footer": {"text": "{all({help}==1|{moreinfo}!=1|{targetinfo}!=1|{helpall}!=1):{prefix}dmgcalc more for more info. {prefix}dmgcalc target for res/shred.}"}, "thumbnail": {"url": "{if({jean}==1):https://cdn.discordapp.com/emojis/809795819234131989.png?size=96}"}, "description": "{{if({in(moreinfo):{Lwr}}==true):=(help):0}}{{if({in(moreinfo):{Lwr}}==true):=(helpmv):0}}{{if({in(moreinfo):{Lwr}}==true):=(form):null}}\n{{if({in(targetinfo):{Lwr}}==true):=(help):0}}{{if({in(targetinfo):{Lwr}}==true):=(helpmv):0}}{{if({in(targetinfo):{Lwr}}==true):=(form):null}}\n{all({help}==0|{helpmv}==0):{if({form}==d2):{msgd2}}{if({form}==c2):{msgc2}}{if({form}==d1):{msgd1}}{if({form}==c1):{msgc1}}}\n{all({help}==0|{helpmv}==0|{mvy}==true|{form}==d1|{in(math):{dmgfinal12}}==false):Your final damage excluding reactions should be **{dmgfinal11}** (non-crit) **{dmgfinal12}** (crit).\n{if({emy}==true):\nWith reverse (1.5x) vape/melt: **{amp1rn}** (non-crit) **{amp1rc}** (crit)\nWith forward (2x) vape/melt: **{amp1fn}** (non-crit) **{amp1fc}** (crit)\n}{estats}} \n{all({help}==0|{helpmv}==0|{mvy}==true|{form}==d2|{in(math):{dmgfinal12}}==false|{in(math):{dmgfinal22}}==false):Your final damage excluding reactions should be\n`Set 1:` **{dmgfinal11}** (non-crit) | **{dmgfinal12}** (crit)\n`Set 2:` **{dmgfinal21}** (non-crit) | **{dmgfinal22}** (crit)\n{if({emy}==true):With reverse (1.5x) vape/melt:\n`Set 1:` **{amp1rn}** (non-crit) | **{amp1rc}** (crit)\n`Set 2:` **{amp2rn}** (non-crit) | **{amp2rc}** (crit)\nWith forward (2x) vape/melt:\n`Set 1:` **{amp1fn}** (non-crit) | **{amp1fc}** (crit)\n`Set 2:` **{amp2fn}** (non-crit) | **{amp2fc}** (crit)\n}{estats}} \n{if({debug}==true):__Verify Input__:\n```{prefix}dmgcalc {args}\nAtk 1: {atk1}    —    Atk 2: {atk2}\nCrate 1: {crate1}    —    Crate 2: {crate2}\nCdmg 1: {cdmg1}    —    Cdmg 2: {cdmg2}\nDmg 1: {dmg1}    —    Dmg 2: {dmg2}\neAtk c1: {eatkc1}    —    eAtk c2: {eatkc2}\neAtk d1: {eatkd1}    —    eAtk d2: {eatkd2} \nMV%: {mv}%    —    Special.mult: {spmult}%\nEM: {em}    —    Amp.bonus: {bonus}\nFlat dmg: {flat}    —    Output: {{form}}```}\n{if({help}==1):{helpmsg}}\n{if({helpmv}==1):{helpmvmsg}}\n{if({moreinfo}==1):{infomsg}}\n{if({targetinfo}==1):{targetmsg}}\n{if({helpall}==1):{replace(Syntax,Syntax Extended):{targetmsg}}\n\n\n__**Tippy tips**:__\n{infomsg}}"}
Raw JSON
{
  "id": 1240739,
  "created_at": "2022-04-26T10:37:54.432Z",
  "tag_name": "dmgt",
  "nsfw": false,
  "owner_id": "286129196227624961",
  "uses": 209,
  "description": null,
  "restricted": false,
  "shared": false,
  "deleted": false,
  "safe": "unrated",
  "hidden": false,
  "guild_id": "537690888764260352",
  "sharer": "286129196227624961",
  "content": "{=(COMMENT):Calc eAtk using atk/crit/cdmg/dmg. \"sep\" is the separator you want to use \"/\" by default. Don't use space as a separator.}\n{=(prefix):!}\n{=(sep):/}\n{=(embedcolor):#60CFB7}\n{=(charlevel):80}\n{=(targetlevel):90}\n{=(defaultres):10}\n{=(TCNName):TCN}\n{=(HUBLink):}\n\n{=(NO-TOUCHY-BELOW-THIS): Everything configurable is above ^ this line.}\n\n{=():}\n{=(Lwr):{replace({sep}, ):{lower:{args}}}}\n{=(jargs):{join(~):{args}}}\n{=(arg1):{list(0):{jargs}}}\n{=(arg2):{list(1):{jargs}}}\n{=(arg3):{list(2):{jargs}}}\n{=(arg4):{list(3):{jargs}}}\n{=(arg5):{list(4):{jargs}}}\n{=(arg9):}\n{=(mvy):{contains(mv):{args}}}{=(fly):{contains(flat):{args}}}\n{=(emy):{or({contains(em):{args}}==true|{contains(r):{args}}==true|{contains(f):{args}}==true):true|false}}\n{{or({emy}==true|{fly}==true):=(mvy):true}}\n{=(react):{or({contains(em):{args}}==true|{contains(r):{args}}==true):Reverse|{if({contains(f):{args}}==true):Forward|None}}}\n{=(None):0}{=(Reverse):1.5}{=(Forward):2}\n\n{=(j):{if({in(/):{arg3}}==true):2|{if({m:trunc({list(0):{replace({sep},~):{arg2}}})}>100):2|{if({m:trunc({list(0):{replace({sep},~):{arg1}}})}<=100):2|9}}}}\n{=(atk1):{m:{list(0):{replace({sep},~):{arg1}}}}}\n{{all({atk1}<0|{atk1}!=):=(atk1):0}}\n{=(crate1):{m:{list(1):{replace({sep},~):{arg1}}}}}\n{{all({crate1}<0|{crate1}!=):=(crate1):0}}{{all({crate1}>100|{crate1}!=):=(crate1):100}}\n{=(cdmg1):{m:{list(2):{replace({sep},~):{arg1}}}}}\n{{all({cdmg1}<0|{cdmg1}!=):=(cdmg1):0}}\n{=(dmg1):{m:{list(3):{replace({sep},~):{arg1}}}}}\n{{all({dmg1}<0|{dmg1}!=):=(dmg1):0}}\n{=(atk2):{m:{list(0):{replace({sep},~):{arg{j}}}}}}\n{{all({atk2}<0|{atk2}!=):=(atk2):0}}\n{=(crate2):{m:{list(1):{replace({sep},~):{arg{j}}}}}}\n{{all({crate2}<0|{crate2}!=):=(crate2):0}}{{all({crate2}>100|{crate2}!=):=(crate2):100}}\n{=(cdmg2):{m:{list(2):{replace({sep},~):{arg{j}}}}}}\n{{all({cdmg2}<0|{cdmg2}!=):=(cdmg2):0}}\n{=(dmg2):{m:{list(3):{replace({sep},~):{arg{j}}}}}}\n{{all({dmg2}<0|{dmg2}!=):=(dmg2):0}}\n{=(mv):{list(0):{replace({sep},~):{list({math:trunc({index(mv):{args}}+1)}):{replace( ,~):{args}}}}}}\n{{if({in({sep}):{mv}}==true):=(mv):100}}\n{=(spmult):{m:100+{list(1):{replace({sep},~):{list({math:trunc({index(mv):{args}}+1)}):{replace( ,~):{args}}}}}}}\n{{or({in(m):{spmult}}==true|{spmult}==):=(spmult):100}}\n{=(flat):{list({math:trunc({index(flat):{args}}+1)}):{replace( ,~):{args}}}}\n{{if({in({sep}):{flat}}==true):=(flat):0}}\n{=(em):{list(0):{replace({sep},~):{list({math:trunc({index(em):{args}}+1)}):{replace( ,~):{args}}}}}}\n{{or({in(m):{em}}==true|{em}==):=(em):0}}\n{=(bonus):{list(1):{replace({sep},~):{list({math:trunc({index(em):{args}}+1)}):{replace( ,~):{args}}}}}}\n{{or({in(m):{bonus}}==true|{bonus}==):=(bonus):0}}\n{=(tbonus):{list(2):{replace({sep},~):{list({math:trunc({index(em):{args}}+1)}):{replace( ,~):{args}}}}}}\n{{or({in(m):{tbonus}}==true|{tbonus}==):=(tbonus):0}}\n{embed(color):{embedcolor}}\n\n{=(kbork):{list({math:trunc({index(em):{args}}+1)}):{replace( ,~):{args}}}!={arg3}}\n{{if({kbork}!=true):=(kbork):{list({math:trunc({index(mv):{args}}+1)}):{replace( ,~):{args}}}!={arg3}}}\n{=(k):{and({in(/):{arg3}}==true|{kbork}!=true):3|{and({m:trunc({list(0):{replace({sep},~):{arg2}}})}<=100|{m:trunc({list(0):{replace({sep},~):{arg1}}})}>100):2|9}}}\n{=(res):{m:trunc({list(0):{replace({sep},~):{arg{k}}}})}}\n{=(clvl):{m:trunc({list(1):{replace({sep},~):{arg{k}}}})}}\n{{all({clvl}<0|{clvl}!=):=(clvl):1}}{{all({clvl}>90|{clvl}!=):=(clvl):90}}\n{=(elvl):{m:trunc({list(2):{replace({sep},~):{arg{k}}}})}}\n{{all({elvl}<0|{elvl}!=):=(elvl):1}}{{all({elvl}>100|{elvl}!=):=(elvl):100}}\n{=(defred):{m:trunc({list(3):{replace({sep},~):{arg{k}}}})}}\n{{all({defred}>90|{defred}!=):=(defred):90}}\n\n{{if({in(m:):{res}}==true):=(res):{defaultres}}}\n{{if({in(m:):{clvl}}==true):=(clvl):{charlevel}}}\n{{if({in(m:):{elvl}}==true):=(elvl):{targetlevel}}}\n{{if({in(m:):{defred}}==true):=(defred):0}}\n\n{=(resd):{m:{res}/100}}\n{=(resmult):{if({resd}<0):{m:1-({resd}/2)}|{if({resd}<0.75):{m:1-{resd}}|{m:1/(4*{resd}+1)}}}}\n{=(def):{m:1-({defred}/100)}}\n{=(defmult):{m:({clvl}+100)/({clvl}+100+({elvl}+100)*{def})}}\n\n{=(debug):false}\n{=(help):{if({args}==):1|0}}\n{=(helpall):{if({contains(help):{Lwr}}==true):1|0}}\n\n{=(null):null}\n{{if({in(m):{atk1}}==true):=(atk1):null}}\n{{if({in(m):{crate1}}==true):=(crate1):null}}\n{{if({in(m):{cdmg1}}==true):=(cdmg1):null}}\n{{if({in(m):{dmg1}}==true):=(dmg1):null}}\n{{if({in(m):{atk2}}==true):=(atk2):null}}\n{{if({in(m):{crate2}}==true):=(crate2):null}}\n{{if({in(m):{cdmg2}}==true):=(cdmg2):null}}\n{{if({in(m):{dmg2}}==true):=(dmg2):null}}\n{{if({emy}==false):=(em):0}}{{if({emy}==false):=(bonus):0}}{{if({emy}==false):=(tbonus):0}}\n{{if({fly}==false):=(flat):0}}\n\n{=(emb):{m:(2.78*{em})/({em}+1400)}}\n{=(amp):{m:1+{emb}+({bonus}/100)}}\n{=(trans):{m:(16*{em})/({em}+2000)}}\n\n{=(eatkc1):{m:{atk1}*(1+{crate1}*{cdmg1}/100^2)}}\n{=(eatkc1):{m:round({eatkc1}*10^2)/10^2}}\n{=(eatkc2):{m:{atk2}*(1+{crate2}*{cdmg2}/100^2)}}\n{=(eatkc2):{m:round({eatkc2}*10^2)/10^2}}\n\n{=(midd1):{m:{atk1}*(1+{dmg1}/100)}}{=(flat1):{m:{flat}*(1+{dmg1}/100)*(1+({crate1}*{cdmg1}/100^2))}}\n{=(eatkd1):{m:{midd1}+{midd1}*({crate1}*{cdmg1}/100^2)}}\n{{if({mvy}==true):=(eatkd1):{math:{eatkd1}*{mv}/100*{spmult}/100}}}\n{{if({emy}==true):=(eatkd1):{math:{eatkd1}*1.5*{amp}}}}\n{{if({emy}==true):=(flat1):{math:{flat1}*1.5*{amp}}}}\n{=(eatkd1):{m:round(({eatkd1}+{flat1})*10^2)/10^2}}\n\n{=(midd2):{m:{atk2}*(1+{dmg2}/100)}}{=(flat2):{m:{flat}*(1+{dmg2}/100)*(1+({crate2}*{cdmg2}/100^2))}}\n{=(eatkd2):{m:{midd2}+{midd2}*({crate2}*{cdmg2}/100^2)}}\n{{if({mvy}==true):=(eatkd2):{math:{eatkd2}*{mv}/100*{spmult}/100}}}\n{{if({emy}==true):=(eatkd2):{math:{eatkd2}*1.5*{amp}}}}\n{{if({emy}==true):=(flat2):{math:{flat2}*1.5*{amp}}}}\n{=(eatkd2):{m:round(({eatkd2}+{flat2})*10^2)/10^2}}\n\n{=(form):null}\n{{if({in(m):{eatkd2}}==true):{if({in(m):{eatkd1}}==true):{if({in(m):{eatkc2}}==true):{if({in(m):{eatkc1}}==true):=(help):1|=(form):c1}|=(form):c2}|=(form):d1}|=(form):d2}}\n\n{=(cahigher):{m:{eatkc1}*100/{eatkc2}-100}}\n{=(cahigher):{m:round({cahigher}*10^2)/10^2}}\n{=(cbhigher):{m:{eatkc2}*100/{eatkc1}-100}}\n{=(cbhigher):{m:round({cbhigher}*10^2)/10^2}}\n{=(dahigher):{m:{eatkd1}*100/{eatkd2}-100}}\n{=(dahigher):{m:round({dahigher}*10^2)/10^2}}\n{=(dbhigher):{m:{eatkd2}*100/{eatkd1}-100}}\n{=(dbhigher):{m:round({dbhigher}*10^2)/10^2}}\n\n{=(flat1):{m:{flat}*(1+{dmg1}/100)}}{=(flat2):{m:{flat}*(1+{dmg2}/100)}}\n{=(dmgfinal11):{m:round(({midd1}*({mv}/100)*({spmult}/100)+{flat1})*{resmult}*{defmult})}}\n{=(dmgfinal12):{m:round(({midd1}*({mv}/100)*({spmult}/100)+{flat1})*(1+{cdmg1}/100)*{resmult}*{defmult})}}\n{=(dmgfinal21):{m:round(({midd2}*({mv}/100)*({spmult}/100)+{flat2})*{resmult}*{defmult})}}\n{=(dmgfinal22):{m:round(({midd2}*({mv}/100)*({spmult}/100)+{flat2})*(1+{cdmg2}/100)*{resmult}*{defmult})}}\n\n{=(amp1rn):{m:round({dmgfinal11}*1.5*{amp})}}\n{=(amp1rc):{m:round({dmgfinal12}*1.5*{amp})}}\n{=(amp1fn):{m:round({dmgfinal11}*2*{amp})}}\n{=(amp1fc):{m:round({dmgfinal12}*2*{amp})}}\n{=(amp2rn):{m:round({dmgfinal21}*1.5*{amp})}}\n{=(amp2rc):{m:round({dmgfinal22}*1.5*{amp})}}\n{=(amp2fn):{m:round({dmgfinal21}*2*{amp})}}\n{=(amp2fc):{m:round({dmgfinal22}*2*{amp})}}\n\n{=(msgc1):{target(mention)}, your {if({mvy}==true):output damage|effective Atk}: **{eatkc1}**}\n{=(msgd1):{target(mention)}, your {if({mvy}==true):output damage|effective Atk}: **{eatkd1}**}\n\n{=(msgc2):{target(mention)}, {if({mvy}==true):output damage|effective Atk} for\nSet 1: **{eatkc1}** {if({eatkc1}>{eatkc2}):(+{cahigher}%)} \nSet 2: **{eatkc2}** {if({eatkc2}>{eatkc1}):(+{cbhigher}%)} }\n\n{=(msgd2):{target(mention)}, {if({mvy}==true):output damage|effective Atk} for\nSet 1: **{eatkd1}** {if({eatkd1}>{eatkd2}):(+{dahigher}%)} \nSet 2: **{eatkd2}** {if({eatkd2}>{eatkd1}):(+{dbhigher}%)}}\n\n{=(helpmv):0}\n{{if({help}==1):=(helpmv):1}}\n{{and({mvy}==true|{or({form}==c1|{form}==c2):true}==true):=(helpmv):1}}\n{=(c1):One set w/o dmg%}{=(d1):One set w/ dmg%}{=(c2):Two sets w/o dmg%}{=(d2):Two sets w/ dmg%}\n\n{{if({in(m):{eatkc1}}==true):=(eatkc1):null}}\n{{if({in(m):{eatkc2}}==true):=(eatkc2):null}}\n{{if({in(m):{eatkd1}}==true):=(eatkd1):null}}\n{{if({in(m):{eatkd2}}==true):=(eatkd2):null}}\n\n{=(estats):With lvl {clvl} character and lvl {elvl} target, with {if({res}<0):{m:trunc({res}/2)}|{res}}% RES and {defred}% DEF shred.}\n{=(helpmsg):__**Syntax**__:\n● **<atk>** - Total attack, or base+bonus attack\n● **<crit>**  - Crit Rate%\n● **<cdmg>** - Crit Damage%\n● **<dmg>** - Elemental and other Damage%\n\n● For single sets: `{prefix}dmgcalc atk{sep}crit{sep}cdmg`\n● Comparing sets and DMG%: \n`{prefix}dmgcalc atk1{sep}crit1{sep}cdmg1{sep}dmg1 atk2{sep}crit2{sep}cdmg2{sep}dmg2`\n\n__**Examples**__:\n● 1 set with atk crit cdmg dmg : `{prefix}dmgcalc 100{sep}5{sep}50{sep}40`\n● 2 sets comparison with only atk and crit: `{prefix}dmgcalc 100{sep}5{sep}50 110{sep}10{sep}80`\n\n__**Notes**:__\n● Add ` mv 525` to the end to multiply by your talent value%, 525 in this case.}\n{{if({in(target):{Lwr}}==true):=(targetinfo):1}}\n{=(targetmsg):__**Syntax**:__\n● **<res>** - Final RES of the enemy after shredding – Do not halve negative values.\n● **<charlvl>** - Your character's level.\n● **<targetlvl>** - The target's level.\n● **<defshred>** - Any Defense shred the target is afflicted with.\n\n__**Example**__:\n● 1 set with atk crit cdmg dmg : \n`{prefix}dmgcalc 2100{sep}65{sep}130{sep}90 -30{sep}90{sep}100{sep}15 mv 240`\nShows a regular dmgcalc with target stats, in this case\n`10` RES target, VV shredded for a total of `-30` RES, which the formula will halve to `-15`.\n`90` character and `100` target level.\nAnd `15`% DEF shred (eg. Lisa A4).\n● You can add this target info with 2 set calculation as well.}\n{{if({in(moreinfo):{Lwr}}==true):=(moreinfo):1}}\n{=(infomsg):● You can add your stats by simply typing them out: `740+890` (say, for buffs).\n● You can add a ` debug` at the end on the input to check if the command saw the stats correctly.\n● Try adding the ` mv %` to see an estimation of the final damage you'd do on targets (without reactions).\n\n● Advanced: You can also use the mv% to check different parts of your kit with differing stats in a rotation, for example:\n\nHeart of Depth set only provides extra dmg% for Normal and Charged attacks, and not Skill or Burst attacks.\nSay if 40% of your damage comes from burst and 60% from Normals, you can calc with ` mv 40` with regular stats and ` mv 60` with the added dmg% from HoD set.\nThis can help tell the difference certain set bonuses give you. \n\nOrrrr at this point, use a stat optimizer website.\n\n● Hope this tag can save you some time!\n— Kai, made for [Jean Mains](https://discord.gg/fSw9xXSyTe), and [{TCNName}]({HUBLink}).\nDM for issues with the command.}\n{=(helpmvmsg):Be sure to include dmg% values when also including mv%, flat dmg, or em, otherwise you get a meaningless value.}\n{{and({dmg1}==null|{dmg2}!=null):=(help):1}}\n{{and({dmg1}==null|{dmg2}!=null):=(debug):true}}\n{{and({or({crate1}==null|{cdmg1}==null):true}==true|{atk1}!=null):=(help):1}}\n{{and({or({crate1}==null|{cdmg1}==null):true}==true|{atk1}!=null):=(debug):true}}\n{{and({or({emy}==true|{fly}==true):true}==true|{dmg1}==null):=(helpmv):1}}\n{{and({or({emy}==true|{fly}==true):true}==true|{dmg1}==null):=(debug):true}}\n{{and({help}==1|{atk1}!=null):=(debug):true}}\n{{if({contains(debug):{Lwr}}==true):=(debug):true}}\n{{and({or({moreinfo}==1|{help}==1):true|false}==true|{debug}==false):=(jean):1|=(jean):0}}",
  "embed": "{\"color\": 5198940, \"title\": \"{if({helpall}==1):Information overload? Try {prefix}dmgcalc for only the basics.}\", \"footer\": {\"text\": \"{all({help}==1|{moreinfo}!=1|{targetinfo}!=1|{helpall}!=1):{prefix}dmgcalc more for more info. {prefix}dmgcalc target for res/shred.}\"}, \"thumbnail\": {\"url\": \"{if({jean}==1):https://cdn.discordapp.com/emojis/809795819234131989.png?size=96}\"}, \"description\": \"{{if({in(moreinfo):{Lwr}}==true):=(help):0}}{{if({in(moreinfo):{Lwr}}==true):=(helpmv):0}}{{if({in(moreinfo):{Lwr}}==true):=(form):null}}\\n{{if({in(targetinfo):{Lwr}}==true):=(help):0}}{{if({in(targetinfo):{Lwr}}==true):=(helpmv):0}}{{if({in(targetinfo):{Lwr}}==true):=(form):null}}\\n{all({help}==0|{helpmv}==0):{if({form}==d2):{msgd2}}{if({form}==c2):{msgc2}}{if({form}==d1):{msgd1}}{if({form}==c1):{msgc1}}}\\n{all({help}==0|{helpmv}==0|{mvy}==true|{form}==d1|{in(math):{dmgfinal12}}==false):Your final damage excluding reactions should be **{dmgfinal11}** (non-crit) **{dmgfinal12}** (crit).\\n{if({emy}==true):\\nWith reverse (1.5x) vape/melt: **{amp1rn}** (non-crit) **{amp1rc}** (crit)\\nWith forward (2x) vape/melt: **{amp1fn}** (non-crit) **{amp1fc}** (crit)\\n}{estats}} \\n{all({help}==0|{helpmv}==0|{mvy}==true|{form}==d2|{in(math):{dmgfinal12}}==false|{in(math):{dmgfinal22}}==false):Your final damage excluding reactions should be\\n`Set 1:` **{dmgfinal11}** (non-crit) | **{dmgfinal12}** (crit)\\n`Set 2:` **{dmgfinal21}** (non-crit) | **{dmgfinal22}** (crit)\\n{if({emy}==true):With reverse (1.5x) vape/melt:\\n`Set 1:` **{amp1rn}** (non-crit) | **{amp1rc}** (crit)\\n`Set 2:` **{amp2rn}** (non-crit) | **{amp2rc}** (crit)\\nWith forward (2x) vape/melt:\\n`Set 1:` **{amp1fn}** (non-crit) | **{amp1fc}** (crit)\\n`Set 2:` **{amp2fn}** (non-crit) | **{amp2fc}** (crit)\\n}{estats}} \\n{if({debug}==true):__Verify Input__:\\n```{prefix}dmgcalc {args}\\nAtk 1: {atk1}    —    Atk 2: {atk2}\\nCrate 1: {crate1}    —    Crate 2: {crate2}\\nCdmg 1: {cdmg1}    —    Cdmg 2: {cdmg2}\\nDmg 1: {dmg1}    —    Dmg 2: {dmg2}\\neAtk c1: {eatkc1}    —    eAtk c2: {eatkc2}\\neAtk d1: {eatkd1}    —    eAtk d2: {eatkd2} \\nMV%: {mv}%    —    Special.mult: {spmult}%\\nEM: {em}    —    Amp.bonus: {bonus}\\nFlat dmg: {flat}    —    Output: {{form}}```}\\n{if({help}==1):{helpmsg}}\\n{if({helpmv}==1):{helpmvmsg}}\\n{if({moreinfo}==1):{infomsg}}\\n{if({targetinfo}==1):{targetmsg}}\\n{if({helpall}==1):{replace(Syntax,Syntax Extended):{targetmsg}}\\n\\n\\n__**Tippy tips**:__\\n{infomsg}}\"}",
  "last_fetched": "2026-10-20T18:18:33.259Z"
}