mirror of
https://github.com/Vikeo/LifeTrinket.git
synced 2025-11-19 09:18:02 +00:00
@@ -1,8 +1,8 @@
|
|||||||
manifest.json,1693069583936,91ce94afb71f33a477f5d8d48c3f98bd7de422279c74f17b6500eec72003ac1a
|
robots.txt,1693082171694,391d14b3c2f8c9143a27a28c7399585142228d4d1bdbe2c87ac946de411fa9a2
|
||||||
index.html,1693069584093,6b94bfa279d7639e72ce48d0e997824865ab66e4c519a64ac6906bf32636d200
|
manifest.json,1693082171694,91ce94afb71f33a477f5d8d48c3f98bd7de422279c74f17b6500eec72003ac1a
|
||||||
robots.txt,1693069583936,391d14b3c2f8c9143a27a28c7399585142228d4d1bdbe2c87ac946de411fa9a2
|
assets/index-5265c558.css,1693082171837,08c4451946bbdf520fe337edb365417a8bbf91914c018b83866723ef52d57b43
|
||||||
assets/index-5265c558.css,1693069584093,08c4451946bbdf520fe337edb365417a8bbf91914c018b83866723ef52d57b43
|
index.html,1693082171837,09e1919fbaaa3a0bf08f43eb46c29136d62a7747b41f8b5d0f4a7ed23337c344
|
||||||
logo192.png,1693069583935,4309255bccbdbb341b5ab88708677e3d43b9e171d2666528ff932295a8257e4e
|
logo192.png,1693082171693,4309255bccbdbb341b5ab88708677e3d43b9e171d2666528ff932295a8257e4e
|
||||||
favicon.ico,1693069583934,48d8c1b9714dbc9bcb012d9c9f04112d229f20e6c889bda588ac159f973e6a8d
|
favicon.ico,1693082171692,48d8c1b9714dbc9bcb012d9c9f04112d229f20e6c889bda588ac159f973e6a8d
|
||||||
logo512.png,1693069583936,92c7c05dc98170596d04f48e5e60eaae9535f409bcaeff129fd98fef8aba9f4e
|
logo512.png,1693082171694,92c7c05dc98170596d04f48e5e60eaae9535f409bcaeff129fd98fef8aba9f4e
|
||||||
assets/index-3f4fc294.js,1693069584093,ca292dd8ad8ae5540a8aefe69f8042a19e46655862e0ac68b149bb55ce0a9bce
|
assets/index-5023e89e.js,1693082171838,8a6177168e95e1ca90e5ad8774252a8a02a9a78765bd329b7deae729c01aedf3
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
{
|
{
|
||||||
"name": "life-trinket",
|
"name": "life-trinket",
|
||||||
"private": true,
|
"private": true,
|
||||||
"version": "0.1.1",
|
"version": "0.1.2",
|
||||||
"type": "commonjs",
|
"type": "commonjs",
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"dev": "vite",
|
"dev": "vite",
|
||||||
|
|||||||
26
src/App.tsx
26
src/App.tsx
@@ -62,20 +62,18 @@ const App = () => {
|
|||||||
|
|
||||||
const resetCurrentGame = () => {
|
const resetCurrentGame = () => {
|
||||||
// loop over all players and reset them
|
// loop over all players and reset them
|
||||||
players.forEach((player) => {
|
// players.forEach((player) => {
|
||||||
player.commanderDamage.forEach((commanderDamage) => {
|
// player.commanderDamage.forEach((commanderDamage) => {
|
||||||
commanderDamage.damageTotal = 0;
|
// commanderDamage.damageTotal = 0;
|
||||||
commanderDamage.partnerDamageTotal = 0;
|
// commanderDamage.partnerDamageTotal = 0;
|
||||||
});
|
// });
|
||||||
player.lifeTotal = 40;
|
// player.lifeTotal = 40;
|
||||||
player.extraCounters.forEach((counter) => {
|
// player.extraCounters.forEach((counter) => {
|
||||||
counter.value = 0;
|
// counter.value = 0;
|
||||||
});
|
// });
|
||||||
|
// handlePlayerChange(player);
|
||||||
handlePlayerChange(player);
|
// });
|
||||||
});
|
// setPlayers([...players]); // ensure to trigger a re-render
|
||||||
|
|
||||||
setPlayers([...players]); // ensure to trigger a re-render
|
|
||||||
};
|
};
|
||||||
|
|
||||||
return (
|
return (
|
||||||
|
|||||||
@@ -84,7 +84,7 @@ const ExtraCountersBar = ({
|
|||||||
{player.settings.useCommanderDamage && (
|
{player.settings.useCommanderDamage && (
|
||||||
<ExtraCounter
|
<ExtraCounter
|
||||||
rotation={player.settings.rotation}
|
rotation={player.settings.rotation}
|
||||||
Icon={<CommanderTax size={iconSize} opacity="0.5" />}
|
Icon={<CommanderTax size={iconSize} opacity="0.5" color="black" />}
|
||||||
type={CounterType.CommanderTax}
|
type={CounterType.CommanderTax}
|
||||||
counterTotal={
|
counterTotal={
|
||||||
player.extraCounters?.find(
|
player.extraCounters?.find(
|
||||||
@@ -99,7 +99,7 @@ const ExtraCountersBar = ({
|
|||||||
) && (
|
) && (
|
||||||
<ExtraCounter
|
<ExtraCounter
|
||||||
rotation={player.settings.rotation}
|
rotation={player.settings.rotation}
|
||||||
Icon={<PartnerTax size={iconSize} opacity="0.5" />}
|
Icon={<PartnerTax size={iconSize} opacity="0.5" color="black" />}
|
||||||
type={CounterType.PartnerTax}
|
type={CounterType.PartnerTax}
|
||||||
counterTotal={
|
counterTotal={
|
||||||
player.extraCounters?.find(
|
player.extraCounters?.find(
|
||||||
@@ -112,7 +112,7 @@ const ExtraCountersBar = ({
|
|||||||
{player.settings.usePoison && (
|
{player.settings.usePoison && (
|
||||||
<ExtraCounter
|
<ExtraCounter
|
||||||
rotation={player.settings.rotation}
|
rotation={player.settings.rotation}
|
||||||
Icon={<Poison size={iconSize} opacity="0.5" />}
|
Icon={<Poison size={iconSize} opacity="0.5" color="black" />}
|
||||||
type={CounterType.Poison}
|
type={CounterType.Poison}
|
||||||
counterTotal={
|
counterTotal={
|
||||||
player.extraCounters?.find((counter) => counter.type === 'poison')
|
player.extraCounters?.find((counter) => counter.type === 'poison')
|
||||||
@@ -124,7 +124,7 @@ const ExtraCountersBar = ({
|
|||||||
{player.settings.useEnergy && (
|
{player.settings.useEnergy && (
|
||||||
<ExtraCounter
|
<ExtraCounter
|
||||||
rotation={player.settings.rotation}
|
rotation={player.settings.rotation}
|
||||||
Icon={<Energy size={iconSize} opacity="0.5" />}
|
Icon={<Energy size={iconSize} opacity="0.5" color="black" />}
|
||||||
type={CounterType.Energy}
|
type={CounterType.Energy}
|
||||||
counterTotal={
|
counterTotal={
|
||||||
player.extraCounters?.find((counter) => counter.type === 'energy')
|
player.extraCounters?.find((counter) => counter.type === 'energy')
|
||||||
@@ -136,7 +136,7 @@ const ExtraCountersBar = ({
|
|||||||
{player.settings.useExperience && (
|
{player.settings.useExperience && (
|
||||||
<ExtraCounter
|
<ExtraCounter
|
||||||
rotation={player.settings.rotation}
|
rotation={player.settings.rotation}
|
||||||
Icon={<Experience size={iconSize} opacity="0.5" />}
|
Icon={<Experience size={iconSize} opacity="0.5" color="black" />}
|
||||||
type={CounterType.Experience}
|
type={CounterType.Experience}
|
||||||
counterTotal={
|
counterTotal={
|
||||||
player.extraCounters?.find(
|
player.extraCounters?.find(
|
||||||
|
|||||||
@@ -9,7 +9,7 @@ import {
|
|||||||
} from '../../../Data/getInitialPlayers';
|
} from '../../../Data/getInitialPlayers';
|
||||||
import { Player } from '../../../Types/Player';
|
import { Player } from '../../../Types/Player';
|
||||||
import { SupportMe } from '../../Misc/SupportMe';
|
import { SupportMe } from '../../Misc/SupportMe';
|
||||||
import { H2 } from '../../Misc/TextComponents';
|
import { H2, Paragraph } from '../../Misc/TextComponents';
|
||||||
import LayoutOptions from './LayoutOptions';
|
import LayoutOptions from './LayoutOptions';
|
||||||
import { useAnalytics } from '../../../Data/useAnalytics';
|
import { useAnalytics } from '../../../Data/useAnalytics';
|
||||||
|
|
||||||
@@ -108,7 +108,11 @@ const Start = ({
|
|||||||
|
|
||||||
analytics.trackEvent('game_started', { ...initialGameSettings });
|
analytics.trackEvent('game_started', { ...initialGameSettings });
|
||||||
|
|
||||||
|
try {
|
||||||
document.documentElement.requestFullscreen();
|
document.documentElement.requestFullscreen();
|
||||||
|
} catch (error) {
|
||||||
|
console.error(error);
|
||||||
|
}
|
||||||
setInitialGameSettings(initialGameSettings);
|
setInitialGameSettings(initialGameSettings);
|
||||||
setPlayers(createInitialPlayers(initialGameSettings));
|
setPlayers(createInitialPlayers(initialGameSettings));
|
||||||
};
|
};
|
||||||
@@ -212,6 +216,11 @@ const Start = ({
|
|||||||
}
|
}
|
||||||
/>
|
/>
|
||||||
</FormControl>
|
</FormControl>
|
||||||
|
|
||||||
|
<Paragraph style={{ textAlign: 'center', maxWidth: '75%' }}>
|
||||||
|
If you're on iOS, this page works better if you{' '}
|
||||||
|
<strong>hide the toolbar</strong>
|
||||||
|
</Paragraph>
|
||||||
<StartButtonFooter>
|
<StartButtonFooter>
|
||||||
<Button
|
<Button
|
||||||
size="large"
|
size="large"
|
||||||
|
|||||||
Reference in New Issue
Block a user