diff --git a/old-ui/package.json b/old-ui/package.json
index 2cd385b5..868e4370 100644
--- a/old-ui/package.json
+++ b/old-ui/package.json
@@ -1,6 +1,6 @@
{
"name": "@gaia-project/old-ui",
- "version": "1.2.8",
+ "version": "1.2.9",
"scripts": {
"serve": "vite --port 5193",
"build": "vite build",
diff --git a/viewer/package.json b/viewer/package.json
index f7f7ed93..87cdb57e 100644
--- a/viewer/package.json
+++ b/viewer/package.json
@@ -1,6 +1,6 @@
{
"name": "@gaia-project/viewer",
- "version": "5.22.8",
+ "version": "5.22.9",
"description": "Functions to visualize the map and boards for gaia project inside html canvas",
"contributors": [
"coyotte508",
diff --git a/viewer/src/components/AutomaDecisionCard.vue b/viewer/src/components/AutomaDecisionCard.vue
index b25e1dbd..e1b25337 100644
--- a/viewer/src/components/AutomaDecisionCard.vue
+++ b/viewer/src/components/AutomaDecisionCard.vue
@@ -1,58 +1,103 @@
-
+
-
-
-
- #{{ card.id }}
-
-
-
+
+
+
+
+ #{{ card.id }}
+
+
+
+
+
+
-
+
-
+
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
@@ -63,6 +108,7 @@ import { cards } from "@gaia-project/engine/src/automa/cards";
import { Component, Prop, Vue } from "vue-property-decorator";
import type { AutomaIcon } from "../data/automa";
import { automaFactionAction, describeAutomaAction } from "../data/automa";
+import { tooltipTriggerConfig } from "../logic/tooltip";
import AutomaActionIcon from "./AutomaActionIcon.vue";
import Building from "./Building.vue";
import MobileActionIcon from "./MobileActionIcon.vue";
@@ -87,13 +133,16 @@ export default class AutomaDecisionCard extends Vue {
kind: this.card.action === "upgrade" ? "upgrade" : this.card.action === "power-qic" ? "block" : "research",
};
}
- get label() {
- if (this.passed)
- return this.card
- ? `Action card ${this.card.id}: Automa passed. This card's action and VP were not used. Show details`
- : "Automa passed after exhausting its deck. Show details";
- if (!this.card) return "Automa draws cards to choose its actions. Show details";
- const action = {
+ get passActive() {
+ return this.card?.pass && this.engine.automa.remaining < 3;
+ }
+ get passLabel() {
+ return this.passActive
+ ? "This is one of the last three cards: Automa passes and scores the round tile. The support card chooses its next booster."
+ : "Pass only when drawn among the last three cards. Drawn earlier, this card resolves its action and VP normally.";
+ }
+ get actionDescription() {
+ return {
"build-mine": "Build a mine",
upgrade: "Upgrade a structure",
"power-qic": "Block a power/Q.I.C. action",
@@ -101,33 +150,71 @@ export default class AutomaDecisionCard extends Vue {
"research-area-random": "Advance a research track using numbered selection",
faction: "Resolve the full faction action shown at the bottom left of the board",
}[this.card.action];
+ }
+ get actionLabel() {
+ return `${this.actionDescription}.${this.passed ? " Passing replaces this action." : ""}`;
+ }
+ get pointsLabel() {
+ return this.passed
+ ? `${this.card.victoryPoints} VP for the card's action. Passing scores the round tile instead.`
+ : `Gain ${this.card.victoryPoints} VP after this action, even if it cannot be completed.`;
+ }
+ get tooltipConfig() {
+ return { trigger: `${tooltipTriggerConfig().trigger} focus`, html: false };
+ }
+ get label() {
+ if (this.passed)
+ return this.card
+ ? `Action card ${this.card.id}: Automa passed. Show details`
+ : "Automa passed after exhausting its deck. Show details";
+ if (!this.card) return "Automa draws cards to choose its actions. Show details";
const vp =
this.card.action === "faction"
? this.factionAction.find((icon) => icon.kind === "vp").count
: this.card.victoryPoints;
const result = (this.engine.automa.lastActions ?? []).map(describeAutomaAction).join("; ");
- return `Action card ${this.card.id}: ${action}; ${vp} VP. Last turn: ${result || "no available action"}. Show details`;
+ return `Action card ${this.card.id}: ${this.actionDescription}; ${vp} VP. Last turn: ${result || "no available action"}. Show details`;
}
}