Feat : add tokens, handle mutex effects
This commit is contained in:
@@ -16,7 +16,7 @@ const props = withDefaults(defineProps<Props>(), {
|
||||
noEffects: () => false,
|
||||
});
|
||||
|
||||
const emit = defineEmits(["cardClick"]);
|
||||
const emit = defineEmits(["cardClick", "effectClick"]);
|
||||
|
||||
const settingsStore = useSettingsStore();
|
||||
|
||||
@@ -97,6 +97,7 @@ onUnmounted(() => {
|
||||
<TransitionGroup name="list">
|
||||
<CardPreview
|
||||
@click="$emit('cardClick', c._id)"
|
||||
@effectClick="$emit('effectClick', c._id, $event)"
|
||||
v-for="c in cards"
|
||||
:card_id="c.cardId"
|
||||
:wrapped="wrapped"
|
||||
@@ -106,7 +107,7 @@ onUnmounted(() => {
|
||||
!playingTurn || playingTurn?.cardsLocked.includes(c._id.toString())
|
||||
"
|
||||
:used_effects_indexes="c.effects?.reduce( (prev,e, i)=>{
|
||||
if(playingTurn?.effectsUsed.includes(e._id)){
|
||||
if(playingTurn?.lockedEffects.includes(e._id)){
|
||||
prev.push(i)
|
||||
}
|
||||
return prev
|
||||
|
||||
Reference in New Issue
Block a user