Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix effects active w/o fulfilled conditions, correct Jean's and Amber's C2 and C1 opt nodes, KQM Multi-Opt link. #1226

Merged
merged 12 commits into from
Jul 22, 2023
2 changes: 1 addition & 1 deletion apps/frontend/.env
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ NX_URL_GITHUB_VAN=https://github.com/
NX_GA_TRACKINGID=UA-000000-01
NX_URL_YOUTUBE_TUTPL=https://www.youtube.com/
NX_URL_WEBSITE_KQM=https://keqingmains.com/
NX_URL_KQM_MULTI_GUIDE=https://docs.google.com/document/d/12hrPJ3MrAF7t03gyiiVtV5uI_rUKlVlbEwl9Lf2esIQ/edit?usp=sharing
NX_URL_KQM_MULTI_GUIDE=https://keqingmains.com/misc/multi-optimization/
nguyentvan7 marked this conversation as resolved.
Show resolved Hide resolved
NX_URLS_GUIDES=[]
NX_URL_GITHUB_API_GO_RELEASES=https://api.github.com/repos///releases/tags/
NX_URL_GITHUB_GO_CURRENT_VERSION=
8 changes: 4 additions & 4 deletions apps/frontend/src/app/Data/Characters/Albedo/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -92,10 +92,10 @@ const p2Burst_eleMas = equal(
)

