Skip to content

Commit

Permalink
Merge pull request #88 from harry0000/feature-1_3_3
Browse files Browse the repository at this point in the history
Update version to 1.3.3: Add unit & rank up
  • Loading branch information
harry0000 authored Mar 23, 2024
2 parents 935592e + 2c68ae2 commit 2aa64a6
Show file tree
Hide file tree
Showing 28 changed files with 881 additions and 439 deletions.
2 changes: 1 addition & 1 deletion .eslintrc.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"env": {
"browser": true,
"es2021": true
"es2022": true
},
"extends": [
"eslint:recommended",
Expand Down
330 changes: 165 additions & 165 deletions package-lock.json

Large diffs are not rendered by default.

36 changes: 18 additions & 18 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "last-origin-unit-viewer",
"version": "1.3.2",
"version": "1.3.3",
"private": true,
"license": "UNLICENSED",
"author": "harry0000 <https://github.com/harry0000>",
Expand Down Expand Up @@ -28,16 +28,16 @@
]
},
"dependencies": {
"@emotion/react": "^11.11.3",
"@types/gtag.js": "^0.0.18",
"@types/react": "^18.2.38",
"@types/react-dom": "^18.2.18",
"@emotion/react": "^11.11.4",
"@types/gtag.js": "^0.0.19",
"@types/react": "^18.2.61",
"@types/react-dom": "^18.2.19",
"@types/react-router-dom": "^5.3.3",
"@types/recoil": "0.0.9",
"bootstrap": "^4.6.2",
"fast-deep-equal": "^3.1.3",
"i18next": "^23.8.1",
"nanoid": "^5.0.4",
"i18next": "^23.10.0",
"nanoid": "^5.0.6",
"rdndmb-html5-to-touch": "^8.0.3",
"react": "^18.2.0",
"react-bootstrap": "^1.6.8",
Expand All @@ -47,34 +47,34 @@
"react-dnd-preview": "^8.0.3",
"react-dnd-touch-backend": "^16.0.1",
"react-dom": "^18.2.0",
"react-i18next": "^14.0.1",
"react-router-dom": "^6.21.3",
"react-virtuoso": "^4.6.3",
"react-i18next": "^14.0.5",
"react-router-dom": "^6.22.2",
"react-virtuoso": "^4.7.1",
"recoil": "^0.7.7"
},
"devDependencies": {
"@babel/plugin-proposal-private-property-in-object": "^7.21.11",
"@babel/preset-env": "^7.23.9",
"@babel/preset-env": "^7.24.0",
"@babel/preset-react": "^7.23.3",
"@babel/preset-typescript": "^7.23.3",
"@testing-library/jest-dom": "^6.3.0",
"@testing-library/react": "^14.1.2",
"@testing-library/jest-dom": "^6.4.2",
"@testing-library/react": "^14.2.1",
"@testing-library/user-event": "^14.5.2",
"@types/jest": "^29.5.11",
"@typescript-eslint/eslint-plugin": "^6.19.1",
"@typescript-eslint/parser": "^6.19.1",
"@types/jest": "^29.5.12",
"@typescript-eslint/eslint-plugin": "^7.1.0",
"@typescript-eslint/parser": "^7.1.0",
"@vitejs/plugin-react": "^4.2.1",
"babel-jest": "^29.7.0",
"babel-preset-vite": "^1.1.3",
"eslint": "^8.56.0",
"eslint": "^8.57.0",
"eslint-plugin-react": "^7.33.2",
"eslint-plugin-react-hooks": "^4.6.0",
"identity-obj-proxy": "^3.0.0",
"jest": "^29.7.0",
"jest-environment-jsdom": "^29.7.0",
"react-test-renderer": "^18.2.0",
"typescript": "^5.3.3",
"vite": "^5.0.12",
"vite": "^5.1.4",
"vite-plugin-svgr": "^4.2.0"
}
}
Binary file added public/unit_icon/255.webp
Binary file not shown.
4 changes: 4 additions & 0 deletions src/component/skill/AreaOfEffectCellType.ts
Original file line number Diff line number Diff line change
Expand Up @@ -183,6 +183,10 @@ export const AreaOfEffectCells = {
select: 3,
area: ['effective', 'none', 'none', 'effective', 'effective', 'none', 'effective', 'effective', 'effective']
},
[SkillAreaType.AllTowardBackLeft]: {
select: 3,
area: ['effective', 'effective', 'effective', 'effective', 'effective', 'effective', 'effective', 'effective', 'effective']
},
[SkillAreaType.AllBackwardWithSelf]: {
select: 6,
area: ['effective', 'effective', 'none', 'effective', 'effective', 'effective', 'effective', 'effective', 'none']
Expand Down
37 changes: 30 additions & 7 deletions src/component/skill/SkillEffectConditionView.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,12 @@ import {
ActivationSquadState,
ActivationTargetState,
ArmoredBulgasari,
AttackCommandFormLeona,
AttackCommandStateLeona,
DefenderAndArmoredBulgasari,
DefenderAndCyclopsPrincess,
DefenseCommandFormLeona,
EquipObservationFrameLeona,
InSquadTaggedUnitState,
NumOfCrossAdjacentCondition,
NumOfDefenderAndArmoredBulgasariCondition,
Expand All @@ -27,10 +31,11 @@ import {
UnitAliasAndRole,
isDefenderAndArmoredBulgasari,
isDefenderAndCyclopsPrincess,
isUnitsInSquadCondition,
isJangHwaActivationSquadState,
isNumOfCrossAdjacentCondition,
isNumOfDefenderAndArmoredBulgasariCondition,
isNumOfUnitsCompareToEnemiesCondition
isNumOfUnitsCompareToEnemiesCondition,
isUnitsInSquadCondition, isCommandStateLeona
} from '../../domain/skill/SkillEffectActivationCondition';
import { Effect } from '../../domain/Effect';
import { EffectActivationState } from '../../domain/EffectActivationState';
Expand Down Expand Up @@ -199,8 +204,12 @@ function unitStateView(
typeof UnitKind.AGS |
UnitType |
UnitRole |
AttackCommandFormLeona |
DefenseCommandFormLeona |
EquipObservationFrameLeona |
ArmoredBulgasari |
readonly [typeof UnitType.Light, typeof UnitType.Heavy] |
AttackCommandStateLeona |
DefenderAndArmoredBulgasari |
DefenderAndCyclopsPrincess |
'golden_factory' |
Expand All @@ -224,6 +233,10 @@ function unitStateView(
unit = `${t(`effect:unit.${state[0]}`)}${t('effect:unit_separator')}${t(`effect:unit.${state[1]}`)}`;
} else if (isDefenderAndCyclopsPrincess(state)) {
unit = `${t(`effect:unit.${state[0]}`)}${t('effect:unit_separator')}${unitName(state[1])}`;
} else if (isCommandStateLeona(state)) {
const state0 = t('effect:condition.state.form_unit', state[0]);
const state1 = t('effect:condition.state.equipped_unit', state[1]);
unit = `${state0}${t('effect:unit_separator')}${state1}`;
} else {
const separator =
key === EffectActivationState.NotInSquad ?
Expand Down Expand Up @@ -269,6 +282,10 @@ function unitStateView(
);
} else if ('equipment' in state) {
return (<span>{t('effect:condition.state.affected_equipment_effect_by', state)}</span>);
} else if ('equipped' in state) {
return (<span>{t('effect:condition.state.equipped_unit', state)}</span>);
} else if ('form' in state) {
return (<span>{t('effect:condition.state.form_unit', state)}</span>);
} else {
// only in_squad conditions.
// TODO: Move this logic from view.
Expand Down Expand Up @@ -360,11 +377,17 @@ const SquadStateView: React.FC<{
{
isUnitsInSquadCondition(state) ?
unitStateView(EffectActivationState.InSquad, state.map(s => s.in_squad), unitNumber, t) :
(<React.Fragment>
{unitStateView(EffectActivationState.NotInSquad, state[0].not_in_squad, unitNumber, t)}
<span>{t('effect:or_symbolic_separator')}</span>
{unitStateView(EffectActivationState.InSquad, state[1].in_squad, unitNumber, t)}
</React.Fragment>)
isJangHwaActivationSquadState(state) ?
(<React.Fragment>
{unitStateView(EffectActivationState.NotInSquad, state[0].not_in_squad, unitNumber, t)}
<span>{t('effect:or_symbolic_separator')}</span>
{unitStateView(EffectActivationState.InSquad, state[1].in_squad, unitNumber, t)}
</React.Fragment>) :
(<React.Fragment>
{unitStateView(EffectActivationState.InSquad, state[0].in_squad, unitNumber, t)}
<span>{t('effect:or_symbolic_separator')}</span>
{unitStateView(EffectActivationState.InSquad, state[1].in_squad, unitNumber, t)}
</React.Fragment>)
}
</React.Fragment>
);
Expand Down
7 changes: 6 additions & 1 deletion src/component/skill/SkillEffectTargetView.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,12 @@ const SkillEffectTargetView: React.FC<{
</React.Fragment>
);
} else {
return t(`effect:unit.${cond.type}`) + t(`effect:unit.${cond.role}`) + separator;
if ('kind' in cond) {
const unit = 'type' in cond ? cond.type : cond.role;
return t(`effect:unit.${unit}`) + t(`effect:unit.${cond.kind}`) + separator;
} else {
return t(`effect:unit.${cond.type}`) + t(`effect:unit.${cond.role}`) + separator;
}
}
}) :
null
Expand Down
7 changes: 7 additions & 0 deletions src/data/unitBasicData.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1468,5 +1468,12 @@ export const unitBasicData = {
rank: 'ss',
type: 'flying',
role: 'attacker'
},
255: {
no: 255,
kind: 'ags',
rank: 's',
type: 'light',
role: 'supporter'
}
} as const;
10 changes: 10 additions & 0 deletions src/data/unitCoreLinkBonusData.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2090,6 +2090,16 @@ export const unitCoreLinkBonusData: UnitCoreLinkBonusData = {
{ spd_up: { microValue: 100000 } }
]
},
255: {
specific_link_bonus: { acc_up: { milliPercentage: 7000 } },
full_link_bonus: [
{ sortie_cost: { milliPercentage: 20000 } },
{ damage_multiplier: { milliPercentage: 20000 } },
{ acc_up: { milliPercentage: 75000 } },
{ buff_debuff_lv_up: { value: 2 } },
{ spd_up: { microValue: 100000 } }
]
},
301: {
specific_link_bonus: { cri_up: { milliPercentage: 2000 } },
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 @@ -207,6 +207,7 @@ export const unitEquipmentSlotData = {
251: { chip1: 20, chip2: 40, os: 60, gear: 80 },
252: { chip1: 20, chip2: 40, os: 60, gear: 80 },
253: { chip1: 60, chip2: 80, os: 20, gear: 40 },
255: { chip1: 20, chip2: 40, os: 60, gear: 80 },
301: { chip1: 60, chip2: 80, os: 20, gear: 40 },
302: { chip1: 60, chip2: 80, os: 20, gear: 40 }
} as const;
61 changes: 54 additions & 7 deletions src/data/unitRankUpBonusData.ts
Original file line number Diff line number Diff line change
Expand Up @@ -314,10 +314,27 @@ export const unitRankUpBonusData = {
},
35: {
a: {
hp_up: { value: 80 },
atk_up: { milliValue: 15000 },
def_up: { milliValue: 14000 },
acc_up: { milliPercentage: 2000 }
hp_up: { value: 100 },
atk_up: { milliValue: 30000 },
def_up: { milliValue: 10000 },
cri_up: { milliPercentage: 5000 },
acc_up: { milliPercentage: 7000 },
},
s: {
hp_up: { value: 100 },
atk_up: { milliValue: 30000 },
def_up: { milliValue: 20000 },
cri_up: { milliPercentage: 5000 },
acc_up: { milliPercentage: 5000 },
spd_up: { microValue: 50000 }
},
ss: {
hp_up: { value: 100 },
atk_up: { milliValue: 40000 },
def_up: { milliValue: 20000 },
cri_up: { milliPercentage: 5000 },
acc_up: { milliPercentage: 5000 },
spd_up: { microValue: 50000 }
}
},
37: {
Expand Down Expand Up @@ -1243,6 +1260,22 @@ export const unitRankUpBonusData = {
spd_up: { microValue: 50000 }
}
},
177: {
s: {
hp_up: { value: 150 },
atk_up: { milliValue: 15000 },
def_up: { milliValue: 25000 },
acc_up: { milliPercentage: 5000 },
spd_up: { microValue: 30000 }
},
ss: {
hp_up: { value: 150 },
atk_up: { milliValue: 15000 },
def_up: { milliValue: 25000 },
acc_up: { milliPercentage: 5000 },
spd_up: { microValue: 20000 }
}
},
178: {
ss: {
hp_up: { value: 185 },
Expand Down Expand Up @@ -1432,10 +1465,24 @@ export const unitRankUpBonusData = {
}
},
253: {
// FIXME: Add rank up bonus data when bug fixed in game
ss: {
hp_up: { value: 0 },
atk_up: { milliValue: 0 }
hp_up: { value: 260 },
atk_up: { milliValue: 70000 },
def_up: { milliValue: 70000 },
cri_up: { milliPercentage: 6000 },
acc_up: { milliPercentage: 12000 },
spd_up: { microValue: 50000 }
}
},
255: {
ss: {
hp_up: { value: 100 },
atk_up: { milliValue: 50000 },
def_up: { milliValue: 10000 },
cri_up: { milliPercentage: 5000 },
acc_up: { milliPercentage: 10000 },
eva_up: { milliPercentage: 5000 },
spd_up: { microValue: 50000 }
}
},
301: {
Expand Down
Loading

0 comments on commit 2aa64a6

Please sign in to comment.