Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update version to 1.2.13: Add unit & Add rank up #74

Merged
merged 8 commits into from
Jul 14, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
377 changes: 194 additions & 183 deletions package-lock.json

Large diffs are not rendered by default.

34 changes: 17 additions & 17 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "last-origin-unit-viewer",
"version": "1.2.12",
"version": "1.2.13",
"private": true,
"license": "UNLICENSED",
"author": "harry0000 <https://github.com/harry0000>",
Expand Down Expand Up @@ -39,44 +39,44 @@
]
},
"dependencies": {
"@emotion/react": "^11.11.0",
"@emotion/react": "^11.11.1",
"@types/gtag.js": "0.0.12",
"@types/node": "^18.16.16",
"@types/react": "^18.2.7",
"@types/react-dom": "^18.2.4",
"@types/node": "^18.16.19",
"@types/react": "^18.2.14",
"@types/react-dom": "^18.2.7",
"@types/react-router-dom": "^5.3.3",
"@types/recoil": "0.0.9",
"bootstrap": "^4.6.2",
"fast-deep-equal": "^3.1.3",
"i18next": "^22.5.0",
"rdndmb-html5-to-touch": "^8.0.0",
"i18next": "^22.5.1",
"rdndmb-html5-to-touch": "^8.0.1",
"react": "^18.2.0",
"react-bootstrap": "^1.6.7",
"react-dnd": "^16.0.1",
"react-dnd-html5-backend": "^16.0.1",
"react-dnd-multi-backend": "^8.0.0",
"react-dnd-preview": "^8.0.0",
"react-dnd-multi-backend": "^8.0.1",
"react-dnd-preview": "^8.0.1",
"react-dnd-touch-backend": "^16.0.1",
"react-dom": "^18.2.0",
"react-i18next": "^12.3.1",
"react-router-dom": "^5.3.3",
"react-router-dom": "^5.3.4",
"react-scripts": "^5.0.1",
"react-virtuoso": "^4.3.8",
"react-virtuoso": "^4.4.0",
"recoil": "^0.7.7"
},
"devDependencies": {
"@testing-library/jest-dom": "^5.16.5",
"@testing-library/react": "^14.0.0",
"@testing-library/user-event": "^14.4.3",
"@types/jest": "^29.5.2",
"@typescript-eslint/eslint-plugin": "^5.59.8",
"@typescript-eslint/parser": "^5.59.8",
"eslint": "^8.41.0",
"@types/jest": "^29.5.3",
"@typescript-eslint/eslint-plugin": "^5.62.0",
"@typescript-eslint/parser": "^5.62.0",
"eslint": "^8.44.0",
"eslint-plugin-react": "^7.32.2",
"eslint-plugin-react-hooks": "^4.6.0",
"typescript": "^5.0.4"
"typescript": "^5.1.6"
},
"overrides": {
"typescript": "^5.0.4"
"typescript": "^5.1.6"
}
}
Binary file added public/unit_icon/156.webp
Binary file not shown.
12 changes: 7 additions & 5 deletions src/component/skill/SkillEffectConditionView.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -452,11 +452,13 @@ const TriggerView: React.FC<{
<React.Fragment>
{
condition.round ?
'at' in condition.round ?
t('effect:condition.trigger.round.at', { round: condition.round.at }) :
'from' in condition.round ?
t('effect:condition.trigger.round.from', { round: condition.round.from }) :
t('effect:condition.trigger.round.until', { round: condition.round.until }) :
typeof condition.round === 'string' ?
t(`effect:condition.trigger.start_${condition.round}_round`) :
'at' in condition.round ?
t('effect:condition.trigger.round.at', { round: condition.round.at }) :
'from' in condition.round ?
t('effect:condition.trigger.round.from', { round: condition.round.from }) :
t('effect:condition.trigger.round.until', { round: condition.round.until }) :
t('effect:condition.trigger.start_round')
}
</React.Fragment>
Expand Down
4 changes: 4 additions & 0 deletions src/component/status/UnitSlot.css
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
.slot-container {
width: fit-content;
}

.slot-row {
display: flex;
}
Expand Down
11 changes: 11 additions & 0 deletions src/component/status/corelink/UnitCoreLinkView.css
Original file line number Diff line number Diff line change
Expand Up @@ -10,3 +10,14 @@
.core-link-rate-details {
margin-left: 15px;
}

.core-link-action {
display: flex;
margin-left: auto;
}

.core-link-action > .btn {
line-height: 0.5;
font-weight: bold;
font-size: 0.9em;
}
46 changes: 44 additions & 2 deletions src/component/status/corelink/UnitCoreLinkView.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import React, { Suspense } from 'react';
import { ReactElementLike } from 'prop-types';
import { useTranslation } from 'react-i18next';

import { OverlayTrigger, Popover } from 'react-bootstrap';
import { Button, OverlayTrigger, Popover } from 'react-bootstrap';
import PopoverListContent from '../../common/PopoverListContent';
import { Search } from '../../icon/FluentIcons';
import SVGIcon from '../../icon/SVGIcon';
Expand All @@ -16,7 +16,11 @@ import { CoreLinkBonus } from '../../../domain/UnitCoreLinkBonusData';
import { UnitBasicInfo } from '../../../domain/UnitBasicInfo';
import { calcMicroValue, calcMilliPercentageValue } from '../../../domain/ValueUnit';

import { useCoreLinkEffect, useCoreLinkRate } from '../../../state/corelink/UnitCoreLinkHook';
import {
useCoreLinkEffect,
useCoreLinkRate,
useLinkAllSlot
} from '../../../state/corelink/UnitCoreLinkHook';
import { useSelectedUnit } from '../../../state/selector/UnitSelectorHook';

import '../UnitSlot.css';
Expand Down Expand Up @@ -88,6 +92,43 @@ const CoreLinkEffectDetailView: React.FC = () => {
);
};

