mirror of
https://github.com/blitzkit/blitzkit.git
synced 2026-10-23 19:49:50 +02:00
feat: spall liner
This commit is contained in:
1 parent
ab26b346e6
commit
d6e96e17ad
4 files changed
+38
-1
No files matched your search
@@ -5,11 +5,13 @@ import {
|
|||||||
CaretRightIcon,
|
CaretRightIcon,
|
||||||
CaretSortIcon,
|
CaretSortIcon,
|
||||||
ComponentPlaceholderIcon,
|
ComponentPlaceholderIcon,
|
||||||
|
InfoCircledIcon,
|
||||||
PlusIcon,
|
PlusIcon,
|
||||||
TrashIcon,
|
TrashIcon,
|
||||||
} from '@radix-ui/react-icons';
|
} from '@radix-ui/react-icons';
|
||||||
import {
|
import {
|
||||||
Button,
|
Button,
|
||||||
|
Callout,
|
||||||
Dialog,
|
Dialog,
|
||||||
Flex,
|
Flex,
|
||||||
Heading,
|
Heading,
|
||||||
@@ -76,6 +78,15 @@ export default function Page() {
|
|||||||
const awaitedProvisionDefinitions = use(provisionDefinitions);
|
const awaitedProvisionDefinitions = use(provisionDefinitions);
|
||||||
const deltaMode = useComparePersistent((state) => state.deltaMode);
|
const deltaMode = useComparePersistent((state) => state.deltaMode);
|
||||||
const crewSkills = useCompareTemporary((state) => state.crewSkills);
|
const crewSkills = useCompareTemporary((state) => state.crewSkills);
|
||||||
|
const haveReactive = members.some((member) =>
|
||||||
|
member.consumables.includes(33),
|
||||||
|
);
|
||||||
|
const haveDynamicArmor = members.some((member) =>
|
||||||
|
member.consumables.includes(73),
|
||||||
|
);
|
||||||
|
const haveSpallLiner = members.some((member) =>
|
||||||
|
member.provisions.includes(101),
|
||||||
|
);
|
||||||
const stats = useMemo(
|
const stats = useMemo(
|
||||||
() =>
|
() =>
|
||||||
members.map((thisMember) =>
|
members.map((thisMember) =>
|
||||||
@@ -97,6 +108,11 @@ export default function Page() {
|
|||||||
member.key !== thisMember.key &&
|
member.key !== thisMember.key &&
|
||||||
member.consumables.includes(73),
|
member.consumables.includes(73),
|
||||||
),
|
),
|
||||||
|
applySpallLiner: members.some(
|
||||||
|
(member) =>
|
||||||
|
member.key !== thisMember.key &&
|
||||||
|
member.provisions.includes(101),
|
||||||
|
),
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
equipmentDefinitions: awaitedEquipmentDefinitions,
|
equipmentDefinitions: awaitedEquipmentDefinitions,
|
||||||
@@ -514,6 +530,18 @@ export default function Page() {
|
|||||||
return (
|
return (
|
||||||
<PageWrapper color="crimson" size="100%">
|
<PageWrapper color="crimson" size="100%">
|
||||||
<Flex justify="center" gap="2" align="center" mt="4" direction="column">
|
<Flex justify="center" gap="2" align="center" mt="4" direction="column">
|
||||||
|
{(haveReactive || haveDynamicArmor || haveSpallLiner) && (
|
||||||
|
<Callout.Root mb="4">
|
||||||
|
<Callout.Icon>
|
||||||
|
<InfoCircledIcon />
|
||||||
|
</Callout.Icon>
|
||||||
|
<Callout.Text>
|
||||||
|
Consumables like Reactive Armor and Dynamic Armor System and
|
||||||
|
provisions like Spall Liner may reduce other tanks' damage.
|
||||||
|
</Callout.Text>
|
||||||
|
</Callout.Root>
|
||||||
|
)}
|
||||||
|
|
||||||
<Flex gap="2">
|
<Flex gap="2">
|
||||||
<Dialog.Root
|
<Dialog.Root
|
||||||
open={addTankDialogOpen}
|
open={addTankDialogOpen}
|
||||||
|
|||||||
@@ -88,6 +88,7 @@ export function Characteristics() {
|
|||||||
stockTurret,
|
stockTurret,
|
||||||
applyReactive: false,
|
applyReactive: false,
|
||||||
applyDynamicArmor: false,
|
applyDynamicArmor: false,
|
||||||
|
applySpallLiner: false,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
equipmentDefinitions: awaitedEquipmentDefinitions,
|
equipmentDefinitions: awaitedEquipmentDefinitions,
|
||||||
|
|||||||
@@ -17,3 +17,5 @@ export interface ProvisionDefinitions {
|
|||||||
export const provisionDefinitions = fetchCdonLz4<ProvisionDefinitions>(
|
export const provisionDefinitions = fetchCdonLz4<ProvisionDefinitions>(
|
||||||
asset('definitions/provisions.cdon.lz4'),
|
asset('definitions/provisions.cdon.lz4'),
|
||||||
);
|
);
|
||||||
|
|
||||||
|
provisionDefinitions.then(console.log);
|
||||||
@@ -40,6 +40,7 @@ export function tankCharacteristics(
|
|||||||
stockGun,
|
stockGun,
|
||||||
applyReactive,
|
applyReactive,
|
||||||
applyDynamicArmor,
|
applyDynamicArmor,
|
||||||
|
applySpallLiner,
|
||||||
}: {
|
}: {
|
||||||
tank: TankDefinition;
|
tank: TankDefinition;
|
||||||
turret: TurretDefinition;
|
turret: TurretDefinition;
|
||||||
@@ -59,6 +60,7 @@ export function tankCharacteristics(
|
|||||||
camouflage: boolean;
|
camouflage: boolean;
|
||||||
applyReactive: boolean;
|
applyReactive: boolean;
|
||||||
applyDynamicArmor: boolean;
|
applyDynamicArmor: boolean;
|
||||||
|
applySpallLiner: boolean;
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
modelDefinitions,
|
modelDefinitions,
|
||||||
@@ -138,7 +140,11 @@ export function tankCharacteristics(
|
|||||||
const intraClipCoefficient = coefficient([hasShellReloadBoost, -0.3]);
|
const intraClipCoefficient = coefficient([hasShellReloadBoost, -0.3]);
|
||||||
const damageCoefficient =
|
const damageCoefficient =
|
||||||
coefficient([hasTungsten, 0.15]) *
|
coefficient([hasTungsten, 0.15]) *
|
||||||
coefficient([applyReactive, -0.2], [applyDynamicArmor, -0.1]);
|
coefficient(
|
||||||
|
[applyReactive, -0.2],
|
||||||
|
[applyDynamicArmor, -0.1],
|
||||||
|
[applySpallLiner && shell.type === 'he', -0.2],
|
||||||
|
);
|
||||||
const reloadCoefficient =
|
const reloadCoefficient =
|
||||||
(coefficient([hasRammer, -0.07]) *
|
(coefficient([hasRammer, -0.07]) *
|
||||||
coefficient([true, degressiveStat(crewMemberMastery)])) /
|
coefficient([true, degressiveStat(crewMemberMastery)])) /
|
||||||
|
|||||||
Reference in new issue
Block a user