Skip to content

Commit

Permalink
Add Sword of Narzissenkreuz (#1329)
Browse files Browse the repository at this point in the history
* Add Sword of Narzissenkreuz

* Add todo

---------

Co-authored-by: lantua <[email protected]>
  • Loading branch information
nguyentvan7 and lantua authored Nov 12, 2023
1 parent a94910b commit eb2a4a2
Show file tree
Hide file tree
Showing 8 changed files with 101 additions and 0 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
import type { WeaponKey } from '@genshin-optimizer/consts'
import { allStats } from '@genshin-optimizer/gi-stats'
import { input } from '../../../../Formula'
import {
constant,
equal,
infoMut,
prod,
subscript,
} from '../../../../Formula/utils'
import { customDmgNode } from '../../../Characters/dataUtil'
import { st } from '../../../SheetUtil'
import type { IWeaponSheet } from '../../IWeaponSheet'
import WeaponSheet, { headerTemplate } from '../../WeaponSheet'
import { dataObjForWeaponSheet } from '../../util'

const key: WeaponKey = 'SwordOfNarzissenkreuz'
const data_gen = allStats.weapon.data[key]

const dmg_arr = [-1, 1.6, 2, 2.4, 2.8, 3.2]
// TODO: Don't show dmg value when wielder has an Arkhe
const dmg = equal(
input.weapon.key,
key,
customDmgNode(
prod(
subscript(input.weapon.refinement, dmg_arr, { unit: '%' }),
input.total.atk
),
'elemental',
{
hit: { ele: constant('physical') },
}
)
)

const data = dataObjForWeaponSheet(key, data_gen, undefined, {
dmg,
})
const sheet: IWeaponSheet = {
document: [
{
header: headerTemplate(key, st('dmg')),
fields: [{ node: infoMut(dmg, { name: st('dmg') }) }],
},
],
}
export default new WeaponSheet(key, sheet, data_gen, data)
2 changes: 2 additions & 0 deletions apps/frontend/src/app/Data/Weapons/Sword/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ import SkywardBlade from './SkywardBlade'
import SummitShaper from './SummitShaper'
import SplendorOfTranquilWaters from './SplendorOfTranquilWaters'
import SwordOfDescension from './SwordOfDescension'
import SwordOfNarzissenkreuz from './SwordOfNarzissenkreuz'
import TheAlleyFlash from './TheAlleyFlash'
import TheBlackSword from './TheBlackSword'
import TheDockhandsAssistant from './TheDockhandsAssistant'
Expand Down Expand Up @@ -73,6 +74,7 @@ const sword: Record<WeaponSwordKey, WeaponSheet> = {
SplendorOfTranquilWaters,
SummitShaper,
SwordOfDescension,
SwordOfNarzissenkreuz,
TheAlleyFlash,
TheBlackSword,
TheDockhandsAssistant,
Expand Down
1 change: 1 addition & 0 deletions libs/consts/src/weapon.ts
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,7 @@ export const allWeaponSwordKeys = [
'SplendorOfTranquilWaters',
'SummitShaper',
'SwordOfDescension',
'SwordOfNarzissenkreuz',
'TheAlleyFlash',
'TheBlackSword',
'TheDockhandsAssistant',
Expand Down
1 change: 1 addition & 0 deletions libs/dm/src/mapping/weapon.ts
Original file line number Diff line number Diff line change
Expand Up @@ -79,6 +79,7 @@ export const weaponIdMap: Record<number | string, WeaponKey> = {
12424: 'TalkingStick',
12425: 'TidalShadow',
12427: 'PortablePowerSaw',
11428: 'SwordOfNarzissenkreuz',
12501: 'SkywardPride',
12502: 'WolfsGravestone',
12503: 'SongOfBrokenPines',
Expand Down
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
9 changes: 9 additions & 0 deletions libs/gi-assets/src/gen/weapons/SwordOfNarzissenkreuz/index.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
// This is a generated index file.
import awakenIcon from './UI_EquipIcon_Sword_Purewill.png'
import icon from './UI_EquipIcon_Sword_Purewill.png'

const data = {
awakenIcon,
icon,
} as const
export default data
2 changes: 2 additions & 0 deletions libs/gi-assets/src/gen/weapons/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -143,6 +143,7 @@ import StaffOfHoma from './StaffOfHoma'
import StaffOfTheScarletSands from './StaffOfTheScarletSands'
import SummitShaper from './SummitShaper'
import SwordOfDescension from './SwordOfDescension'
import SwordOfNarzissenkreuz from './SwordOfNarzissenkreuz'
import TalkingStick from './TalkingStick'
import TheAlleyFlash from './TheAlleyFlash'
import TheBell from './TheBell'
Expand Down Expand Up @@ -321,6 +322,7 @@ const data = {
StaffOfTheScarletSands,
SummitShaper,
SwordOfDescension,
SwordOfNarzissenkreuz,
TalkingStick,
TheAlleyFlash,
TheBell,
Expand Down
38 changes: 38 additions & 0 deletions libs/gi-stats/Data/Weapons/Sword/SwordOfNarzissenKreuz/data.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
{
"weaponType": "sword",
"rarity": 4,
"mainStat": {
"type": "atk",
"base": 42.401,
"curve": "GROW_CURVE_ATTACK_201"
},
"subStat": {
"type": "atk_",
"base": 0.09,
"curve": "GROW_CURVE_CRITICAL_201"
},
"lvlCurves": [
{
"key": "atk",
"base": 42.401,
"curve": "GROW_CURVE_ATTACK_201"
},
{
"key": "atk_",
"base": 0.09,
"curve": "GROW_CURVE_CRITICAL_201"
}
],
"refinementBonus": {},
"ascensionBonus": {
"atk": [
0,
25.9,
51.9,
77.8,
103.7,
129.7,
155.6
]
}
}

0 comments on commit eb2a4a2

Please sign in to comment.