const WrappedButton: React.FC<{
available: boolean,
onClick: () => void
}> = ({ available, onClick, ...rest }) => {
const { t } = useTranslation();
return (
<Button
{...rest}
variant="secondary"
disabled={!available}
onClick={onClick}
>
{t('form.link_all_slot')}
</Button>
);
};

const LinkAllSlotButton: React.FC<{ unit: UnitBasicInfo }> = ({ unit }) => {
const [linkAllSlot, available] = useLinkAllSlot(unit);

return (<WrappedButton available={available} onClick={linkAllSlot} />);
};

const DisabledButton: React.FC = () => {
return (<WrappedButton available={false} onClick={() => { return; }} />);
};

const CoreLinkAction: React.FC = () => {
const selected = useSelectedUnit();

return (
<div className="core-link-action">
{selected ? (<LinkAllSlotButton unit={selected} />): (<DisabledButton />)}
</div>
);
};

const CoreLinkSelector = React.lazy(() => import('./CoreLinkSelector'));

const UnitCoreLinkView: React.FC = () => {
Expand All @@ -99,6 +140,7 @@ const UnitCoreLinkView: React.FC = () => {
>
<CoreLinkRate />
<CoreLinkEffectDetailView />
<CoreLinkAction />
</UnitStatusHeading>
<div className="slot-row">
<div className="slot-cell"><Suspense fallback={null}><CoreLinkSelector slot="slot1" /></Suspense></div>
Expand Down
7 changes: 7 additions & 0 deletions src/data/unitBasicData.ts
Original file line number Diff line number Diff line change
Expand Up @@ -860,6 +860,13 @@ export const unitBasicData = {
type: 'light',
role: 'attacker'
},
156: {
no: 156,
kind: 'bioroid',
rank: 'ss',
type: 'heavy',
role: 'attacker'
},
161: {
no: 161,
kind: 'bioroid',
Expand Down
10 changes: 10 additions & 0 deletions src/data/unitCoreLinkBonusData.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1314,6 +1314,16 @@ export const unitCoreLinkBonusData: UnitCoreLinkBonusData = {
{ spd_up: { microValue: 100000 } }
]
},
156: {
specific_link_bonus: { def_up: { milliPercentage: 3_000 } },
full_link_bonus: [
{ sortie_cost: { milliPercentage: 25000 } },
{ cri_up: { milliPercentage: 30000 } },
{ range_up: { value: 2 } },
{ buff_debuff_lv_up: { value: 2 } },
{ spd_up: { microValue: 100000 } }
]
},
161: {
specific_link_bonus: { acc_up: { milliPercentage: 7000 } },
full_link_bonus: [
Expand Down
1 change: 1 addition & 0 deletions src/data/unitEquipmentSlotData.ts
Original file line number Diff line number Diff line change
Expand Up @@ -130,6 +130,7 @@ export const unitEquipmentSlotData = {
152: { chip1: 20, chip2: 40, os: 60, gear: 80 },
154: { chip1: 60, chip2: 80, os: 40, gear: 20 },
155: { chip1: 20, chip2: 40, os: 60, gear: 80 },
156: { chip1: 20, chip2: 80, os: 40, gear: 60 },
161: { chip1: 60, chip2: 80, os: 40, gear: 20 },
162: { chip1: 60, chip2: 80, os: 40, gear: 20 },
165: { chip1: 40, chip2: 60, os: 80, gear: 20 },
Expand Down
17 changes: 17 additions & 0 deletions src/data/unitRankUpBonusData.ts
Original file line number Diff line number Diff line change
Expand Up @@ -142,6 +142,12 @@ export const unitRankUpBonusData = {
def_up: { milliValue: 5000 },
acc_up: { milliPercentage: 5000 },
spd_up: { microValue: 20000 }
},
ss: {
hp_up: { value: 60 },
atk_up: { milliValue: 70000 },
cri_up: { milliPercentage: 14000 },
spd_up: { microValue: 40000 }
}
},
25: {
Expand Down Expand Up @@ -213,6 +219,17 @@ export const unitRankUpBonusData = {
spd_up: { microValue: 20000 }
}
},
29: {
ss: {
hp_up: { value: 140 },
atk_up: { milliValue: 100000 },
def_up: { milliValue: 20000 },
cri_up: { milliPercentage: 10000 },
acc_up: { milliPercentage: 15000 },
eva_up: { milliPercentage: 5000 },
spd_up: { microValue: 100000 }
}
},
30: {
s: {
hp_up: { value: 100 },
Expand Down
Loading