Skip to content

Commit af6ac50

Browse files
committed
introduce botactions
1 parent ace46cf commit af6ac50

16 files changed

Lines changed: 437 additions & 48 deletions

src/components/round/BotAction.vue

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
import { defineComponent, PropType } from 'vue'
99
import NavigationState from '@/util/NavigationState'
1010
import { useI18n } from 'vue-i18n'
11-
import Card, { CardAction } from '@/services/Card'
11+
import Card from '@/services/Card'
1212
import ActionPlant from './botAction/ActionPlant.vue'
1313
import ActionXp from './botAction/ActionXp.vue'
1414
import ActionBillboard from './botAction/ActionBillboard.vue'
@@ -18,6 +18,7 @@ import ActionPrice from './botAction/ActionPrice.vue'
1818
import ActionSold from './botAction/ActionSold.vue'
1919
import ActionVp5 from './botAction/ActionVp5.vue'
2020
import ActionWindowBox from './botAction/ActionWindowBox.vue'
21+
import { BotAction } from '@/services/BotActions'
2122
2223
export default defineComponent({
2324
name: 'BotAction',
@@ -38,7 +39,7 @@ export default defineComponent({
3839
},
3940
props: {
4041
action: {
41-
type: Object as PropType<CardAction>,
42+
type: Object as PropType<BotAction>,
4243
required: true
4344
},
4445
navigationState: {

src/components/round/botAction/ActionBillboard.vue

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,8 @@
1515
import { defineComponent, PropType } from 'vue'
1616
import { useI18n } from 'vue-i18n'
1717
import NavigationState from '@/util/NavigationState'
18-
import Card, { CardAction } from '@/services/Card'
18+
import Card from '@/services/Card'
19+
import { BotAction } from '@/services/BotActions'
1920
import ActionBox from '../ActionBox.vue'
2021
import AppIcon from '@/components/structure/AppIcon.vue'
2122
@@ -32,7 +33,7 @@ export default defineComponent({
3233
},
3334
props: {
3435
action: {
35-
type: Object as PropType<CardAction>,
36+
type: Object as PropType<BotAction>,
3637
required: true
3738
},
3839
navigationState: {

src/components/round/botAction/ActionDelivery.vue

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,8 @@
1515
import { defineComponent, PropType } from 'vue'
1616
import { useI18n } from 'vue-i18n'
1717
import NavigationState from '@/util/NavigationState'
18-
import Card, { CardAction } from '@/services/Card'
18+
import Card from '@/services/Card'
19+
import { BotAction } from '@/services/BotActions'
1920
import ActionBox from '../ActionBox.vue'
2021
import AppIcon from '@/components/structure/AppIcon.vue'
2122
@@ -32,7 +33,7 @@ export default defineComponent({
3233
},
3334
props: {
3435
action: {
35-
type: Object as PropType<CardAction>,
36+
type: Object as PropType<BotAction>,
3637
required: true
3738
},
3839
navigationState: {

src/components/round/botAction/ActionPaid.vue

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,8 @@
1515
import { defineComponent, PropType } from 'vue'
1616
import { useI18n } from 'vue-i18n'
1717
import NavigationState from '@/util/NavigationState'
18-
import Card, { CardAction } from '@/services/Card'
18+
import Card from '@/services/Card'
19+
import { BotAction } from '@/services/BotActions'
1920
import ActionBox from '../ActionBox.vue'
2021
import AppIcon from '@/components/structure/AppIcon.vue'
2122
@@ -32,7 +33,7 @@ export default defineComponent({
3233
},
3334
props: {
3435
action: {
35-
type: Object as PropType<CardAction>,
36+
type: Object as PropType<BotAction>,
3637
required: true
3738
},
3839
navigationState: {

src/components/round/botAction/ActionPlant.vue

Lines changed: 4 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
<ActionBox :instruction-title="t('rules.action.plant.title')" :currentCard="currentCard" :managedByApp="true">
33
<template #action>
44
<div class="action">
5-
<AppIcon type="action" name="plant" class="icon"/>: <FlowerIcon :flower="flowerToPlant" class="icon"/>
5+
<AppIcon type="action" name="plant" class="icon"/>: <FlowerIcon v-if="action.flower" :flower="action.flower" class="icon"/>
66
</div>
77
</template>
88
<template #instruction>
@@ -16,10 +16,10 @@
1616
import { defineComponent, PropType } from 'vue'
1717
import { useI18n } from 'vue-i18n'
1818
import NavigationState from '@/util/NavigationState'
19-
import Card, { CardAction } from '@/services/Card'
19+
import Card from '@/services/Card'
20+
import { BotAction } from '@/services/BotActions'
2021
import ActionBox from '../ActionBox.vue'
2122
import AppIcon from '@/components/structure/AppIcon.vue'
22-
import Flower from '@/services/enum/Flower'
2323
import FlowerIcon from '@/components/structure/FlowerIcon.vue'
2424
2525
export default defineComponent({
@@ -36,7 +36,7 @@ export default defineComponent({
3636
},
3737
props: {
3838
action: {
39-
type: Object as PropType<CardAction>,
39+
type: Object as PropType<BotAction>,
4040
required: true
4141
},
4242
navigationState: {
@@ -47,11 +47,6 @@ export default defineComponent({
4747
type: Object as PropType<Card>,
4848
required: false
4949
}
50-
},
51-
computed: {
52-
flowerToPlant() : Flower {
53-
return this.navigationState.marketPrices.getMostExpensiveFlower()
54-
}
5550
}
5651
})
5752
</script>

src/components/round/botAction/ActionPrice.vue

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,8 @@
1515
import { defineComponent, PropType } from 'vue'
1616
import { useI18n } from 'vue-i18n'
1717
import NavigationState from '@/util/NavigationState'
18-
import Card, { CardAction } from '@/services/Card'
18+
import Card from '@/services/Card'
19+
import { BotAction } from '@/services/BotActions'
1920
import ActionBox from '../ActionBox.vue'
2021
import AppIcon from '@/components/structure/AppIcon.vue'
2122
@@ -32,7 +33,7 @@ export default defineComponent({
3233
},
3334
props: {
3435
action: {
35-
type: Object as PropType<CardAction>,
36+
type: Object as PropType<BotAction>,
3637
required: true
3738
},
3839
navigationState: {

src/components/round/botAction/ActionSold.vue

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,8 @@
1515
import { defineComponent, PropType } from 'vue'
1616
import { useI18n } from 'vue-i18n'
1717
import NavigationState from '@/util/NavigationState'
18-
import Card, { CardAction } from '@/services/Card'
18+
import Card from '@/services/Card'
19+
import { BotAction } from '@/services/BotActions'
1920
import ActionBox from '../ActionBox.vue'
2021
import AppIcon from '@/components/structure/AppIcon.vue'
2122
@@ -32,7 +33,7 @@ export default defineComponent({
3233
},
3334
props: {
3435
action: {
35-
type: Object as PropType<CardAction>,
36+
type: Object as PropType<BotAction>,
3637
required: true
3738
},
3839
navigationState: {

src/components/round/botAction/ActionVp5.vue

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,8 @@
1515
import { defineComponent, PropType } from 'vue'
1616
import { useI18n } from 'vue-i18n'
1717
import NavigationState from '@/util/NavigationState'
18-
import Card, { CardAction } from '@/services/Card'
18+
import Card from '@/services/Card'
19+
import { BotAction } from '@/services/BotActions'
1920
import ActionBox from '../ActionBox.vue'
2021
import AppIcon from '@/components/structure/AppIcon.vue'
2122
@@ -32,7 +33,7 @@ export default defineComponent({
3233
},
3334
props: {
3435
action: {
35-
type: Object as PropType<CardAction>,
36+
type: Object as PropType<BotAction>,
3637
required: true
3738
},
3839
navigationState: {

src/components/round/botAction/ActionWindowBox.vue

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,8 @@
1515
import { defineComponent, PropType } from 'vue'
1616
import { useI18n } from 'vue-i18n'
1717
import NavigationState from '@/util/NavigationState'
18-
import Card, { CardAction } from '@/services/Card'
18+
import Card from '@/services/Card'
19+
import { BotAction } from '@/services/BotActions'
1920
import ActionBox from '../ActionBox.vue'
2021
import AppIcon from '@/components/structure/AppIcon.vue'
2122
@@ -32,7 +33,7 @@ export default defineComponent({
3233
},
3334
props: {
3435
action: {
35-
type: Object as PropType<CardAction>,
36+
type: Object as PropType<BotAction>,
3637
required: true
3738
},
3839
navigationState: {

src/components/round/botAction/ActionXp.vue

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,8 @@
2020
import { defineComponent, PropType } from 'vue'
2121
import { useI18n } from 'vue-i18n'
2222
import NavigationState from '@/util/NavigationState'
23-
import Card, { CardAction } from '@/services/Card'
23+
import Card from '@/services/Card'
24+
import { BotAction } from '@/services/BotActions'
2425
import ActionBox from '../ActionBox.vue'
2526
import AppIcon from '@/components/structure/AppIcon.vue'
2627
import FlowerPriority from '@/components/structure/FlowerPriority.vue'
@@ -39,7 +40,7 @@ export default defineComponent({
3940
},
4041
props: {
4142
action: {
42-
type: Object as PropType<CardAction>,
43+
type: Object as PropType<BotAction>,
4344
required: true
4445
},
4546
navigationState: {

0 commit comments

Comments
 (0)