@firestone-hs/content-craetor-input 0.0.2 → 0.0.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,2 +1 @@
1
1
  export * from './data-model';
2
- export * from './input-model';
@@ -15,5 +15,4 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
15
15
  };
16
16
  Object.defineProperty(exports, "__esModule", { value: true });
17
17
  __exportStar(require("./data-model"), exports);
18
- __exportStar(require("./input-model"), exports);
19
18
  //# sourceMappingURL=_public-api.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"_public-api.js","sourceRoot":"","sources":["../src/_public-api.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,+CAA6B;AAC7B,gDAA8B","sourcesContent":["export * from './data-model';\r\nexport * from './input-model';\r\n"]}
1
+ {"version":3,"file":"_public-api.js","sourceRoot":"","sources":["../src/_public-api.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,+CAA6B","sourcesContent":["export * from './data-model';\r\n"]}
@@ -1,8 +1,6 @@
1
- import { TribeList } from './input-model';
2
1
  export interface BgsCompAdvice {
3
2
  readonly compId: string;
4
3
  readonly name?: string;
5
- readonly needAnyTribeCombinaisonInLobby: readonly TribeList[];
6
4
  readonly difficulty: 'EASY' | 'MEDIUM' | 'HARD';
7
5
  readonly powerLevel: 'LOW' | 'MEDIUM' | 'HIGH';
8
6
  readonly cards: BgsCompCardAdvice[];
@@ -1 +1 @@
1
- {"version":3,"file":"data-model.js","sourceRoot":"","sources":["../src/data-model.ts"],"names":[],"mappings":"","sourcesContent":["import { TribeList } from './input-model';\r\n\r\nexport interface BgsCompAdvice {\r\n\treadonly compId: string;\r\n\treadonly name?: string;\r\n\treadonly needAnyTribeCombinaisonInLobby: readonly TribeList[];\r\n\treadonly difficulty: 'EASY' | 'MEDIUM' | 'HARD';\r\n\treadonly powerLevel: 'LOW' | 'MEDIUM' | 'HIGH';\r\n\treadonly cards: BgsCompCardAdvice[];\r\n\treadonly tips: BgsCompTip[];\r\n}\r\nexport interface BgsCompCardAdvice {\r\n\treadonly cardId: string;\r\n\treadonly name?: string;\r\n\treadonly status: 'CORE' | 'ADDON';\r\n\treadonly tips: BgsCompCardTip[];\r\n}\r\nexport interface BgsCompTip {\r\n\treadonly author: string;\r\n\treadonly date: string;\r\n\treadonly patchNumber: number;\r\n\treadonly language: string;\r\n\treadonly tip: string;\r\n\treadonly whenToCommit: string;\r\n}\r\nexport interface BgsCompCardTip {\r\n\treadonly author: string;\r\n\treadonly date: string;\r\n\treadonly patchNumber: number;\r\n\treadonly language: string;\r\n\treadonly tip: string;\r\n}\r\n"]}
1
+ {"version":3,"file":"data-model.js","sourceRoot":"","sources":["../src/data-model.ts"],"names":[],"mappings":"","sourcesContent":["export interface BgsCompAdvice {\r\n\treadonly compId: string;\r\n\treadonly name?: string;\r\n\treadonly difficulty: 'EASY' | 'MEDIUM' | 'HARD';\r\n\treadonly powerLevel: 'LOW' | 'MEDIUM' | 'HIGH';\r\n\treadonly cards: BgsCompCardAdvice[];\r\n\treadonly tips: BgsCompTip[];\r\n}\r\nexport interface BgsCompCardAdvice {\r\n\treadonly cardId: string;\r\n\treadonly name?: string;\r\n\treadonly status: 'CORE' | 'ADDON';\r\n\treadonly tips: BgsCompCardTip[];\r\n}\r\nexport interface BgsCompTip {\r\n\treadonly author: string;\r\n\treadonly date: string;\r\n\treadonly patchNumber: number;\r\n\treadonly language: string;\r\n\treadonly tip: string;\r\n\treadonly whenToCommit: string;\r\n}\r\nexport interface BgsCompCardTip {\r\n\treadonly author: string;\r\n\treadonly date: string;\r\n\treadonly patchNumber: number;\r\n\treadonly language: string;\r\n\treadonly tip: string;\r\n}\r\n"]}
@@ -11,26 +11,26 @@ export interface InputCard {
11
11
  }
12
12
  export interface BgsCompsInput {
13
13
  readonly author: string;
14
- readonly compositions: readonly BgsCompInput[];
14
+ readonly compsData: readonly BgsCompsDataRow[];
15
+ readonly cardsData: readonly BgsCompsCardDataRow[];
15
16
  }
16
- export interface BgsCompInput {
17
+ export interface BgsCompsDataRow {
17
18
  readonly compId: string;
18
19
  readonly name: string;
19
- readonly tribes: readonly TribeList[];
20
20
  readonly difficulty: 'EASY' | 'MEDIUM' | 'HARD';
21
21
  readonly powerLevel: 'LOW' | 'MEDIUM' | 'HIGH';
22
22
  readonly patchNumber: number;
23
23
  readonly date: string;
24
24
  readonly tip: string;
25
25
  readonly whenToCommit: string;
26
- readonly cards: readonly BgsCompCardInput[];
27
26
  }
28
- export type TribeList = readonly string[];
29
- export interface BgsCompCardInput {
27
+ export interface BgsCompsCardDataRow {
28
+ readonly compId: string;
30
29
  readonly cardId: string;
30
+ readonly compName: string;
31
31
  readonly cardName: string;
32
+ readonly status: 'CORE' | 'ADDON';
32
33
  readonly patchNumber: number;
33
34
  readonly date: string;
34
- readonly status: 'CORE' | 'ADDON';
35
35
  readonly tip: string;
36
36
  }
@@ -1 +1 @@
1
- {"version":3,"file":"input-model.js","sourceRoot":"","sources":["../src/input-model.ts"],"names":[],"mappings":"","sourcesContent":["export interface Input {\r\n\treadonly type: 'bgs-trinkets' | 'bgs-heroes';\r\n\treadonly author: string;\r\n\treadonly data: readonly InputCard[];\r\n}\r\n\r\nexport interface InputCard {\r\n\treadonly cardId: string;\r\n\treadonly patchNumber: number;\r\n\treadonly date: string;\r\n\treadonly tip: string;\r\n}\r\n\r\nexport interface BgsCompsInput {\r\n\treadonly author: string;\r\n\treadonly compositions: readonly BgsCompInput[];\r\n}\r\n\r\nexport interface BgsCompInput {\r\n\treadonly compId: string;\r\n\treadonly name: string;\r\n\treadonly tribes: readonly TribeList[];\r\n\treadonly difficulty: 'EASY' | 'MEDIUM' | 'HARD';\r\n\treadonly powerLevel: 'LOW' | 'MEDIUM' | 'HIGH';\r\n\treadonly patchNumber: number;\r\n\treadonly date: string;\r\n\treadonly tip: string;\r\n\treadonly whenToCommit: string;\r\n\treadonly cards: readonly BgsCompCardInput[];\r\n}\r\n\r\n// Tribes that need to be together in the lobby for the comp to work\r\nexport type TribeList = readonly string[];\r\n\r\nexport interface BgsCompCardInput {\r\n\treadonly cardId: string;\r\n\treadonly cardName: string;\r\n\treadonly patchNumber: number;\r\n\treadonly date: string;\r\n\treadonly status: 'CORE' | 'ADDON';\r\n\treadonly tip: string;\r\n}\r\n"]}
1
+ {"version":3,"file":"input-model.js","sourceRoot":"","sources":["../src/input-model.ts"],"names":[],"mappings":"","sourcesContent":["export interface Input {\r\n\treadonly type: 'bgs-trinkets' | 'bgs-heroes';\r\n\treadonly author: string;\r\n\treadonly data: readonly InputCard[];\r\n}\r\n\r\nexport interface InputCard {\r\n\treadonly cardId: string;\r\n\treadonly patchNumber: number;\r\n\treadonly date: string;\r\n\treadonly tip: string;\r\n}\r\n\r\nexport interface BgsCompsInput {\r\n\treadonly author: string;\r\n\treadonly compsData: readonly BgsCompsDataRow[];\r\n\treadonly cardsData: readonly BgsCompsCardDataRow[];\r\n}\r\n\r\nexport interface BgsCompsDataRow {\r\n\treadonly compId: string;\r\n\treadonly name: string;\r\n\treadonly difficulty: 'EASY' | 'MEDIUM' | 'HARD';\r\n\treadonly powerLevel: 'LOW' | 'MEDIUM' | 'HIGH';\r\n\treadonly patchNumber: number;\r\n\treadonly date: string;\r\n\treadonly tip: string;\r\n\treadonly whenToCommit: string;\r\n}\r\n\r\nexport interface BgsCompsCardDataRow {\r\n\treadonly compId: string;\r\n\treadonly cardId: string;\r\n\treadonly compName: string;\r\n\treadonly cardName: string;\r\n\treadonly status: 'CORE' | 'ADDON';\r\n\treadonly patchNumber: number;\r\n\treadonly date: string;\r\n\treadonly tip: string;\r\n}\r\n\r\n// export interface BgsCompInput {\r\n// \treadonly compId: string;\r\n// \treadonly name: string;\r\n// \treadonly tribes: readonly TribeList[];\r\n// \treadonly difficulty: 'EASY' | 'MEDIUM' | 'HARD';\r\n// \treadonly powerLevel: 'LOW' | 'MEDIUM' | 'HIGH';\r\n// \treadonly patchNumber: number;\r\n// \treadonly date: string;\r\n// \treadonly tip: string;\r\n// \treadonly whenToCommit: string;\r\n// \treadonly cards: readonly BgsCompCardInput[];\r\n// }\r\n\r\n// // Tribes that need to be together in the lobby for the comp to work\r\n// export type TribeList = readonly string[];\r\n\r\n// export interface BgsCompCardInput {\r\n// \treadonly cardId: string;\r\n// \treadonly cardName: string;\r\n// \treadonly patchNumber: number;\r\n// \treadonly date: string;\r\n// \treadonly status: 'CORE' | 'ADDON';\r\n// \treadonly tip: string;\r\n// }\r\n"]}
@@ -1 +1 @@
1
- {"version":3,"file":"start-save-bgs-comp-input.js","sourceRoot":"","sources":["../src/start-save-bgs-comp-input.ts"],"names":[],"mappings":";;AAAA,qEAAqD;AAGrD,MAAM,GAAG,GAAG,IAAI,sBAAG,EAAE,CAAC;AAEtB,kBAAe,KAAK,EAAE,KAAK,EAAgB,EAAE;IAC5C,MAAM,OAAO,GAAG;QACf,8BAA8B,EAC7B,6IAA6I;QAC9I,+BAA+B,EAAE,iBAAiB;QAClD,8BAA8B,EAAE,wCAAwC;QACxE,6BAA6B,EAAE,KAAK,CAAC,OAAO,EAAE,MAAM,IAAI,KAAK,CAAC,OAAO,EAAE,MAAM,IAAI,GAAG;KACpF,CAAC;IAEF,IAAI,CAAC,KAAK,CAAC,IAAI,EAAE;QAChB,MAAM,QAAQ,GAAG;YAChB,UAAU,EAAE,GAAG;YACf,IAAI,EAAE,IAAI;YACV,OAAO,EAAE,OAAO;SAChB,CAAC;QACF,OAAO,QAAQ,CAAC;KAChB;IAED,MAAM,KAAK,GAAiB,IAAI,CAAC,KAAK,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC;IACnD,OAAO,CAAC,KAAK,CAAC,gBAAgB,EAAE,KAAK,CAAC,CAAC;IACvC,MAAM,GAAG,CAAC,kBAAkB,CAAC,KAAK,EAAE,OAAO,CAAC,GAAG,CAAC,gBAAgB,CAAC,CAAC;IAClE,OAAO;QACN,UAAU,EAAE,GAAG;QACf,OAAO,EAAE,OAAO;QAChB,IAAI,EAAE,EAAE;KACR,CAAC;AACH,CAAC,CAAC","sourcesContent":["import { Sqs } from '@firestone-hs/aws-lambda-utils';\r\nimport { BgsCompInput } from './input-model';\r\n\r\nconst sqs = new Sqs();\r\n\r\nexport default async (event): Promise<any> => {\r\n\tconst headers = {\r\n\t\t'Access-Control-Allow-Headers':\r\n\t\t\t'Accept,Accept-Language,Content-Language,Content-Type,Authorization,x-correlation-id,X-Amz-Date,Authorization,X-Api-Key,X-Amz-Security-Token',\r\n\t\t'Access-Control-Expose-Headers': 'x-my-header-out',\r\n\t\t'Access-Control-Allow-Methods': 'DELETE,GET,HEAD,OPTIONS,PATCH,POST,PUT',\r\n\t\t'Access-Control-Allow-Origin': event.headers?.Origin || event.headers?.origin || '*',\r\n\t};\r\n\t// Preflight\r\n\tif (!event.body) {\r\n\t\tconst response = {\r\n\t\t\tstatusCode: 200,\r\n\t\t\tbody: null,\r\n\t\t\theaders: headers,\r\n\t\t};\r\n\t\treturn response;\r\n\t}\r\n\r\n\tconst input: BgsCompInput = JSON.parse(event.body);\r\n\tconsole.debug('received event', input);\r\n\tawait sqs.sendMessageToQueue(input, process.env.SQS_BGS_COMP_URL);\r\n\treturn {\r\n\t\tstatusCode: 200,\r\n\t\theaders: headers,\r\n\t\tbody: '',\r\n\t};\r\n};\r\n"]}
1
+ {"version":3,"file":"start-save-bgs-comp-input.js","sourceRoot":"","sources":["../src/start-save-bgs-comp-input.ts"],"names":[],"mappings":";;AAAA,qEAAqD;AAErD,MAAM,GAAG,GAAG,IAAI,sBAAG,EAAE,CAAC;AAEtB,kBAAe,KAAK,EAAE,KAAK,EAAgB,EAAE;IAC5C,MAAM,OAAO,GAAG;QACf,8BAA8B,EAC7B,6IAA6I;QAC9I,+BAA+B,EAAE,iBAAiB;QAClD,8BAA8B,EAAE,wCAAwC;QACxE,6BAA6B,EAAE,KAAK,CAAC,OAAO,EAAE,MAAM,IAAI,KAAK,CAAC,OAAO,EAAE,MAAM,IAAI,GAAG;KACpF,CAAC;IAEF,IAAI,CAAC,KAAK,CAAC,IAAI,EAAE;QAChB,MAAM,QAAQ,GAAG;YAChB,UAAU,EAAE,GAAG;YACf,IAAI,EAAE,IAAI;YACV,OAAO,EAAE,OAAO;SAChB,CAAC;QACF,OAAO,QAAQ,CAAC;KAChB;IAED,MAAM,KAAK,GAAG,IAAI,CAAC,KAAK,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC;IACrC,OAAO,CAAC,KAAK,CAAC,gBAAgB,EAAE,KAAK,CAAC,CAAC;IACvC,MAAM,GAAG,CAAC,kBAAkB,CAAC,KAAK,EAAE,OAAO,CAAC,GAAG,CAAC,gBAAgB,CAAC,CAAC;IAClE,OAAO;QACN,UAAU,EAAE,GAAG;QACf,OAAO,EAAE,OAAO;QAChB,IAAI,EAAE,EAAE;KACR,CAAC;AACH,CAAC,CAAC","sourcesContent":["import { Sqs } from '@firestone-hs/aws-lambda-utils';\r\n\r\nconst sqs = new Sqs();\r\n\r\nexport default async (event): Promise<any> => {\r\n\tconst headers = {\r\n\t\t'Access-Control-Allow-Headers':\r\n\t\t\t'Accept,Accept-Language,Content-Language,Content-Type,Authorization,x-correlation-id,X-Amz-Date,Authorization,X-Api-Key,X-Amz-Security-Token',\r\n\t\t'Access-Control-Expose-Headers': 'x-my-header-out',\r\n\t\t'Access-Control-Allow-Methods': 'DELETE,GET,HEAD,OPTIONS,PATCH,POST,PUT',\r\n\t\t'Access-Control-Allow-Origin': event.headers?.Origin || event.headers?.origin || '*',\r\n\t};\r\n\t// Preflight\r\n\tif (!event.body) {\r\n\t\tconst response = {\r\n\t\t\tstatusCode: 200,\r\n\t\t\tbody: null,\r\n\t\t\theaders: headers,\r\n\t\t};\r\n\t\treturn response;\r\n\t}\r\n\r\n\tconst input = JSON.parse(event.body);\r\n\tconsole.debug('received event', input);\r\n\tawait sqs.sendMessageToQueue(input, process.env.SQS_BGS_COMP_URL);\r\n\treturn {\r\n\t\tstatusCode: 200,\r\n\t\theaders: headers,\r\n\t\tbody: '',\r\n\t};\r\n};\r\n"]}
@@ -8,12 +8,13 @@ const bucket = 'static.zerotoheroes.com';
8
8
  const fileKey = 'hearthstone/data/battlegrounds-strategies/bgs-comps-strategies.gz.json';
9
9
  const processBgsComps = async (input, bgPatch, allCards) => {
10
10
  const author = input.author;
11
- console.debug('processing', author);
11
+ console.debug('processing', author, input);
12
12
  const result = await loadExistingInfo();
13
- for (const inputComp of input.compositions) {
14
- const comp = updateComp(inputComp, result, author);
15
- for (const card of inputComp.cards) {
16
- updateCompCard(card, comp, author);
13
+ for (const inputComp of input.compsData) {
14
+ const comp = updateComp(inputComp, result, author, bgPatch);
15
+ const cardsData = input.cardsData.filter((card) => card.compId === inputComp.compId);
16
+ for (const card of cardsData) {
17
+ updateCompCard(card, comp, author, bgPatch);
17
18
  }
18
19
  }
19
20
  console.debug('built aggregated tips', result);
@@ -21,7 +22,8 @@ const processBgsComps = async (input, bgPatch, allCards) => {
21
22
  console.debug('saved aggregated tips');
22
23
  };
23
24
  exports.processBgsComps = processBgsComps;
24
- const updateCompCard = (inputCard, comp, author) => {
25
+ const updateCompCard = (inputCard, comp, author, bgPatch) => {
26
+ console.debug('updating card', comp.compId, inputCard.cardId, inputCard.tip, inputCard);
25
27
  let existingCard = comp.cards.find((t) => t.cardId === inputCard.cardId);
26
28
  if (!existingCard) {
27
29
  existingCard = {
@@ -39,18 +41,19 @@ const updateCompCard = (inputCard, comp, author) => {
39
41
  author: author,
40
42
  language: 'enUS',
41
43
  };
44
+ existingCard.tips.push(existingTip);
42
45
  }
43
46
  if (!(0, utils_1.deepEqual)(existingTip.tip, inputCard.tip)) {
44
47
  existingTip.tip = inputCard.tip;
45
48
  existingTip.date = new Date().toISOString().substring(0, 10);
46
- existingTip.patchNumber = inputCard.patchNumber;
49
+ existingTip.patchNumber = bgPatch.number;
47
50
  }
48
51
  }
49
52
  else {
50
53
  existingCard.tips = existingCard.tips.filter((t) => t.author !== author);
51
54
  }
52
55
  };
53
- const updateComp = (inputComp, result, author) => {
56
+ const updateComp = (inputComp, result, author, bgPatch) => {
54
57
  let existingComp = result.find((t) => t.compId === inputComp.compId);
55
58
  if (!existingComp) {
56
59
  existingComp = {
@@ -59,7 +62,6 @@ const updateComp = (inputComp, result, author) => {
59
62
  cards: [],
60
63
  difficulty: inputComp.difficulty,
61
64
  powerLevel: inputComp.powerLevel,
62
- needAnyTribeCombinaisonInLobby: inputComp.tribes,
63
65
  tips: [],
64
66
  };
65
67
  result.push(existingComp);
@@ -73,12 +75,12 @@ const updateComp = (inputComp, result, author) => {
73
75
  };
74
76
  existingComp.tips.push(existingTip);
75
77
  }
76
- if (!(0, utils_1.deepEqual)(existingTip.tip, inputComp.tip) &&
78
+ if (!(0, utils_1.deepEqual)(existingTip.tip, inputComp.tip) ||
77
79
  !(0, utils_1.deepEqual)(existingTip.whenToCommit, inputComp.whenToCommit)) {
78
80
  existingTip.tip = inputComp.tip;
79
81
  existingTip.whenToCommit = inputComp.whenToCommit;
80
82
  existingTip.date = new Date().toISOString().substring(0, 10);
81
- existingTip.patchNumber = inputComp.patchNumber;
83
+ existingTip.patchNumber = bgPatch.number;
82
84
  }
83
85
  }
84
86
  else {
@@ -1 +1 @@
1
- {"version":3,"file":"bgs-comps.js","sourceRoot":"","sources":["../../src/types/bgs-comps.ts"],"names":[],"mappings":";;;AACA,qEAA+D;AAE/D,+BAAgC;AAGhC,oCAA8C;AAE9C,MAAM,MAAM,GAAG,yBAAyB,CAAC;AACzC,MAAM,OAAO,GAAG,wEAAwE,CAAC;AAElF,MAAM,eAAe,GAAG,KAAK,EAAE,KAAoB,EAAE,OAAkB,EAAE,QAAyB,EAAE,EAAE;IAC5G,MAAM,MAAM,GAAG,KAAK,CAAC,MAAM,CAAC;IAC5B,OAAO,CAAC,KAAK,CAAC,YAAY,EAAE,MAAM,CAAC,CAAC;IACpC,MAAM,MAAM,GAAG,MAAM,gBAAgB,EAAE,CAAC;IAExC,KAAK,MAAM,SAAS,IAAI,KAAK,CAAC,YAAY,EAAE;QAC3C,MA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;IACpB,MAAM,EAAE,CAAC,SAAS,CAAC,IAAA,eAAQ,EAAC,IAAI,CAAC,SAAS,CAAC,IAAI,CAAC,CAAC,EAAE,MAAM,EAAE,OAAO,EAAE,kBAAkB,EAAE,MAAM,CAAC,CAAC;AACjG,CAAC,CAAC","sourcesContent":["/* eslint-disable no-extra-boolean-cast */\r\nimport { PatchInfo, S3 } from '@firestone-hs/aws-lambda-utils';\r\nimport { AllCardsService } from '@firestone-hs/reference-data';\r\nimport { gzipSync } from 'zlib';\r\nimport { BgsCompAdvice, BgsCompCardAdvice, BgsCompCardTip, BgsCompTip } from '../data-model';\r\nimport { BgsCompCardInput, BgsCompInput, BgsCompsInput } from '../input-model';\r\nimport { deepEqual, Mutable } from '../utils';\r\n\r\nconst bucket = 'static.zerotoheroes.com';\r\nconst fileKey = 'hearthstone/data/battlegrounds-strategies/bgs-comps-strategies.gz.json';\r\n\r\nexport const processBgsComps = async (input: BgsCompsInput, bgPatch: PatchInfo, allCards: AllCardsService) => {\r\n\tconst author = input.author;\r\n\tconsole.debug('processing', author);\r\n\tconst result = await loadExistingInfo();\r\n\r\n\tfor (const inputComp of input.compositions) {\r\n\t\tconst comp = updateComp(inputComp, result, author);\r\n\t\tfor (const card of inputComp.cards) {\r\n\t\t\tupdateCompCard(card, comp, author);\r\n\t\t}\r\n\t}\r\n\r\n\tconsole.debug('built aggregated tips', result);\r\n\tawait saveInfo(result);\r\n\tconsole.debug('saved aggregated tips');\r\n};\r\n\r\nconst updateCompCard = (inputCard: BgsCompCardInput, comp: MutableBgsCompAdvice, author: string): void => {\r\n\tlet existingCard: Mutable<BgsCompCardAdvice> = comp.cards.find((t) => t.cardId === inputCard.cardId);\r\n\tif (!existingCard) {\r\n\t\texistingCard = {\r\n\t\t\tcardId: inputCard.cardId,\r\n\t\t\tname: inputCard.cardName,\r\n\t\t\ttips: [],\r\n\t\t} as BgsCompCardAdvice;\r\n\t\tcomp.cards.push(existingCard);\r\n\t}\r\n\texistingCard.status = inputCard.status;\r\n\r\n\tif (!!inputCard.tip?.length) {\r\n\t\tlet existingTip: Mutable<BgsCompCardTip> = existingCard.tips.find((t) => t.author === author);\r\n\t\tif (!existingTip) {\r\n\t\t\texistingTip = {\r\n\t\t\t\tauthor: author,\r\n\t\t\t\tlanguage: 'enUS',\r\n\t\t\t} as BgsCompTip;\r\n\t\t}\r\n\t\tif (!deepEqual(existingTip.tip, inputCard.tip)) {\r\n\t\t\texistingTip.tip = inputCard.tip;\r\n\t\t\texistingTip.date = new Date().toISOString().substring(0, 10);\r\n\t\t\texistingTip.patchNumber = inputCard.patchNumber;\r\n\t\t}\r\n\t} else {\r\n\t\texistingCard.tips = existingCard.tips.filter((t) => t.author !== author);\r\n\t}\r\n};\r\n\r\nconst updateComp = (inputComp: BgsCompInput, result: MutableBgsCompAdvice[], author: string): MutableBgsCompAdvice => {\r\n\tlet existingComp = result.find((t) => t.compId === inputComp.compId);\r\n\tif (!existingComp) {\r\n\t\texistingComp = {\r\n\t\t\tcompId: inputComp.compId,\r\n\t\t\tname: inputComp.name,\r\n\t\t\tcards: [],\r\n\t\t\tdifficulty: inputComp.difficulty,\r\n\t\t\tpowerLevel: inputComp.powerLevel,\r\n\t\t\tneedAnyTribeCombinaisonInLobby: inputComp.tribes,\r\n\t\t\ttips: [],\r\n\t\t};\r\n\t\tresult.push(existingComp);\r\n\t}\r\n\r\n\tif (!!inputComp.tip?.length) {\r\n\t\tlet existingTip: Mutable<BgsCompTip> = existingComp.tips.find((t) => t.author === author);\r\n\t\tif (!existingTip) {\r\n\t\t\texistingTip = {\r\n\t\t\t\tauthor: author,\r\n\t\t\t\tlanguage: 'enUS',\r\n\t\t\t} as BgsCompTip;\r\n\t\t\texistingComp.tips.push(existingTip);\r\n\t\t}\r\n\t\tif (\r\n\t\t\t!deepEqual(existingTip.tip, inputComp.tip) &&\r\n\t\t\t!deepEqual(existingTip.whenToCommit, inputComp.whenToCommit)\r\n\t\t) {\r\n\t\t\texistingTip.tip = inputComp.tip;\r\n\t\t\texistingTip.whenToCommit = inputComp.whenToCommit;\r\n\t\t\texistingTip.date = new Date().toISOString().substring(0, 10);\r\n\t\t\texistingTip.patchNumber = inputComp.patchNumber;\r\n\t\t}\r\n\t} else {\r\n\t\texistingComp.tips = existingComp.tips.filter((t) => t.author !== author);\r\n\t}\r\n\treturn existingComp;\r\n};\r\n\r\nconst loadExistingInfo = async (): Promise<MutableBgsCompAdvice[]> => {\r\n\tconst s3 = new S3();\r\n\t// console.debug('created s3');\r\n\tconst asString = await s3.readGzipContent(bucket, fileKey, 5);\r\n\t// console.debug('loaded existing info', asString?.length);\r\n\tif (!asString) {\r\n\t\treturn [];\r\n\t}\r\n\treturn JSON.parse(asString);\r\n};\r\n\r\nconst saveInfo = async (info: readonly BgsCompAdvice[]) => {\r\n\tconst s3 = new S3();\r\n\tawait s3.writeFile(gzipSync(JSON.stringify(info)), bucket, fileKey, 'application/json', 'gzip');\r\n};\r\n\r\ntype MutableBgsCompAdvice = Mutable<BgsCompAdvice>;\r\n"]}
1
+ {"version":3,"file":"bgs-comps.js","sourceRoot":"","sources":["../../src/types/bgs-comps.ts"],"names":[],"mappings":";;;AACA,qEAA+D;AAE/D,+BAAgC;AAGhC,oCAA8C;AAE9C,MAAM,MAAM,GAAG,yBAAyB,CAAC;AACzC,MAAM,OAAO,GAAG,wEAAwE,CAAC;AAElF,MAAM,eAAe,GAAG,KAAK,EAAE,KAAoB,EAAE,OAAkB,EAAE,QAAyB,EAAE,EAAE;IAC5G,MAAM,MAAM,GAAG,KAAK,CAAC,MAAM,CAAC;IAC5B,OAAO,CAAC,KAAK,CAAC,YAAY,EAAE,MAAM,EAAE,KAAK,CAAC,CAAC;IAC3C,MAAM,MAAM,GAAG,MAAM,gBAAgB,EAAE,CAAC;IAExC,KAAK,MAAM,SAAS,IAAI,KAAK,CAAC,SAAS,EAAE;QACxC,MAAM,IAAI,GAAG,UAAU,CAAC,SAAS,EAAE,MAAM,EAAE,MAAM,EAAE,OAAO,CAAC,CA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AAE,CAAC,CAAC,CAAC;IAE9D,IAAI,CAAC,QAAQ,EAAE;QACd,OAAO,EAAE,CAAC;KACV;IACD,OAAO,IAAI,CAAC,KAAK,CAAC,QAAQ,CAAC,CAAC;AAC7B,CAAC,CAAC;AAEF,MAAM,QAAQ,GAAG,KAAK,EAAE,IAA8B,EAAE,EAAE;IACzD,MAAM,EAAE,GAAG,IAAI,qBAAE,EAAE,CAAC;IACpB,MAAM,EAAE,CAAC,SAAS,CAAC,IAAA,eAAQ,EAAC,IAAI,CAAC,SAAS,CAAC,IAAI,CAAC,CAAC,EAAE,MAAM,EAAE,OAAO,EAAE,kBAAkB,EAAE,MAAM,CAAC,CAAC;AACjG,CAAC,CAAC","sourcesContent":["/* eslint-disable no-extra-boolean-cast */\r\nimport { PatchInfo, S3 } from '@firestone-hs/aws-lambda-utils';\r\nimport { AllCardsService } from '@firestone-hs/reference-data';\r\nimport { gzipSync } from 'zlib';\r\nimport { BgsCompAdvice, BgsCompCardAdvice, BgsCompCardTip, BgsCompTip } from '../data-model';\r\nimport { BgsCompsCardDataRow, BgsCompsDataRow, BgsCompsInput } from '../input-model';\r\nimport { deepEqual, Mutable } from '../utils';\r\n\r\nconst bucket = 'static.zerotoheroes.com';\r\nconst fileKey = 'hearthstone/data/battlegrounds-strategies/bgs-comps-strategies.gz.json';\r\n\r\nexport const processBgsComps = async (input: BgsCompsInput, bgPatch: PatchInfo, allCards: AllCardsService) => {\r\n\tconst author = input.author;\r\n\tconsole.debug('processing', author, input);\r\n\tconst result = await loadExistingInfo();\r\n\r\n\tfor (const inputComp of input.compsData) {\r\n\t\tconst comp = updateComp(inputComp, result, author, bgPatch);\r\n\t\tconst cardsData = input.cardsData.filter((card) => card.compId === inputComp.compId);\r\n\t\tfor (const card of cardsData) {\r\n\t\t\tupdateCompCard(card, comp, author, bgPatch);\r\n\t\t}\r\n\t}\r\n\r\n\tconsole.debug('built aggregated tips', result);\r\n\tawait saveInfo(result);\r\n\tconsole.debug('saved aggregated tips');\r\n};\r\n\r\nconst updateCompCard = (\r\n\tinputCard: BgsCompsCardDataRow,\r\n\tcomp: MutableBgsCompAdvice,\r\n\tauthor: string,\r\n\tbgPatch: PatchInfo,\r\n): void => {\r\n\tconsole.debug('updating card', comp.compId, inputCard.cardId, inputCard.tip, inputCard);\r\n\tlet existingCard: Mutable<BgsCompCardAdvice> = comp.cards.find((t) => t.cardId === inputCard.cardId);\r\n\tif (!existingCard) {\r\n\t\texistingCard = {\r\n\t\t\tcardId: inputCard.cardId,\r\n\t\t\tname: inputCard.cardName,\r\n\t\t\ttips: [],\r\n\t\t} as BgsCompCardAdvice;\r\n\t\tcomp.cards.push(existingCard);\r\n\t}\r\n\texistingCard.status = inputCard.status;\r\n\r\n\tif (!!inputCard.tip?.length) {\r\n\t\tlet existingTip: Mutable<BgsCompCardTip> = existingCard.tips.find((t) => t.author === author);\r\n\t\tif (!existingTip) {\r\n\t\t\texistingTip = {\r\n\t\t\t\tauthor: author,\r\n\t\t\t\tlanguage: 'enUS',\r\n\t\t\t} as BgsCompTip;\r\n\t\t\texistingCard.tips.push(existingTip);\r\n\t\t}\r\n\t\tif (!deepEqual(existingTip.tip, inputCard.tip)) {\r\n\t\t\texistingTip.tip = inputCard.tip;\r\n\t\t\texistingTip.date = new Date().toISOString().substring(0, 10);\r\n\t\t\texistingTip.patchNumber = bgPatch.number;\r\n\t\t}\r\n\t} else {\r\n\t\texistingCard.tips = existingCard.tips.filter((t) => t.author !== author);\r\n\t}\r\n};\r\n\r\nconst updateComp = (\r\n\tinputComp: BgsCompsDataRow,\r\n\tresult: MutableBgsCompAdvice[],\r\n\tauthor: string,\r\n\tbgPatch: PatchInfo,\r\n): MutableBgsCompAdvice => {\r\n\tlet existingComp = result.find((t) => t.compId === inputComp.compId);\r\n\tif (!existingComp) {\r\n\t\t// This should maybe come from another process to handle the ref data\r\n\t\texistingComp = {\r\n\t\t\tcompId: inputComp.compId,\r\n\t\t\tname: inputComp.name,\r\n\t\t\tcards: [],\r\n\t\t\tdifficulty: inputComp.difficulty,\r\n\t\t\tpowerLevel: inputComp.powerLevel,\r\n\t\t\ttips: [],\r\n\t\t};\r\n\t\tresult.push(existingComp);\r\n\t}\r\n\r\n\tif (!!inputComp.tip?.length) {\r\n\t\tlet existingTip: Mutable<BgsCompTip> = existingComp.tips.find((t) => t.author === author);\r\n\t\tif (!existingTip) {\r\n\t\t\texistingTip = {\r\n\t\t\t\tauthor: author,\r\n\t\t\t\tlanguage: 'enUS',\r\n\t\t\t} as BgsCompTip;\r\n\t\t\texistingComp.tips.push(existingTip);\r\n\t\t}\r\n\t\tif (\r\n\t\t\t!deepEqual(existingTip.tip, inputComp.tip) ||\r\n\t\t\t!deepEqual(existingTip.whenToCommit, inputComp.whenToCommit)\r\n\t\t) {\r\n\t\t\texistingTip.tip = inputComp.tip;\r\n\t\t\texistingTip.whenToCommit = inputComp.whenToCommit;\r\n\t\t\texistingTip.date = new Date().toISOString().substring(0, 10);\r\n\t\t\texistingTip.patchNumber = bgPatch.number;\r\n\t\t}\r\n\t} else {\r\n\t\texistingComp.tips = existingComp.tips.filter((t) => t.author !== author);\r\n\t}\r\n\treturn existingComp;\r\n};\r\n\r\nconst loadExistingInfo = async (): Promise<MutableBgsCompAdvice[]> => {\r\n\tconst s3 = new S3();\r\n\t// console.debug('created s3');\r\n\tconst asString = await s3.readGzipContent(bucket, fileKey, 5);\r\n\t// console.debug('loaded existing info', asString?.length);\r\n\tif (!asString) {\r\n\t\treturn [];\r\n\t}\r\n\treturn JSON.parse(asString);\r\n};\r\n\r\nconst saveInfo = async (info: readonly BgsCompAdvice[]) => {\r\n\tconst s3 = new S3();\r\n\tawait s3.writeFile(gzipSync(JSON.stringify(info)), bucket, fileKey, 'application/json', 'gzip');\r\n};\r\n\r\ntype MutableBgsCompAdvice = Mutable<BgsCompAdvice>;\r\n"]}
@@ -21,7 +21,7 @@ const processBgsHero = async (input, bgPatch, allCards) => {
21
21
  };
22
22
  result.push(existingCardTip);
23
23
  }
24
- if (!!cardTip.tip?.length) {
24
+ if (!!cardTip.tip?.trim()?.length) {
25
25
  let existingTip = existingCardTip.tips.find((t) => t.author === author);
26
26
  if (!existingTip) {
27
27
  existingTip = {
@@ -1 +1 @@
1
- {"version":3,"file":"bgs-heroes.js","sourceRoot":"","sources":["../../src/types/bgs-heroes.ts"],"names":[],"mappings":";;;AACA,qEAA+D;AAE/D,+BAAgC;AAEhC,oCAAqC;AAErC,MAAM,MAAM,GAAG,yBAAyB,CAAC;AACzC,MAAM,OAAO,GAAG,uEAAuE,CAAC;AAEjF,MAAM,cAAc,GAAG,KAAK,EAAE,KAAY,EAAE,OAAkB,EAAE,QAAyB,EAAE,EAAE;IACnG,MAAM,MAAM,GAAG,KAAK,CAAC,MAAM,CAAC;IAC5B,OAAO,CAAC,KAAK,CAAC,YAAY,EAAE,MAAM,CAAC,CAAC;IACpC,MAAM,QAAQ,GAAG,MAAM,gBAAgB,EAAE,CAAC;IAC1C,MAAM,MAAM,GAAG,QAAQ,CAAC,MAAM,CAAC;IAE/B,KAAK,MAAM,OAAO,IAAI,KAAK,CAAC,IAAI,EAAE;QAEjC,IAAI,eAAe,GAAG,MAAM,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,MAAM,KAAK,OAAO,CAAC,MAAM,CAAC,CAAC;QACtE,IAAI,CAAC,eAAe,EAAE;YACrB,eAAe,GAAG;gBACjB,MAAM,EAAE,OAAO,CAAC,MAAM;gBACtB,IAAI,EAAE,QAAQ,CAAC,OAAO,CAAC,OAAO,CAAC,MAAM,CAAC,EAAE,IAAI;gBAC5C,IAAI,EAAE,EAAE;aACR,CAAC;YACF,MAAM,CAAC,IAAI,CAAC,eAAe,CAAC,CAAC;SAC7B;QACD,IAAI,CAAC,CAAC,OAAO,CAAC,GAAG,EAAE,MAAM,EAAE;YAC1B,IAAI,WAAW,GAAG,eAAe,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CA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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA2yBpB,CAAC","sourcesContent":["/* eslint-disable no-extra-boolean-cast */\r\nimport { PatchInfo, S3 } from '@firestone-hs/aws-lambda-utils';\r\nimport { AllCardsService } from '@firestone-hs/reference-data';\r\nimport { gzipSync } from 'zlib';\r\nimport { Input } from '../input-model';\r\nimport { deepEqual } from '../utils';\r\n\r\nconst bucket = 'static.zerotoheroes.com';\r\nconst fileKey = 'hearthstone/data/battlegrounds-strategies/bgs-hero-strategies.gz.json';\r\n\r\nexport const processBgsHero = async (input: Input, bgPatch: PatchInfo, allCards: AllCardsService) => {\r\n\tconst author = input.author;\r\n\tconsole.debug('processing', author);\r\n\tconst existing = await loadExistingInfo();\r\n\tconst result = existing.heroes;\r\n\t// console.debug('loaded existing info');\r\n\tfor (const cardTip of input.data) {\r\n\t\t// console.debug('processing card', cardTip.cardId);\r\n\t\tlet existingCardTip = result.find((t) => t.cardId === cardTip.cardId);\r\n\t\tif (!existingCardTip) {\r\n\t\t\texistingCardTip = {\r\n\t\t\t\tcardId: cardTip.cardId,\r\n\t\t\t\tname: allCards.getCard(cardTip.cardId)?.name,\r\n\t\t\t\ttips: [],\r\n\t\t\t};\r\n\t\t\tresult.push(existingCardTip);\r\n\t\t}\r\n\t\tif (!!cardTip.tip?.length) {\r\n\t\t\tlet existingTip = existingCardTip.tips.find((t) => t.author === author);\r\n\t\t\tif (!existingTip) {\r\n\t\t\t\texistingTip = {\r\n\t\t\t\t\tauthor: author,\r\n\t\t\t\t} as CardTip;\r\n\t\t\t\texistingCardTip.tips.push(existingTip);\r\n\t\t\t}\r\n\t\t\texistingTip.language = 'enUS';\r\n\t\t\tif (\r\n\t\t\t\t!deepEqual(existingTip.summary, cardTip.tip) ||\r\n\t\t\t\t(cardTip.patchNumber && existingTip.patch !== cardTip.patchNumber)\r\n\t\t\t) {\r\n\t\t\t\texistingTip.summary = cardTip.tip;\r\n\t\t\t\texistingTip.date = new Date().toISOString().substring(0, 10);\r\n\t\t\t\texistingTip.patch = bgPatch.number;\r\n\t\t\t}\r\n\t\t} else {\r\n\t\t\texistingCardTip.tips = existingCardTip.tips.filter((t) => t.author !== author);\r\n\t\t}\r\n\t}\r\n\tconsole.debug('built aggregated tips', result);\r\n\tawait saveInfo({\r\n\t\theroes: result,\r\n\t\tcurves: existing.curves,\r\n\t});\r\n\tconsole.debug('saved aggregated tips');\r\n};\r\n\r\nconst loadExistingInfo = async (): Promise<{ heroes: CardItem[]; curves: any[] }> => {\r\n\tconst s3 = new S3();\r\n\t// console.debug('created s3');\r\n\tconst asString = await s3.readGzipContent(bucket, fileKey, 5);\r\n\t// console.debug('loaded existing info', asString?.length);\r\n\tif (!asString) {\r\n\t\treturn { heroes: [], curves: JSON.parse(curvesString) };\r\n\t}\r\n\treturn JSON.parse(asString);\r\n};\r\n\r\nconst saveInfo = async (info: { heroes: CardItem[]; curves: any[] }) => {\r\n\tconst s3 = new S3();\r\n\tawait s3.writeFile(gzipSync(JSON.stringify(info)), bucket, fileKey, 'application/json', 'gzip');\r\n};\r\n\r\ninterface CardItem {\r\n\tcardId: string;\r\n\tname: string;\r\n\ttips: CardTip[];\r\n}\r\ninterface CardTip {\r\n\tsummary: string;\r\n\tauthor: string;\r\n\tlanguage: string;\r\n\tpatch: number;\r\n\tdate: string;\r\n}\r\n\r\nconst curvesString = `\r\n[\r\n\t\t{\r\n\t\t\t\"id\": \"basic\",\r\n\t\t\t\"name\": \"Basic Curve\",\r\n\t\t\t\"notes\": \"Stronger with a token start, turn 4 shop RNG weakness. No heropower requirement.\",\r\n\t\t\t\"steps\": [\r\n\t\t\t\t{\r\n\t\t\t\t\t\"turn\": 1,\r\n\t\t\t\t\t\"actions\": [\"buy\"]\r\n\t\t\t\t},\r\n\t\t\t\t{\r\n\t\t\t\t\t\"turn\": 2,\r\n\t\t\t\t\t\"actions\": [\r\n\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\t\"type\": \"level\",\r\n\t\t\t\t\t\t\t\"param\": 2\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t]\r\n\t\t\t\t},\r\n\t\t\t\t{\r\n\t\t\t\t\t\"turn\": 3,\r\n\t\t\t\t\t\"actions\": [\"sell\", \"buy\", \"buy\"]\r\n\t\t\t\t},\r\n\t\t\t\t{\r\n\t\t\t\t\t\"turn\": 4,\r\n\t\t\t\t\t\"actions\": [\"buy\", \"buy\"]\r\n\t\t\t\t},\r\n\t\t\t\t{\r\n\t\t\t\t\t\"turn\": 5,\r\n\t\t\t\t\t\"actions\": [\r\n\t\t\t\t\t\t\"buy\",\r\n\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\t\"type\": \"level\",\r\n\t\t\t\t\t\t\t\"param\": 3\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t]\r\n\t\t\t\t},\r\n\t\t\t\t{\r\n\t\t\t\t\t\"turn\": 6,\r\n\t\t\t\t\t\"actions\": [\"buy\", \"buy\", \"roll\", \"roll\"]\r\n\t\t\t\t},\r\n\t\t\t\t{\r\n\t\t\t\t\t\"turn\": 7,\r\n\t\t\t\t\t\"actions\": [\r\n\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\t\"type\": \"level\",\r\n\t\t\t\t\t\t\t\"param\": 4\r\n\t\t\t\t\t\t},\r\n\t\t\t\t\t\t\"roll\",\r\n\t\t\t\t\t\t\"buy\"\r\n\t\t\t\t\t]\r\n\t\t\t\t}\r\n\t\t\t]\r\n\t\t},\r\n\t\t{\r\n\t\t\t\"id\": \"fast-basic\",\r\n\t\t\t\"name\": \"Fast Basic Curve\",\r\n\t\t\t\"notes\": \"Stronger with a token start, turn 4 shop RNG weakness. No heropower requirement.\",\r\n\t\t\t\"steps\": [\r\n\t\t\t\t{\r\n\t\t\t\t\t\"turn\": 1,\r\n\t\t\t\t\t\"actions\": [\"buy\"]\r\n\t\t\t\t},\r\n\t\t\t\t{\r\n\t\t\t\t\t\"turn\": 2,\r\n\t\t\t\t\t\"actions\": [\r\n\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\t\"type\": \"level\",\r\n\t\t\t\t\t\t\t\"param\": 2\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t]\r\n\t\t\t\t},\r\n\t\t\t\t{\r\n\t\t\t\t\t\"turn\": 3,\r\n\t\t\t\t\t\"actions\": [\"sell\", \"buy\", \"buy\"]\r\n\t\t\t\t},\r\n\t\t\t\t{\r\n\t\t\t\t\t\"turn\": 4,\r\n\t\t\t\t\t\"actions\": [\"buy\", \"buy\"]\r\n\t\t\t\t},\r\n\t\t\t\t{\r\n\t\t\t\t\t\"turn\": 5,\r\n\t\t\t\t\t\"actions\": [\r\n\t\t\t\t\t\t\"buy\",\r\n\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\t\"type\": \"level\",\r\n\t\t\t\t\t\t\t\"param\": 3\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t]\r\n\t\t\t\t},\r\n\t\t\t\t{\r\n\t\t\t\t\t\"turn\": 6,\r\n\t\t\t\t\t\"actions\": [\r\n\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\t\"type\": \"level\",\r\n\t\t\t\t\t\t\t\"param\": 4\r\n\t\t\t\t\t\t},\r\n\t\t\t\t\t\t\"roll\"\r\n\t\t\t\t\t]\r\n\t\t\t\t}\r\n\t\t\t]\r\n\t\t},\r\n\t\t{\r\n\t\t\t\"id\": \"jeef\",\r\n\t\t\t\"name\": \"Jeef Curve\",\r\n\t\t\t\"notes\": \"Uses tier 1 economy and strong pairs for a flexible start to the game with its variations.\",\r\n\t\t\t\"steps\": [\r\n\t\t\t\t{\r\n\t\t\t\t\t\"turn\": 1,\r\n\t\t\t\t\t\"actions\": [\"buy\"]\r\n\t\t\t\t},\r\n\t\t\t\t{\r\n\t\t\t\t\t\"turn\": 2,\r\n\t\t\t\t\t\"actions\": [\"buy\", \"roll\"]\r\n\t\t\t\t},\r\n\t\t\t\t{\r\n\t\t\t\t\t\"turn\": 3,\r\n\t\t\t\t\t\"actions\": [\r\n\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\t\"type\": \"level\",\r\n\t\t\t\t\t\t\t\"param\": 2\r\n\t\t\t\t\t\t},\r\n\t\t\t\t\t\t\"buy\",\r\n\t\t\t\t\t\t\"sell\"\r\n\t\t\t\t\t]\r\n\t\t\t\t},\r\n\t\t\t\t{\r\n\t\t\t\t\t\"turn\": 4,\r\n\t\t\t\t\t\"actions\": [\r\n\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\t\"type\": \"level\",\r\n\t\t\t\t\t\t\t\"param\": 3\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t]\r\n\t\t\t\t},\r\n\t\t\t\t{\r\n\t\t\t\t\t\"turn\": 5,\r\n\t\t\t\t\t\"actions\": [\"buy\", \"buy\", \"roll\"]\r\n\t\t\t\t},\r\n\t\t\t\t{\r\n\t\t\t\t\t\"turn\": 6,\r\n\t\t\t\t\t\"actions\": [\r\n\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\t\"type\": \"level\",\r\n\t\t\t\t\t\t\t\"param\": 4\r\n\t\t\t\t\t\t},\r\n\t\t\t\t\t\t\"buy\",\r\n\t\t\t\t\t\t\"sell\"\r\n\t\t\t\t\t]\r\n\t\t\t\t}\r\n\t\t\t]\r\n\t\t},\r\n\t\t{\r\n\t\t\t\"id\": \"fast-jeef\",\r\n\t\t\t\"name\": \"Fast Jeef Curve\",\r\n\t\t\t\"notes\": \"Uses tier 1 economy and strong pairs for a flexible start to the game with its variations. Pushes levels quickly.\",\r\n\t\t\t\"steps\": [\r\n\t\t\t\t{\r\n\t\t\t\t\t\"turn\": 1,\r\n\t\t\t\t\t\"actions\": [\"buy\"]\r\n\t\t\t\t},\r\n\t\t\t\t{\r\n\t\t\t\t\t\"turn\": 2,\r\n\t\t\t\t\t\"actions\": [\"buy\", \"roll\"]\r\n\t\t\t\t},\r\n\t\t\t\t{\r\n\t\t\t\t\t\"turn\": 3,\r\n\t\t\t\t\t\"actions\": [\r\n\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\t\"type\": \"level\",\r\n\t\t\t\t\t\t\t\"param\": 2\r\n\t\t\t\t\t\t},\r\n\t\t\t\t\t\t\"buy\",\r\n\t\t\t\t\t\t\"sell\"\r\n\t\t\t\t\t]\r\n\t\t\t\t},\r\n\t\t\t\t{\r\n\t\t\t\t\t\"turn\": 4,\r\n\t\t\t\t\t\"actions\": [\r\n\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\t\"type\": \"level\",\r\n\t\t\t\t\t\t\t\"param\": 3\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t]\r\n\t\t\t\t},\r\n\t\t\t\t{\r\n\t\t\t\t\t\"turn\": 5,\r\n\t\t\t\t\t\"actions\": [\r\n\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\t\"type\": \"level\",\r\n\t\t\t\t\t\t\t\"param\": 4\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t]\r\n\t\t\t\t},\r\n\t\t\t\t{\r\n\t\t\t\t\t\"turn\": 6,\r\n\t\t\t\t\t\"actions\": [\"buy\", \"buy\", \"roll\", \"roll\"]\r\n\t\t\t\t}\r\n\t\t\t]\r\n\t\t},\r\n\t\t{\r\n\t\t\t\"id\": \"slow-jeef\",\r\n\t\t\t\"name\": \"Slow Jeef Curve\",\r\n\t\t\t\"notes\": \"Uses tier 1 economy and strong pairs for a flexible start to the game with its variations. Stays on tier 2 to solidify the board.\",\r\n\t\t\t\"steps\": [\r\n\t\t\t\t{\r\n\t\t\t\t\t\"turn\": 1,\r\n\t\t\t\t\t\"actions\": [\"buy\"]\r\n\t\t\t\t},\r\n\t\t\t\t{\r\n\t\t\t\t\t\"turn\": 2,\r\n\t\t\t\t\t\"actions\": [\"buy\", \"roll\"]\r\n\t\t\t\t},\r\n\t\t\t\t{\r\n\t\t\t\t\t\"turn\": 3,\r\n\t\t\t\t\t\"actions\": [\r\n\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\t\"type\": \"level\",\r\n\t\t\t\t\t\t\t\"param\": 2\r\n\t\t\t\t\t\t},\r\n\t\t\t\t\t\t\"buy\",\r\n\t\t\t\t\t\t\"sell\"\r\n\t\t\t\t\t]\r\n\t\t\t\t},\r\n\t\t\t\t{\r\n\t\t\t\t\t\"turn\": 4,\r\n\t\t\t\t\t\"actions\": [\"buy\", \"buy\"]\r\n\t\t\t\t},\r\n\t\t\t\t{\r\n\t\t\t\t\t\"turn\": 5,\r\n\t\t\t\t\t\"actions\": [\r\n\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\t\"type\": \"level\",\r\n\t\t\t\t\t\t\t\"param\": 3\r\n\t\t\t\t\t\t},\r\n\t\t\t\t\t\t\"buy\",\r\n\t\t\t\t\t\t\"sell\"\r\n\t\t\t\t\t]\r\n\t\t\t\t},\r\n\t\t\t\t{\r\n\t\t\t\t\t\"turn\": 6,\r\n\t\t\t\t\t\"actions\": [\r\n\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\t\"type\": \"level\",\r\n\t\t\t\t\t\t\t\"param\": 3\r\n\t\t\t\t\t\t},\r\n\t\t\t\t\t\t\"roll\"\r\n\t\t\t\t\t]\r\n\t\t\t\t}\r\n\t\t\t]\r\n\t\t},\r\n\t\t{\r\n\t\t\t\"id\": \"warrior\",\r\n\t\t\t\"name\": \"Warrior Curve\",\r\n\t\t\t\"notes\": \"A highly valueable line if tier 1 economy and forced triples are strong.\",\r\n\t\t\t\"steps\": [\r\n\t\t\t\t{\r\n\t\t\t\t\t\"turn\": 1,\r\n\t\t\t\t\t\"actions\": [\"buy\"]\r\n\t\t\t\t},\r\n\t\t\t\t{\r\n\t\t\t\t\t\"turn\": 2,\r\n\t\t\t\t\t\"actions\": [\"buy\", \"roll\"]\r\n\t\t\t\t},\r\n\t\t\t\t{\r\n\t\t\t\t\t\"turn\": 3,\r\n\t\t\t\t\t\"actions\": [\"buy\", \"sell\", \"buy\"]\r\n\t\t\t\t},\r\n\t\t\t\t{\r\n\t\t\t\t\t\"turn\": 4,\r\n\t\t\t\t\t\"actions\": [\"buy\", \"buy\"]\r\n\t\t\t\t},\r\n\t\t\t\t{\r\n\t\t\t\t\t\"turn\": 5,\r\n\t\t\t\t\t\"actions\": [\r\n\t\t\t\t\t\t\"sell\",\r\n\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\t\"type\": \"level\",\r\n\t\t\t\t\t\t\t\"param\": 2\r\n\t\t\t\t\t\t},\r\n\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\t\"type\": \"level\",\r\n\t\t\t\t\t\t\t\"param\": 3\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t]\r\n\t\t\t\t},\r\n\t\t\t\t{\r\n\t\t\t\t\t\"turn\": 6,\r\n\t\t\t\t\t\"actions\": [\r\n\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\t\"type\": \"level\",\r\n\t\t\t\t\t\t\t\"param\": 4\r\n\t\t\t\t\t\t},\r\n\t\t\t\t\t\t\"roll\"\r\n\t\t\t\t\t]\r\n\t\t\t\t}\r\n\t\t\t]\r\n\t\t},\r\n\t\t{\r\n\t\t\t\"id\": \"extended-warrior\",\r\n\t\t\t\"name\": \"Extended Warrior Curve\",\r\n\t\t\t\"notes\": \"A highly valueable line if tier 1 economy and forced triples are strong. This variant is a fallback option in case a triple hasn't shown up yet playing regular warrior curve.\",\r\n\t\t\t\"steps\": [\r\n\t\t\t\t{\r\n\t\t\t\t\t\"turn\": 1,\r\n\t\t\t\t\t\"actions\": [\"buy\"]\r\n\t\t\t\t},\r\n\t\t\t\t{\r\n\t\t\t\t\t\"turn\": 2,\r\n\t\t\t\t\t\"actions\": [\"buy\", \"roll\"]\r\n\t\t\t\t},\r\n\t\t\t\t{\r\n\t\t\t\t\t\"turn\": 3,\r\n\t\t\t\t\t\"actions\": [\"buy\", \"sell\", \"buy\"]\r\n\t\t\t\t},\r\n\t\t\t\t{\r\n\t\t\t\t\t\"turn\": 4,\r\n\t\t\t\t\t\"actions\": [\"buy\", \"buy\"]\r\n\t\t\t\t},\r\n\t\t\t\t{\r\n\t\t\t\t\t\"turn\": 5,\r\n\t\t\t\t\t\"actions\": [\"buy\", \"buy\", \"roll\"]\r\n\t\t\t\t},\r\n\t\t\t\t{\r\n\t\t\t\t\t\"turn\": 6,\r\n\t\t\t\t\t\"actions\": [\r\n\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\t\"type\": \"level\",\r\n\t\t\t\t\t\t\t\"param\": 2\r\n\t\t\t\t\t\t},\r\n\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\t\"type\": \"level\",\r\n\t\t\t\t\t\t\t\"param\": 3\r\n\t\t\t\t\t\t},\r\n\t\t\t\t\t\t\"roll\"\r\n\t\t\t\t\t]\r\n\t\t\t\t},\r\n\t\t\t\t{\r\n\t\t\t\t\t\"turn\": 7,\r\n\t\t\t\t\t\"actions\": [\r\n\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\t\"type\": \"level\",\r\n\t\t\t\t\t\t\t\"param\": 4\r\n\t\t\t\t\t\t},\r\n\t\t\t\t\t\t\"roll\"\r\n\t\t\t\t\t]\r\n\t\t\t\t}\r\n\t\t\t]\r\n\t\t},\r\n\t\t{\r\n\t\t\t\"id\": \"basic-yogg\",\r\n\t\t\t\"name\": \"Basic Yogg Curve\",\r\n\t\t\t\"notes\": \"Uses a 2-cost heropower to get to tier 3 faster.\",\r\n\t\t\t\"steps\": [\r\n\t\t\t\t{\r\n\t\t\t\t\t\"turn\": 1,\r\n\t\t\t\t\t\"actions\": [\"hero-power\", \"roll\"]\r\n\t\t\t\t},\r\n\t\t\t\t{\r\n\t\t\t\t\t\"turn\": 2,\r\n\t\t\t\t\t\"actions\": [\r\n\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\t\"type\": \"level\",\r\n\t\t\t\t\t\t\t\"param\": 2\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t]\r\n\t\t\t\t},\r\n\t\t\t\t{\r\n\t\t\t\t\t\"turn\": 3,\r\n\t\t\t\t\t\"actions\": [\"hero-power\", \"buy\"]\r\n\t\t\t\t},\r\n\t\t\t\t{\r\n\t\t\t\t\t\"turn\": 4,\r\n\t\t\t\t\t\"actions\": [\r\n\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\t\"type\": \"level\",\r\n\t\t\t\t\t\t\t\"param\": 3\r\n\t\t\t\t\t\t},\r\n\t\t\t\t\t\t\"sell\",\r\n\t\t\t\t\t\t\"hero-power\"\r\n\t\t\t\t\t]\r\n\t\t\t\t},\r\n\t\t\t\t{\r\n\t\t\t\t\t\"turn\": 5,\r\n\t\t\t\t\t\"actions\": [\"hero-power\", \"sell\", \"buy\", \"buy\"]\r\n\t\t\t\t},\r\n\t\t\t\t{\r\n\t\t\t\t\t\"turn\": 6,\r\n\t\t\t\t\t\"actions\": [\r\n\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\t\"type\": \"level\",\r\n\t\t\t\t\t\t\t\"param\": 4\r\n\t\t\t\t\t\t},\r\n\t\t\t\t\t\t\"hero-power\"\r\n\t\t\t\t\t]\r\n\t\t\t\t}\r\n\t\t\t]\r\n\t\t},\r\n\t\t{\r\n\t\t\t\"id\": \"aggro-yogg\",\r\n\t\t\t\"name\": \"Aggro Yogg Curve\",\r\n\t\t\t\"notes\": \"Uses a 2-cost heropower to get good tier 1s on board before leveling to 3 faster\",\r\n\t\t\t\"steps\": [\r\n\t\t\t\t{\r\n\t\t\t\t\t\"turn\": 1,\r\n\t\t\t\t\t\"actions\": [\"hero-power\", \"roll\"]\r\n\t\t\t\t},\r\n\t\t\t\t{\r\n\t\t\t\t\t\"turn\": 2,\r\n\t\t\t\t\t\"actions\": [\"buy\", \"sell\", \"hero-power\"]\r\n\t\t\t\t},\r\n\t\t\t\t{\r\n\t\t\t\t\t\"turn\": 3,\r\n\t\t\t\t\t\"actions\": [\r\n\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\t\"type\": \"level\",\r\n\t\t\t\t\t\t\t\"param\": 2\r\n\t\t\t\t\t\t},\r\n\t\t\t\t\t\t\"hero-power\"\r\n\t\t\t\t\t]\r\n\t\t\t\t},\r\n\t\t\t\t{\r\n\t\t\t\t\t\"turn\": 4,\r\n\t\t\t\t\t\"actions\": [\"hero-power\", \"roll\", \"buy\"]\r\n\t\t\t\t},\r\n\t\t\t\t{\r\n\t\t\t\t\t\"turn\": 5,\r\n\t\t\t\t\t\"actions\": [\r\n\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\t\"type\": \"level\",\r\n\t\t\t\t\t\t\t\"param\": 3\r\n\t\t\t\t\t\t},\r\n\t\t\t\t\t\t\"hero-power\"\r\n\t\t\t\t\t]\r\n\t\t\t\t},\r\n\t\t\t\t{\r\n\t\t\t\t\t\"turn\": 6,\r\n\t\t\t\t\t\"actions\": [\r\n\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\t\"type\": \"level\",\r\n\t\t\t\t\t\t\t\"param\": 4\r\n\t\t\t\t\t\t},\r\n\t\t\t\t\t\t\"hero-power\"\r\n\t\t\t\t\t]\r\n\t\t\t\t}\r\n\t\t\t]\r\n\t\t},\r\n\t\t{\r\n\t\t\t\"id\": \"rafaam\",\r\n\t\t\t\"name\": \"Rafaam Curve\",\r\n\t\t\t\"notes\": \"Clean leveling using 1-cost heropower, 2-cost heropower with economy, or tavern tippers\",\r\n\t\t\t\"steps\": [\r\n\t\t\t\t{\r\n\t\t\t\t\t\"turn\": 1,\r\n\t\t\t\t\t\"actions\": [\"buy\"]\r\n\t\t\t\t},\r\n\t\t\t\t{\r\n\t\t\t\t\t\"turn\": 2,\r\n\t\t\t\t\t\"actions\": [\"buy\", \"hero-power\"]\r\n\t\t\t\t},\r\n\t\t\t\t{\r\n\t\t\t\t\t\"turn\": 3,\r\n\t\t\t\t\t\"actions\": [\"buy\", \"roll\", \"hero-power\"]\r\n\t\t\t\t},\r\n\t\t\t\t{\r\n\t\t\t\t\t\"turn\": 4,\r\n\t\t\t\t\t\"actions\": [\r\n\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\t\"type\": \"level\",\r\n\t\t\t\t\t\t\t\"param\": 2\r\n\t\t\t\t\t\t},\r\n\t\t\t\t\t\t\"buy\",\r\n\t\t\t\t\t\t\"hero-power\"\r\n\t\t\t\t\t]\r\n\t\t\t\t},\r\n\t\t\t\t{\r\n\t\t\t\t\t\"turn\": 5,\r\n\t\t\t\t\t\"actions\": [\r\n\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\t\"type\": \"level\",\r\n\t\t\t\t\t\t\t\"param\": 3\r\n\t\t\t\t\t\t},\r\n\t\t\t\t\t\t\"hero-power\"\r\n\t\t\t\t\t]\r\n\t\t\t\t},\r\n\t\t\t\t{\r\n\t\t\t\t\t\"turn\": 6,\r\n\t\t\t\t\t\"actions\": [\r\n\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\t\"type\": \"level\",\r\n\t\t\t\t\t\t\t\"param\": 4\r\n\t\t\t\t\t\t},\r\n\t\t\t\t\t\t\"hero-power\"\r\n\t\t\t\t\t]\r\n\t\t\t\t}\r\n\t\t\t]\r\n\t\t},\r\n\t\t{\r\n\t\t\t\"id\": \"slow-rafaam\",\r\n\t\t\t\"name\": \"Slow Rafaam Curve\",\r\n\t\t\t\"notes\": \"Clean leveling using 1-cost heropower, 2-cost heropower with economy, or tavern tippers. Cut off on tier 2 to get stronger\",\r\n\t\t\t\"steps\": [\r\n\t\t\t\t{\r\n\t\t\t\t\t\"turn\": 1,\r\n\t\t\t\t\t\"actions\": [\"buy\"]\r\n\t\t\t\t},\r\n\t\t\t\t{\r\n\t\t\t\t\t\"turn\": 2,\r\n\t\t\t\t\t\"actions\": [\"buy\", \"hero-power\"]\r\n\t\t\t\t},\r\n\t\t\t\t{\r\n\t\t\t\t\t\"turn\": 3,\r\n\t\t\t\t\t\"actions\": [\"buy\", \"roll\", \"hero-power\"]\r\n\t\t\t\t},\r\n\t\t\t\t{\r\n\t\t\t\t\t\"turn\": 4,\r\n\t\t\t\t\t\"actions\": [\r\n\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\t\"type\": \"level\",\r\n\t\t\t\t\t\t\t\"param\": 2\r\n\t\t\t\t\t\t},\r\n\t\t\t\t\t\t\"buy\",\r\n\t\t\t\t\t\t\"hero-power\"\r\n\t\t\t\t\t]\r\n\t\t\t\t},\r\n\t\t\t\t{\r\n\t\t\t\t\t\"turn\": 5,\r\n\t\t\t\t\t\"actions\": [\"buy\", \"buy\", \"hero-power\"]\r\n\t\t\t\t},\r\n\t\t\t\t{\r\n\t\t\t\t\t\"turn\": 6,\r\n\t\t\t\t\t\"actions\": [\r\n\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\t\"type\": \"level\",\r\n\t\t\t\t\t\t\t\"param\": 3\r\n\t\t\t\t\t\t},\r\n\t\t\t\t\t\t\"buy\"\r\n\t\t\t\t\t]\r\n\t\t\t\t},\r\n\t\t\t\t{\r\n\t\t\t\t\t\"turn\": 7,\r\n\t\t\t\t\t\"actions\": [\r\n\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\t\"type\": \"level\",\r\n\t\t\t\t\t\t\t\"param\": 4\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t]\r\n\t\t\t\t}\r\n\t\t\t]\r\n\t\t},\r\n\t\t{\r\n\t\t\t\"id\": \"3-on-3\",\r\n\t\t\t\"name\": \"3 on 3 (Level on 8)\",\r\n\t\t\t\"notes\": \"Sacrifices early health to get very fast access to tier 3 minions, then pushes levels\",\r\n\t\t\t\"steps\": [\r\n\t\t\t\t{\r\n\t\t\t\t\t\"turn\": 1,\r\n\t\t\t\t\t\"actions\": [\"buy\"]\r\n\t\t\t\t},\r\n\t\t\t\t{\r\n\t\t\t\t\t\"turn\": 2,\r\n\t\t\t\t\t\"actions\": [\r\n\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\t\"type\": \"level\",\r\n\t\t\t\t\t\t\t\"param\": 2\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t]\r\n\t\t\t\t},\r\n\t\t\t\t{\r\n\t\t\t\t\t\"turn\": 3,\r\n\t\t\t\t\t\"actions\": [\r\n\t\t\t\t\t\t\"sell\",\r\n\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\t\"type\": \"level\",\r\n\t\t\t\t\t\t\t\"param\": 3\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t]\r\n\t\t\t\t},\r\n\t\t\t\t{\r\n\t\t\t\t\t\"turn\": 4,\r\n\t\t\t\t\t\"actions\": [\"buy\", \"buy\"]\r\n\t\t\t\t},\r\n\t\t\t\t{\r\n\t\t\t\t\t\"turn\": 5,\r\n\t\t\t\t\t\"actions\": [\"buy\", \"buy\", \"roll\"]\r\n\t\t\t\t},\r\n\t\t\t\t{\r\n\t\t\t\t\t\"turn\": 6,\r\n\t\t\t\t\t\"actions\": [\r\n\t\t\t\t\t\t\"buy\",\r\n\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\t\"type\": \"level\",\r\n\t\t\t\t\t\t\t\"param\": 4\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t]\r\n\t\t\t\t},\r\n\t\t\t\t{\r\n\t\t\t\t\t\"turn\": 7,\r\n\t\t\t\t\t\"actions\": [\"buy\", \"buy\", \"roll\", \"roll\", \"roll\"]\r\n\t\t\t\t}\r\n\t\t\t]\r\n\t\t},\r\n\t\t{\r\n\t\t\t\"id\": \"3-on-3-bis\",\r\n\t\t\t\"name\": \"3 on 3 (Level on 9)\",\r\n\t\t\t\"notes\": \"Sacrifices early health to fill the board with tier 3 minions\",\r\n\t\t\t\"steps\": [\r\n\t\t\t\t{\r\n\t\t\t\t\t\"turn\": 1,\r\n\t\t\t\t\t\"actions\": [\"buy\"]\r\n\t\t\t\t},\r\n\t\t\t\t{\r\n\t\t\t\t\t\"turn\": 2,\r\n\t\t\t\t\t\"actions\": [\r\n\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\t\"type\": \"level\",\r\n\t\t\t\t\t\t\t\"param\": 2\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t]\r\n\t\t\t\t},\r\n\t\t\t\t{\r\n\t\t\t\t\t\"turn\": 3,\r\n\t\t\t\t\t\"actions\": [\r\n\t\t\t\t\t\t\"sell\",\r\n\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\t\"type\": \"level\",\r\n\t\t\t\t\t\t\t\"param\": 3\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t]\r\n\t\t\t\t},\r\n\t\t\t\t{\r\n\t\t\t\t\t\"turn\": 4,\r\n\t\t\t\t\t\"actions\": [\"buy\", \"buy\"]\r\n\t\t\t\t},\r\n\t\t\t\t{\r\n\t\t\t\t\t\"turn\": 5,\r\n\t\t\t\t\t\"actions\": [\"buy\", \"buy\", \"roll\"]\r\n\t\t\t\t},\r\n\t\t\t\t{\r\n\t\t\t\t\t\"turn\": 6,\r\n\t\t\t\t\t\"actions\": [\"buy\", \"buy\", \"roll\", \"roll\"]\r\n\t\t\t\t},\r\n\t\t\t\t{\r\n\t\t\t\t\t\"turn\": 7,\r\n\t\t\t\t\t\"actions\": [\r\n\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\t\"type\": \"level\",\r\n\t\t\t\t\t\t\t\"param\": 4\r\n\t\t\t\t\t\t},\r\n\t\t\t\t\t\t\"roll\",\r\n\t\t\t\t\t\t\"roll\",\r\n\t\t\t\t\t\t\"buy\"\r\n\t\t\t\t\t]\r\n\t\t\t\t}\r\n\t\t\t]\r\n\t\t},\r\n\t\t{\r\n\t\t\t\"id\": \"4-on-4\",\r\n\t\t\t\"name\": \"4 on 4\",\r\n\t\t\t\"notes\": \"Sacrifices early health to get very fast access to tier 3 minions. A fallback option in case of a bad shop after 3 on 3; requires economy\",\r\n\t\t\t\"steps\": [\r\n\t\t\t\t{\r\n\t\t\t\t\t\"turn\": 1,\r\n\t\t\t\t\t\"actions\": [\"buy-token\"]\r\n\t\t\t\t},\r\n\t\t\t\t{\r\n\t\t\t\t\t\"turn\": 2,\r\n\t\t\t\t\t\"actions\": [\r\n\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\t\"type\": \"level\",\r\n\t\t\t\t\t\t\t\"param\": 2\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t]\r\n\t\t\t\t},\r\n\t\t\t\t{\r\n\t\t\t\t\t\"turn\": 3,\r\n\t\t\t\t\t\"actions\": [\r\n\t\t\t\t\t\t\"sell\",\r\n\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\t\"type\": \"level\",\r\n\t\t\t\t\t\t\t\"param\": 3\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t]\r\n\t\t\t\t},\r\n\t\t\t\t{\r\n\t\t\t\t\t\"turn\": 4,\r\n\t\t\t\t\t\"actions\": [\r\n\t\t\t\t\t\t\"sell\",\r\n\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\t\"type\": \"level\",\r\n\t\t\t\t\t\t\t\"param\": 4\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t]\r\n\t\t\t\t},\r\n\t\t\t\t{\r\n\t\t\t\t\t\"turn\": 5,\r\n\t\t\t\t\t\"actions\": [\"buy\", \"buy\", \"roll\"]\r\n\t\t\t\t},\r\n\t\t\t\t{\r\n\t\t\t\t\t\"turn\": 6,\r\n\t\t\t\t\t\"actions\": [\"buy\", \"buy\", \"roll\", \"roll\"]\r\n\t\t\t\t},\r\n\t\t\t\t{\r\n\t\t\t\t\t\"turn\": 7,\r\n\t\t\t\t\t\"actions\": [\"buy\", \"buy\", \"roll\", \"roll\", \"roll\"]\r\n\t\t\t\t}\r\n\t\t\t]\r\n\t\t},\r\n\t\t{\r\n\t\t\t\"id\": \"toki\",\r\n\t\t\t\"name\": \"Toki Curve\",\r\n\t\t\t\"notes\": \"A way to use 1 cost heropowers that don't provide tempo\",\r\n\t\t\t\"steps\": [\r\n\t\t\t\t{\r\n\t\t\t\t\t\"turn\": 1,\r\n\t\t\t\t\t\"actions\": [\"buy-token\"]\r\n\t\t\t\t},\r\n\t\t\t\t{\r\n\t\t\t\t\t\"turn\": 2,\r\n\t\t\t\t\t\"actions\": [\r\n\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\t\"type\": \"level\",\r\n\t\t\t\t\t\t\t\"param\": 2\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t]\r\n\t\t\t\t},\r\n\t\t\t\t{\r\n\t\t\t\t\t\"turn\": 3,\r\n\t\t\t\t\t\"actions\": [\"sell\", \"buy\", \"buy\"]\r\n\t\t\t\t},\r\n\t\t\t\t{\r\n\t\t\t\t\t\"turn\": 4,\r\n\t\t\t\t\t\"actions\": [\r\n\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\t\"type\": \"level\",\r\n\t\t\t\t\t\t\t\"param\": 3\r\n\t\t\t\t\t\t},\r\n\t\t\t\t\t\t\"hero-power\"\r\n\t\t\t\t\t]\r\n\t\t\t\t},\r\n\t\t\t\t{\r\n\t\t\t\t\t\"turn\": 5,\r\n\t\t\t\t\t\"actions\": [\"hero-power\", \"buy\", \"buy\"]\r\n\t\t\t\t},\r\n\t\t\t\t{\r\n\t\t\t\t\t\"turn\": 6,\r\n\t\t\t\t\t\"actions\": [\"roll\", \"buy\", \"roll\", \"buy\"]\r\n\t\t\t\t},\r\n\t\t\t\t{\r\n\t\t\t\t\t\"turn\": 7,\r\n\t\t\t\t\t\"actions\": [\r\n\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\t\"type\": \"level\",\r\n\t\t\t\t\t\t\t\"param\": 7\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t]\r\n\t\t\t\t}\r\n\t\t\t]\r\n\t\t},\r\n\t\t{\r\n\t\t\t\"id\": \"pocky\",\r\n\t\t\t\"name\": \"Pocky Curve\",\r\n\t\t\t\"notes\": \"A very niche use for 1 cost heropowers\",\r\n\t\t\t\"steps\": [\r\n\t\t\t\t{\r\n\t\t\t\t\t\"turn\": 1,\r\n\t\t\t\t\t\"actions\": [\"buy-token\"]\r\n\t\t\t\t},\r\n\t\t\t\t{\r\n\t\t\t\t\t\"turn\": 2,\r\n\t\t\t\t\t\"actions\": [\r\n\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\t\"type\": \"level\",\r\n\t\t\t\t\t\t\t\"param\": 2\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t]\r\n\t\t\t\t},\r\n\t\t\t\t{\r\n\t\t\t\t\t\"turn\": 3,\r\n\t\t\t\t\t\"actions\": [\"buy\", \"hero-power\", \"roll\"]\r\n\t\t\t\t},\r\n\t\t\t\t{\r\n\t\t\t\t\t\"turn\": 4,\r\n\t\t\t\t\t\"actions\": [\r\n\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\t\"type\": \"level\",\r\n\t\t\t\t\t\t\t\"param\": 3\r\n\t\t\t\t\t\t},\r\n\t\t\t\t\t\t\"sell\",\r\n\t\t\t\t\t\t\"hero-power\"\r\n\t\t\t\t\t]\r\n\t\t\t\t},\r\n\t\t\t\t{\r\n\t\t\t\t\t\"turn\": 5,\r\n\t\t\t\t\t\"actions\": [\"buy\", \"buy\", \"hero-power\"]\r\n\t\t\t\t},\r\n\t\t\t\t{\r\n\t\t\t\t\t\"turn\": 6,\r\n\t\t\t\t\t\"actions\": [\r\n\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\t\"type\": \"level\",\r\n\t\t\t\t\t\t\t\"param\": 4\r\n\t\t\t\t\t\t},\r\n\t\t\t\t\t\t\"roll\",\r\n\t\t\t\t\t\t\"buy\"\r\n\t\t\t\t\t]\r\n\t\t\t\t}\r\n\t\t\t]\r\n\t\t}\r\n\t]\r\n`;\r\n"]}
1
+ {"version":3,"file":"bgs-heroes.js","sourceRoot":"","sources":["../../src/types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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA2yBpB,CAAC","sourcesContent":["/* eslint-disable no-extra-boolean-cast */\r\nimport { PatchInfo, S3 } from '@firestone-hs/aws-lambda-utils';\r\nimport { AllCardsService } from '@firestone-hs/reference-data';\r\nimport { gzipSync } from 'zlib';\r\nimport { Input } from '../input-model';\r\nimport { deepEqual } from '../utils';\r\n\r\nconst bucket = 'static.zerotoheroes.com';\r\nconst fileKey = 'hearthstone/data/battlegrounds-strategies/bgs-hero-strategies.gz.json';\r\n\r\nexport const processBgsHero = async (input: Input, bgPatch: PatchInfo, allCards: AllCardsService) => {\r\n\tconst author = input.author;\r\n\tconsole.debug('processing', author);\r\n\tconst existing = await loadExistingInfo();\r\n\tconst result = existing.heroes;\r\n\t// console.debug('loaded existing info');\r\n\tfor (const cardTip of input.data) {\r\n\t\t// console.debug('processing card', cardTip.cardId);\r\n\t\tlet existingCardTip = result.find((t) => t.cardId === cardTip.cardId);\r\n\t\tif (!existingCardTip) {\r\n\t\t\texistingCardTip = {\r\n\t\t\t\tcardId: cardTip.cardId,\r\n\t\t\t\tname: allCards.getCard(cardTip.cardId)?.name,\r\n\t\t\t\ttips: [],\r\n\t\t\t};\r\n\t\t\tresult.push(existingCardTip);\r\n\t\t}\r\n\t\tif (!!cardTip.tip?.trim()?.length) {\r\n\t\t\tlet existingTip = existingCardTip.tips.find((t) => t.author === author);\r\n\t\t\tif (!existingTip) {\r\n\t\t\t\texistingTip = {\r\n\t\t\t\t\tauthor: author,\r\n\t\t\t\t} as CardTip;\r\n\t\t\t\texistingCardTip.tips.push(existingTip);\r\n\t\t\t}\r\n\t\t\texistingTip.language = 'enUS';\r\n\t\t\tif (\r\n\t\t\t\t!deepEqual(existingTip.summary, cardTip.tip) ||\r\n\t\t\t\t(cardTip.patchNumber && existingTip.patch !== cardTip.patchNumber)\r\n\t\t\t) {\r\n\t\t\t\texistingTip.summary = cardTip.tip;\r\n\t\t\t\texistingTip.date = new Date().toISOString().substring(0, 10);\r\n\t\t\t\texistingTip.patch = bgPatch.number;\r\n\t\t\t}\r\n\t\t} else {\r\n\t\t\texistingCardTip.tips = existingCardTip.tips.filter((t) => t.author !== author);\r\n\t\t}\r\n\t}\r\n\tconsole.debug('built aggregated tips', result);\r\n\tawait saveInfo({\r\n\t\theroes: result,\r\n\t\tcurves: existing.curves,\r\n\t});\r\n\tconsole.debug('saved aggregated tips');\r\n};\r\n\r\nconst loadExistingInfo = async (): Promise<{ heroes: CardItem[]; curves: any[] }> => {\r\n\tconst s3 = new S3();\r\n\t// console.debug('created s3');\r\n\tconst asString = await s3.readGzipContent(bucket, fileKey, 5);\r\n\t// console.debug('loaded existing info', asString?.length);\r\n\tif (!asString) {\r\n\t\treturn { heroes: [], curves: JSON.parse(curvesString) };\r\n\t}\r\n\treturn JSON.parse(asString);\r\n};\r\n\r\nconst saveInfo = async (info: { heroes: CardItem[]; curves: any[] }) => {\r\n\tconst s3 = new S3();\r\n\tawait s3.writeFile(gzipSync(JSON.stringify(info)), bucket, fileKey, 'application/json', 'gzip');\r\n};\r\n\r\ninterface CardItem {\r\n\tcardId: string;\r\n\tname: string;\r\n\ttips: CardTip[];\r\n}\r\ninterface CardTip {\r\n\tsummary: string;\r\n\tauthor: string;\r\n\tlanguage: string;\r\n\tpatch: number;\r\n\tdate: string;\r\n}\r\n\r\nconst curvesString = `\r\n[\r\n\t\t{\r\n\t\t\t\"id\": \"basic\",\r\n\t\t\t\"name\": \"Basic Curve\",\r\n\t\t\t\"notes\": \"Stronger with a token start, turn 4 shop RNG weakness. No heropower requirement.\",\r\n\t\t\t\"steps\": [\r\n\t\t\t\t{\r\n\t\t\t\t\t\"turn\": 1,\r\n\t\t\t\t\t\"actions\": [\"buy\"]\r\n\t\t\t\t},\r\n\t\t\t\t{\r\n\t\t\t\t\t\"turn\": 2,\r\n\t\t\t\t\t\"actions\": [\r\n\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\t\"type\": \"level\",\r\n\t\t\t\t\t\t\t\"param\": 2\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t]\r\n\t\t\t\t},\r\n\t\t\t\t{\r\n\t\t\t\t\t\"turn\": 3,\r\n\t\t\t\t\t\"actions\": [\"sell\", \"buy\", \"buy\"]\r\n\t\t\t\t},\r\n\t\t\t\t{\r\n\t\t\t\t\t\"turn\": 4,\r\n\t\t\t\t\t\"actions\": [\"buy\", \"buy\"]\r\n\t\t\t\t},\r\n\t\t\t\t{\r\n\t\t\t\t\t\"turn\": 5,\r\n\t\t\t\t\t\"actions\": [\r\n\t\t\t\t\t\t\"buy\",\r\n\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\t\"type\": \"level\",\r\n\t\t\t\t\t\t\t\"param\": 3\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t]\r\n\t\t\t\t},\r\n\t\t\t\t{\r\n\t\t\t\t\t\"turn\": 6,\r\n\t\t\t\t\t\"actions\": [\"buy\", \"buy\", \"roll\", \"roll\"]\r\n\t\t\t\t},\r\n\t\t\t\t{\r\n\t\t\t\t\t\"turn\": 7,\r\n\t\t\t\t\t\"actions\": [\r\n\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\t\"type\": \"level\",\r\n\t\t\t\t\t\t\t\"param\": 4\r\n\t\t\t\t\t\t},\r\n\t\t\t\t\t\t\"roll\",\r\n\t\t\t\t\t\t\"buy\"\r\n\t\t\t\t\t]\r\n\t\t\t\t}\r\n\t\t\t]\r\n\t\t},\r\n\t\t{\r\n\t\t\t\"id\": \"fast-basic\",\r\n\t\t\t\"name\": \"Fast Basic Curve\",\r\n\t\t\t\"notes\": \"Stronger with a token start, turn 4 shop RNG weakness. No heropower requirement.\",\r\n\t\t\t\"steps\": [\r\n\t\t\t\t{\r\n\t\t\t\t\t\"turn\": 1,\r\n\t\t\t\t\t\"actions\": [\"buy\"]\r\n\t\t\t\t},\r\n\t\t\t\t{\r\n\t\t\t\t\t\"turn\": 2,\r\n\t\t\t\t\t\"actions\": [\r\n\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\t\"type\": \"level\",\r\n\t\t\t\t\t\t\t\"param\": 2\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t]\r\n\t\t\t\t},\r\n\t\t\t\t{\r\n\t\t\t\t\t\"turn\": 3,\r\n\t\t\t\t\t\"actions\": [\"sell\", \"buy\", \"buy\"]\r\n\t\t\t\t},\r\n\t\t\t\t{\r\n\t\t\t\t\t\"turn\": 4,\r\n\t\t\t\t\t\"actions\": [\"buy\", \"buy\"]\r\n\t\t\t\t},\r\n\t\t\t\t{\r\n\t\t\t\t\t\"turn\": 5,\r\n\t\t\t\t\t\"actions\": [\r\n\t\t\t\t\t\t\"buy\",\r\n\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\t\"type\": \"level\",\r\n\t\t\t\t\t\t\t\"param\": 3\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t]\r\n\t\t\t\t},\r\n\t\t\t\t{\r\n\t\t\t\t\t\"turn\": 6,\r\n\t\t\t\t\t\"actions\": [\r\n\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\t\"type\": \"level\",\r\n\t\t\t\t\t\t\t\"param\": 4\r\n\t\t\t\t\t\t},\r\n\t\t\t\t\t\t\"roll\"\r\n\t\t\t\t\t]\r\n\t\t\t\t}\r\n\t\t\t]\r\n\t\t},\r\n\t\t{\r\n\t\t\t\"id\": \"jeef\",\r\n\t\t\t\"name\": \"Jeef Curve\",\r\n\t\t\t\"notes\": \"Uses tier 1 economy and strong pairs for a flexible start to the game with its variations.\",\r\n\t\t\t\"steps\": [\r\n\t\t\t\t{\r\n\t\t\t\t\t\"turn\": 1,\r\n\t\t\t\t\t\"actions\": [\"buy\"]\r\n\t\t\t\t},\r\n\t\t\t\t{\r\n\t\t\t\t\t\"turn\": 2,\r\n\t\t\t\t\t\"actions\": [\"buy\", \"roll\"]\r\n\t\t\t\t},\r\n\t\t\t\t{\r\n\t\t\t\t\t\"turn\": 3,\r\n\t\t\t\t\t\"actions\": [\r\n\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\t\"type\": \"level\",\r\n\t\t\t\t\t\t\t\"param\": 2\r\n\t\t\t\t\t\t},\r\n\t\t\t\t\t\t\"buy\",\r\n\t\t\t\t\t\t\"sell\"\r\n\t\t\t\t\t]\r\n\t\t\t\t},\r\n\t\t\t\t{\r\n\t\t\t\t\t\"turn\": 4,\r\n\t\t\t\t\t\"actions\": [\r\n\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\t\"type\": \"level\",\r\n\t\t\t\t\t\t\t\"param\": 3\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t]\r\n\t\t\t\t},\r\n\t\t\t\t{\r\n\t\t\t\t\t\"turn\": 5,\r\n\t\t\t\t\t\"actions\": [\"buy\", \"buy\", \"roll\"]\r\n\t\t\t\t},\r\n\t\t\t\t{\r\n\t\t\t\t\t\"turn\": 6,\r\n\t\t\t\t\t\"actions\": [\r\n\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\t\"type\": \"level\",\r\n\t\t\t\t\t\t\t\"param\": 4\r\n\t\t\t\t\t\t},\r\n\t\t\t\t\t\t\"buy\",\r\n\t\t\t\t\t\t\"sell\"\r\n\t\t\t\t\t]\r\n\t\t\t\t}\r\n\t\t\t]\r\n\t\t},\r\n\t\t{\r\n\t\t\t\"id\": \"fast-jeef\",\r\n\t\t\t\"name\": \"Fast Jeef Curve\",\r\n\t\t\t\"notes\": \"Uses tier 1 economy and strong pairs for a flexible start to the game with its variations. Pushes levels quickly.\",\r\n\t\t\t\"steps\": [\r\n\t\t\t\t{\r\n\t\t\t\t\t\"turn\": 1,\r\n\t\t\t\t\t\"actions\": [\"buy\"]\r\n\t\t\t\t},\r\n\t\t\t\t{\r\n\t\t\t\t\t\"turn\": 2,\r\n\t\t\t\t\t\"actions\": [\"buy\", \"roll\"]\r\n\t\t\t\t},\r\n\t\t\t\t{\r\n\t\t\t\t\t\"turn\": 3,\r\n\t\t\t\t\t\"actions\": [\r\n\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\t\"type\": \"level\",\r\n\t\t\t\t\t\t\t\"param\": 2\r\n\t\t\t\t\t\t},\r\n\t\t\t\t\t\t\"buy\",\r\n\t\t\t\t\t\t\"sell\"\r\n\t\t\t\t\t]\r\n\t\t\t\t},\r\n\t\t\t\t{\r\n\t\t\t\t\t\"turn\": 4,\r\n\t\t\t\t\t\"actions\": [\r\n\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\t\"type\": \"level\",\r\n\t\t\t\t\t\t\t\"param\": 3\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t]\r\n\t\t\t\t},\r\n\t\t\t\t{\r\n\t\t\t\t\t\"turn\": 5,\r\n\t\t\t\t\t\"actions\": [\r\n\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\t\"type\": \"level\",\r\n\t\t\t\t\t\t\t\"param\": 4\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t]\r\n\t\t\t\t},\r\n\t\t\t\t{\r\n\t\t\t\t\t\"turn\": 6,\r\n\t\t\t\t\t\"actions\": [\"buy\", \"buy\", \"roll\", \"roll\"]\r\n\t\t\t\t}\r\n\t\t\t]\r\n\t\t},\r\n\t\t{\r\n\t\t\t\"id\": \"slow-jeef\",\r\n\t\t\t\"name\": \"Slow Jeef Curve\",\r\n\t\t\t\"notes\": \"Uses tier 1 economy and strong pairs for a flexible start to the game with its variations. Stays on tier 2 to solidify the board.\",\r\n\t\t\t\"steps\": [\r\n\t\t\t\t{\r\n\t\t\t\t\t\"turn\": 1,\r\n\t\t\t\t\t\"actions\": [\"buy\"]\r\n\t\t\t\t},\r\n\t\t\t\t{\r\n\t\t\t\t\t\"turn\": 2,\r\n\t\t\t\t\t\"actions\": [\"buy\", \"roll\"]\r\n\t\t\t\t},\r\n\t\t\t\t{\r\n\t\t\t\t\t\"turn\": 3,\r\n\t\t\t\t\t\"actions\": [\r\n\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\t\"type\": \"level\",\r\n\t\t\t\t\t\t\t\"param\": 2\r\n\t\t\t\t\t\t},\r\n\t\t\t\t\t\t\"buy\",\r\n\t\t\t\t\t\t\"sell\"\r\n\t\t\t\t\t]\r\n\t\t\t\t},\r\n\t\t\t\t{\r\n\t\t\t\t\t\"turn\": 4,\r\n\t\t\t\t\t\"actions\": [\"buy\", \"buy\"]\r\n\t\t\t\t},\r\n\t\t\t\t{\r\n\t\t\t\t\t\"turn\": 5,\r\n\t\t\t\t\t\"actions\": [\r\n\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\t\"type\": \"level\",\r\n\t\t\t\t\t\t\t\"param\": 3\r\n\t\t\t\t\t\t},\r\n\t\t\t\t\t\t\"buy\",\r\n\t\t\t\t\t\t\"sell\"\r\n\t\t\t\t\t]\r\n\t\t\t\t},\r\n\t\t\t\t{\r\n\t\t\t\t\t\"turn\": 6,\r\n\t\t\t\t\t\"actions\": [\r\n\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\t\"type\": \"level\",\r\n\t\t\t\t\t\t\t\"param\": 3\r\n\t\t\t\t\t\t},\r\n\t\t\t\t\t\t\"roll\"\r\n\t\t\t\t\t]\r\n\t\t\t\t}\r\n\t\t\t]\r\n\t\t},\r\n\t\t{\r\n\t\t\t\"id\": \"warrior\",\r\n\t\t\t\"name\": \"Warrior Curve\",\r\n\t\t\t\"notes\": \"A highly valueable line if tier 1 economy and forced triples are strong.\",\r\n\t\t\t\"steps\": [\r\n\t\t\t\t{\r\n\t\t\t\t\t\"turn\": 1,\r\n\t\t\t\t\t\"actions\": [\"buy\"]\r\n\t\t\t\t},\r\n\t\t\t\t{\r\n\t\t\t\t\t\"turn\": 2,\r\n\t\t\t\t\t\"actions\": [\"buy\", \"roll\"]\r\n\t\t\t\t},\r\n\t\t\t\t{\r\n\t\t\t\t\t\"turn\": 3,\r\n\t\t\t\t\t\"actions\": [\"buy\", \"sell\", \"buy\"]\r\n\t\t\t\t},\r\n\t\t\t\t{\r\n\t\t\t\t\t\"turn\": 4,\r\n\t\t\t\t\t\"actions\": [\"buy\", \"buy\"]\r\n\t\t\t\t},\r\n\t\t\t\t{\r\n\t\t\t\t\t\"turn\": 5,\r\n\t\t\t\t\t\"actions\": [\r\n\t\t\t\t\t\t\"sell\",\r\n\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\t\"type\": \"level\",\r\n\t\t\t\t\t\t\t\"param\": 2\r\n\t\t\t\t\t\t},\r\n\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\t\"type\": \"level\",\r\n\t\t\t\t\t\t\t\"param\": 3\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t]\r\n\t\t\t\t},\r\n\t\t\t\t{\r\n\t\t\t\t\t\"turn\": 6,\r\n\t\t\t\t\t\"actions\": [\r\n\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\t\"type\": \"level\",\r\n\t\t\t\t\t\t\t\"param\": 4\r\n\t\t\t\t\t\t},\r\n\t\t\t\t\t\t\"roll\"\r\n\t\t\t\t\t]\r\n\t\t\t\t}\r\n\t\t\t]\r\n\t\t},\r\n\t\t{\r\n\t\t\t\"id\": \"extended-warrior\",\r\n\t\t\t\"name\": \"Extended Warrior Curve\",\r\n\t\t\t\"notes\": \"A highly valueable line if tier 1 economy and forced triples are strong. This variant is a fallback option in case a triple hasn't shown up yet playing regular warrior curve.\",\r\n\t\t\t\"steps\": [\r\n\t\t\t\t{\r\n\t\t\t\t\t\"turn\": 1,\r\n\t\t\t\t\t\"actions\": [\"buy\"]\r\n\t\t\t\t},\r\n\t\t\t\t{\r\n\t\t\t\t\t\"turn\": 2,\r\n\t\t\t\t\t\"actions\": [\"buy\", \"roll\"]\r\n\t\t\t\t},\r\n\t\t\t\t{\r\n\t\t\t\t\t\"turn\": 3,\r\n\t\t\t\t\t\"actions\": [\"buy\", \"sell\", \"buy\"]\r\n\t\t\t\t},\r\n\t\t\t\t{\r\n\t\t\t\t\t\"turn\": 4,\r\n\t\t\t\t\t\"actions\": [\"buy\", \"buy\"]\r\n\t\t\t\t},\r\n\t\t\t\t{\r\n\t\t\t\t\t\"turn\": 5,\r\n\t\t\t\t\t\"actions\": [\"buy\", \"buy\", \"roll\"]\r\n\t\t\t\t},\r\n\t\t\t\t{\r\n\t\t\t\t\t\"turn\": 6,\r\n\t\t\t\t\t\"actions\": [\r\n\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\t\"type\": \"level\",\r\n\t\t\t\t\t\t\t\"param\": 2\r\n\t\t\t\t\t\t},\r\n\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\t\"type\": \"level\",\r\n\t\t\t\t\t\t\t\"param\": 3\r\n\t\t\t\t\t\t},\r\n\t\t\t\t\t\t\"roll\"\r\n\t\t\t\t\t]\r\n\t\t\t\t},\r\n\t\t\t\t{\r\n\t\t\t\t\t\"turn\": 7,\r\n\t\t\t\t\t\"actions\": [\r\n\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\t\"type\": \"level\",\r\n\t\t\t\t\t\t\t\"param\": 4\r\n\t\t\t\t\t\t},\r\n\t\t\t\t\t\t\"roll\"\r\n\t\t\t\t\t]\r\n\t\t\t\t}\r\n\t\t\t]\r\n\t\t},\r\n\t\t{\r\n\t\t\t\"id\": \"basic-yogg\",\r\n\t\t\t\"name\": \"Basic Yogg Curve\",\r\n\t\t\t\"notes\": \"Uses a 2-cost heropower to get to tier 3 faster.\",\r\n\t\t\t\"steps\": [\r\n\t\t\t\t{\r\n\t\t\t\t\t\"turn\": 1,\r\n\t\t\t\t\t\"actions\": [\"hero-power\", \"roll\"]\r\n\t\t\t\t},\r\n\t\t\t\t{\r\n\t\t\t\t\t\"turn\": 2,\r\n\t\t\t\t\t\"actions\": [\r\n\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\t\"type\": \"level\",\r\n\t\t\t\t\t\t\t\"param\": 2\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t]\r\n\t\t\t\t},\r\n\t\t\t\t{\r\n\t\t\t\t\t\"turn\": 3,\r\n\t\t\t\t\t\"actions\": [\"hero-power\", \"buy\"]\r\n\t\t\t\t},\r\n\t\t\t\t{\r\n\t\t\t\t\t\"turn\": 4,\r\n\t\t\t\t\t\"actions\": [\r\n\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\t\"type\": \"level\",\r\n\t\t\t\t\t\t\t\"param\": 3\r\n\t\t\t\t\t\t},\r\n\t\t\t\t\t\t\"sell\",\r\n\t\t\t\t\t\t\"hero-power\"\r\n\t\t\t\t\t]\r\n\t\t\t\t},\r\n\t\t\t\t{\r\n\t\t\t\t\t\"turn\": 5,\r\n\t\t\t\t\t\"actions\": [\"hero-power\", \"sell\", \"buy\", \"buy\"]\r\n\t\t\t\t},\r\n\t\t\t\t{\r\n\t\t\t\t\t\"turn\": 6,\r\n\t\t\t\t\t\"actions\": [\r\n\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\t\"type\": \"level\",\r\n\t\t\t\t\t\t\t\"param\": 4\r\n\t\t\t\t\t\t},\r\n\t\t\t\t\t\t\"hero-power\"\r\n\t\t\t\t\t]\r\n\t\t\t\t}\r\n\t\t\t]\r\n\t\t},\r\n\t\t{\r\n\t\t\t\"id\": \"aggro-yogg\",\r\n\t\t\t\"name\": \"Aggro Yogg Curve\",\r\n\t\t\t\"notes\": \"Uses a 2-cost heropower to get good tier 1s on board before leveling to 3 faster\",\r\n\t\t\t\"steps\": [\r\n\t\t\t\t{\r\n\t\t\t\t\t\"turn\": 1,\r\n\t\t\t\t\t\"actions\": [\"hero-power\", \"roll\"]\r\n\t\t\t\t},\r\n\t\t\t\t{\r\n\t\t\t\t\t\"turn\": 2,\r\n\t\t\t\t\t\"actions\": [\"buy\", \"sell\", \"hero-power\"]\r\n\t\t\t\t},\r\n\t\t\t\t{\r\n\t\t\t\t\t\"turn\": 3,\r\n\t\t\t\t\t\"actions\": [\r\n\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\t\"type\": \"level\",\r\n\t\t\t\t\t\t\t\"param\": 2\r\n\t\t\t\t\t\t},\r\n\t\t\t\t\t\t\"hero-power\"\r\n\t\t\t\t\t]\r\n\t\t\t\t},\r\n\t\t\t\t{\r\n\t\t\t\t\t\"turn\": 4,\r\n\t\t\t\t\t\"actions\": [\"hero-power\", \"roll\", \"buy\"]\r\n\t\t\t\t},\r\n\t\t\t\t{\r\n\t\t\t\t\t\"turn\": 5,\r\n\t\t\t\t\t\"actions\": [\r\n\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\t\"type\": \"level\",\r\n\t\t\t\t\t\t\t\"param\": 3\r\n\t\t\t\t\t\t},\r\n\t\t\t\t\t\t\"hero-power\"\r\n\t\t\t\t\t]\r\n\t\t\t\t},\r\n\t\t\t\t{\r\n\t\t\t\t\t\"turn\": 6,\r\n\t\t\t\t\t\"actions\": [\r\n\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\t\"type\": \"level\",\r\n\t\t\t\t\t\t\t\"param\": 4\r\n\t\t\t\t\t\t},\r\n\t\t\t\t\t\t\"hero-power\"\r\n\t\t\t\t\t]\r\n\t\t\t\t}\r\n\t\t\t]\r\n\t\t},\r\n\t\t{\r\n\t\t\t\"id\": \"rafaam\",\r\n\t\t\t\"name\": \"Rafaam Curve\",\r\n\t\t\t\"notes\": \"Clean leveling using 1-cost heropower, 2-cost heropower with economy, or tavern tippers\",\r\n\t\t\t\"steps\": [\r\n\t\t\t\t{\r\n\t\t\t\t\t\"turn\": 1,\r\n\t\t\t\t\t\"actions\": [\"buy\"]\r\n\t\t\t\t},\r\n\t\t\t\t{\r\n\t\t\t\t\t\"turn\": 2,\r\n\t\t\t\t\t\"actions\": [\"buy\", \"hero-power\"]\r\n\t\t\t\t},\r\n\t\t\t\t{\r\n\t\t\t\t\t\"turn\": 3,\r\n\t\t\t\t\t\"actions\": [\"buy\", \"roll\", \"hero-power\"]\r\n\t\t\t\t},\r\n\t\t\t\t{\r\n\t\t\t\t\t\"turn\": 4,\r\n\t\t\t\t\t\"actions\": [\r\n\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\t\"type\": \"level\",\r\n\t\t\t\t\t\t\t\"param\": 2\r\n\t\t\t\t\t\t},\r\n\t\t\t\t\t\t\"buy\",\r\n\t\t\t\t\t\t\"hero-power\"\r\n\t\t\t\t\t]\r\n\t\t\t\t},\r\n\t\t\t\t{\r\n\t\t\t\t\t\"turn\": 5,\r\n\t\t\t\t\t\"actions\": [\r\n\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\t\"type\": \"level\",\r\n\t\t\t\t\t\t\t\"param\": 3\r\n\t\t\t\t\t\t},\r\n\t\t\t\t\t\t\"hero-power\"\r\n\t\t\t\t\t]\r\n\t\t\t\t},\r\n\t\t\t\t{\r\n\t\t\t\t\t\"turn\": 6,\r\n\t\t\t\t\t\"actions\": [\r\n\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\t\"type\": \"level\",\r\n\t\t\t\t\t\t\t\"param\": 4\r\n\t\t\t\t\t\t},\r\n\t\t\t\t\t\t\"hero-power\"\r\n\t\t\t\t\t]\r\n\t\t\t\t}\r\n\t\t\t]\r\n\t\t},\r\n\t\t{\r\n\t\t\t\"id\": \"slow-rafaam\",\r\n\t\t\t\"name\": \"Slow Rafaam Curve\",\r\n\t\t\t\"notes\": \"Clean leveling using 1-cost heropower, 2-cost heropower with economy, or tavern tippers. Cut off on tier 2 to get stronger\",\r\n\t\t\t\"steps\": [\r\n\t\t\t\t{\r\n\t\t\t\t\t\"turn\": 1,\r\n\t\t\t\t\t\"actions\": [\"buy\"]\r\n\t\t\t\t},\r\n\t\t\t\t{\r\n\t\t\t\t\t\"turn\": 2,\r\n\t\t\t\t\t\"actions\": [\"buy\", \"hero-power\"]\r\n\t\t\t\t},\r\n\t\t\t\t{\r\n\t\t\t\t\t\"turn\": 3,\r\n\t\t\t\t\t\"actions\": [\"buy\", \"roll\", \"hero-power\"]\r\n\t\t\t\t},\r\n\t\t\t\t{\r\n\t\t\t\t\t\"turn\": 4,\r\n\t\t\t\t\t\"actions\": [\r\n\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\t\"type\": \"level\",\r\n\t\t\t\t\t\t\t\"param\": 2\r\n\t\t\t\t\t\t},\r\n\t\t\t\t\t\t\"buy\",\r\n\t\t\t\t\t\t\"hero-power\"\r\n\t\t\t\t\t]\r\n\t\t\t\t},\r\n\t\t\t\t{\r\n\t\t\t\t\t\"turn\": 5,\r\n\t\t\t\t\t\"actions\": [\"buy\", \"buy\", \"hero-power\"]\r\n\t\t\t\t},\r\n\t\t\t\t{\r\n\t\t\t\t\t\"turn\": 6,\r\n\t\t\t\t\t\"actions\": [\r\n\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\t\"type\": \"level\",\r\n\t\t\t\t\t\t\t\"param\": 3\r\n\t\t\t\t\t\t},\r\n\t\t\t\t\t\t\"buy\"\r\n\t\t\t\t\t]\r\n\t\t\t\t},\r\n\t\t\t\t{\r\n\t\t\t\t\t\"turn\": 7,\r\n\t\t\t\t\t\"actions\": [\r\n\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\t\"type\": \"level\",\r\n\t\t\t\t\t\t\t\"param\": 4\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t]\r\n\t\t\t\t}\r\n\t\t\t]\r\n\t\t},\r\n\t\t{\r\n\t\t\t\"id\": \"3-on-3\",\r\n\t\t\t\"name\": \"3 on 3 (Level on 8)\",\r\n\t\t\t\"notes\": \"Sacrifices early health to get very fast access to tier 3 minions, then pushes levels\",\r\n\t\t\t\"steps\": [\r\n\t\t\t\t{\r\n\t\t\t\t\t\"turn\": 1,\r\n\t\t\t\t\t\"actions\": [\"buy\"]\r\n\t\t\t\t},\r\n\t\t\t\t{\r\n\t\t\t\t\t\"turn\": 2,\r\n\t\t\t\t\t\"actions\": [\r\n\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\t\"type\": \"level\",\r\n\t\t\t\t\t\t\t\"param\": 2\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t]\r\n\t\t\t\t},\r\n\t\t\t\t{\r\n\t\t\t\t\t\"turn\": 3,\r\n\t\t\t\t\t\"actions\": [\r\n\t\t\t\t\t\t\"sell\",\r\n\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\t\"type\": \"level\",\r\n\t\t\t\t\t\t\t\"param\": 3\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t]\r\n\t\t\t\t},\r\n\t\t\t\t{\r\n\t\t\t\t\t\"turn\": 4,\r\n\t\t\t\t\t\"actions\": [\"buy\", \"buy\"]\r\n\t\t\t\t},\r\n\t\t\t\t{\r\n\t\t\t\t\t\"turn\": 5,\r\n\t\t\t\t\t\"actions\": [\"buy\", \"buy\", \"roll\"]\r\n\t\t\t\t},\r\n\t\t\t\t{\r\n\t\t\t\t\t\"turn\": 6,\r\n\t\t\t\t\t\"actions\": [\r\n\t\t\t\t\t\t\"buy\",\r\n\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\t\"type\": \"level\",\r\n\t\t\t\t\t\t\t\"param\": 4\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t]\r\n\t\t\t\t},\r\n\t\t\t\t{\r\n\t\t\t\t\t\"turn\": 7,\r\n\t\t\t\t\t\"actions\": [\"buy\", \"buy\", \"roll\", \"roll\", \"roll\"]\r\n\t\t\t\t}\r\n\t\t\t]\r\n\t\t},\r\n\t\t{\r\n\t\t\t\"id\": \"3-on-3-bis\",\r\n\t\t\t\"name\": \"3 on 3 (Level on 9)\",\r\n\t\t\t\"notes\": \"Sacrifices early health to fill the board with tier 3 minions\",\r\n\t\t\t\"steps\": [\r\n\t\t\t\t{\r\n\t\t\t\t\t\"turn\": 1,\r\n\t\t\t\t\t\"actions\": [\"buy\"]\r\n\t\t\t\t},\r\n\t\t\t\t{\r\n\t\t\t\t\t\"turn\": 2,\r\n\t\t\t\t\t\"actions\": [\r\n\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\t\"type\": \"level\",\r\n\t\t\t\t\t\t\t\"param\": 2\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t]\r\n\t\t\t\t},\r\n\t\t\t\t{\r\n\t\t\t\t\t\"turn\": 3,\r\n\t\t\t\t\t\"actions\": [\r\n\t\t\t\t\t\t\"sell\",\r\n\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\t\"type\": \"level\",\r\n\t\t\t\t\t\t\t\"param\": 3\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t]\r\n\t\t\t\t},\r\n\t\t\t\t{\r\n\t\t\t\t\t\"turn\": 4,\r\n\t\t\t\t\t\"actions\": [\"buy\", \"buy\"]\r\n\t\t\t\t},\r\n\t\t\t\t{\r\n\t\t\t\t\t\"turn\": 5,\r\n\t\t\t\t\t\"actions\": [\"buy\", \"buy\", \"roll\"]\r\n\t\t\t\t},\r\n\t\t\t\t{\r\n\t\t\t\t\t\"turn\": 6,\r\n\t\t\t\t\t\"actions\": [\"buy\", \"buy\", \"roll\", \"roll\"]\r\n\t\t\t\t},\r\n\t\t\t\t{\r\n\t\t\t\t\t\"turn\": 7,\r\n\t\t\t\t\t\"actions\": [\r\n\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\t\"type\": \"level\",\r\n\t\t\t\t\t\t\t\"param\": 4\r\n\t\t\t\t\t\t},\r\n\t\t\t\t\t\t\"roll\",\r\n\t\t\t\t\t\t\"roll\",\r\n\t\t\t\t\t\t\"buy\"\r\n\t\t\t\t\t]\r\n\t\t\t\t}\r\n\t\t\t]\r\n\t\t},\r\n\t\t{\r\n\t\t\t\"id\": \"4-on-4\",\r\n\t\t\t\"name\": \"4 on 4\",\r\n\t\t\t\"notes\": \"Sacrifices early health to get very fast access to tier 3 minions. A fallback option in case of a bad shop after 3 on 3; requires economy\",\r\n\t\t\t\"steps\": [\r\n\t\t\t\t{\r\n\t\t\t\t\t\"turn\": 1,\r\n\t\t\t\t\t\"actions\": [\"buy-token\"]\r\n\t\t\t\t},\r\n\t\t\t\t{\r\n\t\t\t\t\t\"turn\": 2,\r\n\t\t\t\t\t\"actions\": [\r\n\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\t\"type\": \"level\",\r\n\t\t\t\t\t\t\t\"param\": 2\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t]\r\n\t\t\t\t},\r\n\t\t\t\t{\r\n\t\t\t\t\t\"turn\": 3,\r\n\t\t\t\t\t\"actions\": [\r\n\t\t\t\t\t\t\"sell\",\r\n\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\t\"type\": \"level\",\r\n\t\t\t\t\t\t\t\"param\": 3\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t]\r\n\t\t\t\t},\r\n\t\t\t\t{\r\n\t\t\t\t\t\"turn\": 4,\r\n\t\t\t\t\t\"actions\": [\r\n\t\t\t\t\t\t\"sell\",\r\n\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\t\"type\": \"level\",\r\n\t\t\t\t\t\t\t\"param\": 4\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t]\r\n\t\t\t\t},\r\n\t\t\t\t{\r\n\t\t\t\t\t\"turn\": 5,\r\n\t\t\t\t\t\"actions\": [\"buy\", \"buy\", \"roll\"]\r\n\t\t\t\t},\r\n\t\t\t\t{\r\n\t\t\t\t\t\"turn\": 6,\r\n\t\t\t\t\t\"actions\": [\"buy\", \"buy\", \"roll\", \"roll\"]\r\n\t\t\t\t},\r\n\t\t\t\t{\r\n\t\t\t\t\t\"turn\": 7,\r\n\t\t\t\t\t\"actions\": [\"buy\", \"buy\", \"roll\", \"roll\", \"roll\"]\r\n\t\t\t\t}\r\n\t\t\t]\r\n\t\t},\r\n\t\t{\r\n\t\t\t\"id\": \"toki\",\r\n\t\t\t\"name\": \"Toki Curve\",\r\n\t\t\t\"notes\": \"A way to use 1 cost heropowers that don't provide tempo\",\r\n\t\t\t\"steps\": [\r\n\t\t\t\t{\r\n\t\t\t\t\t\"turn\": 1,\r\n\t\t\t\t\t\"actions\": [\"buy-token\"]\r\n\t\t\t\t},\r\n\t\t\t\t{\r\n\t\t\t\t\t\"turn\": 2,\r\n\t\t\t\t\t\"actions\": [\r\n\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\t\"type\": \"level\",\r\n\t\t\t\t\t\t\t\"param\": 2\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t]\r\n\t\t\t\t},\r\n\t\t\t\t{\r\n\t\t\t\t\t\"turn\": 3,\r\n\t\t\t\t\t\"actions\": [\"sell\", \"buy\", \"buy\"]\r\n\t\t\t\t},\r\n\t\t\t\t{\r\n\t\t\t\t\t\"turn\": 4,\r\n\t\t\t\t\t\"actions\": [\r\n\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\t\"type\": \"level\",\r\n\t\t\t\t\t\t\t\"param\": 3\r\n\t\t\t\t\t\t},\r\n\t\t\t\t\t\t\"hero-power\"\r\n\t\t\t\t\t]\r\n\t\t\t\t},\r\n\t\t\t\t{\r\n\t\t\t\t\t\"turn\": 5,\r\n\t\t\t\t\t\"actions\": [\"hero-power\", \"buy\", \"buy\"]\r\n\t\t\t\t},\r\n\t\t\t\t{\r\n\t\t\t\t\t\"turn\": 6,\r\n\t\t\t\t\t\"actions\": [\"roll\", \"buy\", \"roll\", \"buy\"]\r\n\t\t\t\t},\r\n\t\t\t\t{\r\n\t\t\t\t\t\"turn\": 7,\r\n\t\t\t\t\t\"actions\": [\r\n\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\t\"type\": \"level\",\r\n\t\t\t\t\t\t\t\"param\": 7\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t]\r\n\t\t\t\t}\r\n\t\t\t]\r\n\t\t},\r\n\t\t{\r\n\t\t\t\"id\": \"pocky\",\r\n\t\t\t\"name\": \"Pocky Curve\",\r\n\t\t\t\"notes\": \"A very niche use for 1 cost heropowers\",\r\n\t\t\t\"steps\": [\r\n\t\t\t\t{\r\n\t\t\t\t\t\"turn\": 1,\r\n\t\t\t\t\t\"actions\": [\"buy-token\"]\r\n\t\t\t\t},\r\n\t\t\t\t{\r\n\t\t\t\t\t\"turn\": 2,\r\n\t\t\t\t\t\"actions\": [\r\n\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\t\"type\": \"level\",\r\n\t\t\t\t\t\t\t\"param\": 2\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t]\r\n\t\t\t\t},\r\n\t\t\t\t{\r\n\t\t\t\t\t\"turn\": 3,\r\n\t\t\t\t\t\"actions\": [\"buy\", \"hero-power\", \"roll\"]\r\n\t\t\t\t},\r\n\t\t\t\t{\r\n\t\t\t\t\t\"turn\": 4,\r\n\t\t\t\t\t\"actions\": [\r\n\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\t\"type\": \"level\",\r\n\t\t\t\t\t\t\t\"param\": 3\r\n\t\t\t\t\t\t},\r\n\t\t\t\t\t\t\"sell\",\r\n\t\t\t\t\t\t\"hero-power\"\r\n\t\t\t\t\t]\r\n\t\t\t\t},\r\n\t\t\t\t{\r\n\t\t\t\t\t\"turn\": 5,\r\n\t\t\t\t\t\"actions\": [\"buy\", \"buy\", \"hero-power\"]\r\n\t\t\t\t},\r\n\t\t\t\t{\r\n\t\t\t\t\t\"turn\": 6,\r\n\t\t\t\t\t\"actions\": [\r\n\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\t\"type\": \"level\",\r\n\t\t\t\t\t\t\t\"param\": 4\r\n\t\t\t\t\t\t},\r\n\t\t\t\t\t\t\"roll\",\r\n\t\t\t\t\t\t\"buy\"\r\n\t\t\t\t\t]\r\n\t\t\t\t}\r\n\t\t\t]\r\n\t\t}\r\n\t]\r\n`;\r\n"]}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@firestone-hs/content-craetor-input",
3
- "version": "0.0.2",
3
+ "version": "0.0.4",
4
4
  "description": "",
5
5
  "scripts": {
6
6
  "lint": "eslint --color --fix --ext .ts .",
@@ -49,4 +49,4 @@
49
49
  "webpack-cli": "^5.0.2",
50
50
  "yaml-cfn": "^0.2.2"
51
51
  }
52
- }
52
+ }