new deck style

This commit is contained in:
Gavin McDonald
2025-05-09 14:32:38 -04:00
parent a15b80c23e
commit 4448bc9c57
6 changed files with 5 additions and 3 deletions

View File

@@ -54,14 +54,14 @@ export default function Card({ dm, card, position, settings, flipAction }: CardP
<img
src={getURL(cardBack as TarokkaGameCard, settings)}
alt="Card Back"
className="rounded-lg border border-yellow-500 hover:drop-shadow-[0_0_2px_#ffd700]"
className={`rounded-lg ${settings.cardStyle === 'grayscale' ? 'border border-yellow-500/25 hover:drop-shadow-[0_0_3px_#ffd700/50]' : ''}`}
/>
</div>
<div className="absolute group inset-0 backface-hidden rotate-y-180">
<img
src={getURL(card, settings)}
alt={aria}
className="rounded-lg border border-yellow-500 hover:drop-shadow-[0_0_2px_#ffd700]"
className="rounded-lg border border-yellow-500/25 hover:drop-shadow-[0_0_3px_#ffd700/50]"
/>
</div>
</div>

View File

@@ -9,6 +9,7 @@ const tarokkaCards: TarokkaCard[] = [
aria: 'Back of card',
description: 'Back of card',
back: true,
extension: '.png',
},
{
id: 'swashbuckler',

BIN
public/img/color/back.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 969 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 597 KiB

View File

@@ -4,5 +4,5 @@ import { Settings, TarokkaGameCard } from '@/types';
export default function getURL(card: TarokkaGameCard, settings: Settings) {
const styleConfig = cardStyles[settings.cardStyle];
const fileBase = settings.cardStyle === 'standard' ? standardMap[card.id] : card.id;
return `${styleConfig.baseURL}${fileBase}${styleConfig.extension}`;
return `${styleConfig.baseURL}${fileBase}${card.extension || styleConfig.extension}`;
}

View File

@@ -29,6 +29,7 @@ export interface TarokkaBase {
aria: string;
back: boolean;
suit: 'Coins' | 'Glyphs' | 'High Deck' | 'Stars' | 'Swords' | null;
extension?: string;
}
export interface TarokkaGameBase extends TarokkaBase {