-
Notifications
You must be signed in to change notification settings - Fork 0
/
main.ts
49 lines (44 loc) · 1.36 KB
/
main.ts
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
import simulate, { initCard, initCharacter, initQuest, initSetting, initSkill } from "./index";
import { getDefaultUserCard } from './satomi/card';
import { CustomNote, TransDeck } from "./types/trans_types"
import { getAllGroups } from './db/repository/chara_repository';
import { initApi } from "./db/dao/api";
import dotenv from "dotenv"
async function main() {
dotenv.config()
if (!process.env.DB_URL || !process.env.DB_SKR) {
console.error("DB_URL and DB_SKR must be given")
return
}
initApi({
url: process.env.DB_URL,
sakura: process.env.DB_URL,
})
await Promise.all([
initCard(),
initSkill(),
initCharacter(),
initSetting(),
initQuest(),
])
const questId = "pvp-quest-056"
const allyDeck: TransDeck = {
name: "test deck",
userCards: [
{ index: 1, card: getDefaultUserCard("card-rio-05-fest-00") },
{ index: 2, card: getDefaultUserCard("card-szk-04-casl-00") },
{ index: 3, card: getDefaultUserCard("card-ski-05-xmas-00") },
{ index: 4, card: getDefaultUserCard("card-skr-02-casl-00") },
{ index: 5, card: getDefaultUserCard("card-szk-05-prem-00") },
],
}
const customNodes: CustomNote[] = [{
ingamePos: 2,
sequence: 13,
privilege: "opponent",
}]
const result = simulate(questId, allyDeck, undefined, undefined)
const xxx = getAllGroups()
const a = 1
}
main()