Skip to content

Commit

Permalink
Add Prospector's Drill (#1314)
Browse files Browse the repository at this point in the history
* add Prospector's Drill

* add missing file

* update assets

* Range Gauge
  • Loading branch information
frzyc authored Oct 24, 2023
1 parent e4c3364 commit 8d5c5de
Show file tree
Hide file tree
Showing 300 changed files with 271 additions and 2 deletions.
79 changes: 79 additions & 0 deletions apps/frontend/src/app/Data/Weapons/Bow/RangeGauge/index.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,79 @@
import { allElementKeys, type WeaponKey } from '@genshin-optimizer/consts'
import { allStats } from '@genshin-optimizer/gi-stats'
import { objKeyMap, range } from '@genshin-optimizer/util'
import { input } from '../../../../Formula'
import { lookup, naught, prod, subscript } from '../../../../Formula/utils'
import { cond, st, stg, trans } from '../../../SheetUtil'
import type { IWeaponSheet } from '../../IWeaponSheet'
import { dataObjForWeaponSheet } from '../../util'
import WeaponSheet, { headerTemplate } from '../../WeaponSheet'

const key: WeaponKey = 'RangeGauge'
const data_gen = allStats.weapon.data[key]
const [, trm] = trans('weapon', key)

const atk_arr = [-1, 0.03, 0.04, 0.05, 0.06, 0.07]
const all_ele_dmg_arr = [-1, 0.07, 0.085, 0.1, 0.115, 0.13]

const [condSymbolsConsumedPath, condMarksConsumed] = cond(key, 'marksConsumed')
const marksConsumedArr = range(1, 3)
const atk_ = lookup(
condMarksConsumed,
objKeyMap(marksConsumedArr, (symbol) =>
prod(symbol, subscript(input.weapon.refinement, atk_arr, { unit: '%' }))
),
naught
)
const ele_dmg_ = lookup(
condMarksConsumed,
objKeyMap(marksConsumedArr, (symbol) =>
prod(
symbol,
subscript(input.weapon.refinement, all_ele_dmg_arr, { unit: '%' })
)
),
naught
)
const all_ele_dmg_ = objKeyMap(
allElementKeys.map((ele) => `${ele}_dmg_`),
() => ({ ...ele_dmg_ })
)

const data = dataObjForWeaponSheet(key, data_gen, {
premod: {
atk_,
...all_ele_dmg_,
},
})

const sheet: IWeaponSheet = {
document: [
{
value: condMarksConsumed,
path: condSymbolsConsumedPath,
teamBuff: true,
header: headerTemplate(key, st('stacks')),
name: trm('condName'),
states: objKeyMap(marksConsumedArr, (mark) => ({
name: `${mark}`,
fields: [
{
node: atk_,
},
...Object.values(all_ele_dmg_).map((node) => ({ node })),
{
text: stg('duration'),
value: 10,
unit: 's',
},
{
text: stg('cd'),
value: 15,
unit: 's',
},
],
})),
},
],
}
export default new WeaponSheet(key, sheet, data_gen, data)
5 changes: 3 additions & 2 deletions apps/frontend/src/app/Data/Weapons/Bow/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ import AquaSimulacra from './AquaSimulacra'
import BlackcliffWarbow from './BlackcliffWarbow'
import CompoundBow from './CompoundBow'
import ElegyForTheEnd from './ElegyForTheEnd'
import EndOfTheLine from './EndOfTheLine'
import FadingTwilight from './FadingTwilight'
import FavoniusWarbow from './FavoniusWarbow'
import Hamayumi from './Hamayumi'
Expand All @@ -20,6 +21,7 @@ import MouunsMoon from './MouunsMoon'
import PolarStar from './PolarStar'
import Predator from './Predator'
import PrototypeCrescent from './PrototypeCrescent'
import RangeGauge from './RangeGauge'
import RavenBow from './RavenBow'
import RecurveBow from './RecurveBow'
import RoyalBow from './RoyalBow'
Expand All @@ -35,9 +37,7 @@ import TheFirstGreatMagic from './TheFirstGreatMagic'
import TheStringless from './TheStringless'
import TheViridescentHunt from './TheViridescentHunt'
import ThunderingPulse from './ThunderingPulse'
import EndOfTheLine from './EndOfTheLine'
import WindblumeOde from './WindblumeOde'

