Compare commits
3
Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
dd4a938632 | ||
|
|
d8aa87cf97 | ||
|
|
79e28b5006 |
@@ -146,23 +146,23 @@ function discardCardClick(card: Card) {
|
||||
}, [] as number[])" :noEffects="noEffects" :discardable="discardable">
|
||||
<template v-for="t in tokens">
|
||||
<GameToken :token="t" @useToken="tokenClick(t, c)" v-if="
|
||||
(t.effect == CardEffects.SACRIFICE &&
|
||||
((t.effect == CardEffects.SACRIFICE &&
|
||||
playingTurn &&
|
||||
!playingTurn?.cardsLocked.includes(c._id.toString())) ||
|
||||
(t.effect == CardEffects.PREPARE &&
|
||||
c.cardType == CardType.CHAMPION) ||
|
||||
(t.effect == CardEffects.STACK_NEXT_ACTION_BOUGHT &&
|
||||
c.cardType == CardType.ACTION) ||
|
||||
(t.effect == CardEffects.STUN &&
|
||||
c.cardType == CardType.CHAMPION &&
|
||||
championsKillable) ||
|
||||
t.effect == CardEffects.PLAY_NEXT_CARD_BOUGHT ||
|
||||
t.effect == CardEffects.STACK_NEXT_CARD_BOUGHT ||
|
||||
t.effect == CardEffects.RESTACK_DISCARDED_CARD ||
|
||||
(t.effect == CardEffects.RESTACK_DISCARDED_ACTION &&
|
||||
c.cardType == CardType.ACTION) ||
|
||||
(t.effect == CardEffects.RESTACK_DISCARDED_CHAMPION &&
|
||||
c.cardType == CardType.CHAMPION)
|
||||
(t.effect == CardEffects.PREPARE &&
|
||||
c.cardType == CardType.CHAMPION) ||
|
||||
(t.effect == CardEffects.STACK_NEXT_ACTION_BOUGHT &&
|
||||
c.cardType == CardType.ACTION) ||
|
||||
(t.effect == CardEffects.STUN &&
|
||||
c.cardType == CardType.CHAMPION &&
|
||||
championsKillable) ||
|
||||
t.effect == CardEffects.PLAY_NEXT_CARD_BOUGHT ||
|
||||
t.effect == CardEffects.STACK_NEXT_CARD_BOUGHT ||
|
||||
t.effect == CardEffects.RESTACK_DISCARDED_CARD ||
|
||||
(t.effect == CardEffects.RESTACK_DISCARDED_ACTION &&
|
||||
c.cardType == CardType.ACTION) ||
|
||||
(t.effect == CardEffects.RESTACK_DISCARDED_CHAMPION &&
|
||||
c.cardType == CardType.CHAMPION)) && ((wrapped && i == (cards.length - 1)) || !wrapped)
|
||||
"></GameToken>
|
||||
</template>
|
||||
<button v-if="championsKillable && c.cardType == CardType.CHAMPION" @click.stop="damageChampionClick(c)"
|
||||
|
||||
@@ -33,6 +33,7 @@ const discardTokens = computed(() => {
|
||||
].includes(t.effect)
|
||||
)
|
||||
}
|
||||
return []
|
||||
}
|
||||
|
||||
);
|
||||
|
||||
+4
-2
@@ -4,8 +4,10 @@
|
||||
"type": "module",
|
||||
"scripts": {
|
||||
"cards-gen": "sh -c 'docker run --rm --pull=always -v ./assets/images/cards/heron-svg:/app/output/heron git.legonzaur.fr/heronfief/cards-gen:main' && sudo chown -R $USER:$USER ./assets/images/cards/heron-svg",
|
||||
"pull-images": "sh -c 'docker run --rm --pull=always -v ./public/img:/repo/images/skins git.legonzaur.fr/heronfief/cards-gen:main cp -r img/skins/ /repo/images/skins' && sudo chown -R $USER:$USER ./public/",
|
||||
"fetch": "npm run cards-gen && npm run pull-images",
|
||||
"tokens-gen": "sh -c 'docker run --rm --pull=always -v ./assets/images/tokens:/app/output/heron git.legonzaur.fr/heronfief/tokens-gen:main' && sudo chown -R $USER:$USER ./assets/images/tokens",
|
||||
"pull-token-images": "sh -c 'docker run --rm --pull=always -v ./public/img:/repo/images/tokens git.legonzaur.fr/heronfief/tokens-gen:main cp -r img/icon/ /repo/images/tokens' && sudo chown -R $USER:$USER ./public/",
|
||||
"pull-card-images": "sh -c 'docker run --rm --pull=always -v ./public/img:/repo/images/skins git.legonzaur.fr/heronfief/cards-gen:main cp -r img/skins/ /repo/images/skins' && sudo chown -R $USER:$USER ./public/",
|
||||
"fetch": "npm run cards-gen && npm run pull-card-images && npm run tokens-gen && npm run pull-token-images",
|
||||
"build": "nuxt build",
|
||||
"dev": "nuxt dev",
|
||||
"generate": "nuxt generate",
|
||||
|
||||
+4
-5
@@ -10,7 +10,6 @@ import {
|
||||
leaveGame,
|
||||
surrender,
|
||||
} from "~/netcode";
|
||||
import { delay } from "~/netcode/events";
|
||||
import {
|
||||
type Container,
|
||||
type Effect,
|
||||
@@ -28,7 +27,6 @@ const gameId = route.query.id;
|
||||
|
||||
const {
|
||||
data: game,
|
||||
pending,
|
||||
error,
|
||||
refresh,
|
||||
execute,
|
||||
@@ -235,8 +233,8 @@ onUnmounted(() => {
|
||||
|
||||
</div>
|
||||
|
||||
<ClientOnly>
|
||||
<div id="turn_buttons" v-if="game">
|
||||
<ClientOnly v-if="game">
|
||||
<div id="turn_buttons">
|
||||
<template v-if="game.started">
|
||||
<button id="end_turn" class="end_turn_button turn_icon" :class="{ hidden: !isTurn }"
|
||||
@click="endTurn(game._id)" v-if="isTurn">
|
||||
@@ -257,7 +255,8 @@ onUnmounted(() => {
|
||||
</template>
|
||||
</div>
|
||||
<div>
|
||||
<button v-if="game && game.started && selfPlayer" class="red" @click="surrender(game._id)">
|
||||
<button v-if="game.started && selfPlayer && game.owner._id != selfPlayer.user._id" class="red"
|
||||
@click="surrender(game._id)">
|
||||
Surrender
|
||||
</button>
|
||||
<button @click="navigateTo('/lobby')">Return to lobby</button>
|
||||
|
||||
@@ -4,7 +4,7 @@ export const cards = {} as Record<string, Component>;
|
||||
export const tokens = {} as Record<string, Component>;
|
||||
|
||||
export async function compileCards() {
|
||||
const svgs = import.meta.glob("@/assets/images/cards/heron-svg/*.svg", {
|
||||
const svgs = import.meta.glob("./assets/images/cards/heron-svg/*.svg", {
|
||||
eager: true,
|
||||
});
|
||||
|
||||
@@ -64,7 +64,7 @@ export async function compileCards() {
|
||||
}
|
||||
|
||||
export async function compileTokens() {
|
||||
const svgs = import.meta.glob("@/assets/images/tokens/*.svg", {
|
||||
const svgs = import.meta.glob("./assets/images/tokens/*.svg", {
|
||||
eager: true,
|
||||
});
|
||||
|
||||
|
||||
Reference in New Issue
Block a user