Feat : add tokens, handle mutex effects
This commit is contained in:
@@ -112,3 +112,15 @@ export async function buyCard(game: string, cardId: string) {
|
||||
}
|
||||
);
|
||||
}
|
||||
|
||||
export async function lockEffect(game: string, effectId: string) {
|
||||
const config = useRuntimeConfig();
|
||||
await $fetch(
|
||||
new URL(`games/${game}/turn/lockEffect/${effectId}`, config.public.endpoint)
|
||||
.href,
|
||||
{
|
||||
method: "POST",
|
||||
credentials: "include",
|
||||
}
|
||||
);
|
||||
}
|
||||
|
||||
@@ -5,7 +5,8 @@ export interface GameObject {
|
||||
export interface PlayingTurn {
|
||||
currentTeam: string;
|
||||
cardsLocked: string[];
|
||||
effectsUsed: string[];
|
||||
lockedEffects: string[];
|
||||
tokens: Effect[];
|
||||
damage: number;
|
||||
gold: number;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user