Fix object being undefined error for has_actions_remaining function
release-tag / release-image (push) Successful in 27s

This commit is contained in:
2024-05-16 23:43:23 +02:00
parent 0f530c3007
commit 397240589e
+5 -3
View File
@@ -59,7 +59,7 @@ let warning = ref(false)
function has_actions_remaining(): boolean {
return (goStore.self?.turn?.damage_reserve ? goStore.self?.turn?.damage_reserve > 0 : false)
|| (goStore.self?.turn?.gold_reserve ? goStore.self?.turn?.gold_reserve >= goStore.current_game?.market.reduce((min, card) => Math.min(min, card?.cost ?? Infinity), Infinity) : false)
|| (goStore.self?.turn?.gold_reserve ? goStore.self?.turn?.gold_reserve >= (goStore.current_game?.market.reduce((min, card) => Math.min(min, card?.cost ?? Infinity), Infinity) ?? Infinity) : false)
|| (goStore.self?.turn?.fuck_u_markers ? goStore.self?.turn?.fuck_u_markers > 0 : false)
|| !goStore.self?.turn?.effects_availables.every(e => !e.usable)
|| !goStore.self?.board.every(c => (c.uuid in (goStore.self?.turn?.cards_locked ?? {})))
@@ -83,7 +83,7 @@ function checkEndTurn() {
else if (!warning.value && can_buy_fire_gem()) {
warningText.value = "P'tite Fire gem?"
warning.value = true
}
}
else {
warningText.value = "Effets restants!"
warning.value = false
@@ -155,7 +155,9 @@ function damage_team_all(team: Team) {
<template v-if="!hide_stack_and_discard">
<button id="end_turn" v-if="isSelfTurn" class="end_turn_button" @click="checkEndTurn">END
TURN</button>
<div class="warning" v-if="warning" :class="{'warning-fire-gem': warningText == 'P\'tite Fire gem?'}">/!\<br>{{warningText}}</div>
<div class="warning" v-if="warning"
:class="{ 'warning-fire-gem': warningText == 'P\'tite Fire gem?' }">/!\<br>{{ warningText }}
</div>
</template>
</template>