From 750a4f037ce4c794a77f06a0b660fb7e70a80b85 Mon Sep 17 00:00:00 2001 From: legonzaur Date: Thu, 1 Aug 2024 23:12:44 +0200 Subject: [PATCH] Chore : remove jsons from back --- .env.dev | 2 +- docker-compose.yml | 17 +- src/app.controller.ts | 7 - src/app.module.ts | 3 +- src/app.service.ts | 5 +- src/cards/cards.module.ts | 6 +- src/cards/cards.service.spec.ts | 18 -- src/cards/cards.service.ts | 148 ----------- src/json/pack1_base_deck.json | 75 ------ src/json/pack1_base_guild.json | 290 --------------------- src/json/pack1_base_imperial.json | 343 ------------------------- src/json/pack1_base_necros.json | 298 --------------------- src/json/pack1_base_wild.json | 291 --------------------- src/json/pack2_journeys_hunters.json | 172 ------------- src/json/pack2_journeys_travelers.json | 185 ------------- src/json/pack3_character_cleric.json | 97 ------- src/json/pack3_character_fighter.json | 72 ------ src/json/pack3_character_ranger.json | 78 ------ src/json/pack3_character_thief.json | 49 ---- src/json/pack3_character_wizard.json | 88 ------- src/json/pack4_ancestry.json | 188 -------------- 21 files changed, 11 insertions(+), 2421 deletions(-) delete mode 100644 src/cards/cards.service.spec.ts delete mode 100644 src/cards/cards.service.ts delete mode 100644 src/json/pack1_base_deck.json delete mode 100644 src/json/pack1_base_guild.json delete mode 100644 src/json/pack1_base_imperial.json delete mode 100644 src/json/pack1_base_necros.json delete mode 100644 src/json/pack1_base_wild.json delete mode 100644 src/json/pack2_journeys_hunters.json delete mode 100644 src/json/pack2_journeys_travelers.json delete mode 100644 src/json/pack3_character_cleric.json delete mode 100644 src/json/pack3_character_fighter.json delete mode 100644 src/json/pack3_character_ranger.json delete mode 100644 src/json/pack3_character_thief.json delete mode 100644 src/json/pack3_character_wizard.json delete mode 100644 src/json/pack4_ancestry.json diff --git a/.env.dev b/.env.dev index cd184be..7948f10 100644 --- a/.env.dev +++ b/.env.dev @@ -6,7 +6,7 @@ API_PREFIX= DISCORD_CLIENTID= DISCORD_CLIENTSECRET= -MONGO_ENDPOINT=mongodb://127.0.0.1 +MONGO_ENDPOINT=mongodb://127.0.0.1?directConnection=true MONGO_PASSWORD=example MONGO_USER=root diff --git a/docker-compose.yml b/docker-compose.yml index 07ffe24..a29648b 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -1,18 +1,11 @@ services: mongo: - image: docker.io/mongo + image: git.legonzaur.fr/heronfief/db-mongo:main restart: always - environment: - MONGO_INITDB_ROOT_USERNAME: root - MONGO_INITDB_ROOT_PASSWORD: example ports: - 27017:27017 - # entrypoint: bash -c "chown 999:999 /opt/keyfile/mongodb-keyfile && chmod 400 /opt/keyfile/mongodb-keyfile && exec docker-entrypoint.sh $$@" - command: mongod --replSet rs0 --keyFile /opt/keyfile/mongodb-keyfile - volumes: - - ./mongodb-keyfile:/opt/keyfile/mongodb-keyfile - - mongo:/data/db +# volumes: +# - mongo:/data/db -volumes: - mongo: -# docker run --rm -it --network=host --name mongoContainer mongo:latest mongosh mongodb://127.0.0.1:27017 -u root -p example --eval "rs.initiate({'_id':'rs0', members: [{'_id':1, 'host':'127.0.0.1:27017'}]})" +# volumes: +# mongo: diff --git a/src/app.controller.ts b/src/app.controller.ts index c0c5805..1c6c77c 100644 --- a/src/app.controller.ts +++ b/src/app.controller.ts @@ -6,11 +6,4 @@ import { ApiOperation, ApiTags } from '@nestjs/swagger'; @Controller() export class AppController { constructor(private readonly appService: AppService) {} - - @Put('loadCards') - @ApiOperation({ summary: 'Load cards into the database' }) - loadCards(): void { - this.appService.loadCards(); - return; - } } diff --git a/src/app.module.ts b/src/app.module.ts index ab84e42..221cc7d 100644 --- a/src/app.module.ts +++ b/src/app.module.ts @@ -25,11 +25,10 @@ import { EventEmitterModule } from '@nestjs/event-emitter'; return connection; }, }), - CardsModule, GamesModule, UsersModule, ], controllers: [AppController], - providers: [AppService, CardsService], + providers: [AppService], }) export class AppModule {} diff --git a/src/app.service.ts b/src/app.service.ts index 2ff22cc..ab13520 100644 --- a/src/app.service.ts +++ b/src/app.service.ts @@ -3,8 +3,5 @@ import { CardsService } from './cards/cards.service'; @Injectable() export class AppService { - constructor(private readonly cardService: CardsService) {} - loadCards(): void { - this.cardService.loadCards(); - } + constructor() {} } diff --git a/src/cards/cards.module.ts b/src/cards/cards.module.ts index cac1c26..305ef17 100644 --- a/src/cards/cards.module.ts +++ b/src/cards/cards.module.ts @@ -1,7 +1,7 @@ import { Module } from '@nestjs/common'; import { MongooseModule } from '@nestjs/mongoose'; import { Card, CardSchema } from './schemas/cards.schema'; -import { CardsService } from './cards.service'; + import { Effect, EffectSchema } from './schemas/effect.schema'; // import { // Effect, @@ -18,8 +18,8 @@ import { Effect, EffectSchema } from './schemas/effect.schema'; { name: Card.name, schema: CardSchema }, ]), ], - providers: [CardsService], - exports: [MongooseModule, CardsService], + + exports: [MongooseModule], }) export class CardsModule { schema = CardSchema; diff --git a/src/cards/cards.service.spec.ts b/src/cards/cards.service.spec.ts deleted file mode 100644 index 2e26f28..0000000 --- a/src/cards/cards.service.spec.ts +++ /dev/null @@ -1,18 +0,0 @@ -import { Test, TestingModule } from '@nestjs/testing'; -import { CardsService } from './cards.service'; - -describe('CardsService', () => { - let service: CardsService; - - beforeEach(async () => { - const module: TestingModule = await Test.createTestingModule({ - providers: [CardsService], - }).compile(); - - service = module.get(CardsService); - }); - - it('should be defined', () => { - expect(service).toBeDefined(); - }); -}); diff --git a/src/cards/cards.service.ts b/src/cards/cards.service.ts deleted file mode 100644 index ef64638..0000000 --- a/src/cards/cards.service.ts +++ /dev/null @@ -1,148 +0,0 @@ -import { Injectable } from '@nestjs/common'; -import path from 'node:path'; -import fs from 'node:fs/promises'; -import { Effect } from './schemas/effect.schema'; -import { Card } from './schemas/cards.schema'; -import { Model } from 'mongoose'; -import { InjectModel } from '@nestjs/mongoose'; -import { - CardFaction, - CardParser, - CardRole, - EffectParser, - EffectType, - EffectTypeVerbose, -} from './schemas/cards.types'; -import { EffectCondition } from './schemas/effect.schema'; - -@Injectable() -export class CardsService { - constructor( - @InjectModel(Card.name) private cardModel: Model, - @InjectModel(Effect.name) private effectModel: Model, - ) {} - - async loadCards(): Promise { - const cardPath = path.join(path.resolve(), 'src', 'json'); - const files = await fs.readdir(cardPath); - const processed = await Promise.all( - files.map(async (f) => { - return [ - path.parse(f).name, - ( - await fs - .readFile(path.join(cardPath, f)) - .then((e) => JSON.parse(e.toString())) - ).cards, - ]; - }), - ); - - await Promise.all( - Object.entries(processed).map( - // eslint-disable-next-line @typescript-eslint/no-unused-vars - async ([_, data]: [string, [string, CardParser[]]]) => { - await Promise.all( - data[1].map((c) => { - if (c.role == CardRole.FIRE_GEM || c.role == CardRole.MARKET) { - for (let i = 0; i < (c.init_amount ?? 1); i++) { - this.createCard(c, data[0]); - } - } else { - for (let j = 0; j < 4; j++) { - for (let i = 0; i < (c.init_amount ?? 1); i++) { - this.createCard(c, data[0], j); - } - } - } - }), - ); - }, - ), - ); - } - - private async createCard( - json: CardParser, - pack: string, - playerIndex?: number, - ) { - const createdCard = await this.cardModel.create({ - cardId: json.id, - role: json.role, - cardType: json.card_type, - faction: json.faction, - name: json.name, - cost: json.cost, - defense: json.defense, - guard: json.guard, - pack: pack, - playerIndex, - }); - if (json.effects) { - createdCard.effects = await this.createEffects(json.effects, createdCard); - } - await createdCard.save(); - } - - private async createEffects( - json: EffectParser[], - card: Card, - ): Promise { - return await Promise.all( - json.map(async (e) => { - if (e.mutex) { - console.log(e.mutex); - } - const createdEffect = { - card: card, - effect: e.effect, - amount: e.amount, - times: e.times ?? 1, - per: e.per, - faction: e.faction, - mutex: e.mutex?.toString(), - } as Effect; - if (e.sub_effects) { - createdEffect.subEffects = await this.createEffects( - e.sub_effects, - card, - ); - } else { - createdEffect.subEffects = []; - } - - if (e.effect_type) { - createdEffect.condition = await this.createEffectCondition( - e.effect_type, - card, - ); - } - return await this.effectModel.create(createdEffect); - }), - ); - } - - private async createEffectCondition( - json: EffectType | EffectTypeVerbose, - card: Card, - ): Promise { - const createdCondition = {} as EffectCondition; - if (typeof json === 'string') { - createdCondition.effectId = json; - if (json == EffectType.FACTION_COMBO) { - createdCondition.faction = card.faction; - } - createdCondition.amount = 1; - } else { - createdCondition.effectId = json.id; - createdCondition.amount = json.amount ?? 1; - createdCondition.cardId = json.card_id; - if (json.id == EffectType.FACTION_COMBO) { - createdCondition.faction = (json.faction ?? - card.faction) as CardFaction; - } - } - return createdCondition; - } -} diff --git a/src/json/pack1_base_deck.json b/src/json/pack1_base_deck.json deleted file mode 100644 index 9828e54..0000000 --- a/src/json/pack1_base_deck.json +++ /dev/null @@ -1,75 +0,0 @@ -{ - "cards": [ - { - "id": 59, - "role": "personal", - "card_type": "item", - "faction": "base", - "name": "Ruby", - "effects": [ - { - "effect": "gold", - "amount": 2 - } - ] - }, - { - "id": 58, - "role": "personal", - "card_type": "item", - "faction": "base", - "name": "Dagger", - "effects": [ - { - "effect": "damage" - } - ] - }, - { - "id": 57, - "role": "personal", - "card_type": "item", - "faction": "base", - "name": "Shortsword", - "effects": [ - { - "effect": "damage", - "amount": 2 - } - ] - }, - { - "id": 56, - "role": "personal", - "card_type": "item", - "faction": "base", - "name": "Gold", - "init_amount": 7, - "effects": [ - { - "effect": "gold" - } - ] - }, - { - "id": 55, - "role": "fire_gem", - "card_type": "item", - "faction": "base", - "name": "Fire Gem", - "cost": 2, - "init_amount": 16, - "effects": [ - { - "effect": "gold", - "amount": 2 - }, - { - "effect": "damage", - "amount": 3, - "effect_type": "suicide" - } - ] - } - ] -} \ No newline at end of file diff --git a/src/json/pack1_base_guild.json b/src/json/pack1_base_guild.json deleted file mode 100644 index 9cb3c50..0000000 --- a/src/json/pack1_base_guild.json +++ /dev/null @@ -1,290 +0,0 @@ -{ - "cards": [ - { - "id": 28, - "role": "market", - "card_type": "champion", - "faction": "blue", - "name": "Street Thug", - "cost": 3, - "defense": 4, - "guard": false, - "init_amount": 2, - "effects": [ - { - "effect": "gold", - "effect_type": "champion_action", - "mutex": 1 - }, - { - "effect": "damage", - "amount": 2, - "effect_type": "champion_action", - "mutex": 1 - } - ] - }, - { - "id": 15, - "role": "market", - "card_type": "champion", - "faction": "blue", - "name": "borg, ogre mercenary", - "cost": 6, - "defense": 6, - "guard": true, - "effects": [ - { - "effect": "damage", - "amount": 4, - "effect_type": "champion_action" - } - ] - }, - { - "id": 16, - "role": "market", - "card_type": "action", - "faction": "blue", - "name": "bribe", - "cost": 3, - "init_amount": 3, - "effects": [ - { - "effect": "gold", - "amount": 3 - }, - { - "effect": "stack_next_action_bought", - "effect_type": "faction_combo" - } - ] - }, - { - "id": 17, - "role": "market", - "card_type": "action", - "faction": "blue", - "name": "death threat", - "cost": 3, - "effects": [ - { - "effect": "damage" - }, - { - "effect": "draw" - }, - { - "effect": "stun", - "effect_type": "faction_combo" - } - ] - }, - { - "id": 18, - "role": "market", - "card_type": "action", - "faction": "blue", - "name": "deception", - "cost": 5, - "effects": [ - { - "effect": "gold", - "amount": 2 - }, - { - "effect": "draw" - }, - { - "effect": "play_next_card_bought", - "effect_type": "faction_combo" - } - ] - }, - { - "id": 19, - "role": "market", - "card_type": "action", - "faction": "blue", - "name": "fire bomb", - "cost": 8, - "effects": [ - { - "effect": "damage", - "amount": 8 - }, - { - "effect": "stun" - }, - { - "effect": "draw" - }, - { - "effect": "damage", - "amount": 5, - "effect_type": "suicide" - } - ] - }, - { - "id": 20, - "role": "market", - "card_type": "action", - "faction": "blue", - "name": "tit job", - "cost": 4, - "effects": [ - { - "effect": "damage", - "amount": 7 - }, - { - "effect": "stun", - "effect_type": "faction_combo" - } - ] - }, - { - "id": 21, - "role": "market", - "card_type": "action", - "faction": "blue", - "name": "intimidation", - "cost": 2, - "init_amount": 2, - "effects": [ - { - "effect": "damage", - "amount": 5 - }, - { - "effect": "gold", - "amount": 2, - "effect_type": "faction_combo" - } - ] - }, - { - "id": 22, - "role": "market", - "card_type": "champion", - "faction": "blue", - "name": "myros, guild mage", - "cost": 5, - "defense": 3, - "guard": true, - "effects": [ - { - "effect": "gold", - "amount": 3, - "effect_type": "champion_action" - }, - { - "effect": "damage", - "amount": 4, - "effect_type": "faction_combo" - } - ] - }, - { - "id": 23, - "role": "market", - "card_type": "champion", - "faction": "blue", - "name": "parov, the enforcer", - "cost": 5, - "defense": 5, - "guard": true, - "effects": [ - { - "effect": "damage", - "amount": 3, - "effect_type": "champion_action" - }, - { - "effect": "draw", - "effect_type": "faction_combo" - } - ] - }, - { - "id": 24, - "role": "market", - "card_type": "action", - "faction": "blue", - "name": "profit", - "cost": 1, - "init_amount": 3, - "effects": [ - { - "effect": "gold", - "amount": 2 - }, - { - "effect": "damage", - "amount": 4, - "effect_type": "faction_combo" - } - ] - }, - { - "id": 25, - "role": "market", - "card_type": "champion", - "faction": "blue", - "name": "rake, master assassin", - "cost": 7, - "defense": 7, - "guard": false, - "effects": [ - { - "effect": "damage", - "amount": 4, - "effect_type": "champion_action" - }, - { - "effect": "stun", - "effect_type": "champion_action" - } - ] - }, - { - "id": 26, - "role": "market", - "card_type": "champion", - "faction": "blue", - "name": "rasmus, the smuggler", - "cost": 4, - "defense": 5, - "guard": false, - "effects": [ - { - "effect": "gold", - "amount": 2, - "effect_type": "champion_action" - }, - { - "effect": "stack_next_card_bought", - "effect_type": "faction_combo" - } - ] - }, - { - "id": 27, - "role": "market", - "card_type": "action", - "faction": "blue", - "name": "smash and grab", - "cost": 6, - "effects": [ - { - "effect": "damage", - "amount": 6 - }, - { - "effect": "restack_discarded_card" - } - ] - } - ] -} \ No newline at end of file diff --git a/src/json/pack1_base_imperial.json b/src/json/pack1_base_imperial.json deleted file mode 100644 index 9c9cce0..0000000 --- a/src/json/pack1_base_imperial.json +++ /dev/null @@ -1,343 +0,0 @@ -{ - "cards": [ - { - "id": 1, - "role": "market", - "card_type": "champion", - "faction": "yellow", - "name": "Arkus, Imperial Dragon", - "cost": 8, - "defense": 6, - "guard": true, - "effects": [ - { - "effect": "draw", - "effect_type": "champion_action" - }, - { - "effect": "damage", - "amount": 5, - "effect_type": "champion_action" - }, - { - "effect": "heal", - "amount": 6, - "effect_type": "faction_combo" - } - ] - }, - { - "id": 2, - "role": "market", - "card_type": "action", - "faction": "yellow", - "name": "Close Ranks", - "cost": 3, - "effects": [ - { - "effect": "damage", - "amount": 5 - }, - { - "effect": "damage", - "amount": 2, - "per": "champion" - }, - { - "effect": "heal", - "amount": 6, - "effect_type": "faction_combo" - } - ] - }, - { - "id": 3, - "role": "market", - "card_type": "action", - "faction": "yellow", - "name": "Command", - "cost": 5, - "effects": [ - { - "effect": "draw" - }, - { - "effect": "damage", - "amount": 3 - }, - { - "effect": "gold", - "amount": 2 - }, - { - "effect": "heal", - "amount": 4 - } - ] - }, - { - "id": 4, - "role": "market", - "card_type": "champion", - "faction": "yellow", - "name": "Darian , War Mage", - "cost": 4, - "defense": 5, - "guard": false, - "effects": [ - { - "effect": "damage", - "amount": 3, - "effect_type": "champion_action", - "mutex": 1 - }, - { - "effect": "heal", - "amount": 4, - "effect_type": "champion_action", - "mutex": 1 - } - ] - }, - { - "id": 5, - "role": "market", - "card_type": "action", - "faction": "yellow", - "name": "Domination", - "cost": 7, - "effects": [ - { - "effect": "heal", - "amount": 6 - }, - { - "effect": "damage", - "amount": 6 - }, - { - "effect": "draw" - }, - { - "effect": "prepare", - "effect_type": "faction_combo" - } - ] - }, - { - "id": 6, - "role": "market", - "card_type": "champion", - "faction": "yellow", - "name": "Cristov, the Just", - "cost": 5, - "defense": 5, - "guard": true, - "effects": [ - { - "effect": "damage", - "amount": 2, - "effect_type": "champion_action" - }, - { - "effect": "heal", - "amount": 3, - "effect_type": "champion_action" - }, - { - "effect": "draw", - "effect_type": "faction_combo" - } - ] - }, - { - "id": 7, - "role": "market", - "card_type": "champion", - "faction": "yellow", - "name": "Kraka, High Priest", - "cost": 6, - "defense": 6, - "guard": false, - "effects": [ - { - "effect": "heal", - "amount": 2, - "effect_type": "champion_action" - }, - { - "effect": "draw", - "effect_type": "champion_action" - }, - { - "effect": "heal", - "amount": 2, - "effect_type": "faction_combo", - "per": "champion" - } - ] - }, - { - "id": 8, - "role": "market", - "card_type": "champion", - "faction": "yellow", - "name": "Man-at-Arms", - "cost": 3, - "defense": 4, - "guard": true, - "init_amount": 2, - "effects": [ - { - "effect": "damage", - "amount": 2, - "effect_type": "champion_action" - }, - { - "effect": "damage", - "per": "other_guard", - "effect_type": "champion_action" - } - ] - }, - { - "id": 9, - "role": "market", - "card_type": "champion", - "faction": "yellow", - "name": "Master Weyan", - "cost": 4, - "defense": 4, - "guard": true, - "effects": [ - { - "effect": "damage", - "amount": 3, - "effect_type": "champion_action" - }, - { - "effect": "damage", - "per": "other_champion", - "effect_type": "champion_action" - } - ] - }, - { - "id": 10, - "role": "market", - "card_type": "action", - "faction": "yellow", - "name": "Rally the Troops", - "cost": 4, - "effects": [ - { - "effect": "heal", - "amount": 5 - }, - { - "effect": "damage", - "amount": 5 - }, - { - "effect": "prepare", - "effect_type": "faction_combo" - } - ] - }, - { - "id": 11, - "role": "market", - "card_type": "action", - "faction": "yellow", - "name": "Recruit", - "cost": 2, - "init_amount": 3, - "effects": [ - { - "effect": "gold", - "amount": 2 - }, - { - "effect": "heal", - "amount": 3 - }, - { - "effect": "heal", - "per": "champion" - }, - { - "effect": "gold", - "effect_type": "faction_combo" - } - ] - }, - { - "id": 12, - "role": "market", - "card_type": "champion", - "faction": "yellow", - "name": "Tits Priest", - "cost": 2, - "defense": 3, - "guard": false, - "init_amount": 2, - "effects": [ - { - "effect": "gold", - "effect_type": "champion_action", - "mutex": 1 - }, - { - "effect": "heal", - "effect_type": "champion_action", - "mutex": 1, - "per": "champion" - } - ] - }, - { - "id": 13, - "role": "market", - "card_type": "action", - "faction": "yellow", - "name": "Taxation", - "cost": 1, - "init_amount": 3, - "effects": [ - { - "effect": "gold", - "amount": 2 - }, - { - "effect": "heal", - "amount": 6, - "effect_type": "faction_combo" - } - ] - }, - { - "id": 14, - "role": "market", - "card_type": "action", - "faction": "yellow", - "name": "Word of Power", - "cost": 6, - "effects": [ - { - "effect": "draw", - "amount": 2 - }, - { - "effect": "heal", - "amount": 5, - "effect_type": "faction_combo" - }, - { - "effect": "damage", - "amount": 5, - "effect_type": "suicide" - } - ] - } - ] -} \ No newline at end of file diff --git a/src/json/pack1_base_necros.json b/src/json/pack1_base_necros.json deleted file mode 100644 index 97a8b66..0000000 --- a/src/json/pack1_base_necros.json +++ /dev/null @@ -1,298 +0,0 @@ -{ - "cards": [ - { - "id": 38, - "role": "market", - "card_type": "champion", - "faction": "red", - "name": "Lys, the Unseen", - "cost": 6, - "defense": 5, - "guard": true, - "effects": [ - { - "effect": "damage", - "amount": 2, - "effect_type": "champion_action" - }, - { - "effect": "sacrifice", - "effect_type": "champion_action", - "sub_effects": [ - { - "effect": "damage", - "amount": 2 - } - ] - } - ] - }, - { - "id": 29, - "role": "market", - "card_type": "champion", - "faction": "red", - "name": "Ass Priest", - "cost": 3, - "defense": 4, - "guard": false, - "init_amount": 2, - "effects": [ - { - "effect": "gold", - "effect_type": "champion_action", - "mutex": 1 - }, - { - "effect": "damage", - "effect_type": "champion_action", - "mutex": 1 - }, - { - "effect": "damage", - "amount": 4, - "effect_type": "faction_combo" - } - ] - }, - { - "id": 30, - "role": "market", - "card_type": "action", - "faction": "red", - "name": "dark energy", - "cost": 4, - "effects": [ - { - "effect": "damage", - "amount": 7 - }, - { - "effect": "draw", - "effect_type": "faction_combo" - } - ] - }, - { - "id": 31, - "role": "market", - "card_type": "action", - "faction": "red", - "name": "dark reward", - "cost": 5, - "effects": [ - { - "effect": "gold", - "amount": 3 - }, - { - "effect": "sacrifice" - }, - { - "effect": "damage", - "amount": 6, - "effect_type": "faction_combo" - } - ] - }, - { - "id": 32, - "role": "market", - "card_type": "champion", - "faction": "red", - "name": "death cultist", - "cost": 2, - "defense": 3, - "guard": true, - "init_amount": 2, - "effects": [ - { - "effect": "damage", - "amount": 2, - "effect_type": "champion_action" - } - ] - }, - { - "id": 33, - "role": "market", - "card_type": "action", - "faction": "red", - "name": "death touch", - "cost": 1, - "init_amount": 3, - "effects": [ - { - "effect": "damage", - "amount": 2 - }, - { - "effect": "sacrifice" - }, - { - "effect": "damage", - "amount": 2, - "effect_type": "faction_combo" - } - ] - }, - { - "id": 34, - "role": "market", - "card_type": "champion", - "faction": "red", - "name": "rayla, endweaver", - "cost": 4, - "defense": 4, - "guard": false, - "effects": [ - { - "effect": "damage", - "amount": 3, - "effect_type": "champion_action" - }, - { - "effect": "draw", - "effect_type": "faction_combo" - } - ] - }, - { - "id": 35, - "role": "market", - "card_type": "action", - "faction": "red", - "name": "influence", - "cost": 2, - "init_amount": 3, - "effects": [ - { - "effect": "gold", - "amount": 3 - }, - { - "effect": "damage", - "amount": 3, - "effect_type": "suicide" - } - ] - }, - { - "id": 36, - "role": "market", - "card_type": "champion", - "faction": "red", - "name": "krythos, master vampire", - "cost": "7", - "defense": 6, - "guard": false, - "effects": [ - { - "effect": "damage", - "amount": 3, - "effect_type": "champion_action" - }, - { - "effect": "sacrifice", - "effect_type": "champion_action", - "sub_effects": [ - { - "effect": "damage", - "amount": 3 - } - ] - } - ] - }, - { - "id": 37, - "role": "market", - "card_type": "action", - "faction": "red", - "name": "life drain", - "cost": 6, - "effects": [ - { - "effect": "damage", - "amount": 8 - }, - { - "effect": "sacrifice" - }, - { - "effect": "draw", - "effect_type": "faction_combo" - } - ] - }, - { - "id": 39, - "role": "market", - "card_type": "action", - "faction": "red", - "name": "the rot", - "cost": 3, - "init_amount": 2, - "effects": [ - { - "effect": "damage", - "amount": 4 - }, - { - "effect": "sacrifice" - }, - { - "effect": "damage", - "amount": 3, - "effect_type": "faction_combo" - } - ] - }, - { - "id": 40, - "role": "market", - "card_type": "champion", - "faction": "red", - "name": "tyrannor, the devourer", - "cost": 8, - "defense": 6, - "guard": true, - "effects": [ - { - "effect": "damage", - "amount": 4, - "effect_type": "champion_action" - }, - { - "effect": "sacrifice", - "times": 2, - "effect_type": "champion_action" - }, - { - "effect": "draw", - "effect_type": "faction_combo" - } - ] - }, - { - "id": 41, - "role": "market", - "card_type": "champion", - "faction": "red", - "name": "varrick, the necromancer", - "cost": 5, - "defense": 3, - "guard": false, - "effects": [ - { - "effect": "restack_discarded_champion", - "effect_type": "champion_action" - }, - { - "effect": "draw", - "effect_type": "faction_combo" - } - ] - } - ] -} \ No newline at end of file diff --git a/src/json/pack1_base_wild.json b/src/json/pack1_base_wild.json deleted file mode 100644 index 0139e26..0000000 --- a/src/json/pack1_base_wild.json +++ /dev/null @@ -1,291 +0,0 @@ -{ - "cards": [ - { - "id": 42, - "role": "market", - "card_type": "champion", - "faction": "green", - "name": "broelyn, loreweaver", - "cost": 4, - "defense": 6, - "guard": false, - "effects": [ - { - "effect": "gold", - "amount": 2, - "effect_type": "champion_action" - }, - { - "effect": "make_discard", - "effect_type": "faction_combo" - } - ] - }, - { - "id": 43, - "role": "market", - "card_type": "champion", - "faction": "green", - "name": "cron, the berserker", - "cost": 6, - "defense": 6, - "guard": false, - "effects": [ - { - "effect": "damage", - "amount": 5, - "effect_type": "champion_action" - }, - { - "effect": "draw", - "effect_type": "faction_combo" - } - ] - }, - { - "id": 44, - "role": "market", - "card_type": "champion", - "faction": "green", - "name": "dire wolf", - "cost": 5, - "defense": 5, - "guard": true, - "effects": [ - { - "effect": "damage", - "amount": 3, - "effect_type": "champion_action" - }, - { - "effect": "damage", - "amount": 4, - "effect_type": "faction_combo" - } - ] - }, - { - "id": 45, - "role": "market", - "card_type": "action", - "faction": "green", - "name": "elven curse", - "cost": 3, - "init_amount": 2, - "effects": [ - { - "effect": "damage", - "amount": 6 - }, - { - "effect": "make_discard" - }, - { - "effect": "damage", - "amount": 3, - "effect_type": "faction_combo" - } - ] - }, - { - "id": 46, - "role": "market", - "card_type": "action", - "faction": "green", - "name": "elven gift", - "cost": 2, - "init_amount": 3, - "effects": [ - { - "effect": "gold", - "amount": 2 - }, - { - "effect": "draw_and_discard" - }, - { - "effect": "damage", - "amount": 4, - "effect_type": "faction_combo" - } - ] - }, - { - "id": 47, - "role": "market", - "card_type": "champion", - "faction": "green", - "name": "grak, storm giant", - "cost": 8, - "defense": 7, - "guard": true, - "effects": [ - { - "effect": "damage", - "amount": 6, - "effect_type": "champion_action" - }, - { - "effect": "draw_and_discard", - "effect_type": "champion_action" - }, - { - "effect": "draw_and_discard", - "effect_type": "faction_combo" - } - ] - }, - { - "id": 48, - "role": "market", - "card_type": "action", - "faction": "green", - "name": "nature's bounty", - "cost": 4, - "effects": [ - { - "effect": "gold", - "amount": 4 - }, - { - "effect": "make_discard", - "effect_type": "faction_combo" - }, - { - "effect": "damage", - "amount": 4, - "effect_type": "suicide" - } - ] - }, - { - "id": 49, - "role": "market", - "card_type": "champion", - "faction": "green", - "name": "orc grunt", - "cost": 3, - "defense": 3, - "guard": true, - "init_amount": 2, - "effects": [ - { - "effect": "damage", - "amount": 2, - "effect_type": "champion_action" - }, - { - "effect": "draw", - "effect_type": "faction_combo" - } - ] - }, - { - "id": 50, - "role": "market", - "card_type": "action", - "faction": "green", - "name": "rampage", - "cost": 6, - "effects": [ - { - "effect": "damage", - "amount": 6 - }, - { - "effect": "draw_and_discard", - "times": 2 - } - ] - }, - { - "id": 51, - "role": "market", - "card_type": "champion", - "faction": "green", - "name": "torgen rocksplitter", - "cost": 7, - "defense": 7, - "guard": true, - "effects": [ - { - "effect": "damage", - "amount": 4, - "effect_type": "champion_action" - }, - { - "effect": "make_discard", - "effect_type": "champion_action" - } - ] - }, - { - "id": 52, - "role": "market", - "card_type": "action", - "faction": "green", - "name": "spark", - "cost": 1, - "init_amount": 3, - "effects": [ - { - "effect": "damage", - "amount": 3 - }, - { - "effect": "make_discard" - }, - { - "effect": "damage", - "amount": 2, - "effect_type": "faction_combo" - } - ] - }, - { - "id": 53, - "role": "market", - "card_type": "action", - "faction": "green", - "name": "wolf form", - "cost": 5, - "effects": [ - { - "effect": "damage", - "amount": 8 - }, - { - "effect": "make_discard" - }, - { - "effect": "make_discard", - "effect_type": "suicide" - } - ] - }, - { - "id": 54, - "role": "market", - "card_type": "champion", - "faction": "green", - "name": "wolf shaman", - "cost": 2, - "defense": 4, - "guard": false, - "init_amount": 2, - "effects": [ - { - "effect": "damage", - "amount": 2, - "effect_type": "champion_action" - }, - { - "effect": "damage", - "amount": 1, - "per": "other_card_of_same_faction", - "effect_type": "champion_action" - } - ] - } - ] -} \ No newline at end of file diff --git a/src/json/pack2_journeys_hunters.json b/src/json/pack2_journeys_hunters.json deleted file mode 100644 index 96b96ea..0000000 --- a/src/json/pack2_journeys_hunters.json +++ /dev/null @@ -1,172 +0,0 @@ -{ - "cards": [ - { - "id": 68, - "role": "hunter", - "card_type": "action", - "faction": "yellow", - "name": "Confiscate", - "cost": 3, - "init_amount": 2, - "effects": [ - { - "effect": "buy_for_free", - "amount": 4 - }, - { - "effect": "heal", - "amount": 6, - "effect_type": "faction_combo" - } - ] - }, - { - "id": 69, - "role": "hunter", - "card_type": "action", - "faction": "red", - "name": "Demonic Cloud", - "cost": 7, - "effects": [ - { - "effect": "damage", - "amount": 7 - }, - { - "effect": "damage_all_champions", - "amount": 4 - }, - { - "effect": "draw" - }, - { - "effect": "sacrifice", - "effect_type": "faction_combo" - } - ] - }, - { - "id": 70, - "role": "hunter", - "card_type": "action", - "faction": "green", - "name": "Pack’s Fury", - "cost": 7, - "effects": [ - { - "effect": "damage", - "amount": 7 - }, - { - "effect": "discard_x_and_draw_x" - } - ] - }, - { - "id": 71, - "role": "hunter", - "card_type": "action", - "faction": "blue", - "name": "Thrash", - "cost": 2, - "init_amount": 2, - "effects": [ - { - "effect": "damage", - "amount": 4, - "mutex": 1 - }, - { - "effect": "stun", - "mutex": 1 - } - ] - }, - { - "id": 72, - "role": "hunter", - "card_type": "champion", - "faction": "yellow", - "name": "Andor, the Valiant", - "cost": 6, - "defense": 5, - "guard": true, - "effects": [ - { - "effect": "damage", - "amount": 2, - "effect_type": "champion_action" - }, - { - "effect": "draw", - "effect_type": "champion_action" - }, - { - "effect": "prepare_another_champion", - "effect_type": "faction_combo" - } - ] - }, - { - "id": 73, - "role": "hunter", - "card_type": "champion", - "faction": "red", - "name": "Fettered Imp", - "cost": 2, - "defense": 5, - "guard": true, - "init_amount": 2, - "effects": [ - { - "effect": "sacrifice", - "effect_type": "champion_action" - } - ] - }, - { - "id": 74, - "role": "hunter", - "card_type": "champion", - "faction": "blue", - "name": "Lenka, the Hunter", - "cost": 5, - "defense": 5, - "guard": false, - "effects": [ - { - "effect": "damage", - "amount": 4, - "effect_type": "champion_action" - }, - { - "effect": "stun", - "effect_type": "faction_combo" - } - ] - }, - { - "id": 75, - "role": "hunter", - "card_type": "champion", - "faction": "green", - "name": "Pathfinder", - "cost": 3, - "defense": 4, - "guard": false, - "init_amount": 2, - "effects": [ - { - "effect": "damage", - "amount": 2, - "effect_type": "champion_action" - }, - { - "effect": "gold", - "amount": 2, - "effect_type": "faction_combo" - } - ] - } - ] -} \ No newline at end of file diff --git a/src/json/pack2_journeys_travelers.json b/src/json/pack2_journeys_travelers.json deleted file mode 100644 index 9fb66b6..0000000 --- a/src/json/pack2_journeys_travelers.json +++ /dev/null @@ -1,185 +0,0 @@ -{ - "cards": [ - { - "id": 60, - "role": "traveler", - "card_type": "action", - "faction": "blue", - "name": "Bounty Collection", - "cost": 7, - "effects": [ - { - "effect": "gold", - "amount": 3 - }, - { - "effect": "play_next_card_bought" - }, - { - "effect": "draw", - "effect_type": "faction_combo" - } - ] - }, - { - "id": 61, - "role": "traveler", - "card_type": "action", - "faction": "green", - "name": "Daring Escape", - "cost": 3, - "init_amount": 2, - "effects": [ - { - "effect": "make_discard" - }, - { - "effect": "restack_discarded_card" - }, - { - "effect": "draw", - "effect_type": "suicide" - } - ] - }, - { - "id": 62, - "role": "traveler", - "card_type": "action", - "faction": "yellow", - "name": "Fearless Charge", - "cost": 8, - "effects": [ - { - "effect": "damage", - "amount": 5 - }, - { - "effect": "heal", - "amount": 5 - }, - { - "effect": "draw", - "amount": 2 - }, - { - "effect": "prepare_all_champions", - "effect_type": "suicide" - } - ] - }, - { - "id": 63, - "role": "traveler", - "card_type": "action", - "faction": "red", - "name": "Sway", - "cost": 3, - "init_amount": 2, - "effects": [ - { - "effect": "gold", - "amount": 3 - }, - { - "effect": "cheaper_champions_passive" - }, - { - "effect": "control_opposing_champion_passive", - "effect_type": "suicide" - } - ] - }, - { - "id": 64, - "role": "traveler", - "card_type": "champion", - "faction": "blue", - "name": "Con Artist", - "cost": 2, - "defense": 2, - "guard": false, - "init_amount": 2, - "effects": [ - { - "effect": "damage", - "amount": 2, - "effect_type": "champion_action", - "mutex": 1 - }, - { - "effect": "gold", - "per": "stunned_champion", - "effect_type": "champion_action", - "mutex": 1 - } - ] - }, - { - "id": 65, - "role": "traveler", - "card_type": "champion", - "faction": "red", - "name": "Olara, the Slayer", - "cost": 4, - "defense": 5, - "guard": false, - "effects": [ - { - "effect": "gold", - "amount": 2, - "effect_type": "champion_action", - "mutex": 1 - }, - { - "effect": "damage_all_champions", - "amount": 2, - "effect_type": "champion_action", - "mutex": 1 - } - ] - }, - { - "id": 66, - "role": "traveler", - "card_type": "champion", - "faction": "green", - "name": "Pelleas, the Seeker", - "cost": 5, - "defense": 4, - "guard": true, - "effects": [ - { - "effect": "damage", - "amount": 3, - "effect_type": "champion_action", - "mutex": 1 - }, - { - "effect": "restack_discarded_action", - "effect_type": "champion_action", - "mutex": 1 - } - ] - }, - { - "id": 67, - "role": "traveler", - "card_type": "champion", - "faction": "yellow", - "name": "Veteran Squire", - "cost": 3, - "defense": 3, - "guard": false, - "init_amount": 2, - "effects": [ - { - "effect": "damage", - "amount": 2, - "per": "champion_of_same_faction", - "effect_type": "champion_action" - } - ] - } - ] -} \ No newline at end of file diff --git a/src/json/pack3_character_cleric.json b/src/json/pack3_character_cleric.json deleted file mode 100644 index a3f0b61..0000000 --- a/src/json/pack3_character_cleric.json +++ /dev/null @@ -1,97 +0,0 @@ -{ - "cards": [ - { - "id": 87, - "role": "cleric", - "card_type": "champion", - "faction": "base", - "name": "Follower A", - "defense": 1, - "guard": true, - "effects": [ - { - "effect": "damage" - } - ] - }, - { - "id": 88, - "role": "cleric", - "card_type": "champion", - "faction": "base", - "name": "Follower B", - "defense": 1, - "guard": true, - "effects": [ - { - "effect": "damage" - } - ] - }, - { - "id": 89, - "role": "cleric", - "card_type": "item", - "faction": "base", - "name": "Spiked Mace", - "effects": [ - { - "effect": "damage", - "amount": 2 - } - ] - }, - { - "id": 90, - "role": "cleric", - "card_type": "item", - "faction": "base", - "name": "Prayer Beads", - "effects": [ - { - "effect": "gold", - "amount": 2, - "sub_effects": [ - { - "effect": "heal", - "amount": 5, - "effect_type": { - "id": "champion_amount", - "amount": 2 - } - } - ], - "mutex": 1 - }, - { - "effect": "heal", - "amount": 5, - "sub_effects": [ - { - "effect": "gold", - "amount": 2, - "effect_type": { - "id": "champion_amount", - "amount": 2 - } - } - ], - "mutex": 1 - } - ] - }, - { - "id": 56, - "role": "cleric", - "card_type": "item", - "faction": "base", - "name": "Gold", - "init_amount": 6, - "effects": [ - { - "effect": "gold" - } - ] - } - ] -} \ No newline at end of file diff --git a/src/json/pack3_character_fighter.json b/src/json/pack3_character_fighter.json deleted file mode 100644 index 7078606..0000000 --- a/src/json/pack3_character_fighter.json +++ /dev/null @@ -1,72 +0,0 @@ -{ - "cards": [ - { - "id": 84, - "role": "fighter", - "card_type": "item", - "faction": "base", - "name": "Longsword", - "effects": [ - { - "effect": "damage", - "amount": 3 - } - ] - }, - { - "id": 85, - "role": "fighter", - "card_type": "champion", - "faction": "base", - "name": "Shield Bearer", - "defense": 3, - "guard": true - }, - { - "id": 86, - "role": "fighter", - "card_type": "item", - "faction": "base", - "name": "Throwing Axe", - "effects": [ - { - "effect": "damage", - "amount": 2 - }, - { - "effect": "draw", - "effect_type": { - "id": "total_damage", - "amount": 7 - } - } - ] - }, - { - "id": 56, - "role": "fighter", - "card_type": "item", - "faction": "base", - "name": "Gold", - "init_amount": 1, - "effects": [ - { - "effect": "gold" - } - ] - }, - { - "id": 59, - "role": "fighter", - "card_type": "item", - "faction": "base", - "name": "Ruby", - "effects": [ - { - "effect": "gold", - "amount": 2 - } - ] - } - ] -} \ No newline at end of file diff --git a/src/json/pack3_character_ranger.json b/src/json/pack3_character_ranger.json deleted file mode 100644 index af3e259..0000000 --- a/src/json/pack3_character_ranger.json +++ /dev/null @@ -1,78 +0,0 @@ -{ - "cards": [ - { - "id": 81, - "role": "ranger", - "card_type": "item", - "faction": "base", - "name": "Black Arrow", - "init_amount": 2, - "effects": [ - { - "effect": "damage" - }, - { - "effect": "draw", - "effect_type": { - "id": "card_amount", - "card_id": 83 - } - } - ] - }, - { - "id": 82, - "role": "ranger", - "card_type": "item", - "faction": "base", - "name": "Horn of Calling", - "effects": [ - { - "effect": "gold" - }, - { - "effect": "cheaper_champion" - } - ] - }, - { - "id": 83, - "role": "ranger", - "card_type": "item", - "faction": "base", - "name": "Hunting Bow", - "effects": [ - { - "effect": "damage", - "amount": 2 - } - ] - }, - { - "id": 56, - "role": "ranger", - "card_type": "item", - "faction": "base", - "name": "Gold", - "init_amount": 5, - "effects": [ - { - "effect": "gold" - } - ] - }, - { - "id": 59, - "role": "ranger", - "card_type": "item", - "faction": "base", - "name": "Ruby", - "effects": [ - { - "effect": "gold", - "amount": 2 - } - ] - } - ] -} \ No newline at end of file diff --git a/src/json/pack3_character_thief.json b/src/json/pack3_character_thief.json deleted file mode 100644 index 9cb1bf7..0000000 --- a/src/json/pack3_character_thief.json +++ /dev/null @@ -1,49 +0,0 @@ -{ - "cards": [ - { - "id": 80, - "role": "thief", - "card_type": "item", - "faction": "base", - "name": "Throwing Knife", - "init_amount": 3, - "effects": [ - { - "effect": "damage" - }, - { - "effect": "damage", - "amount": 2, - "per": "other_knife_played" - } - ] - }, - { - "id": 56, - "role": "thief", - "card_type": "item", - "faction": "base", - "name": "Gold", - "init_amount": 5, - "effects": [ - { - "effect": "gold" - } - ] - }, - { - "id": 59, - "role": "thief", - "card_type": "item", - "faction": "base", - "name": "Ruby", - "init_amount": 2, - "effects": [ - { - "effect": "gold", - "amount": 2 - } - ] - } - ] -} \ No newline at end of file diff --git a/src/json/pack3_character_wizard.json b/src/json/pack3_character_wizard.json deleted file mode 100644 index b96a9e8..0000000 --- a/src/json/pack3_character_wizard.json +++ /dev/null @@ -1,88 +0,0 @@ -{ - "cards": [ - { - "id": 76, - "role": "wizard", - "card_type": "champion", - "faction": "base", - "name": "Cat Familiar", - "defense": 2, - "guard": false, - "effects": [ - { - "effect": "damage", - "mutex": 1 - }, - { - "effect": "gold", - "mutex": 1 - }, - { - "effect": "heal", - "mutex": 1 - } - ] - }, - { - "id": 77, - "role": "wizard", - "card_type": "action", - "faction": "base", - "name": "Ignite", - "init_amount": 2, - "effects": [ - { - "effect": "damage", - "amount": 2 - } - ] - }, - { - "id": 78, - "role": "wizard", - "card_type": "item", - "faction": "base", - "name": "Spell Components", - "effects": [ - { - "effect": "gold" - }, - { - "effect": "cheaper_action" - } - ] - }, - { - "id": 79, - "role": "wizard", - "card_type": "item", - "faction": "base", - "name": "Fire Staff", - "effects": [ - { - "effect": "damage" - }, - { - "effect": "draw", - "effect_type": { - "id": "action_amount", - "amount": 2 - } - } - ] - }, - { - "id": 56, - "role": "wizard", - "card_type": "item", - "faction": "base", - "name": "Gold", - "init_amount": 5, - "effects": [ - { - "effect": "gold" - } - ] - } - ] -} \ No newline at end of file diff --git a/src/json/pack4_ancestry.json b/src/json/pack4_ancestry.json deleted file mode 100644 index 52e23f9..0000000 --- a/src/json/pack4_ancestry.json +++ /dev/null @@ -1,188 +0,0 @@ -{ - "cards": [ - { - "id": 91, - "role": "half-demon", - "card_type": "action", - "faction": "red", - "name": "Demon Blood", - "effects": [ - { - "effect": "gold", - "mutex": 1 - }, - { - "effect": "sacrifice", - "mutex": 1 - } - ] - }, - { - "id": 92, - "role": "half-demon", - "card_type": "action", - "faction": "base", - "name": "Demonic Strength", - "effects": [ - { - "effect": "damage", - "amount": 2 - }, - { - "effect": "keep_in_hand", - "effect_type": { - "id": "faction_combo", - "faction": "red" - } - } - ] - }, - { - "id": 93, - "role": "dwarf", - "card_type": "item", - "faction": "base", - "name": "Hammer", - "effects": [ - { - "effect": "damage", - "amount": 3 - } - ] - }, - { - "id": 94, - "role": "dwarf", - "card_type": "item", - "faction": "base", - "name": "Pick", - "effects": [ - { - "effect": "damage", - "amount": 2, - "mutex": 1 - }, - { - "effect": "buy_gem_for_free", - "amount": 2, - "mutex": 1 - } - ] - }, - { - "id": 95, - "role": "elf", - "card_type": "action", - "faction": "base", - "name": "Elven Grace", - "effects": [ - { - "effect": "cheaper_skills_passive" - }, - { - "effect": "draw" - } - ] - }, - { - "id": 96, - "role": "elf", - "card_type": "item", - "faction": "base", - "name": "Sunstone Brooch", - "effects": [ - { - "effect": "gold", - "mutex": 1 - }, - { - "effect": "heal", - "amount": 2, - "mutex": 1 - } - ] - }, - { - "id": 97, - "role": "ogre", - "card_type": "item", - "faction": "base", - "name": "Shiny Rock", - "effects": [ - { - "effect": "gold", - "amount": 2 - } - ] - }, - { - "id": 98, - "role": "ogre", - "card_type": "item", - "faction": "base", - "name": "War Club", - "effects": [ - { - "effect": "damage", - "amount": 5 - } - ] - }, - { - "id": 99, - "role": "orc", - "card_type": "action", - "faction": "base", - "name": "Bully", - "effects": [ - { - "effect": "buy_for_free", - "amount": 3 - } - ] - }, - { - "id": 100, - "role": "orc", - "card_type": "item", - "faction": "base", - "name": "Ragged Blade", - "effects": [ - { - "effect": "damage", - "amount": 3 - } - ] - }, - { - "id": 101, - "role": "smallfolk", - "card_type": "action", - "faction": "base", - "name": "Burgle", - "effects": [ - { - "effect": "cheaper_card_if_higher_price" - }, - { - "effect": "draw" - } - ] - }, - { - "id": 102, - "role": "smallfolk", - "card_type": "action", - "faction": "base", - "name": "Friendly Banter", - "effects": [ - { - "effect": "gold" - }, - { - "effect": "pick_faction" - } - ] - } - ] -} \ No newline at end of file