diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 0509878a2..2dc68172e 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -6,7 +6,6 @@ on: jobs: build: - if: github.event.pull_request.draft == false runs-on: ubuntu-latest container: pandoc/latex # "ubuntu" is a more generic container, using "pandoc/latex" because of dependencies, used in the specific "build.sh" steps: diff --git a/.github/workflows/playwright.yml b/.github/workflows/playwright.yml index af368a4fa..54eb4a360 100644 --- a/.github/workflows/playwright.yml +++ b/.github/workflows/playwright.yml @@ -4,6 +4,7 @@ on: branches: [ main, beta ] pull_request: branches: [ main, beta ] + types: [ review_requested, ready_for_review ] jobs: test: timeout-minutes: 60 diff --git a/docs/dev/ide-settings/webstorm-settings.zip b/docs/dev/ide-settings/webstorm-settings.zip index 3d75c88e5..1a519697b 100644 Binary files a/docs/dev/ide-settings/webstorm-settings.zip and b/docs/dev/ide-settings/webstorm-settings.zip differ diff --git a/eslint.config.js b/eslint.config.js index 032bfde2b..639f6a3eb 100644 --- a/eslint.config.js +++ b/eslint.config.js @@ -45,7 +45,7 @@ const config = tseslint.config( // As we're migrating to TS these make the process easier '@typescript-eslint/no-unsafe-assignment': 'off', '@typescript-eslint/no-unsafe-return': 'off', - '@typescript-eslint/no-unused-vars': 'warn', + '@typescript-eslint/no-unused-vars': 'off', '@typescript-eslint/ban-ts-comment': 'off', }, }, diff --git a/public/locales/en/conditionals.yaml b/public/locales/en/conditionals.yaml index 8f708d4be..f1f873b4a 100644 --- a/public/locales/en/conditionals.yaml +++ b/public/locales/en/conditionals.yaml @@ -496,7 +496,7 @@ Lightcones: content: After the wearer uses Basic ATK or Skill, deals Additional DMG equal to {{Multiplier}}% of the wearer's ATK to a random enemy that has been attacked. WoofWalkTime: Content: - atkBoost: + enemyBurnedBleeding: text: Enemy burn / bleed DMG boost content: Increases the wearer's DMG to enemies afflicted with Burn or Bleed by {{DmgBuff}}%. This also applies to DoT. Adversarial: diff --git a/src/components/CharacterPreview.jsx b/src/components/CharacterPreview.jsx index bc4285a2e..abb5517aa 100644 --- a/src/components/CharacterPreview.jsx +++ b/src/components/CharacterPreview.jsx @@ -43,9 +43,11 @@ import { AppPages, DB } from 'lib/db' import { Message } from 'lib/message' import { calculateBuild } from 'lib/optimizer/calculateBuild' import { OptimizerTabController } from 'lib/optimizerTabController' +import { RelicFilters } from 'lib/relicFilters' import { RelicModalController } from 'lib/relicModalController' import { RelicScorer } from 'lib/relicScorerPotential' import { SaveState } from 'lib/saveState' +import { StatCalculator } from 'lib/statCalculator' import { Utils } from 'lib/utils' import PropTypes from 'prop-types' import React, { useEffect, useRef, useState } from 'react' @@ -184,13 +186,14 @@ export function CharacterPreview(props) { gap={defaultGap} id={props.id} > -
{/* This is a placeholder for the character portrait when no character is selected */}
@@ -251,7 +254,7 @@ export function CharacterPreview(props) { const statCalculationRelics = Utils.clone(displayRelics) RelicFilters.condenseRelicSubstatsForOptimizerSingle(Object.values(statCalculationRelics)) - const finalStats = calculateBuild(OptimizerTabController.fixForm(OptimizerTabController.getDisplayFormValues(character.form)), statCalculationRelics) + const { c: finalStats } = calculateBuild(OptimizerTabController.fixForm(OptimizerTabController.getDisplayFormValues(character.form)), statCalculationRelics) finalStats.CV = StatCalculator.calculateCv(Object.values(statCalculationRelics)) finalStats[elementalDmgValue] = finalStats.ELEMENTAL_DMG @@ -313,7 +316,9 @@ export function CharacterPreview(props) { // Some APIs return empty light cone as '0' const charCenter = DB.getMetadata().characters[character.id].imageCenter - const lcCenter = (character.form.lightCone && character.form.lightCone != '0') ? DB.getMetadata().lightCones[character.form.lightCone].imageCenter : 0 + const lcCenter = (character.form.lightCone && character.form.lightCone != '0') + ? DB.getMetadata().lightCones[character.form.lightCone].imageCenter + : 0 const tempLcParentW = simScoringResult ? parentW : lcParentW diff --git a/src/components/RelicScorerTab.jsx b/src/components/RelicScorerTab.jsx index b07334e09..9509b2edc 100644 --- a/src/components/RelicScorerTab.jsx +++ b/src/components/RelicScorerTab.jsx @@ -1,20 +1,27 @@ -import React, { useEffect, useMemo, useRef, useState } from 'react' +import Icon, { + CameraOutlined, + DownloadOutlined, + EditOutlined, + ExperimentOutlined, + ImportOutlined, + LineChartOutlined, +} from '@ant-design/icons' import { Button, Dropdown, Flex, Form, Input, Segmented, theme, Typography } from 'antd' +import CharacterModal from 'components/CharacterModal' import { CharacterPreview } from 'components/CharacterPreview' -import { SaveState } from 'lib/saveState' -import { CharacterConverter } from 'lib/characterConverter' +import { applySpdPreset } from 'components/optimizerTab/optimizerForm/RecommendedPresetsButton' import { Assets } from 'lib/assets' -import PropTypes from 'prop-types' +import { CharacterConverter } from 'lib/characterConverter' +import { Constants, CURRENT_DATA_VERSION, officialOnly } from 'lib/constants' +import { SavedSessionKeys } from 'lib/constantsSession' import DB, { AppPages, PageToRoute } from 'lib/db' -import { Utils } from 'lib/utils' -import Icon, { CameraOutlined, DownloadOutlined, EditOutlined, ExperimentOutlined, ImportOutlined, LineChartOutlined } from '@ant-design/icons' import { Message } from 'lib/message' -import CharacterModal from 'components/CharacterModal' -import { SavedSessionKeys } from 'lib/constantsSession' -import { applySpdPreset } from 'components/optimizerTab/optimizerForm/RecommendedPresetsButton' import { calculateBuild } from 'lib/optimizer/calculateBuild' import { OptimizerTabController } from 'lib/optimizerTabController' -import { Constants, CURRENT_DATA_VERSION, officialOnly } from 'lib/constants' +import { SaveState } from 'lib/saveState' +import { Utils } from 'lib/utils' +import PropTypes from 'prop-types' +import React, { useEffect, useMemo, useRef, useState } from 'react' import { useTranslation } from 'react-i18next' const { useToken } = theme @@ -201,7 +208,9 @@ export default function RelicScorerTab() { */} - {officialOnly ? t('Header.WithoutVersion') : t('Header.WithVersion', { beta_version: CURRENT_DATA_VERSION })} + {officialOnly + ? t('Header.WithoutVersion') + : t('Header.WithVersion', { beta_version: CURRENT_DATA_VERSION })} { /* "WithVersion": "Enter your account UID to score your profile character at level 80 & maxed traces. Log out to refresh instantly. (Current version {{beta_version}} )", @@ -264,11 +273,17 @@ function CharacterPreviewSelection(props) { const items = [ { - label: {t('ImportLabels.AllCharacters')/* Import all characters & all relics into optimizer */}, + label: ( + {t('ImportLabels.AllCharacters')/* Import all characters & all relics into optimizer */} + + ), key: 'import characters', }, { - label: {t('ImportLabels.SingleCharacter')/* Import selected character & all relics into optimizer */}, + label: ( + {t('ImportLabels.SingleCharacter')/* Import selected character & all relics into optimizer */} + + ), key: 'import single character', }, ] @@ -458,7 +473,7 @@ function CharacterPreviewSelection(props) { RelicFilters.condenseRelicSubstatsForOptimizer(relicsByPart) // Calculate the build's speed value to use as a preset - const c = calculateBuild(cleanedForm, equippedRelics) + const { c } = calculateBuild(cleanedForm, equippedRelics) applySpdPreset(Utils.precisionRound(c.SPD, 3), characterId) // Timeout to allow the form to populate before optimizing @@ -474,10 +489,21 @@ function CharacterPreviewSelection(props) { 0) ? 'flex' : 'none', width: '100%' }}> 0) ? 'flex' : 'none' }} justify='space-between'> - -