const [condP1EnemyHpPath, condP1EnemyHp] = cond(key, 'p1EnemyHp')
const p1_blossom_dmg_ = equal(
condP1EnemyHp,
'belowHp',
greaterEq(input.asc, 1, dm.passive1.blossomDmgInc)
const p1_blossom_dmg_ = greaterEq(
input.asc,
1,
equal(condP1EnemyHp, 'belowHp', dm.passive1.blossomDmgInc)
)

const [condC2StacksPath, condC2Stacks] = cond(key, 'c2Stacks')
Expand Down
54 changes: 30 additions & 24 deletions apps/frontend/src/app/Data/Characters/Amber/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -118,6 +118,25 @@ const dmgFormulas = {
aimedCharged: dmgNode('atk', dm.charged.aimedCharged, 'charged', {
hit: { ele: constant('pyro') },
}),
},
plunging: Object.fromEntries(
Object.entries(dm.plunging).map(([key, value]) => [
key,
dmgNode('atk', value, 'plunging'),
])
),
skill: {
inheritedHp: prod(
subscript(input.total.skillIndex, dm.skill.inheritedHp),
input.total.hp
),
dmg: dmgNode('atk', dm.skill.dmg, 'skill'),
},
burst: {
rainDmg: dmgNode('atk', dm.burst.rainDmg, 'burst'),
dmgPerWave: dmgNode('atk', dm.burst.dmgPerWave, 'burst'),
},
constellation1: {
secondAimed: greaterEq(
input.constellation,
1,
Expand All @@ -137,23 +156,6 @@ const dmgFormulas = {
)
),
},
plunging: Object.fromEntries(
Object.entries(dm.plunging).map(([key, value]) => [
key,
dmgNode('atk', value, 'plunging'),
])
),
skill: {
inheritedHp: prod(
subscript(input.total.skillIndex, dm.skill.inheritedHp),
input.total.hp
),
dmg: dmgNode('atk', dm.skill.dmg, 'skill'),
},
burst: {
rainDmg: dmgNode('atk', dm.burst.rainDmg, 'burst'),
dmgPerWave: dmgNode('atk', dm.burst.dmgPerWave, 'burst'),
},
constellation2: {
manualDetonationDmg: greaterEq(
input.constellation,
Expand Down Expand Up @@ -221,24 +223,28 @@ const sheet: ICharacterSheet = {
}),
},
{
node: infoMut(dmgFormulas.charged.secondAimed, {
name: ct.chg(`auto.skillParams.5`),
textSuffix: ct.ch('secondArrow'),
node: infoMut(dmgFormulas.charged.aimedCharged, {
name: ct.chg(`auto.skillParams.6`),
}),
},
],
},
ct.headerTem('constellation1', {
fields: [
{
node: infoMut(dmgFormulas.charged.aimedCharged, {
name: ct.chg(`auto.skillParams.6`),
node: infoMut(dmgFormulas.constellation1.secondAimed, {
name: ct.chg(`auto.skillParams.5`),
textSuffix: ct.ch('secondArrow'),
}),
},
{
node: infoMut(dmgFormulas.charged.secondAimedCharged, {
node: infoMut(dmgFormulas.constellation1.secondAimedCharged, {
name: ct.chg(`auto.skillParams.6`),
textSuffix: ct.ch('secondArrow'),
}),
},
],
},
}),
{
text: ct.chg('auto.fields.plunging'),
},
Expand Down
24 changes: 12 additions & 12 deletions apps/frontend/src/app/Data/Characters/Diluc/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -108,10 +108,10 @@ const nodeA4Bonus = greaterEq(
equal(condBurst, 'on', dm.passive2.pyroInc)
)

const nodeC1Bonus = equal(
condC1,
'on',
greaterEq(input.constellation, 1, dm.constellation1.dmgInc)
const nodeC1Bonus = greaterEq(
input.constellation,
1,
equal(condC1, 'on', dm.constellation1.dmgInc)
)
const nodeC2AtkBonus = greaterEq(
input.constellation,
Expand Down Expand Up @@ -143,15 +143,15 @@ const nodeC2SpdBonus = greaterEq(
KeyMap.info('atkSPD_')
)
)
const nodeC6DmgBonus = equal(
condC6,
'on',
greaterEq(input.constellation, 6, dm.constellation6.dmgInc)
const nodeC6DmgBonus = greaterEq(
input.constellation,
6,
equal(condC6, 'on', dm.constellation6.dmgInc)
)
const nodeC6SpdBonus = equal(
condC6,
'on',
greaterEq(input.constellation, 6, dm.constellation6.atkSpdInc),
const nodeC6SpdBonus = greaterEq(
input.constellation,
6,
equal(condC6, 'on', dm.constellation6.atkSpdInc),
KeyMap.info('atkSPD_')
)

Expand Down
16 changes: 12 additions & 4 deletions apps/frontend/src/app/Data/Characters/Diona/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -157,10 +157,18 @@ const dmgFormulas = {
healDot: healNodeTalent('hp', dm.burst.healHp_, dm.burst.healBase, 'burst'),
},
constellation2: {
pressShield: nodeC2ShieldPress,
pressCryoShield: shieldElement(elementKey, nodeC2ShieldPress),
holdShield: nodeC2ShieldHold,
holdCryoShield: shieldElement(elementKey, nodeC2ShieldHold),
pressShield: greaterEq(input.constellation, 2, nodeC2ShieldPress),
pressCryoShield: greaterEq(
input.constellation,
2,
shieldElement(elementKey, nodeC2ShieldPress)
),
holdShield: greaterEq(input.constellation, 2, nodeC2ShieldHold),
holdCryoShield: greaterEq(
input.constellation,
2,
shieldElement(elementKey, nodeC2ShieldHold)
),
},
}

Expand Down
6 changes: 3 additions & 3 deletions apps/frontend/src/app/Data/Characters/Faruzan/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -135,12 +135,12 @@ const dmgFormulas = {
passive2: {
anemo_dmgInc: greaterEq(
input.asc,
1,
4,
equal(
condA4Active,
condBurstBenefit,
'on',
equal(
condBurstBenefit,
condA4Active,
'on',
prod(percent(datamine.passive2.gift_dmgInc), input.base.atk)
)
Expand Down
20 changes: 8 additions & 12 deletions apps/frontend/src/app/Data/Characters/HuTao/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -144,22 +144,18 @@ const critRateTeam_2 = greaterEq(
)

const [condC6Path, condC6] = cond(key, 'ButterflysEmbrace')
const critRate_ = equal(
'on',
condC6,
greaterEq(input.constellation, 6, percent(dm.constellation6.critRateInc))
const critRate_ = greaterEq(
input.constellation,
6,
equal('on', condC6, percent(dm.constellation6.critRateInc))
)
const ele_res_s = Object.fromEntries(
allElementWithPhyKeys.map((ele) => [
ele,
equal(
'on',
condC6,
greaterEq(
input.constellation,
6,
percent(dm.constellation6.elePhysResInc)
)
greaterEq(
input.constellation,
6,
equal('on', condC6, percent(dm.constellation6.elePhysResInc))
),
])
)
Expand Down
48 changes: 20 additions & 28 deletions apps/frontend/src/app/Data/Characters/Jean/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -113,40 +113,36 @@ const a1Regen = greaterEq(
)

const [condC1Path, condC1] = cond(key, 'c1')
const skill_dmg_ = equal(
condC1,
'on',
greaterEq(input.constellation, 1, dm.constellation1.increaseDmg)
const skill_dmg_ = greaterEq(
input.constellation,
1,
equal(condC1, 'on', dm.constellation1.increaseDmg)
)

const [condC2Path, condC2] = cond(key, 'c2')
const atkSPD_ = equal(
condC2,
'on',
greaterEq(input.constellation, 2, percent(dm.constellation2.atkSpd))
const atkSPD_ = greaterEq(
input.constellation,
2,
equal(condC2, 'on', percent(dm.constellation2.atkSpd))
)
const moveSPD_ = equal(
condC2,
'on',
greaterEq(input.constellation, 2, percent(dm.constellation2.moveSpd))
const moveSPD_ = greaterEq(
input.constellation,
2,
equal(condC2, 'on', percent(dm.constellation2.moveSpd))
)

const [condC4Path, condC4] = cond(key, 'c4')
const anemo_enemyRes_ = equal(
condC4,
'on',
greaterEq(
input.constellation,
4,
percent(-Math.abs(dm.constellation4.anemoRes))
)
const anemo_enemyRes_ = greaterEq(
input.constellation,
4,
equal(condC4, 'on', percent(-Math.abs(dm.constellation4.anemoRes)))
)

const [condC6Path, condC6] = cond(key, 'c6')
const dmgRed_disp = equal(
condC6,
'on',
greaterEq(input.constellation, 6, percent(dm.constellation6.dmgReduction))
const dmgRed_disp = greaterEq(
input.constellation,
6,
equal(condC6, 'on', percent(dm.constellation6.dmgReduction))
)
const dmgRed_ = equal(input.activeCharKey, target.charKey, dmgRed_disp)

Expand Down Expand Up @@ -175,10 +171,6 @@ const dmgFormulas = {
passive1: {
a1Regen,
},
constellation2: {
atkSPD_,
moveSPD_,
},
}
const nodeC3 = greaterEq(input.constellation, 3, 3)
const nodeC5 = greaterEq(input.constellation, 5, 3)
Expand Down
20 changes: 14 additions & 6 deletions apps/frontend/src/app/Data/Characters/KaedeharaKazuha/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -202,12 +202,20 @@ const dmgFormulas = {
),
},
passive1: {
absorb: unequal(
condSkillAbsorption,
undefined,
customDmgNode(prod(input.total.atk, dm.passive1.absorbAdd), 'plunging', {
hit: { ele: condSkillAbsorption },
})
absorb: greaterEq(
input.asc,
1,
unequal(
condSkillAbsorption,
undefined,
customDmgNode(
prod(input.total.atk, dm.passive1.absorbAdd),
'plunging',
{
hit: { ele: condSkillAbsorption },
}
)
)
),
},
passive2: asc4,
Expand Down
22 changes: 13 additions & 9 deletions apps/frontend/src/app/Data/Characters/Kaeya/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,11 @@ const dmgFormulas = {
dmg: dmgNode('atk', dm.burst.dmg, 'burst'),
},
passive1: {
heal: healNode('atk', percent(dm.passive2.healAtk_), 0),
heal: greaterEq(
input.asc,
1,
healNode('atk', percent(dm.passive2.healAtk_), 0)
),
},
constellation4: {
shield: greaterEq(
Expand All @@ -116,15 +120,15 @@ const nodeC5 = greaterEq(input.constellation, 5, 3)

//Conditional C1: Oppo affected by Cryo
const [condC1Path, condC1Cryo] = cond(key, 'CryoC1')
const nodeC1NormalCritRate = equal(
condC1Cryo,
'on',
greaterEq(input.constellation, 1, dm.constellation1.critRate_)
const nodeC1NormalCritRate = greaterEq(
input.constellation,
1,
equal(condC1Cryo, 'on', dm.constellation1.critRate_)
)
const nodeC1ChargeCritRate = equal(
condC1Cryo,
'on',
greaterEq(input.constellation, 1, dm.constellation1.critRate_)
const nodeC1ChargeCritRate = greaterEq(
input.constellation,
1,
equal(condC1Cryo, 'on', dm.constellation1.critRate_)
)

export const data = dataObjForCharacterSheet(
Expand Down
8 changes: 4 additions & 4 deletions apps/frontend/src/app/Data/Characters/Keqing/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -124,10 +124,10 @@ const nodeC3 = greaterEq(input.constellation, 3, 3)
const nodeC5 = greaterEq(input.constellation, 5, 3)

const [condAfterRecastPath, condAfterRecast] = cond(key, 'afterRecast')
const afterRecastInfusion = equalStr(
'afterRecast',
condAfterRecast,
greaterEqStr(input.asc, 1, elementKey)
const afterRecastInfusion = greaterEqStr(
input.asc,
1,
equalStr('afterRecast', condAfterRecast, elementKey)
)

const [condAfterBurstPath, condAfterBurst] = cond(key, 'afterBurst')
Expand Down
Loading