fix : remove damage and make discard buttons when not relevant
This commit is contained in:
@@ -8,12 +8,11 @@ export interface Props {
|
||||
game: Game;
|
||||
player: Player;
|
||||
focused?: boolean;
|
||||
isTurn?: boolean;
|
||||
isSelfTurn: boolean;
|
||||
self?: boolean;
|
||||
}
|
||||
|
||||
const props = withDefaults(defineProps<Props>(), {
|
||||
isTurn: () => false,
|
||||
self: () => false,
|
||||
});
|
||||
|
||||
@@ -43,7 +42,7 @@ function damage() {
|
||||
:class="{
|
||||
self,
|
||||
focused,
|
||||
isTurn,
|
||||
isSelfTurn,
|
||||
}"
|
||||
>
|
||||
<div id="player_banner" class="small">
|
||||
@@ -68,24 +67,21 @@ function damage() {
|
||||
</GamePlayerStats>
|
||||
<!-- </template> -->
|
||||
</div>
|
||||
<button
|
||||
v-if="
|
||||
game.currentTurn.tokens.some(
|
||||
(t) => t.effect == CardEffects.MAKE_DISCARD
|
||||
) &&
|
||||
props.player._id != selfPlayer?._id &&
|
||||
!isTurn
|
||||
"
|
||||
@click.stop="makeDiscardClick"
|
||||
>
|
||||
Make Discard
|
||||
</button>
|
||||
<button
|
||||
v-if="props.player._id != selfPlayer?._id && !isTurn"
|
||||
@click.stop="damage"
|
||||
>
|
||||
Damage
|
||||
</button>
|
||||
<template v-if="!self && isSelfTurn">
|
||||
<button
|
||||
v-if="
|
||||
game.currentTurn.tokens.some(
|
||||
(t) => t.effect == CardEffects.MAKE_DISCARD
|
||||
)
|
||||
"
|
||||
@click.stop="makeDiscardClick"
|
||||
>
|
||||
Make Discard
|
||||
</button>
|
||||
<button @click.stop="damage" :disabled="game.currentTurn.damage == 0">
|
||||
Damage
|
||||
</button>
|
||||
</template>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
Reference in New Issue
Block a user