const bow: Record<WeaponBowKey, WeaponSheet> = {
AlleyHunter,
AmosBow,
Expand All @@ -58,6 +58,7 @@ const bow: Record<WeaponBowKey, WeaponSheet> = {
PolarStar,
Predator,
PrototypeCrescent,
RangeGauge,
RavenBow,
RecurveBow,
RoyalBow,
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,79 @@
import { allElementKeys, type WeaponKey } from '@genshin-optimizer/consts'
import { allStats } from '@genshin-optimizer/gi-stats'
import { objKeyMap, range } from '@genshin-optimizer/util'
import { input } from '../../../../Formula'
import { lookup, naught, prod, subscript } from '../../../../Formula/utils'
import { cond, st, stg, trans } from '../../../SheetUtil'
import type { IWeaponSheet } from '../../IWeaponSheet'
import { dataObjForWeaponSheet } from '../../util'
import WeaponSheet, { headerTemplate } from '../../WeaponSheet'

const key: WeaponKey = 'ProspectorsDrill'
const data_gen = allStats.weapon.data[key]
const [, trm] = trans('weapon', key)

const atk_arr = [-1, 0.03, 0.04, 0.05, 0.06, 0.07]
const all_ele_dmg_arr = [-1, 0.07, 0.085, 0.1, 0.115, 0.13]

const [condSymbolsConsumedPath, condMarksConsumed] = cond(key, 'marksConsumed')
const marksConsumedArr = range(1, 3)
const atk_ = lookup(
condMarksConsumed,
objKeyMap(marksConsumedArr, (symbol) =>
prod(symbol, subscript(input.weapon.refinement, atk_arr, { unit: '%' }))
),
naught
)
const ele_dmg_ = lookup(
condMarksConsumed,
objKeyMap(marksConsumedArr, (symbol) =>
prod(
symbol,
subscript(input.weapon.refinement, all_ele_dmg_arr, { unit: '%' })
)
),
naught
)
const all_ele_dmg_ = objKeyMap(
allElementKeys.map((ele) => `${ele}_dmg_`),
() => ({ ...ele_dmg_ })
)

const data = dataObjForWeaponSheet(key, data_gen, {
premod: {
atk_,
...all_ele_dmg_,
},
})

const sheet: IWeaponSheet = {
document: [
{
value: condMarksConsumed,
path: condSymbolsConsumedPath,
teamBuff: true,
header: headerTemplate(key, st('stacks')),
name: trm('condName'),
states: objKeyMap(marksConsumedArr, (mark) => ({
name: `${mark}`,
fields: [
{
node: atk_,
},
...Object.values(all_ele_dmg_).map((node) => ({ node })),
{
text: stg('duration'),
value: 10,
unit: 's',
},
{
text: stg('cd'),
value: 15,
unit: 's',
},
],
})),
},
],
}
export default new WeaponSheet(key, sheet, data_gen, data)
2 changes: 2 additions & 0 deletions apps/frontend/src/app/Data/Weapons/Polearm/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ import LithicSpear from './LithicSpear'
import MissiveWindspear from './MissiveWindspear'
import Moonpiercer from './Moonpiercer'
import PrimordialJadeWingedSpear from './PrimordialJadeWingedSpear'
import ProspectorsDrill from './ProspectorsDrill'
import PrototypeStarglitter from './PrototypeStarglitter'
import RightfulReward from './RightfulReward'
import RoyalSpear from './RoyalSpear'
Expand Down Expand Up @@ -47,6 +48,7 @@ const polearm: Record<WeaponPoleArmKey, WeaponSheet> = {
MissiveWindspear,
Moonpiercer,
PrimordialJadeWingedSpear,
ProspectorsDrill,
PrototypeStarglitter,
RightfulReward,
RoyalSpear,
Expand Down
2 changes: 2 additions & 0 deletions libs/consts/src/weapon.ts
Original file line number Diff line number Diff line change
Expand Up @@ -118,6 +118,7 @@ export const allWeaponPolearmKeys = [
'VortexVanquisher',
'WavebreakersFin',
'WhiteTassel',
'ProspectorsDrill',
] as const
export type WeaponPoleArmKey = (typeof allWeaponPolearmKeys)[number]

Expand All @@ -142,6 +143,7 @@ export const allWeaponBowKeys = [
'PolarStar',
'Predator',
'PrototypeCrescent',
'RangeGauge',
'RavenBow',
'RecurveBow',
'RoyalBow',
Expand Down
2 changes: 2 additions & 0 deletions libs/dm/src/mapping/weapon.ts
Original file line number Diff line number Diff line change
Expand Up @@ -111,6 +111,7 @@ export const weaponIdMap: Record<number | string, WeaponKey> = {
13419: 'MissiveWindspear',
13424: 'BalladOfTheFjords',
13425: 'RightfulReward',
13427: 'ProspectorsDrill',
13501: 'StaffOfHoma',
13502: 'SkywardSpine',
// 13503: "",
Expand Down Expand Up @@ -196,6 +197,7 @@ export const weaponIdMap: Record<number | string, WeaponKey> = {
15419: 'IbisPiercer',
15424: 'ScionOfTheBlazingSun',
15425: 'SongOfStillness',
15427: 'RangeGauge',
15501: 'SkywardHarp',
15502: 'AmosBow',
15503: 'ElegyForTheEnd',
Expand Down
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified libs/gi-assets/src/gen/chars/Amber/UI_AvatarIcon_Ambor.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified libs/gi-assets/src/gen/chars/Freminet/Skill_E_Freminet_01_HD.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified libs/gi-assets/src/gen/chars/Freminet/Skill_S_Freminet_01.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified libs/gi-assets/src/gen/chars/Freminet/UI_AvatarIcon_Freminet.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified libs/gi-assets/src/gen/chars/Lynette/Skill_E_Linette_01_HD.png
Binary file modified libs/gi-assets/src/gen/chars/Lynette/Skill_S_Linette_01.png
Binary file modified libs/gi-assets/src/gen/chars/Lynette/UI_AvatarIcon_Linette.png
Binary file modified libs/gi-assets/src/gen/chars/Lynette/UI_Talent_S_Linette_01.png
Binary file modified libs/gi-assets/src/gen/chars/Lynette/UI_Talent_S_Linette_02.png
Binary file modified libs/gi-assets/src/gen/chars/Lynette/UI_Talent_S_Linette_03.png
Binary file modified libs/gi-assets/src/gen/chars/Lynette/UI_Talent_S_Linette_04.png
Binary file modified libs/gi-assets/src/gen/chars/Lynette/UI_Talent_S_Linette_05.png
Binary file modified libs/gi-assets/src/gen/chars/Lynette/UI_Talent_S_Linette_06.png
Binary file modified libs/gi-assets/src/gen/chars/Lynette/UI_Talent_S_Linette_07.png
Binary file modified libs/gi-assets/src/gen/chars/Lynette/UI_Talent_U_Linette_01.png
Binary file modified libs/gi-assets/src/gen/chars/Lynette/UI_Talent_U_Linette_02.png
Binary file modified libs/gi-assets/src/gen/chars/Lyney/Skill_E_Liney_01_HD.png
Binary file modified libs/gi-assets/src/gen/chars/Lyney/Skill_S_Liney_01.png
Binary file modified libs/gi-assets/src/gen/chars/Lyney/UI_AvatarIcon_Liney.png
Binary file modified libs/gi-assets/src/gen/chars/Lyney/UI_AvatarIcon_Side_Liney.png
Binary file modified libs/gi-assets/src/gen/chars/Lyney/UI_NameCardPic_Liney_P.png
Binary file modified libs/gi-assets/src/gen/chars/Lyney/UI_Talent_S_Liney_01.png
Binary file modified libs/gi-assets/src/gen/chars/Lyney/UI_Talent_S_Liney_02.png
Binary file modified libs/gi-assets/src/gen/chars/Lyney/UI_Talent_S_Liney_03.png
Binary file modified libs/gi-assets/src/gen/chars/Lyney/UI_Talent_S_Liney_04.png
Binary file modified libs/gi-assets/src/gen/chars/Lyney/UI_Talent_S_Liney_05.png
Binary file modified libs/gi-assets/src/gen/chars/Lyney/UI_Talent_S_Liney_06.png
Binary file modified libs/gi-assets/src/gen/chars/Lyney/UI_Talent_S_Liney_07.png
Binary file modified libs/gi-assets/src/gen/chars/Lyney/UI_Talent_U_Liney_01.png
Binary file modified libs/gi-assets/src/gen/chars/Lyney/UI_Talent_U_Liney_02.png
9 changes: 9 additions & 0 deletions libs/gi-assets/src/gen/weapons/ProspectorsDrill/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_Pole_Mechanic_Awaken.png'
import icon from './UI_EquipIcon_Pole_Mechanic.png'

const data = {
awakenIcon,
icon,
} as const
export default data
9 changes: 9 additions & 0 deletions libs/gi-assets/src/gen/weapons/RangeGauge/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_Bow_Mechanic_Awaken.png'
import icon from './UI_EquipIcon_Bow_Mechanic.png'

const data = {
awakenIcon,
icon,
} as const
export default data
4 changes: 4 additions & 0 deletions libs/gi-assets/src/gen/weapons/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -96,13 +96,15 @@ import PortablePowerSaw from './PortablePowerSaw'
import Predator from './Predator'
import PrimordialJadeCutter from './PrimordialJadeCutter'
import PrimordialJadeWingedSpear from './PrimordialJadeWingedSpear'
import ProspectorsDrill from './ProspectorsDrill'
import PrototypeAmber from './PrototypeAmber'
import PrototypeArchaic from './PrototypeArchaic'
import PrototypeCrescent from './PrototypeCrescent'
import PrototypeRancour from './PrototypeRancour'
import PrototypeStarglitter from './PrototypeStarglitter'
import QuantumCatalyst from './QuantumCatalyst'
import Rainslasher from './Rainslasher'
import RangeGauge from './RangeGauge'
import RavenBow from './RavenBow'
import RecurveBow from './RecurveBow'
import RedhornStonethresher from './RedhornStonethresher'
Expand Down Expand Up @@ -271,13 +273,15 @@ const data = {
Predator,
PrimordialJadeCutter,
PrimordialJadeWingedSpear,
ProspectorsDrill,
PrototypeAmber,
PrototypeArchaic,
PrototypeCrescent,
PrototypeRancour,
PrototypeStarglitter,
QuantumCatalyst,
Rainslasher,
RangeGauge,
RavenBow,
RecurveBow,
RedhornStonethresher,
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"condName": "Marks of Unity consumed"
}
3 changes: 3 additions & 0 deletions libs/gi-localization/assets/locales/en/weapon_RangeGauge.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"condName": "Marks of Unity consumed"
}
38 changes: 38 additions & 0 deletions libs/gi-stats/Data/Weapons/Bow/RangeGauge/data.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
{
"weaponType": "bow",
"rarity": 4,
"mainStat": {
"type": "atk",
"base": 43.7349,
"curve": "GROW_CURVE_ATTACK_202"
},
"subStat": {
"type": "atk_",
"base": 0.06,
"curve": "GROW_CURVE_CRITICAL_201"
},
"lvlCurves": [
{
"key": "atk",
"base": 43.7349,
"curve": "GROW_CURVE_ATTACK_202"
},
{
"key": "atk_",
"base": 0.06,
"curve": "GROW_CURVE_CRITICAL_201"
}
],
"refinementBonus": {},
"ascensionBonus": {
"atk": [
0,
25.9,
51.9,
77.8,
103.7,
129.7,
155.6
]
}
}
38 changes: 38 additions & 0 deletions libs/gi-stats/Data/Weapons/Polearm/ProspectorsDrill/data.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
{
"weaponType": "polearm",
"rarity": 4,
"mainStat": {
"type": "atk",
"base": 43.7349,
"curve": "GROW_CURVE_ATTACK_202"
},
"subStat": {
"type": "atk_",
"base": 0.06,
"curve": "GROW_CURVE_CRITICAL_201"
},
"lvlCurves": [
{
"key": "atk",
"base": 43.7349,
"curve": "GROW_CURVE_ATTACK_202"
},
{
"key": "atk_",
"base": 0.06,
"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 8d5c5de

Please sign in to comment.