Skip to content
Merged
Show file tree
Hide file tree
Changes from 3 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
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@ export async function _getPage(lng: string) {
return createPage<HeroDevelopmentPageProps>({
buildPage: () => ({
title: t('title'),
text: t('text'),
}),
buildSeo: () => ({
title: t('head-title'),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ import greenBg from '@/shared/assets/images/heros/textBgColors/green2.webp';
import darkBlue from '@/shared/assets/images/heros/textBgColors/dark-blue_cropped.webp';
import purpleBg from '@/shared/assets/images/heros/textBgColors/purple.webp';
import { GroupInfo, HeroGroup, HeroSlug } from '../types/hero';
import { statData } from '@/entities/Hero/model/stats/statsDataV2';
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

should be "@/entities/Hero" according to https://feature-sliced.design/


export const initializeHeroGroups = (t: (key: string) => string): Record<HeroGroup, GroupInfo> => {
return {
Expand All @@ -38,6 +39,7 @@ export const initializeHeroGroups = (t: (key: string) => string): Record<HeroGro
title: t('RETROFLECTOR.heroes.hannuHodari.title'),
slug: HeroSlug.HANNU_HODARI,
description: t('RETROFLECTOR.heroes.hannuHodari.description'),
stats: statData.HANNU_HODARI,
},

{
Expand All @@ -49,6 +51,7 @@ export const initializeHeroGroups = (t: (key: string) => string): Record<HeroGro
title: t('RETROFLECTOR.heroes.pirate.title'),
slug: HeroSlug.PIRATE,
description: t('RETROFLECTOR.heroes.pirate.description'),
stats: statData.PIRATE,
},
],
},
Expand All @@ -68,6 +71,7 @@ export const initializeHeroGroups = (t: (key: string) => string): Record<HeroGro
slug: HeroSlug.SOUL_SISTERS,
title: t('CONFLUENT.heroes.SoulSisters.title'),
description: t('CONFLUENT.heroes.SoulSisters.description'),
stats: statData.SOUL_SISTERS,
},

{
Expand All @@ -79,6 +83,7 @@ export const initializeHeroGroups = (t: (key: string) => string): Record<HeroGro
slug: HeroSlug.SLEEPER,
title: t('CONFLUENT.heroes.Sleeper.title'),
description: t('CONFLUENT.heroes.Sleeper.description'),
stats: statData.SLEEPER,
},
],
},
Expand All @@ -98,6 +103,7 @@ export const initializeHeroGroups = (t: (key: string) => string): Record<HeroGro
slug: HeroSlug.GRAFFITI_ARTIST,
title: t('PROJECTOR.heroes.GraffitiArtist.title'),
description: t('PROJECTOR.heroes.GraffitiArtist.description'),
stats: statData.GRAFFITI_ARTIST,
},
],
},
Expand All @@ -117,6 +123,7 @@ export const initializeHeroGroups = (t: (key: string) => string): Record<HeroGro
slug: HeroSlug.RESEARCHER,
title: t('INTELLECTUALIZER.heroes.Researcher.title'),
description: t('INTELLECTUALIZER.heroes.Researcher.description'),
stats: statData.RESEARCHER,
},
],
},
Expand All @@ -136,6 +143,7 @@ export const initializeHeroGroups = (t: (key: string) => string): Record<HeroGro
slug: HeroSlug.CONMAN,
title: t('TRICKSTER.heroes.Conman.title'),
description: t('TRICKSTER.heroes.Conman.description'),
stats: statData.CONMAN,
},
],
},
Expand All @@ -155,6 +163,7 @@ export const initializeHeroGroups = (t: (key: string) => string): Record<HeroGro
slug: HeroSlug.FATE_PRIEST,
title: t('OBEDIENT.heroes.FatePriest.title'),
description: t('OBEDIENT.heroes.FatePriest.description'),
stats: statData.FATE_PRIEST,
},
],
},
Expand Down
262 changes: 262 additions & 0 deletions frontend-next-migration/src/entities/Hero/model/stats/statsDataV2.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,262 @@
import { Stat } from '../../types/hero';

export const color = {
resistance: 'rgb(153,0,255)',
hp: 'rgb(0,255,0)',
size: 'rgb(224,102,102)',
impactForce: 'rgb(255,153,0)',
speed: 'rgb(0,255,255)',
};
export const statValue = {
resistance: [
50, 75, 100, 125, 150, 175, 200, 225, 250, 275, 300, 325, 350, 375, 400, 425, 450, 475, 500,
525, 550, 575, 600, 625,
],
hp: [
50, 75, 100, 125, 150, 175, 200, 225, 250, 275, 300, 325, 350, 375, 400, 425, 450, 475, 500,
525, 550, 575, 600, 625,
],
size: [4, 4, 4, 6, 6, 6, 8, 8, 8, 8, 10, 10, 10, 10, 12, 12, 12, 12, 14, 14, 14, 16, 16, 16],
impactForce: [
5, 10, 20, 30, 40, 50, 60, 70, 80, 90, 100, 110, 120, 130, 140, 150, 160, 170, 180, 190,
200, 210, 220, 230,
],
speed: [4, 4, 4, 6, 6, 6, 8, 8, 8, 8, 10, 10, 10, 10, 12, 12, 12, 12, 14, 14, 14, 16, 16, 16],
};

