-
Notifications
You must be signed in to change notification settings - Fork 228
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
0bef26b
commit 29c173b
Showing
63 changed files
with
1,983 additions
and
11 deletions.
There are no files selected for viewing
83 changes: 83 additions & 0 deletions
83
apps/frontend/src/app/Data/Artifacts/NighttimeWhispersInTheEchoingWoods/index.tsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,83 @@ | ||
import type { ArtifactSetKey } from '@genshin-optimizer/consts' | ||
import { input } from '../../../Formula' | ||
import type { Data } from '../../../Formula/type' | ||
import { equal, greaterEq, sum } from '../../../Formula/utils' | ||
import KeyMap from '../../../KeyMap' | ||
import { cond, st, trans } from '../../SheetUtil' | ||
import { ArtifactSheet, setHeaderTemplate } from '../ArtifactSheet' | ||
import type { IArtifactSheet } from '../IArtifactSheet' | ||
import { dataObjForArtifactSheet } from '../dataUtil' | ||
|
||
const key: ArtifactSetKey = 'NighttimeWhispersInTheEchoingWoods' | ||
const setHeader = setHeaderTemplate(key) | ||
|
||
const set2 = greaterEq(input.artSet.NighttimeWhispersInTheEchoingWoods, 2, 0.18) | ||
|
||
const [condAfterSkillPath, condAfterSkill] = cond(key, 'afterSkill') | ||
const afterSkill_geo_dmg_ = greaterEq( | ||
input.artSet.NighttimeWhispersInTheEchoingWoods, | ||
4, | ||
equal(condAfterSkill, 'on', 0.2, KeyMap.info('geo_dmg_')) | ||
) | ||
|
||
const [condCrystallizePath, condCrystallize] = cond(key, 'crystallize') | ||
const crystallize_geo_dmg_ = greaterEq( | ||
input.artSet.NighttimeWhispersInTheEchoingWoods, | ||
4, | ||
equal( | ||
condAfterSkill, | ||
'on', | ||
equal(condCrystallize, 'on', 0.2 * 1.5, KeyMap.info('geo_dmg_')) | ||
) | ||
) | ||
|
||
export const data: Data = dataObjForArtifactSheet(key, { | ||
premod: { | ||
atk_: set2, | ||
geo_dmg_: sum(afterSkill_geo_dmg_, crystallize_geo_dmg_), | ||
}, | ||
}) | ||
|
||
const sheet: IArtifactSheet = { | ||
name: 'Nighttime Whispers In The Echoing Woods', | ||
rarity: [4, 5], | ||
setEffects: { | ||
2: { document: [{ header: setHeader(2), fields: [{ node: set2 }] }] }, | ||
4: { | ||
document: [ | ||
{ | ||
header: setHeader(4), | ||
value: condAfterSkill, | ||
path: condAfterSkillPath, | ||
name: st('hitOp.skill'), | ||
states: { | ||
on: { | ||
fields: [ | ||
{ | ||
node: afterSkill_geo_dmg_, | ||
}, | ||
], | ||
}, | ||
}, | ||
}, | ||
{ | ||
header: setHeader(4), | ||
value: condCrystallize, | ||
path: condCrystallizePath, | ||
canShow: equal(condAfterSkill, 'on', 1), | ||
name: st('protectedByShieldCrystal'), | ||
states: { | ||
on: { | ||
fields: [ | ||
{ | ||
node: crystallize_geo_dmg_, | ||
}, | ||
], | ||
}, | ||
}, | ||
}, | ||
], | ||
}, | ||
}, | ||
} | ||
export default new ArtifactSheet(key, sheet, data) |
91 changes: 91 additions & 0 deletions
91
apps/frontend/src/app/Data/Artifacts/SongOfDaysPast/index.tsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,91 @@ | ||
import type { ArtifactSetKey } from '@genshin-optimizer/consts' | ||
import { objKeyMap, range } from '@genshin-optimizer/util' | ||
import { input } from '../../../Formula' | ||
import type { Data } from '../../../Formula/type' | ||
import { constant, greaterEq, lookup, naught } from '../../../Formula/utils' | ||
import { cond, st, stg, trans } from '../../SheetUtil' | ||
import { ArtifactSheet, setHeaderTemplate } from '../ArtifactSheet' | ||
import type { IArtifactSheet } from '../IArtifactSheet' | ||
import { dataObjForArtifactSheet } from '../dataUtil' | ||
|
||
const key: ArtifactSetKey = 'SongOfDaysPast' | ||
const setHeader = setHeaderTemplate(key) | ||
const [, trm] = trans('artifact', key) | ||
|
||
const set2 = greaterEq(input.artSet.SongOfDaysPast, 2, 0.15) | ||
|
||
const healingArr = range(1000, 15000, 1000) | ||
const [condHealingPath, condHealing] = cond(key, 'healing') | ||
const healing_dmgInc = greaterEq( | ||
input.artSet.SongOfDaysPast, | ||
4, | ||
lookup( | ||
condHealing, | ||
objKeyMap(healingArr, (healAmt) => constant(healAmt * 0.08)), | ||
naught | ||
) | ||
) | ||
const normal_dmgInc = { ...healing_dmgInc } | ||
const charged_dmgInc = { ...healing_dmgInc } | ||
const plunging_dmgInc = { ...healing_dmgInc } | ||
const skill_dmgInc = { ...healing_dmgInc } | ||
const burst_dmgInc = { ...healing_dmgInc } | ||
|
||
export const data: Data = dataObjForArtifactSheet(key, { | ||
premod: { | ||
heal_: set2, | ||
normal_dmgInc, | ||
charged_dmgInc, | ||
plunging_dmgInc, | ||
skill_dmgInc, | ||
burst_dmgInc, | ||
}, | ||
}) | ||
|
||
const sheet: IArtifactSheet = { | ||
name: 'Song of Days Past', | ||
rarity: [4, 5], | ||
setEffects: { | ||
2: { document: [{ header: setHeader(2), fields: [{ node: set2 }] }] }, | ||
4: { | ||
document: [ | ||
{ | ||
header: setHeader(4), | ||
value: condHealing, | ||
path: condHealingPath, | ||
name: trm('condName'), | ||
states: objKeyMap(healingArr, (heal) => ({ | ||
name: `${heal}`, | ||
fields: [ | ||
{ | ||
node: normal_dmgInc, | ||
}, | ||
{ | ||
node: charged_dmgInc, | ||
}, | ||
{ | ||
node: plunging_dmgInc, | ||
}, | ||
{ | ||
node: skill_dmgInc, | ||
}, | ||
{ | ||
node: burst_dmgInc, | ||
}, | ||
{ | ||
text: st('triggerQuota'), | ||
value: 5, | ||
}, | ||
{ | ||
text: stg('duration'), | ||
value: 10, | ||
unit: 's', | ||
}, | ||
], | ||
})), | ||
}, | ||
], | ||
}, | ||
}, | ||
} | ||
export default new ArtifactSheet(key, sheet, data) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.