Skip to content

Commit

Permalink
Add Mavuika c2 def exception until c6
Browse files Browse the repository at this point in the history
  • Loading branch information
nguyentvan7 committed Jan 9, 2025
1 parent b8f3ab9 commit 33164bd
Show file tree
Hide file tree
Showing 2 changed files with 40 additions and 19 deletions.
3 changes: 2 additions & 1 deletion libs/gi/localization/assets/locales/en/char_Mavuika.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,5 +7,6 @@
"c1Cond": "After gaining Fighting Spirit",
"c2RingCond": "In Ring of Searing Radiance form",
"c2FlameCond": "In Flamestrider form",
"flamestriderDmg": "Flamestrider DMG"
"flamestriderDmg": "Flamestrider DMG",
"c2Exception": "Enemy DEF Reduction will not apply to Flamestrider or Burst hits until C6"
}
56 changes: 38 additions & 18 deletions libs/gi/sheets/src/Characters/Mavuika/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ import {
greaterEq,
infoMut,
input,
lessThan,
lookup,
naught,
percent,
Expand Down Expand Up @@ -217,6 +218,12 @@ const c2RingForm_enemyDefRed_ = greaterEq(
2,
equal(condC2RingForm, 'on', dm.constellation2.enemyDefRed_)
)
const antiC2RingForm_enemyDefRed_ = lessThan(
input.constellation,
6,
prod(-1, c2RingForm_enemyDefRed_)
)

const c2FlameForm_normal_dmgInc = greaterEq(
input.constellation,
2,
Expand Down Expand Up @@ -266,12 +273,14 @@ const flameNormalAddl = {
...hitEle.pyro,
premod: {
normal_dmgInc: sum(flameNormal_dmgInc, c2FlameForm_normal_dmgInc),
enemyDefRed_: antiC2RingForm_enemyDefRed_,
},
}
const flameChargedAddl = {
...hitEle.pyro,
premod: {
charged_dmgInc: sum(flameCharged_dmgInc, c2FlameForm_charged_dmgInc),
enemyDefRed_: antiC2RingForm_enemyDefRed_,
},
}
const dmgFormulas = {
Expand Down Expand Up @@ -328,7 +337,9 @@ const dmgFormulas = {
'skill'
),
// TODO: Check what damage type this is
sprintDmg: dmgNode('atk', dm.skill.sprintDmg, 'skill'),
sprintDmg: dmgNode('atk', dm.skill.sprintDmg, 'skill', {
premod: { enemyDefRed_: antiC2RingForm_enemyDefRed_ },
}),
chargedCyclicDmg: dmgNode(
'atk',
dm.skill.chargedCyclicDmg,
Expand All @@ -349,13 +360,18 @@ const dmgFormulas = {
'atk',
dm.skill.plungeDmg,
'plunging_impact',
hitEle.pyro,
{
premod: { enemyDefRed_: antiC2RingForm_enemyDefRed_ },
...hitEle.pyro,
},
undefined,
'skill'
),
},
burst: {
skillDmg: dmgNode('atk', dm.burst.skillDmg, 'burst'),
skillDmg: dmgNode('atk', dm.burst.skillDmg, 'burst', {
premod: { enemyDefRed_: antiC2RingForm_enemyDefRed_ },
}),
sunfell_dmgInc,
flameNormal_dmgInc,
flameCharged_dmgInc,
Expand Down Expand Up @@ -537,21 +553,6 @@ const sheet: TalentSheet = {
},
],
},
ct.condTem('constellation2', {
path: condC2RingFormPath,
value: condC2RingForm,
teamBuff: true,
name: ct.ch('c2RingCond'),
states: {
on: {
fields: [
{
node: c2RingForm_enemyDefRed_,
},
],
},
},
}),
]),

burst: ct.talentTem('burst', [
Expand Down Expand Up @@ -701,6 +702,25 @@ const sheet: TalentSheet = {
},
},
}),
ct.condTem('constellation2', {
path: condC2RingFormPath,
value: condC2RingForm,
teamBuff: true,
name: ct.ch('c2RingCond'),
states: {
on: {
fields: [
{
canShow: (data) => data.get(input.constellation).value < 6,
text: ct.ch('c2Exception'),
},
{
node: c2RingForm_enemyDefRed_,
},
],
},
},
}),
]),
constellation3: ct.talentTem('constellation3', [
{ fields: [{ node: burstC3 }] },
Expand Down

0 comments on commit 33164bd

Please sign in to comment.