Skip to content

Commit

Permalink
Merge branch 'release/1.0.2'
Browse files Browse the repository at this point in the history
  • Loading branch information
web-flow committed Sep 15, 2024
2 parents e88efd2 + 5023101 commit d70b715
Show file tree
Hide file tree
Showing 10 changed files with 27 additions and 48 deletions.
4 changes: 2 additions & 2 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@brdgm/age-of-innovation-solo-helper",
"version": "1.0.1",
"version": "1.0.2",
"private": true,
"description": "Age of Innovation Solo Helper",
"appDeployName": "age-of-innovation",
Expand Down
18 changes: 5 additions & 13 deletions src/components/setup/AutomaSetup.vue
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
<h4>{{t('setupGameAutoma.generalSetup')}}</h4>
<p v-html="t('setupGameAutoma.generalSetupIntro')"></p>
<ol>
<li v-if="isTwoPlayerGame" v-html="t('setupGameAutoma.noTwoPlayerSpecialRules')"></li>
<li>
<AppIcon name="scoring-tile-setup" class="scoring-tile-icon"/>
<span v-html="t('setupGameAutoma.roundScoreTiles')"></span>
Expand All @@ -10,7 +11,7 @@
<AppIcon name="scoring-tile-game-end-token" class="scoring-tile-icon"/>
<span v-html="t('setupGameAutoma.gameEndToken')"></span>
</li>
<li v-html="t('setupGameAutoma.palaceTiles')"></li>
<li v-html="t('setupGameAutoma.palaceTiles', {count:palaceTileCount})"></li>
<li>
<span v-html="t('setupGameAutoma.factionSelection.title')"></span>
<ol type="a">
Expand Down Expand Up @@ -46,18 +47,6 @@
</li>
</ol>

<template v-if="isTwoPlayerGame">
<h4>{{t('setupGameAutoma.twoPlayer.title')}}</h4>
<ol>
<li v-html="t('setupGameAutoma.twoPlayer.areaScoreTile')"></li>
<li v-html="t('setupGameAutoma.twoPlayer.componentsUnusedColor')"></li>
<ul>
<li v-html="t('setupGameAutoma.twoPlayer.placeScholars')"></li>
<li v-html="t('setupGameAutoma.twoPlayer.placeStatusMarkers')"></li>
</ul>
</ol>
</template>

