Skip to content

Commit

Permalink
faction abilites
Browse files Browse the repository at this point in the history
  • Loading branch information
stefanseifert committed May 10, 2024
1 parent e2d020f commit e03f475
Show file tree
Hide file tree
Showing 5 changed files with 31 additions and 7 deletions.
11 changes: 9 additions & 2 deletions src/components/turn/botAction/ActionBuildMine.vue
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,10 @@
<ol type="a">
<li v-html="t('botAction.buildMine.execute.placeMine')"></li>
<li v-if="hasScoringFinalTileSatellites" v-html="t('botAction.buildMine.execute.placeSatellite')"></li>
<li v-if="isFactionGeodens">
<span v-html="t(`botFaction.${botFaction}`)"></span>:
<span class="fw-bold" v-html="t('botAction.buildMine.execute.planetTypeVP')"></span>
</li>
</ol>
</ol>
</div>
Expand Down Expand Up @@ -88,10 +92,13 @@ export default defineComponent({
}
},
botFaction() : BotFaction|undefined {
return this.botAction.botFaction
return this.navigationState.botFaction
},
isFactionActionTiebreaker() : boolean {
return this.botFaction != undefined
return this.botAction.botFaction != undefined
},
isFactionGeodens() : boolean {
return this.botFaction === BotFaction.GEODENS
},
scoringFinalTiles() : ScoringFinalTile[] {
return this.state.setup.scoringFinalTiles ?? []
Expand Down
13 changes: 13 additions & 0 deletions src/components/turn/botAction/ActionPowerQic.vue
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,10 @@
<ol>
<li v-html="t('botAction.powerQic.placeToken')"></li>
<li v-html="t('botAction.powerQic.numberedSelection')"></li>
<li v-if="isFactionXenosNormalAction">
<span v-html="t(`botFaction.${botFaction}`)"></span>:
<span class="fw-bold" v-html="t(`botAction.powerQic.executeTwice`)"></span>
</li>
</ol>
</div>
</template>
Expand All @@ -21,6 +25,7 @@ import AppIcon from '@/components/structure/AppIcon.vue'
import SupportInfo from '../supportInfo/SupportInfo.vue'
import { useStateStore } from '@/store/state'
import NavigationState from '@/util/NavigationState'
import BotFaction from '@/services/enum/BotFaction'
export default defineComponent({
name: 'ActionPowerQic',
Expand All @@ -43,6 +48,14 @@ export default defineComponent({
type: NavigationState,
required: true
}
},
computed: {
botFaction() : BotFaction|undefined {
return this.navigationState.botFaction
},
isFactionXenosNormalAction() : boolean {
return this.botFaction === BotFaction.XENOS && this.botAction.botFaction == undefined
}
}
})
</script>
Expand Down
6 changes: 4 additions & 2 deletions src/locales/de.json
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,8 @@
"execute": {
"title": "Ausführung:",
"placeMine": "Setze die Mine ein.",
"placeSatellite": "Platziere einen <b>Satelliten</b> benachbart zur neuen Mine, wenn diese nicht direkt an ein Gebäude des Automa angrenzt."
"placeSatellite": "Platziere einen <b>Satelliten</b> benachbart zur neuen Mine, wenn diese nicht direkt an ein Gebäude des Automa angrenzt.",
"planetTypeVP": "Wenn diese Mine die erste auf einer neuen Planetenart ist, erhält der Automa 2 VP."
}
},
"upgrade": {
Expand All @@ -107,7 +108,8 @@
},
"powerQic": {
"placeToken": "Lege ein Aktionsmarker auf eine offenes Macht-/Q.I.C.-Aktionsfeld.",
"numberedSelection": "Auswahl nach Zahlen."
"numberedSelection": "Auswahl nach Zahlen.",
"executeTwice": "Führe diese Aktion zweimal aus."
},
"researchArea": {
"validResearchArea": "Auswahl: Forschungsbereiche in dem der Automa aufsteigen kann oder in dem noch eine fortgeschrittene Technologie verfügbar ist.",
Expand Down
6 changes: 4 additions & 2 deletions src/locales/en.json
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,8 @@
"execute": {
"title": "Execute:",
"placeMine": "Place mine",
"placeSatellite": "Place <b>satellite</b> adjacent to new mine if it is not adjacent to another Automa structure."
"placeSatellite": "Place <b>satellite</b> adjacent to new mine if it is not adjacent to another Automa structure.",
"planetTypeVP": "If this mine is the Automa's first on that planet type, it gains 2 VP."
}
},
"upgrade": {
Expand All @@ -107,7 +108,8 @@
},
"powerQic": {
"placeToken": "Place action token on an uncovered Power/Q.I.C. action space.",
"numberedSelection": "Numbered selection."
"numberedSelection": "Numbered selection.",
"executeTwice": "Execute this action twice."
},
"researchArea": {
"validResearchArea": "Valid: Any research area where Automa can advance or an advanced tech tile is available.",
Expand Down
2 changes: 1 addition & 1 deletion src/services/BotActions.ts
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ export default class BotActions {
case BotFaction.XENOS:
return [
{action: Action.BUILD_MINE, range: 2},
{action: Action.POWER_QIC},
{action: Action.POWER_QIC, botFaction: BotFaction.XENOS},
{action: Action.GAIN_VICTORY_POINTS, victoryPoints: 2}
]
case BotFaction.TAKLONS:
Expand Down

0 comments on commit e03f475

Please sign in to comment.