All files / projects-dev/apps/mc-api/src/migrations 1636156715821-DecksSeeds.ts

0% Statements 0/120
0% Branches 0/1
0% Functions 0/1
0% Lines 0/120

Press n or j to go to the next uncovered block, b, p or k for the previous block.

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 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121                                                                                                                                                                                                                                                 
import { MigrationInterface, QueryRunner } from "typeorm";

export class DecksSeeds1636156715821 implements MigrationInterface {
    public async up(queryRunner: QueryRunner): Promise<void> {
        queryRunner.query(`
            INSERT INTO decks (id, name, description, aspects) VALUES
            (1, "Reckless Aggression", "The deck to use if you want to rush the villain. Almost no thwarting, few allies, and lots of cheap damage to end the game quickly.", "Aggression"),
            (2, "Graceful Aggression", "A more balanced approach to the Aggression aspect. Instead of all-out damage, you focus more on building up a tableau and setting up combos within the aspect.", "Aggression"),
            (3, "Warrior's Aggression", "All about the minions. Cards to get you minions, cards to help kill them, and more cards to reward you when you do.", "Aggression"),
            (4, "Defiant Justice", "Focused more on the aggressive side of Justice. You'll stay in hero form more and deal more damage, while removing less threat than a traditional Justice build.", "Justice"),
            (5, "Evasive Justice", "A more traditional Justice deck, centered around confusion and flipping frequently. You have plenty of confusion and threat prevention for alter-ego form, and good thwarting for when you flip back to hero form.", "Justice"),
            (6, "Guardian Justice", "Really only usable with Guardian heroes, due to the presence of Think Fast. Also centered around confusion.", "Justice"),
            (7, "Commanding Leadership", "The quintessential chump block deck. Play allies as a meat shield, using them once or twice and then throwing them in front of the villain at the earliest possible convenience.", "Leadership"),
            (8, "Courageous Leadership", "All about building up a small number of semi-permanent allies. Designed for heroes who can take attacks while their allies do most of the work.", "Leadership"),
            (9, "Guardian Leadership", "Really only meant for Guardian heroes, due to the prevalence of Guardian-only cards. Serves a good middle-ground between the other two Leadership decks in terms of ally durability.", "Leadership"),
            (10, "Unyielding Protection", "Designed to turn your hero into an iron wall. Instead of blocking with allies, you defend often, take as little damage as possible, and hit back hard.", "Protection"),
            (11, "Debilitating Protection", "Focused on stunning and damage prevention. Avoid attacks instead of blocking them, so you don't have to worry about recovering in alter-ego form.", "Protection"),
            (12, "Guardian Protection", "Really only usable with Guardian heroes, due to Shake it Off. Focused primarily on pure damage prevention and tough status cards.", "Protection")
        `);

        queryRunner.query(`
            INSERT INTO decks_heroes VALUES
            (1, 1),
            (1, 2),
            (1, 3),
            (1, 11),
            (1, 14),
            (1, 15),
            (1, 17),
            (1, 22),
            (2, 4),
            (2, 5),
            (2, 7),
            (2, 9),
            (2, 10),
            (2, 13),
            (2, 16),
            (2, 18),
            (2, 20),
            (2, 21),
            (2, 23),
            (3, 6),
            (3, 8),
            (3, 19),
            (4, 2),
            (4, 6),
            (4, 8),
            (4, 10),
            (4, 11),
            (4, 15),
            (4, 17),
            (4, 20),
            (4, 21),
            (4, 22),
            (5, 1),
            (5, 3),
            (5, 4),
            (5, 5),
            (5, 7),
            (5, 9),
            (5, 12),
            (5, 13),
            (5, 14),
            (5, 16),
            (6, 18),
            (6, 19),
            (6, 23),
            (7, 3),
            (7, 4),
            (7, 7),
            (7, 8),
            (7, 10),
            (7, 11),
            (7, 12),
            (7, 15),
            (7, 16),
            (7, 18),
            (7, 19),
            (8, 1),
            (8, 2),
            (8, 5),
            (8, 9),
            (8, 13),
            (8, 14),
            (8, 17),
            (9, 20),
            (9, 21),
            (9, 22),
            (9, 23),
            (10, 1),
            (10, 5),
            (10, 6),
            (10, 8),
            (10, 9),
            (10, 11),
            (10, 13),
            (10, 15),
            (10, 16),
            (11, 2),
            (11, 3),
            (11, 4),
            (11, 7),
            (11, 10),
            (11, 12),
            (11, 14),
            (11, 17),
            (11, 19),
            (11, 20),
            (12, 18),
            (12, 21),
            (12, 22),
            (12, 23)
        `);
    }

    public async down(queryRunner: QueryRunner): Promise<void> {
        queryRunner.query(`DELETE FROM decks_heroes`);
        queryRunner.query(`DELETE FROM decks`);
    }
}