Compare commits
8 Commits
master
...
doubling_c
| Author | SHA1 | Date | |
|---|---|---|---|
| f372b6dce1 | |||
| cef0509bf9 | |||
| 48d45312b7 | |||
| 92f26420ff | |||
| 385766ab31 | |||
| b47358949f | |||
| 4b1c59ed24 | |||
| 3c480f9b63 |
3
.gitignore
vendored
3
.gitignore
vendored
@@ -21,3 +21,6 @@ pnpm-debug.log*
|
||||
*.njsproj
|
||||
*.sln
|
||||
*.sw?
|
||||
|
||||
# Custom
|
||||
src/assets/deck_of_cards
|
||||
|
||||
9
commands.md
Normal file
9
commands.md
Normal file
@@ -0,0 +1,9 @@
|
||||
# Commands
|
||||
|
||||
## Adding new cards to json
|
||||
|
||||
- Increase prettier line width to 200
|
||||
- Quote Props to persistent
|
||||
- Sort lines by natural
|
||||
- Add `"id": ""`
|
||||
- Generate GUID and remove the tails
|
||||
121
src/data/shikigami_cards.json
Normal file
121
src/data/shikigami_cards.json
Normal file
@@ -0,0 +1,121 @@
|
||||
[
|
||||
{
|
||||
"header": "Group 1"
|
||||
},
|
||||
{
|
||||
"name": "Shiki_0",
|
||||
"cards": [
|
||||
{ "id": "23c8ab29", "name": "shiki_0_card_0", "url": "AS.png" },
|
||||
{ "id": "58472d92", "name": "shiki_0_card_0", "url": "AS.png" },
|
||||
{ "id": "4210b5bb", "name": "shiki_0_card_1", "url": "KS.png" },
|
||||
{ "id": "1d512961", "name": "shiki_0_card_1", "url": "KS.png" },
|
||||
{ "id": "345fcb75", "name": "shiki_0_card_2", "url": "2S.png" },
|
||||
{ "id": "1d6b91ab", "name": "shiki_0_card_2", "url": "2S.png" },
|
||||
{ "id": "5aa61d05", "name": "shiki_0_card_3", "url": "3S.png" },
|
||||
{ "id": "006ebea2", "name": "shiki_0_card_3", "url": "3S.png" },
|
||||
{ "id": "cc861795", "name": "shiki_0_card_4", "url": "4S.png" },
|
||||
{ "id": "c34695f0", "name": "shiki_0_card_4", "url": "4S.png" },
|
||||
{ "id": "8086ded8", "name": "shiki_0_card_5", "url": "5S.png" },
|
||||
{ "id": "d0df74c2", "name": "shiki_0_card_5", "url": "5S.png" },
|
||||
{ "id": "b8dfe5be", "name": "shiki_0_card_6", "url": "6S.png" },
|
||||
{ "id": "d72b3867", "name": "shiki_0_card_6", "url": "6S.png" },
|
||||
{ "id": "e715a175", "name": "shiki_0_card_7", "url": "7S.png" },
|
||||
{ "id": "0b19a276", "name": "shiki_0_card_7", "url": "7S.png" }
|
||||
],
|
||||
"avatar": "https://cdn.vuetifyjs.com/images/lists/1.jpg"
|
||||
},
|
||||
{
|
||||
"name": "Shiki_1",
|
||||
"cards": [
|
||||
{ "id": "a1731031", "name": "shiki_1_card_0", "url": "https://shiki_1_card_0.png" },
|
||||
{ "id": "e7e726da", "name": "shiki_1_card_0", "url": "https://shiki_1_card_0.png" },
|
||||
{ "id": "78a98586", "name": "shiki_1_card_1", "url": "https://shiki_1_card_1.png" },
|
||||
{ "id": "d86c45ad", "name": "shiki_1_card_1", "url": "https://shiki_1_card_1.png" },
|
||||
{ "id": "8bc7bd43", "name": "shiki_1_card_2", "url": "https://shiki_1_card_2.png" },
|
||||
{ "id": "7189320d", "name": "shiki_1_card_2", "url": "https://shiki_1_card_2.png" },
|
||||
{ "id": "b497c29d", "name": "shiki_1_card_3", "url": "https://shiki_1_card_3.png" },
|
||||
{ "id": "ef18f102", "name": "shiki_1_card_3", "url": "https://shiki_1_card_3.png" },
|
||||
{ "id": "9bcc73a4", "name": "shiki_1_card_4", "url": "https://shiki_1_card_4.png" },
|
||||
{ "id": "1303292a", "name": "shiki_1_card_4", "url": "https://shiki_1_card_4.png" },
|
||||
{ "id": "746a7c46", "name": "shiki_1_card_5", "url": "https://shiki_1_card_5.png" },
|
||||
{ "id": "e36abe58", "name": "shiki_1_card_5", "url": "https://shiki_1_card_5.png" },
|
||||
{ "id": "0e70898a", "name": "shiki_1_card_6", "url": "https://shiki_1_card_6.png" },
|
||||
{ "id": "a703e2e1", "name": "shiki_1_card_6", "url": "https://shiki_1_card_6.png" },
|
||||
{ "id": "2a9cbb60", "name": "shiki_1_card_7", "url": "https://shiki_1_card_7.png" },
|
||||
{ "id": "90770c78", "name": "shiki_1_card_7", "url": "https://shiki_1_card_7.png" }
|
||||
],
|
||||
"avatar": "https://cdn.vuetifyjs.com/images/lists/2.jpg"
|
||||
},
|
||||
{
|
||||
"name": "Shiki_2",
|
||||
"cards": [
|
||||
{ "id": "01ccb58e", "name": "shiki_2_card_0", "url": "https://shiki_2_card_0.png" },
|
||||
{ "id": "14f56042", "name": "shiki_2_card_0", "url": "https://shiki_2_card_0.png" },
|
||||
{ "id": "9a254d1b", "name": "shiki_2_card_1", "url": "https://shiki_2_card_1.png" },
|
||||
{ "id": "69f4fdb2", "name": "shiki_2_card_1", "url": "https://shiki_2_card_1.png" },
|
||||
{ "id": "df6c5fed", "name": "shiki_2_card_2", "url": "https://shiki_2_card_2.png" },
|
||||
{ "id": "bb45fa3d", "name": "shiki_2_card_2", "url": "https://shiki_2_card_2.png" },
|
||||
{ "id": "b542a22d", "name": "shiki_2_card_3", "url": "https://shiki_2_card_3.png" },
|
||||
{ "id": "9c456857", "name": "shiki_2_card_3", "url": "https://shiki_2_card_3.png" },
|
||||
{ "id": "dff9a535", "name": "shiki_2_card_4", "url": "https://shiki_2_card_4.png" },
|
||||
{ "id": "aafef844", "name": "shiki_2_card_4", "url": "https://shiki_2_card_4.png" },
|
||||
{ "id": "32afefe6", "name": "shiki_2_card_5", "url": "https://shiki_2_card_5.png" },
|
||||
{ "id": "2883340a", "name": "shiki_2_card_5", "url": "https://shiki_2_card_5.png" },
|
||||
{ "id": "a3272322", "name": "shiki_2_card_6", "url": "https://shiki_2_card_6.png" },
|
||||
{ "id": "4cce0001", "name": "shiki_2_card_6", "url": "https://shiki_2_card_6.png" },
|
||||
{ "id": "5f36e966", "name": "shiki_2_card_7", "url": "https://shiki_2_card_7.png" },
|
||||
{ "id": "aceb124d", "name": "shiki_2_card_7", "url": "https://shiki_2_card_7.png" }
|
||||
],
|
||||
"avatar": "https://cdn.vuetifyjs.com/images/lists/3.jpg"
|
||||
},
|
||||
{
|
||||
"header": "Group 2"
|
||||
},
|
||||
{
|
||||
"divider": true
|
||||
},
|
||||
{
|
||||
"name": "Shiki_3",
|
||||
"cards": [
|
||||
{ "id": "a2d14b50", "name": "shiki_3_card_0", "url": "https://shiki_3_card_0.png" },
|
||||
{ "id": "5e781f61", "name": "shiki_3_card_0", "url": "https://shiki_3_card_0.png" },
|
||||
{ "id": "3ac7b446", "name": "shiki_3_card_1", "url": "https://shiki_3_card_1.png" },
|
||||
{ "id": "ed75a6d1", "name": "shiki_3_card_1", "url": "https://shiki_3_card_1.png" },
|
||||
{ "id": "e3fa8e21", "name": "shiki_3_card_2", "url": "https://shiki_3_card_2.png" },
|
||||
{ "id": "5de5f2f5", "name": "shiki_3_card_2", "url": "https://shiki_3_card_2.png" },
|
||||
{ "id": "cfaff11f", "name": "shiki_3_card_3", "url": "https://shiki_3_card_3.png" },
|
||||
{ "id": "7dc06ad2", "name": "shiki_3_card_3", "url": "https://shiki_3_card_3.png" },
|
||||
{ "id": "f3eac1e9", "name": "shiki_3_card_4", "url": "https://shiki_3_card_4.png" },
|
||||
{ "id": "d6063473", "name": "shiki_3_card_4", "url": "https://shiki_3_card_4.png" },
|
||||
{ "id": "b982300e", "name": "shiki_3_card_5", "url": "https://shiki_3_card_5.png" },
|
||||
{ "id": "099e6321", "name": "shiki_3_card_5", "url": "https://shiki_3_card_5.png" },
|
||||
{ "id": "cac026ec", "name": "shiki_3_card_6", "url": "https://shiki_3_card_6.png" },
|
||||
{ "id": "28d709ad", "name": "shiki_3_card_6", "url": "https://shiki_3_card_6.png" },
|
||||
{ "id": "e37841b5", "name": "shiki_3_card_7", "url": "https://shiki_3_card_7.png" },
|
||||
{ "id": "8a7a1fe6", "name": "shiki_3_card_7", "url": "https://shiki_3_card_7.png" }
|
||||
],
|
||||
"avatar": "https://cdn.vuetifyjs.com/images/lists/4.jpg"
|
||||
},
|
||||
{
|
||||
"name": "Shiki_4",
|
||||
"cards": [
|
||||
{ "id": "ffbc2c3b", "name": "shiki_4_card_0", "url": "https://shiki_4_card_0.png" },
|
||||
{ "id": "5af60a5d", "name": "shiki_4_card_0", "url": "https://shiki_4_card_0.png" },
|
||||
{ "id": "24745643", "name": "shiki_4_card_1", "url": "https://shiki_4_card_1.png" },
|
||||
{ "id": "ba686924", "name": "shiki_4_card_1", "url": "https://shiki_4_card_1.png" },
|
||||
{ "id": "b0c8d226", "name": "shiki_4_card_2", "url": "https://shiki_4_card_2.png" },
|
||||
{ "id": "10b19db5", "name": "shiki_4_card_2", "url": "https://shiki_4_card_2.png" },
|
||||
{ "id": "96fbef2d", "name": "shiki_4_card_3", "url": "https://shiki_4_card_3.png" },
|
||||
{ "id": "40c025b6", "name": "shiki_4_card_3", "url": "https://shiki_4_card_3.png" },
|
||||
{ "id": "c41586ba", "name": "shiki_4_card_4", "url": "https://shiki_4_card_4.png" },
|
||||
{ "id": "8a5aa489", "name": "shiki_4_card_4", "url": "https://shiki_4_card_4.png" },
|
||||
{ "id": "7f821f27", "name": "shiki_4_card_5", "url": "https://shiki_4_card_5.png" },
|
||||
{ "id": "8cc18160", "name": "shiki_4_card_5", "url": "https://shiki_4_card_5.png" },
|
||||
{ "id": "ae6b489f", "name": "shiki_4_card_6", "url": "https://shiki_4_card_6.png" },
|
||||
{ "id": "c5a5d90d", "name": "shiki_4_card_6", "url": "https://shiki_4_card_6.png" },
|
||||
{ "id": "c6607d02", "name": "shiki_4_card_7", "url": "https://shiki_4_card_7.png" },
|
||||
{ "id": "32f4bcb3", "name": "shiki_4_card_7", "url": "https://shiki_4_card_7.png" }
|
||||
],
|
||||
"avatar": "https://cdn.vuetifyjs.com/images/lists/5.jpg"
|
||||
}
|
||||
]
|
||||
@@ -78,8 +78,8 @@
|
||||
<v-select
|
||||
v-model="selected_shikigami_decks[index][index]"
|
||||
v-on:input="limit_decks"
|
||||
:items="double_cards(index)"
|
||||
item-text="card.name"
|
||||
:items="selected_shikigami_data[index].cards"
|
||||
item-text="name"
|
||||
item-value="id"
|
||||
chips
|
||||
multiple
|
||||
@@ -97,126 +97,47 @@
|
||||
@click="data.select"
|
||||
@click:close="remove_decks(index, data.index)"
|
||||
color="#04002E"
|
||||
>{{ data.item.card.name }}</v-chip
|
||||
>{{ data.item.name }}</v-chip
|
||||
></template
|
||||
>
|
||||
</v-select>
|
||||
</div>
|
||||
</div>
|
||||
</v-col>
|
||||
<v-col cols="10">{{ selected_shikigami_decks[index][index] }}</v-col>
|
||||
<v-col cols="10">
|
||||
<div cols="12">
|
||||
<!-- {{ selected_shikigami_decks[index][index] }} -->
|
||||
</div>
|
||||
<v-row cols="12" class="d-flex">
|
||||
<v-card
|
||||
v-for="i in selected_shikigami_decks[index][index]"
|
||||
:key="i.id"
|
||||
width="12.4%"
|
||||
>
|
||||
<div class="text-center">
|
||||
{{ i.name }}
|
||||
</div>
|
||||
<v-img
|
||||
:src="require(`@/assets/deck_of_cards/${i.url}`)"
|
||||
class="deck-card"
|
||||
></v-img
|
||||
></v-card>
|
||||
</v-row>
|
||||
</v-col>
|
||||
</v-row>
|
||||
</v-card>
|
||||
</v-row>
|
||||
<v-container grid-list-xl>
|
||||
<v-select
|
||||
v-model="color"
|
||||
:items="colors"
|
||||
item-text="title"
|
||||
item-value="id"
|
||||
multiple
|
||||
return-object
|
||||
>
|
||||
</v-select>
|
||||
colors: {{ color }}<br />
|
||||
computed: {{ getColors }}
|
||||
</v-container>
|
||||
</v-container>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import shikigami from "../data/shikigami_cards.json";
|
||||
export default {
|
||||
data: () => ({
|
||||
selected_shikigami_names: [],
|
||||
selected_shikigami_data: [],
|
||||
selected_shikigami_decks: [{ 0: [] }, { 1: [] }, { 2: [] }, { 3: [] }],
|
||||
shikigami: [
|
||||
{
|
||||
header: "Group 1",
|
||||
},
|
||||
{
|
||||
name: "Shiki_0",
|
||||
cards: [
|
||||
{ name: "shiki_0_card_0", url: "https://shiki_0_card_0.png" },
|
||||
{ name: "shiki_0_card_1", url: "https://shiki_0_card_1.png" },
|
||||
{ name: "shiki_0_card_2", url: "https://shiki_0_card_2.png" },
|
||||
{ name: "shiki_0_card_3", url: "https://shiki_0_card_3.png" },
|
||||
{ name: "shiki_0_card_4", url: "https://shiki_0_card_4.png" },
|
||||
{ name: "shiki_0_card_5", url: "https://shiki_0_card_5.png" },
|
||||
{ name: "shiki_0_card_6", url: "https://shiki_0_card_6.png" },
|
||||
{ name: "shiki_0_card_7", url: "https://shiki_0_card_7.png" },
|
||||
],
|
||||
avatar: "https://cdn.vuetifyjs.com/images/lists/1.jpg",
|
||||
},
|
||||
{
|
||||
name: "Shiki_1",
|
||||
cards: [
|
||||
{ name: "shiki_1_card_0", url: "https://shiki_1_card_0.png" },
|
||||
{ name: "shiki_1_card_1", url: "https://shiki_1_card_1.png" },
|
||||
{ name: "shiki_1_card_2", url: "https://shiki_1_card_2.png" },
|
||||
{ name: "shiki_1_card_3", url: "https://shiki_1_card_3.png" },
|
||||
{ name: "shiki_1_card_4", url: "https://shiki_1_card_4.png" },
|
||||
{ name: "shiki_1_card_5", url: "https://shiki_1_card_5.png" },
|
||||
{ name: "shiki_1_card_6", url: "https://shiki_1_card_6.png" },
|
||||
{ name: "shiki_1_card_7", url: "https://shiki_1_card_7.png" },
|
||||
],
|
||||
avatar: "https://cdn.vuetifyjs.com/images/lists/2.jpg",
|
||||
},
|
||||
{
|
||||
name: "Shiki_2",
|
||||
cards: [
|
||||
{ name: "shiki_2_card_0", url: "https://shiki_2_card_0.png" },
|
||||
{ name: "shiki_2_card_1", url: "https://shiki_2_card_1.png" },
|
||||
{ name: "shiki_2_card_2", url: "https://shiki_2_card_2.png" },
|
||||
{ name: "shiki_2_card_3", url: "https://shiki_2_card_3.png" },
|
||||
{ name: "shiki_2_card_4", url: "https://shiki_2_card_4.png" },
|
||||
{ name: "shiki_2_card_5", url: "https://shiki_2_card_5.png" },
|
||||
{ name: "shiki_2_card_6", url: "https://shiki_2_card_6.png" },
|
||||
{ name: "shiki_2_card_7", url: "https://shiki_2_card_7.png" },
|
||||
],
|
||||
avatar: "https://cdn.vuetifyjs.com/images/lists/3.jpg",
|
||||
},
|
||||
{
|
||||
header: "Group 2",
|
||||
},
|
||||
{
|
||||
divider: true,
|
||||
},
|
||||
{
|
||||
name: "Shiki_3",
|
||||
cards: [
|
||||
{ name: "shiki_3_card_0", url: "https://shiki_3_card_0.png" },
|
||||
{ name: "shiki_3_card_1", url: "https://shiki_3_card_1.png" },
|
||||
{ name: "shiki_3_card_2", url: "https://shiki_3_card_2.png" },
|
||||
{ name: "shiki_3_card_3", url: "https://shiki_3_card_3.png" },
|
||||
{ name: "shiki_3_card_4", url: "https://shiki_3_card_4.png" },
|
||||
{ name: "shiki_3_card_5", url: "https://shiki_3_card_5.png" },
|
||||
{ name: "shiki_3_card_6", url: "https://shiki_3_card_6.png" },
|
||||
{ name: "shiki_3_card_7", url: "https://shiki_3_card_7.png" },
|
||||
],
|
||||
avatar: "https://cdn.vuetifyjs.com/images/lists/4.jpg",
|
||||
},
|
||||
{
|
||||
name: "Shiki_4",
|
||||
cards: [
|
||||
{ name: "shiki_4_card_0", url: "https://shiki_4_card_0.png" },
|
||||
{ name: "shiki_4_card_1", url: "https://shiki_4_card_1.png" },
|
||||
{ name: "shiki_4_card_2", url: "https://shiki_4_card_2.png" },
|
||||
{ name: "shiki_4_card_3", url: "https://shiki_4_card_3.png" },
|
||||
{ name: "shiki_4_card_4", url: "https://shiki_4_card_4.png" },
|
||||
{ name: "shiki_4_card_5", url: "https://shiki_4_card_5.png" },
|
||||
{ name: "shiki_4_card_6", url: "https://shiki_4_card_6.png" },
|
||||
{ name: "shiki_4_card_7", url: "https://shiki_4_card_7.png" },
|
||||
],
|
||||
avatar: "https://cdn.vuetifyjs.com/images/lists/5.jpg",
|
||||
},
|
||||
],
|
||||
colors: [
|
||||
{ id: 1, title: "red" },
|
||||
{ id: 2, title: "blue" },
|
||||
{ id: 3, title: "red" },
|
||||
],
|
||||
color: [],
|
||||
shikigami: shikigami,
|
||||
}),
|
||||
methods: {
|
||||
get_chosen_shikigami_data: function (shikigami_name) {
|
||||
@@ -253,29 +174,8 @@ export default {
|
||||
console.log(this.selected_shikigami_decks[shiki_index].shiki_index);
|
||||
console.log(shiki_index, card_index);
|
||||
},
|
||||
double_cards(index) {
|
||||
const doubled_cards = [];
|
||||
this.selected_shikigami_data[index].cards.forEach(function (el) {
|
||||
let id_0 = Math.random().toString(36).slice(6);
|
||||
let id_1 = Math.random().toString(36).slice(6);
|
||||
doubled_cards.push({ id: id_0, card: el }, { id: id_1, card: el });
|
||||
});
|
||||
console.log(doubled_cards);
|
||||
return doubled_cards;
|
||||
|
||||
// return this.selected_shikigami_data[index].cards.concat.apply(
|
||||
// [],
|
||||
// this.selected_shikigami_data[index].cards.map(function (el) {
|
||||
// return [el, el];
|
||||
// })
|
||||
// );
|
||||
},
|
||||
},
|
||||
computed: {
|
||||
getColors() {
|
||||
return this.color.map((c) => c.title);
|
||||
},
|
||||
},
|
||||
computed: {},
|
||||
watch: {
|
||||
selected_shikigami_names: function () {
|
||||
this.selected_shikigami_data = [];
|
||||
@@ -300,4 +200,16 @@ export default {
|
||||
height: 60px !important;
|
||||
width: 60px !important;
|
||||
}
|
||||
|
||||
.deck-card:hover {
|
||||
position: relative;
|
||||
animation: scaleMe 500ms ease-in-out 0s forwards;
|
||||
z-index: 100;
|
||||
}
|
||||
|
||||
@keyframes scaleMe {
|
||||
100% {
|
||||
transform: scale(1.25);
|
||||
}
|
||||
}
|
||||
</style>
|
||||
|
||||
Reference in New Issue
Block a user