<h4>{{t('setupGameAutoma.initialWorkshop.title')}}</h4>
<p v-html="t('setupGameAutoma.initialWorkshop.intro')"></p>
<ol>
Expand Down Expand Up @@ -101,6 +90,9 @@ export default defineComponent({
return { t, state }
},
computed: {
palaceTileCount() : number {
return this.state.setup.playerSetup.playerCount + 1
},
bonusCardCount() : number {
return this.state.setup.playerSetup.botCount + this.state.setup.playerSetup.playerCount + 3
},
Expand Down
14 changes: 3 additions & 11 deletions src/locales/de.json
Original file line number Diff line number Diff line change
Expand Up @@ -27,9 +27,10 @@
"title": "Automa Spielaufbau",
"generalSetup": "Allgemeiner Aufbau",
"generalSetupIntro": "Baue das Spiel wie gewohnt auf, mit diesen Änderungen:",
"noTwoPlayerSpecialRules": "Die besonderen Regeln für das Spiel zu zweit (Standardspiel-Regel, Seite 19) werden <b>nicht</b> angewendet.",
"roundScoreTiles": "Verwende die <b>Automa-Rundenwertungsplättchen</b> anstelle der Plättchen des Grundspiels. Lege die Plättchen mit der Seite nach oben ab, deren helle Markierung (links) dem Rundenfeld entspricht, auf das du sie legst. Wie im Grundspiel darf das Plättchen mit dem Spaten nicht auf den Feldern für Runde 5 oder 6 liegen.",
"gameEndToken": "Verwende die <b>Automa-Zusatzwertungsplättchen</b> für die letzte Runde anstelle der Plättchen des Grundspiels. Lege ein zufälliges dieser Plättchen nach den üblichen Regeln aus.",
"palaceTiles": "Lege nur 2 zufällige <b>Palastplättchen</b> neben den Spielplan. Lege das Palastplättchen Nr. 17 (mit der roten Rückseite) daneben.",
"palaceTiles": "Lege {count} zufällige <b>Palastplättchen</b> neben den Spielplan. Lege das Palastplättchen Nr. 17 (mit der roten Rückseite) daneben.",
"factionSelection": {
"title": "Wähle deine <b>Gemeinschaft</b> wie folgt:",
"planningDisplayCards": "Lege 3 zufällige Planungstableaukarten aus.",
Expand All @@ -46,13 +47,6 @@
"factionSetup": "Wende die weiteren Aufbauregeln der <i>{faction}</i>-<b>Gemeinschaftskarte</b> an und mache dich mit den Sonderregeln vertraut.",
"scoreTrack": "Setze 1 ihrer Markierungssteine wie üblich auf Feld 20 der <b>Punkteleiste</b>."
},
"twoPlayer": {
"title": "Aufbau für 2 Spieler",
"areaScoreTile": "Platziere verdeckt ein zufälliges <b>2-Spieler Gebietswertungsplättchen</b>.",
"componentsUnusedColor": "Verwende das Material einer nicht genutzten Spielerfarbe:",
"placeScholars": "Stelle je <b>1 Gelehrten</b> in jeder Disziplin auf ein <b>2er-Feld</b>.",
"placeStatusMarkers": "Stelle je <b>1 Markierungsstein</b> in jeder Disziplin auf <b>Stufe 2</b>."
},
"initialWorkshop": {
"title": "Platzierung der ersten Werkstätten",
"intro": "Automa setzt ihre beiden Werkstätten ein, nachdem du deine erste Werkstatt eingesetzt hast. Nutze dafür die <b>Aufbaukarte</b>, die zu der Spielplanseite passt.",
Expand All @@ -70,8 +64,7 @@
"income": {
"title": "Einkommen",
"turnInfo": "Runde {round}",
"collect": "Erhalte Werkzeuge, Geld, Gelehrte, Bücher und Macht.",
"twoPlayer": "<i>2 Spieler:</i> Drehe das <b>Plättchen für die Gebietswertung</b> um."
"collect": "Erhalte Werkzeuge, Geld, Gelehrte, Bücher und Macht."
},
"roundTurn": {
"turnInfo": "Runde {round}, Zug {turn}",
Expand Down Expand Up @@ -193,7 +186,6 @@
"title": "Rundenende",
"turnInfo": "Runde {round}",
"scienceBonus": "Du erhältst den <b>Wissensbonus</b>.",
"scienceBonusTwoPlayer": "<i>2 Spieler</i>: Bewege für jeden der Wissensboni (auf der rechten Seite der Rundenwertungsplättchen) den Markierungsstein der ungenutzten Spielerfarbe in der abgebildeten Disziplin um die abgebildete Anzahl Schritte nach oben. Dafür wird kein Schlüssel benötigt.",
"returnActionTokens": "X-Marker zurücknehmen.",
"bonusCardsCoin": "Lege auf die drei übrig gebliebenen Rundenboni je <b>1 Geldmünze</b>.",
"removeScoringTile": "Entferne das aktuelle Rundenwertungsplättchen."
Expand Down
14 changes: 3 additions & 11 deletions src/locales/en.json
Original file line number Diff line number Diff line change
Expand Up @@ -27,9 +27,10 @@
"title": "Automa Setup",
"generalSetup": "General Setup",
"generalSetupIntro": "Set up the game as usual, but with the following changes:",
"noTwoPlayerSpecialRules": "The special rules for a 2-player game (multiplayer rulebook, p. 19) <b>do not</b> apply.",
"roundScoreTiles": "Use the double-sided <b>Automa Round Score tiles</b> instead of those from the multiplayer game. Flip the Automa Round Score tile to the side that shows the relevant round with a light marking. As In the base game, the Round Score tile with the Spade on its left side cannot be placed In Round 5 or 6.",
"gameEndToken": "Use the <b>Automa Final Round Score tiles</b> instead of those from the multiplayer game. Place a random tile as usual.",
"palaceTiles": "Place only 2 random <b>Palace tiles</b> next to the game board. Place Palace tile #17 (with the red back) next to them.",
"palaceTiles": "Place {count} random <b>Palace tiles</b> next to the game board. Place Palace tile #17 (with the red back) next to them.",
"factionSelection": {
"title": "Choose your <b>Faction</b> as follows:",
"planningDisplayCards": "Lay out 3 random Planning Display cards.",
Expand All @@ -46,13 +47,6 @@
"factionSetup": "Follow the additional setup instructions on the <i>{faction}</i> <b>Automa Faction card</b> and familiarize yourself with the special rules.",
"scoreTrack": "Place 1 of her Status markers on space 20 of the <b>Score track</b>"
},
"twoPlayer": {
"title": "2-Player Game Setup",
"areaScoreTile": "Place a random <b>2-player Area Score tile</b> face-down.",
"componentsUnusedColor": "Use components of an unused color:",
"placeScholars": "Place <b>1 Scholar</b> on a <b>2 space</b> of each Discipline.",
"placeStatusMarkers": "Place <b>1 Status marker</b> on <b>Level 2</b> for each of the 4 Disciplines."
},
"initialWorkshop": {
"title": "Placement of the First Workshops",
"intro": "Automa places her initial Workshops after you place your first Workshop. Use the side of the <b>Initial Workshop Setup card</b> that shows the corresponding side of the game board.",
Expand All @@ -70,8 +64,7 @@
"income": {
"title": "Income",
"turnInfo": "Round {round}",
"collect": "Collect Tools, Coins, Scholars, Books and Power.",
"twoPlayer": "<i>2-Player Game:</i> Reveal the <b>Area Score tile</b>."
"collect": "Collect Tools, Coins, Scholars, Books and Power."
},
"roundTurn": {
"turnInfo": "Round {round}, Turn {turn}",
Expand Down Expand Up @@ -193,7 +186,6 @@
"title": "End of Round",
"turnInfo": "Round {round}",
"scienceBonus": "You gain the <b>Science Bonus</b>.",
"scienceBonusTwoPlayer": "<i>2-Player Game</i>: Using the Science Bonuses on the right side of the Round Score Bonus tile, advance the corresponding Discipline marker of the unused player color a number of Levels as shown by the number of Discipline icons. No key is needed in this case to advance to or above Level 8.",
"returnActionTokens": "Remove X-tokens.",
"bonusCardsCoin": "Put <b>1 Coin</b> on each of the three leftover Round Bonus tiles.",
"removeScoringTile": "Remove the current Round Score tile."
Expand Down
7 changes: 5 additions & 2 deletions src/services/RouteCalculator.ts
Original file line number Diff line number Diff line change
Expand Up @@ -86,8 +86,11 @@ export default class RouteCalculator {
/**
* Build route to player/bot step
*/
private static routeTo(step: Step) : string {
if (step.bot) {
private static routeTo(step?: Step) : string {
if (!step) {
return ''
}
else if (step.bot) {
return `/round/${step.round}/turn/${step.turn}/${step.turnOrderIndex}/bot/${step.bot}`
}
else {
Expand Down
2 changes: 0 additions & 2 deletions src/util/NavigationState.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@ export default class NavigationState {
readonly difficultyLevel : DifficultyLevel
readonly playerCount : number
readonly botCount : number
readonly isTwoPlayerGame : boolean
readonly round : number
readonly turn : number
readonly turnOrderIndex : number
Expand All @@ -26,7 +25,6 @@ export default class NavigationState {
this.difficultyLevel = setup.difficultyLevel
this.playerCount = setup.playerSetup.playerCount
this.botCount = setup.playerSetup.botCount
this.isTwoPlayerGame = (this.playerCount + this.botCount) == 2

this.round = getIntRouteParam(route, 'round')
this.turn = getIntRouteParam(route, 'turn')
Expand Down
3 changes: 0 additions & 3 deletions src/views/EndOfRound.vue
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,6 @@

<ol>
<li v-html="t('endOfRound.scienceBonus')"></li>
<ul v-if="navigationState.isTwoPlayerGame">
<li v-html="t('endOfRound.scienceBonusTwoPlayer')"></li>
</ul>
<li v-html="t('endOfRound.returnActionTokens')"></li>
<li v-html="t('endOfRound.bonusCardsCoin')"></li>
<li v-html="t('endOfRound.removeScoringTile')"></li>
Expand Down
4 changes: 1 addition & 3 deletions src/views/RoundIncome.vue
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,6 @@

<p v-html="t('income.collect')"></p>

<p v-if="navigationState.isTwoPlayerGame && round == 6" v-html="t('income.twoPlayer')"></p>

<router-link :to="nextButtonRouteTo" class="btn btn-primary btn-lg mt-4">
{{t('action.next')}}
</router-link>
Expand Down Expand Up @@ -39,7 +37,7 @@ export default defineComponent({
const routeCalculator = new RouteCalculator({round})
return { t, state, round, navigationState, routeCalculator }
return { t, state, round, routeCalculator }
},
computed: {
backButtonRouteTo() : string {
Expand Down
7 changes: 7 additions & 0 deletions tests/unit/services/RouteCalculator.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -93,6 +93,13 @@ describe('services/RouteCalculator', () => {
expect(routeCalculator.getFirstTurnRouteTo(state)).to.eq('/round/1/turn/1/0/player/1')
})

it('getFirstTurnRouteTo_noRounds', () => {
const routeCalculator = new RouteCalculator({round:1})

const state = mockState({playerCount:1, botCount:2})
expect(routeCalculator.getFirstTurnRouteTo(state)).to.eq('')
})

it('getLastTurnRouteTo', () => {
const routeCalculator = new RouteCalculator({round:1})

Expand Down

0 comments on commit d70b715

Please sign in to comment.