type RarityClass = {
[key: number]: string;
};

export const rarityClassNames: RarityClass = {
1: 'veryStrongSkill',
3: 'strongSkill',
5: 'fairlyStrongSkill',
6: 'intermediate',
7: 'ratherWeakSkill',
8: 'weakSkill',
10: 'veryWeakSkill',
};

type NamedStatArray = {
[key: string]: Stat[];
};

export const statData: NamedStatArray = {
HANNU_HODARI: [
{
name: 'resistance',
defaultLevel: 5,
rarityClass: 3,
},
{
name: 'hp',
defaultLevel: 2,
rarityClass: 3,
},
{
name: 'size',
defaultLevel: 12,
rarityClass: 1,
},
{
name: 'impactForce',
defaultLevel: 8,
rarityClass: 3,
},
{
name: 'speed',
defaultLevel: 8,
rarityClass: 3,
},
],
PIRATE: [
{
name: 'resistance',
defaultLevel: 8,
rarityClass: 3,
},
{
name: 'hp',
defaultLevel: 1,
rarityClass: 3,
},
{
name: 'size',
defaultLevel: 10,
rarityClass: 1,
},
{
name: 'impactForce',
defaultLevel: 9,
rarityClass: 3,
},
{
name: 'speed',
defaultLevel: 8,
rarityClass: 3,
},
],
SOUL_SISTERS: [
{
name: 'resistance',
defaultLevel: 11,
rarityClass: 3,
},
{
name: 'hp',
defaultLevel: 2,
rarityClass: 8,
},
{
name: 'size',
defaultLevel: 12,
rarityClass: 3,
},
{
name: 'impactForce',
defaultLevel: 2,
rarityClass: 10,
},
{
name: 'speed',
defaultLevel: 2,
rarityClass: 10,
},
],
SLEEPER: [
{
name: 'resistance',
defaultLevel: 12,
rarityClass: 3,
},
{
name: 'hp',
defaultLevel: 3,
rarityClass: 8,
},
{
name: 'size',
defaultLevel: 10,
rarityClass: 3,
},
{
name: 'impactForce',
defaultLevel: 1,
rarityClass: 10,
},
{
name: 'speed',
defaultLevel: 4,
rarityClass: 10,
},
],
GRAFFITI_ARTIST: [
{
name: 'resistance',
defaultLevel: 10,
rarityClass: 5,
},
{
name: 'hp',
defaultLevel: 3,
rarityClass: 7,
},
{
name: 'size',
defaultLevel: 8,
rarityClass: 7,
},
{
name: 'impactForce',
defaultLevel: 7,
rarityClass: 7,
},
{
name: 'speed',
defaultLevel: 4,
rarityClass: 5,
},
],
RESEARCHER: [
{
name: 'resistance',
defaultLevel: 3,
rarityClass: 7,
},
{
name: 'hp',
defaultLevel: 8,
rarityClass: 5,
},
{
name: 'size',
defaultLevel: 8,
rarityClass: 8,
},
{
name: 'impactForce',
defaultLevel: 10,
rarityClass: 10,
},
{
name: 'speed',
defaultLevel: 6,
rarityClass: 7,
},
],
CONMAN: [
{
name: 'resistance',
defaultLevel: 5,
rarityClass: 8,
},
{
name: 'hp',
defaultLevel: 2,
rarityClass: 3,
},
{
name: 'size',
defaultLevel: 6,
rarityClass: 4,
},
{
name: 'impactForce',
defaultLevel: 7,
rarityClass: 7,
},
{
name: 'speed',
defaultLevel: 10,
rarityClass: 8,
},
],
FATE_PRIEST: [
{
name: 'resistance',
defaultLevel: 10,
rarityClass: 3,
},
{
name: 'hp',
defaultLevel: 10,
rarityClass: 3,
},
{
name: 'size',
defaultLevel: 10,
rarityClass: 1,
},
{
name: 'impactForce',
defaultLevel: 10,
rarityClass: 3,
},
{
name: 'speed',
defaultLevel: 10,
rarityClass: 3,
},
],
};
10 changes: 7 additions & 3 deletions frontend-next-migration/src/entities/Hero/types/hero.ts
Original file line number Diff line number Diff line change
Expand Up @@ -31,15 +31,19 @@ export interface Hero {
title: string;
description: string;
slug: HeroSlug;
stats: Stat[];
}

export type StatName = 'resistance' | 'hp' | 'size' | 'impactForce' | 'speed';

export type Stat = {
name: string;
name: StatName;
rarityClass: number;
defaultLevel: number;
developmentLevel?: number;
rarityClass: number;
color: string;
color?: string;
};

export interface GroupInfo {
name: string;
description: string;
Expand Down
Loading
Loading