qpremake 1.5.2 → 1.6.3

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.
Files changed (234) hide show
  1. package/README.md +335 -180
  2. package/package.json +2 -7
  3. package/lib/_localizationFiles/English.d.ts +0 -2
  4. package/lib/_localizationFiles/English.js +0 -307
  5. package/lib/_mods/parserModules/addSymbol.d.ts +0 -7
  6. package/lib/_mods/parserModules/addSymbol.js +0 -18
  7. package/lib/_mods/parserModules/expression.d.ts +0 -7
  8. package/lib/_mods/parserModules/expression.js +0 -45
  9. package/lib/_mods/parserModules/expression_parser.d.ts +0 -143
  10. package/lib/_mods/parserModules/expression_parser.js +0 -728
  11. package/lib/_mods/parserModules/img.d.ts +0 -8
  12. package/lib/_mods/parserModules/img.js +0 -42
  13. package/lib/_mods/parserModules/qpOriginal.d.ts +0 -5
  14. package/lib/_mods/parserModules/qpOriginal.js +0 -27
  15. package/lib/_mods/parserModules/sectionID.d.ts +0 -13
  16. package/lib/_mods/parserModules/sectionID.js +0 -56
  17. package/lib/_mods/parserModules/tags.d.ts +0 -9
  18. package/lib/_mods/parserModules/tags.js +0 -29
  19. package/lib/_mods/parserModules/uaddminus.d.ts +0 -9
  20. package/lib/_mods/parserModules/uaddminus.js +0 -42
  21. package/lib/_mods/parserModules/variantCheck.d.ts +0 -10
  22. package/lib/_mods/parserModules/variantCheck.js +0 -53
  23. package/lib/_queenSystem/handler/actionGenrator.d.ts +0 -994
  24. package/lib/_queenSystem/handler/actionGenrator.js +0 -646
  25. package/lib/_queenSystem/handler/actionInputGenerator.d.ts +0 -95
  26. package/lib/_queenSystem/handler/actionInputGenerator.js +0 -373
  27. package/lib/_queenSystem/handler/actionInputRequesterGenerator.d.ts +0 -92
  28. package/lib/_queenSystem/handler/actionInputRequesterGenerator.js +0 -341
  29. package/lib/_queenSystem/handler/cardHandler.d.ts +0 -20
  30. package/lib/_queenSystem/handler/cardHandler.js +0 -61
  31. package/lib/_queenSystem/handler/effectGenerator.d.ts +0 -1
  32. package/lib/_queenSystem/handler/effectGenerator.js +0 -127
  33. package/lib/_queenSystem/handler/localizationHandler.d.ts +0 -28
  34. package/lib/_queenSystem/handler/localizationHandler.js +0 -166
  35. package/lib/_queenSystem/handler/modHandler.d.ts +0 -10
  36. package/lib/_queenSystem/handler/modHandler.js +0 -36
  37. package/lib/_queenSystem/handler/oldDataProcessor.d.ts +0 -9
  38. package/lib/_queenSystem/handler/oldDataProcessor.js +0 -129
  39. package/lib/_queenSystem/handler/registryHandler.d.ts +0 -36
  40. package/lib/_queenSystem/handler/registryHandler.js +0 -63
  41. package/lib/_queenSystem/handler/zoneHandler.d.ts +0 -102
  42. package/lib/_queenSystem/handler/zoneHandler.js +0 -606
  43. package/lib/_queenSystem/loader/loader_card.d.ts +0 -20
  44. package/lib/_queenSystem/loader/loader_card.js +0 -124
  45. package/lib/_queenSystem/loader/loader_effect.d.ts +0 -27
  46. package/lib/_queenSystem/loader/loader_effect.js +0 -163
  47. package/lib/_queenSystem/loader/loader_handler.d.ts +0 -11
  48. package/lib/_queenSystem/loader/loader_handler.js +0 -24
  49. package/lib/_queenSystem/loader/loader_localization.d.ts +0 -11
  50. package/lib/_queenSystem/loader/loader_localization.js +0 -73
  51. package/lib/_queenSystem/loader/loader_mod.d.ts +0 -10
  52. package/lib/_queenSystem/loader/loader_mod.js +0 -72
  53. package/lib/_queenSystem/loader/loader_subtype.d.ts +0 -9
  54. package/lib/_queenSystem/loader/loader_subtype.js +0 -39
  55. package/lib/_queenSystem/loader/loader_type.d.ts +0 -9
  56. package/lib/_queenSystem/loader/loader_type.js +0 -39
  57. package/lib/_queenSystem/loader/loader_zone.d.ts +0 -14
  58. package/lib/_queenSystem/loader/loader_zone.js +0 -35
  59. package/lib/_queenSystem/queenSystem.d.ts +0 -127
  60. package/lib/_queenSystem/queenSystem.js +0 -996
  61. package/lib/_queenSystem/renderer/rendererInterface.d.ts +0 -9
  62. package/lib/_queenSystem/renderer/rendererInterface.js +0 -2
  63. package/lib/data/actionRegistry.d.ts +0 -56
  64. package/lib/data/actionRegistry.js +0 -60
  65. package/lib/data/cardRegistry.d.ts +0 -1162
  66. package/lib/data/cardRegistry.js +0 -716
  67. package/lib/data/deckRegistry.d.ts +0 -19
  68. package/lib/data/deckRegistry.js +0 -41
  69. package/lib/data/effectRegistry.d.ts +0 -465
  70. package/lib/data/effectRegistry.js +0 -151
  71. package/lib/data/effectTypeRegistry.d.ts +0 -14
  72. package/lib/data/effectTypeRegistry.js +0 -14
  73. package/lib/data/operatorRegistry.d.ts +0 -92
  74. package/lib/data/operatorRegistry.js +0 -82
  75. package/lib/data/rarityRegistry.d.ts +0 -28
  76. package/lib/data/rarityRegistry.js +0 -63
  77. package/lib/data/registryRegistry.d.ts +0 -10
  78. package/lib/data/registryRegistry.js +0 -14
  79. package/lib/data/subtypeRegistry.d.ts +0 -15
  80. package/lib/data/subtypeRegistry.js +0 -15
  81. package/lib/data/systemRegistry.d.ts +0 -253
  82. package/lib/data/systemRegistry.js +0 -56
  83. package/lib/data/zoneRegistry.d.ts +0 -43
  84. package/lib/data/zoneRegistry.js +0 -157
  85. package/lib/effectTextParser/index.d.ts +0 -42
  86. package/lib/effectTextParser/index.js +0 -316
  87. package/lib/global/index.d.ts +0 -8
  88. package/lib/global/index.js +0 -12
  89. package/lib/index.d.ts +0 -6341
  90. package/lib/index.js +0 -212
  91. package/lib/specificEffects/e_cond.d.ts +0 -11
  92. package/lib/specificEffects/e_cond.js +0 -36
  93. package/lib/specificEffects/e_fruit.d.ts +0 -3
  94. package/lib/specificEffects/e_fruit.js +0 -187
  95. package/lib/specificEffects/e_generic.d.ts +0 -191
  96. package/lib/specificEffects/e_generic.js +0 -662
  97. package/lib/specificEffects/e_generic_cardTargetting.d.ts +0 -38
  98. package/lib/specificEffects/e_generic_cardTargetting.js +0 -82
  99. package/lib/specificEffects/e_generic_noneTargetting.d.ts +0 -10
  100. package/lib/specificEffects/e_generic_noneTargetting.js +0 -26
  101. package/lib/specificEffects/e_status.d.ts +0 -80
  102. package/lib/specificEffects/e_status.js +0 -151
  103. package/lib/specificEffects/e_test.d.ts +0 -3
  104. package/lib/specificEffects/e_test.js +0 -21
  105. package/lib/types/abstract/gameComponents/API.d.ts +0 -19
  106. package/lib/types/abstract/gameComponents/API.js +0 -2
  107. package/lib/types/abstract/gameComponents/card.d.ts +0 -108
  108. package/lib/types/abstract/gameComponents/card.js +0 -771
  109. package/lib/types/abstract/gameComponents/effect.d.ts +0 -82
  110. package/lib/types/abstract/gameComponents/effect.js +0 -331
  111. package/lib/types/abstract/gameComponents/effectSubtype.d.ts +0 -22
  112. package/lib/types/abstract/gameComponents/effectSubtype.js +0 -40
  113. package/lib/types/abstract/gameComponents/effectType.d.ts +0 -11
  114. package/lib/types/abstract/gameComponents/effectType.js +0 -8
  115. package/lib/types/abstract/gameComponents/settings.d.ts +0 -80
  116. package/lib/types/abstract/gameComponents/settings.js +0 -68
  117. package/lib/types/abstract/gameComponents/zone.d.ts +0 -113
  118. package/lib/types/abstract/gameComponents/zone.js +0 -614
  119. package/lib/types/abstract/gameComponents/zone_gridBased.d.ts +0 -18
  120. package/lib/types/abstract/gameComponents/zone_gridBased.js +0 -58
  121. package/lib/types/abstract/gameComponents/zone_stackBased.d.ts +0 -13
  122. package/lib/types/abstract/gameComponents/zone_stackBased.js +0 -55
  123. package/lib/types/abstract/generics/node.d.ts +0 -23
  124. package/lib/types/abstract/generics/node.js +0 -46
  125. package/lib/types/abstract/generics/position.d.ts +0 -23
  126. package/lib/types/abstract/generics/position.js +0 -91
  127. package/lib/types/abstract/generics/tree.d.ts +0 -25
  128. package/lib/types/abstract/generics/tree.js +0 -153
  129. package/lib/types/abstract/generics/universalResponse.d.ts +0 -4
  130. package/lib/types/abstract/generics/universalResponse.js +0 -2
  131. package/lib/types/abstract/generics/wraper.d.ts +0 -21
  132. package/lib/types/abstract/generics/wraper.js +0 -56
  133. package/lib/types/abstract/parser/component.d.ts +0 -88
  134. package/lib/types/abstract/parser/component.js +0 -132
  135. package/lib/types/abstract/parser/index.d.ts +0 -6
  136. package/lib/types/abstract/parser/index.js +0 -28
  137. package/lib/types/abstract/parser/modPack.d.ts +0 -21
  138. package/lib/types/abstract/parser/modPack.js +0 -48
  139. package/lib/types/abstract/parser/moduleInputObject.d.ts +0 -12
  140. package/lib/types/abstract/parser/moduleInputObject.js +0 -21
  141. package/lib/types/abstract/parser/options.d.ts +0 -31
  142. package/lib/types/abstract/parser/options.js +0 -45
  143. package/lib/types/abstract/serializedGameComponents/Gamestate.d.ts +0 -46
  144. package/lib/types/abstract/serializedGameComponents/Gamestate.js +0 -70
  145. package/lib/types/abstract/serializedGameComponents/Localized.d.ts +0 -69
  146. package/lib/types/abstract/serializedGameComponents/Localized.js +0 -84
  147. package/lib/types/defaultZones/ability.d.ts +0 -10
  148. package/lib/types/defaultZones/ability.js +0 -22
  149. package/lib/types/defaultZones/deck.d.ts +0 -25
  150. package/lib/types/defaultZones/deck.js +0 -90
  151. package/lib/types/defaultZones/drop.d.ts +0 -5
  152. package/lib/types/defaultZones/drop.js +0 -13
  153. package/lib/types/defaultZones/field.d.ts +0 -11
  154. package/lib/types/defaultZones/field.js +0 -35
  155. package/lib/types/defaultZones/grave.d.ts +0 -8
  156. package/lib/types/defaultZones/grave.js +0 -21
  157. package/lib/types/defaultZones/hand.d.ts +0 -5
  158. package/lib/types/defaultZones/hand.js +0 -14
  159. package/lib/types/defaultZones/storage.d.ts +0 -9
  160. package/lib/types/defaultZones/storage.js +0 -21
  161. package/lib/types/defaultZones/system.d.ts +0 -12
  162. package/lib/types/defaultZones/system.js +0 -35
  163. package/lib/types/defaultZones/void.d.ts +0 -4
  164. package/lib/types/defaultZones/void.js +0 -10
  165. package/lib/types/effects/effectSubtypes/subtype_chained.d.ts +0 -10
  166. package/lib/types/effects/effectSubtypes/subtype_chained.js +0 -17
  167. package/lib/types/effects/effectSubtypes/subtype_delayed.d.ts +0 -9
  168. package/lib/types/effects/effectSubtypes/subtype_delayed.js +0 -16
  169. package/lib/types/effects/effectSubtypes/subtype_fieldLock.d.ts +0 -9
  170. package/lib/types/effects/effectSubtypes/subtype_fieldLock.js +0 -21
  171. package/lib/types/effects/effectSubtypes/subtype_graveLock.d.ts +0 -9
  172. package/lib/types/effects/effectSubtypes/subtype_graveLock.js +0 -21
  173. package/lib/types/effects/effectSubtypes/subtype_hand_or_fieldLock.d.ts +0 -9
  174. package/lib/types/effects/effectSubtypes/subtype_hand_or_fieldLock.js +0 -21
  175. package/lib/types/effects/effectSubtypes/subtype_hardUnique.d.ts +0 -9
  176. package/lib/types/effects/effectSubtypes/subtype_hardUnique.js +0 -15
  177. package/lib/types/effects/effectSubtypes/subtype_instant.d.ts +0 -8
  178. package/lib/types/effects/effectSubtypes/subtype_instant.js +0 -20
  179. package/lib/types/effects/effectSubtypes/subtype_once.d.ts +0 -12
  180. package/lib/types/effects/effectSubtypes/subtype_once.js +0 -27
  181. package/lib/types/effects/effectSubtypes/subtype_unique.d.ts +0 -9
  182. package/lib/types/effects/effectSubtypes/subtype_unique.js +0 -16
  183. package/lib/types/effects/effectTypes/initEffect.d.ts +0 -7
  184. package/lib/types/effects/effectTypes/initEffect.js +0 -23
  185. package/lib/types/effects/effectTypes/lockEffect.d.ts +0 -9
  186. package/lib/types/effects/effectTypes/lockEffect.js +0 -25
  187. package/lib/types/effects/effectTypes/manualEffect.d.ts +0 -9
  188. package/lib/types/effects/effectTypes/manualEffect.js +0 -18
  189. package/lib/types/effects/effectTypes/passiveEffect.d.ts +0 -9
  190. package/lib/types/effects/effectTypes/passiveEffect.js +0 -23
  191. package/lib/types/effects/effectTypes/triggerEffect.d.ts +0 -9
  192. package/lib/types/effects/effectTypes/triggerEffect.js +0 -28
  193. package/lib/types/errors/cannotLoad.d.ts +0 -5
  194. package/lib/types/errors/cannotLoad.js +0 -13
  195. package/lib/types/errors/cardNotExist.d.ts +0 -5
  196. package/lib/types/errors/cardNotExist.js +0 -13
  197. package/lib/types/errors/cardNotInApplicableZone.d.ts +0 -5
  198. package/lib/types/errors/cardNotInApplicableZone.js +0 -13
  199. package/lib/types/errors/effectCondNotMet.d.ts +0 -5
  200. package/lib/types/errors/effectCondNotMet.js +0 -13
  201. package/lib/types/errors/effectNotExist.d.ts +0 -5
  202. package/lib/types/errors/effectNotExist.js +0 -13
  203. package/lib/types/errors/error.d.ts +0 -17
  204. package/lib/types/errors/error.js +0 -42
  205. package/lib/types/errors/incorrectActionType.d.ts +0 -5
  206. package/lib/types/errors/incorrectActionType.js +0 -13
  207. package/lib/types/errors/index.d.ts +0 -16
  208. package/lib/types/errors/index.js +0 -36
  209. package/lib/types/errors/invalidOrderMap.d.ts +0 -6
  210. package/lib/types/errors/invalidOrderMap.js +0 -14
  211. package/lib/types/errors/invalidPosition.d.ts +0 -6
  212. package/lib/types/errors/invalidPosition.js +0 -13
  213. package/lib/types/errors/subTypeOverrideConflict.d.ts +0 -7
  214. package/lib/types/errors/subTypeOverrideConflict.js +0 -15
  215. package/lib/types/errors/unknownError.d.ts +0 -5
  216. package/lib/types/errors/unknownError.js +0 -13
  217. package/lib/types/errors/unregisteredAction.d.ts +0 -6
  218. package/lib/types/errors/unregisteredAction.js +0 -13
  219. package/lib/types/errors/wrongEffectIdx.d.ts +0 -5
  220. package/lib/types/errors/wrongEffectIdx.js +0 -14
  221. package/lib/types/errors/zoneAttrConflict.d.ts +0 -5
  222. package/lib/types/errors/zoneAttrConflict.js +0 -15
  223. package/lib/types/errors/zoneFull.d.ts +0 -5
  224. package/lib/types/errors/zoneFull.js +0 -13
  225. package/lib/types/errors/zoneNotExist.d.ts +0 -5
  226. package/lib/types/errors/zoneNotExist.js +0 -13
  227. package/lib/types/misc.d.ts +0 -97
  228. package/lib/types/misc.js +0 -8
  229. package/lib/types/mods/effectTextParserModule.d.ts +0 -16
  230. package/lib/types/mods/effectTextParserModule.js +0 -81
  231. package/lib/types/mods/gameModule.d.ts +0 -5
  232. package/lib/types/mods/gameModule.js +0 -8
  233. package/lib/utils/index.d.ts +0 -78
  234. package/lib/utils/index.js +0 -562
@@ -1,341 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- const zoneRegistry_1 = require("../../data/zoneRegistry");
4
- const actionInputGenerator_1 = require("./actionInputGenerator");
5
- const systemRegistry_1 = require("../../data/systemRegistry");
6
- const e_status_1 = require("../../specificEffects/e_status");
7
- class regen_cards {
8
- constructor(s, cards) {
9
- this.s = s;
10
- this.cards = cards;
11
- }
12
- ofArchtype(p) {
13
- this.cards = this.cards.filter(c => c.is(p));
14
- return this;
15
- }
16
- ofSameArchtype(c1) {
17
- this.cards = this.cards.filter(c => c.is(c1.extensionArr));
18
- return this;
19
- }
20
- ofSameField(c1) {
21
- this.cards = this.cards.filter(c => c.pos.zoneID === c1.pos.zoneID);
22
- return this;
23
- }
24
- hasStatus() {
25
- this.cards = this.cards.filter(c => c.hasStatusEffect);
26
- return this;
27
- }
28
- hasAutomate() {
29
- this.cards = this.cards.filter(c => c.hasStatusEffect && c.statusEffects.some(e => e instanceof e_status_1.e_automate_base));
30
- return this;
31
- }
32
- isExposed() {
33
- this.cards = this.cards.filter(c => c.___zone.isExposed(c));
34
- return this;
35
- }
36
- isCoverred() {
37
- this.cards = this.cards.filter(c => !c.___zone.isExposed(c));
38
- return this;
39
- }
40
- isBack() {
41
- this.cards = this.cards.filter(c => {
42
- //a card is in the back if its back pos is out of bounds
43
- const back = c.___zone.getBackPos(c);
44
- return Utils.isPositionOutOfBounds(back.flat(), c.___zone.shape);
45
- });
46
- return this;
47
- }
48
- isFront() {
49
- this.cards = this.cards.filter(c => {
50
- //a card is in the front if its front pos is out of bounds
51
- const front = c.___zone.getFrontPos(c);
52
- return Utils.isPositionOutOfBounds(front.flat(), c.___zone.shape);
53
- });
54
- return this;
55
- }
56
- ofLevel(l) {
57
- this.cards = this.cards.filter(c => c.level === l);
58
- return this;
59
- }
60
- ofAtLeastLevel(l) {
61
- this.cards = this.cards.filter(c => c.level <= l);
62
- return this;
63
- }
64
- ofDataID(s) {
65
- this.cards = this.cards.filter(c => c.dataID === s);
66
- return this;
67
- }
68
- ofSameDataID(c_) {
69
- this.cards = this.cards.filter(c => c.dataID === c_.dataID);
70
- return this;
71
- }
72
- pos() {
73
- return new regen_pos(this.s, this.cards.map(c => {
74
- const p1 = c.pos;
75
- p1.___zone = c.___zone;
76
- delete c.___zone;
77
- return p1;
78
- }));
79
- }
80
- zones() {
81
- return new regen_zone(this.s, this.cards.map(c => {
82
- const z1 = c.___zone;
83
- delete c.___zone;
84
- return z1;
85
- }));
86
- }
87
- filter(f) {
88
- if (f)
89
- this.cards.filter(f);
90
- return this;
91
- }
92
- once(e) {
93
- if (e)
94
- this.filter(e.addedInputConditionMap.c);
95
- return new actionInputGenerator_1.inputRequester(systemRegistry_1.inputType.card, this.cards.map(c => {
96
- delete c.___zone;
97
- return actionInputGenerator_1.inputFormRegistry.card(this.s, c);
98
- }));
99
- }
100
- many(l, e) {
101
- if (e)
102
- this.filter(e.addedInputConditionMap.c);
103
- return new actionInputGenerator_1.inputRequester_multiple(l, systemRegistry_1.inputType.card, this.cards.map(c => {
104
- delete c.___zone;
105
- return actionInputGenerator_1.inputFormRegistry.card(this.s, c);
106
- }));
107
- }
108
- // all(e? : Effect<any>){
109
- // if(e) this.filter(e.addedInputConditionMap.c);
110
- // return new inputRequester_multiple(
111
- // this.cards.length,
112
- // inputType.card,
113
- // this.cards.map(c => {
114
- // delete (c as any).___zone
115
- // return inputFormRegistry.card(this.s, c)
116
- // })
117
- // )
118
- // }
119
- clean(e) {
120
- if (e)
121
- this.filter(e.addedInputConditionMap.c);
122
- return this.cards.map(p => {
123
- delete p.___zone;
124
- return p;
125
- });
126
- }
127
- }
128
- class regen_pos {
129
- constructor(s, pos) {
130
- this.s = s;
131
- this.pos = pos;
132
- }
133
- isEmpty() {
134
- this.pos = this.pos.filter(p => !p.___zone.isOccupied(p));
135
- return this;
136
- }
137
- isOccupied() {
138
- this.pos = this.pos.filter(p => p.___zone.isOccupied(p));
139
- return this;
140
- }
141
- isExposed() {
142
- this.pos = this.pos.filter(p => p.___zone.isExposed({ pos: p }));
143
- return this;
144
- }
145
- isCoverred() {
146
- this.pos = this.pos.filter(p => !p.___zone.isExposed({ pos: p }));
147
- return this;
148
- }
149
- isBack() {
150
- this.pos = this.pos.filter(p => {
151
- //a card is in the back if its back pos is out of bounds
152
- const back = p.___zone.getBackPos({ pos: p });
153
- return Utils.isPositionOutOfBounds(back.flat(), p.___zone.shape);
154
- });
155
- return this;
156
- }
157
- isFront() {
158
- this.pos = this.pos.filter(p => {
159
- //a card is in the front if its front pos is out of bounds
160
- const front = p.___zone.getFrontPos({ pos: p });
161
- return Utils.isPositionOutOfBounds(front.flat(), p.___zone.shape);
162
- });
163
- return this;
164
- }
165
- cards() {
166
- return new regen_cards(this.s, this.pos.map(p => {
167
- const card = p.___zone.cardArr[Utils.positionToIndex(p.flat(), p.___zone.shape)];
168
- if (!card) {
169
- delete p.___zone;
170
- return;
171
- }
172
- ;
173
- const c1 = card;
174
- c1.___zone = p.___zone;
175
- delete p.___zone;
176
- return c1;
177
- }).filter(p => p !== undefined));
178
- }
179
- zones() {
180
- return new regen_zone(this.s, this.pos.map(p => {
181
- const z1 = p.___zone;
182
- delete p.___zone;
183
- return z1;
184
- }));
185
- }
186
- filter(f) {
187
- if (f)
188
- this.pos.filter(f);
189
- return this;
190
- }
191
- once(e) {
192
- if (e)
193
- this.filter(e.addedInputConditionMap.p);
194
- return new actionInputGenerator_1.inputRequester(systemRegistry_1.inputType.position, this.pos.map(p => {
195
- delete p.___zone;
196
- return actionInputGenerator_1.inputFormRegistry.pos(this.s, p);
197
- }));
198
- }
199
- many(l, e) {
200
- if (e)
201
- this.filter(e.addedInputConditionMap.p);
202
- return new actionInputGenerator_1.inputRequester_multiple(l, systemRegistry_1.inputType.position, this.pos.map(p => {
203
- delete p.___zone;
204
- return actionInputGenerator_1.inputFormRegistry.pos(this.s, p);
205
- }));
206
- }
207
- // all(e? : Effect<any>){
208
- // if(e) this.filter(e.addedInputConditionMap.p);
209
- // return new inputRequester_multiple(
210
- // this.pos.length,
211
- // inputType.position,
212
- // this.pos.map(p => {
213
- // delete (p as any).___zone
214
- // return inputFormRegistry.pos(this.s, p)
215
- // })
216
- // )
217
- // }
218
- clean(e) {
219
- if (e)
220
- this.filter(e.addedInputConditionMap.p);
221
- return this.pos.map(p => {
222
- delete p.___zone;
223
- return p;
224
- });
225
- }
226
- }
227
- class regen_zone {
228
- constructor(s, zones) {
229
- this.s = s;
230
- this.zones = zones;
231
- }
232
- cards() {
233
- return new regen_cards(this.s, this.zones.flatMap(z => {
234
- const carr = z.cardArr_filtered;
235
- return carr.map(c => {
236
- const c1 = c;
237
- c1.___zone = z;
238
- return c1;
239
- });
240
- }));
241
- }
242
- pos() {
243
- return new regen_pos(this.s, this.zones.flatMap(z => {
244
- const pos = z.getAllPos();
245
- return pos.map(p => {
246
- const p1 = p;
247
- p1.___zone = z;
248
- return p1;
249
- });
250
- }));
251
- }
252
- ofSamePlayer(pstat) {
253
- this.zones = pstat ? this.zones.filter(z => z.playerIndex === pstat.playerIndex) : [];
254
- return this;
255
- }
256
- ofSamePlayerType(pstat) {
257
- this.zones = pstat ? this.zones.filter(z => z.playerType === pstat.playerType) : [];
258
- return this;
259
- }
260
- filter(f) {
261
- if (f)
262
- this.zones = this.zones.filter(f);
263
- return this;
264
- }
265
- once(e) {
266
- if (e)
267
- this.filter(e.addedInputConditionMap.z);
268
- return new actionInputGenerator_1.inputRequester(systemRegistry_1.inputType.zone, this.zones.map(z => actionInputGenerator_1.inputFormRegistry.zone(this.s, z)));
269
- }
270
- many(l, e) {
271
- if (e)
272
- this.filter(e.addedInputConditionMap.z);
273
- return new actionInputGenerator_1.inputRequester_multiple(l, systemRegistry_1.inputType.zone, this.zones.map(z => actionInputGenerator_1.inputFormRegistry.zone(this.s, z)));
274
- }
275
- // all(e? : Effect<any>){
276
- // if(e) this.filter(e.addedInputConditionMap.z);
277
- // return new inputRequester_multiple(
278
- // this.zones.length,
279
- // inputType.zone,
280
- // this.zones.map(z => inputFormRegistry.zone(this.s, z))
281
- // )
282
- // }
283
- clean(e) {
284
- if (e)
285
- this.filter(e.addedInputConditionMap.z);
286
- return this.zones;
287
- }
288
- }
289
- class regen_nums {
290
- constructor(s, nums) {
291
- this.s = s;
292
- this.nums = nums;
293
- }
294
- filter(f) {
295
- if (f)
296
- this.nums = this.nums.filter(f);
297
- }
298
- once(e) {
299
- if (e)
300
- this.filter(e.addedInputConditionMap.n);
301
- return new actionInputGenerator_1.inputRequester(systemRegistry_1.inputType.number, this.nums.map(n => actionInputGenerator_1.inputFormRegistry.num(n)));
302
- }
303
- many(l, e) {
304
- if (e)
305
- this.filter(e.addedInputConditionMap.n);
306
- return new actionInputGenerator_1.inputRequester_multiple(l, systemRegistry_1.inputType.number, this.nums.map(n => actionInputGenerator_1.inputFormRegistry.num(n)));
307
- }
308
- }
309
- class inputRequesterGenerator {
310
- //zones
311
- field(s, c) {
312
- return new regen_zone(s, s.filter(0, z => z.is(zoneRegistry_1.zoneRegistry.z_field)));
313
- }
314
- grave(s, c) {
315
- return new regen_zone(s, s.filter(0, z => z.is(zoneRegistry_1.zoneRegistry.z_grave)));
316
- }
317
- deck(s, c) {
318
- return new regen_zone(s, s.filter(0, z => z.is(zoneRegistry_1.zoneRegistry.z_deck)));
319
- }
320
- hand(s, c) {
321
- return new regen_zone(s, s.filter(0, z => z.is(zoneRegistry_1.zoneRegistry.z_hand)));
322
- }
323
- specificType(s, c, zType) {
324
- return new regen_zone(s, s.filter(0, z => z.is(zType)));
325
- }
326
- oppositeZoneTo(s, c) {
327
- return new regen_zone(s, s.getZoneOf(c).getOppositeZone(this.field(s, c).clean()));
328
- }
329
- allZones(s, c) {
330
- return new regen_zone(s, s.filter(0, () => true));
331
- }
332
- //misc
333
- nums(s, ...nums) {
334
- const merged = nums.reduce((prev, cur) => {
335
- return [...prev, ...(typeof cur === "number" ? [cur] : cur)];
336
- }, []);
337
- return new regen_nums(s, merged);
338
- }
339
- }
340
- const Request = new inputRequesterGenerator();
341
- exports.default = Request;
@@ -1,20 +0,0 @@
1
- import type registryHandler from "./registryHandler";
2
- import type { Setting } from "../../types/abstract/gameComponents/settings";
3
- import { cardData_unified, cardDataRegistry, effectData } from "../../data/cardRegistry";
4
- import type Card from "../../types/abstract/gameComponents/card";
5
- export default class cardHandler {
6
- private cloader;
7
- private effloader;
8
- private subtypeloader;
9
- private typeLoader;
10
- private setting;
11
- constructor(s: Setting, regs: registryHandler);
12
- getCard(cid: keyof typeof cardDataRegistry, variantID?: string[]): Card;
13
- getCard(cid: string, variantID?: string[]): Card | undefined;
14
- getCard(cid: keyof typeof cardDataRegistry, variantID: string[], dataOnly: true): Omit<cardData_unified, "effects"> & {
15
- effects: effectData[];
16
- };
17
- getCard(cid: string, variantID: string[], dataOnly: true): Omit<cardData_unified, "effects"> & {
18
- effects: effectData[];
19
- } | undefined;
20
- }
@@ -1,61 +0,0 @@
1
- "use strict";
2
- var __importDefault = (this && this.__importDefault) || function (mod) {
3
- return (mod && mod.__esModule) ? mod : { "default": mod };
4
- };
5
- Object.defineProperty(exports, "__esModule", { value: true });
6
- const subtypeRegistry_1 = __importDefault(require("../../data/subtypeRegistry"));
7
- const subtype_chained_1 = __importDefault(require("../../types/effects/effectSubtypes/subtype_chained"));
8
- const subtype_fieldLock_1 = __importDefault(require("../../types/effects/effectSubtypes/subtype_fieldLock"));
9
- const subtype_hardUnique_1 = __importDefault(require("../../types/effects/effectSubtypes/subtype_hardUnique"));
10
- const subtype_instant_1 = __importDefault(require("../../types/effects/effectSubtypes/subtype_instant"));
11
- const subtype_once_1 = __importDefault(require("../../types/effects/effectSubtypes/subtype_once"));
12
- const subtype_unique_1 = __importDefault(require("../../types/effects/effectSubtypes/subtype_unique"));
13
- const subtype_hand_or_fieldLock_1 = __importDefault(require("../../types/effects/effectSubtypes/subtype_hand_or_fieldLock"));
14
- const subtype_graveLock_1 = __importDefault(require("../../types/effects/effectSubtypes/subtype_graveLock"));
15
- const subtype_delayed_1 = __importDefault(require("../../types/effects/effectSubtypes/subtype_delayed"));
16
- const effectTypeRegistry_1 = __importDefault(require("../../data/effectTypeRegistry"));
17
- const effectType_1 = __importDefault(require("../../types/abstract/gameComponents/effectType"));
18
- const initEffect_1 = __importDefault(require("../../types/effects/effectTypes/initEffect"));
19
- const manualEffect_1 = __importDefault(require("../../types/effects/effectTypes/manualEffect"));
20
- const passiveEffect_1 = __importDefault(require("../../types/effects/effectTypes/passiveEffect"));
21
- const triggerEffect_1 = __importDefault(require("../../types/effects/effectTypes/triggerEffect"));
22
- const lockEffect_1 = __importDefault(require("../../types/effects/effectTypes/lockEffect"));
23
- const cardRegistry_1 = require("../../data/cardRegistry");
24
- class cardHandler {
25
- constructor(s, regs) {
26
- this.cloader = regs.cardLoader;
27
- this.effloader = regs.effectLoader;
28
- this.subtypeloader = regs.subTypeLoader;
29
- this.typeLoader = regs.typeLoader;
30
- this.setting = s;
31
- this.subtypeloader.load(subtypeRegistry_1.default[subtypeRegistry_1.default.e_st_chained], subtype_chained_1.default);
32
- this.subtypeloader.load(subtypeRegistry_1.default[subtypeRegistry_1.default.e_st_fieldLock], subtype_fieldLock_1.default);
33
- this.subtypeloader.load(subtypeRegistry_1.default[subtypeRegistry_1.default.e_st_hardUnique], subtype_hardUnique_1.default);
34
- this.subtypeloader.load(subtypeRegistry_1.default[subtypeRegistry_1.default.e_st_instant], subtype_instant_1.default);
35
- this.subtypeloader.load(subtypeRegistry_1.default[subtypeRegistry_1.default.e_st_once], subtype_once_1.default);
36
- this.subtypeloader.load(subtypeRegistry_1.default[subtypeRegistry_1.default.e_st_unique], subtype_unique_1.default);
37
- this.subtypeloader.load(subtypeRegistry_1.default[subtypeRegistry_1.default.e_st_handOrFieldLock], subtype_hand_or_fieldLock_1.default);
38
- this.subtypeloader.load(subtypeRegistry_1.default[subtypeRegistry_1.default.e_st_graveLock], subtype_graveLock_1.default);
39
- this.subtypeloader.load(subtypeRegistry_1.default[subtypeRegistry_1.default.e_st_delayed], subtype_delayed_1.default);
40
- this.typeLoader.load(effectTypeRegistry_1.default[effectTypeRegistry_1.default.e_t_none], effectType_1.default);
41
- this.typeLoader.load(effectTypeRegistry_1.default[effectTypeRegistry_1.default.e_t_counter], effectType_1.default);
42
- this.typeLoader.load(effectTypeRegistry_1.default[effectTypeRegistry_1.default.e_t_init], initEffect_1.default);
43
- this.typeLoader.load(effectTypeRegistry_1.default[effectTypeRegistry_1.default.e_t_manual], manualEffect_1.default);
44
- this.typeLoader.load(effectTypeRegistry_1.default[effectTypeRegistry_1.default.e_t_passive], passiveEffect_1.default);
45
- this.typeLoader.load(effectTypeRegistry_1.default[effectTypeRegistry_1.default.e_t_trigger], triggerEffect_1.default);
46
- this.typeLoader.load(effectTypeRegistry_1.default[effectTypeRegistry_1.default.e_t_lock], lockEffect_1.default);
47
- // this.rarityLoader.load(rarityRegistry[rarityRegistry.r_white], rarityDataRegistry.r_white)
48
- // this.rarityLoader.load(rarityRegistry[rarityRegistry.r_green], rarityDataRegistry.r_green)
49
- // this.rarityLoader.load(rarityRegistry[rarityRegistry.r_blue], rarityDataRegistry.r_blue)
50
- // this.rarityLoader.load(rarityRegistry[rarityRegistry.r_red], rarityDataRegistry.r_red)
51
- // this.rarityLoader.load(rarityRegistry[rarityRegistry.r_ability], rarityDataRegistry.r_ability)
52
- // this.rarityLoader.load(rarityRegistry[rarityRegistry.r_algo], rarityDataRegistry.r_algo)
53
- Object.entries(cardRegistry_1.cardDataRegistry).forEach(([key, val]) => {
54
- this.cloader.load(key, Object.assign({ id: key }, val));
55
- });
56
- }
57
- getCard(cid, variantID, dataOnly = false) {
58
- return this.cloader.getCard(cid, this.setting, variantID, dataOnly);
59
- }
60
- }
61
- exports.default = cardHandler;
@@ -1 +0,0 @@
1
- export {};
@@ -1,127 +0,0 @@
1
- "use strict";
2
- var __importDefault = (this && this.__importDefault) || function (mod) {
3
- return (mod && mod.__esModule) ? mod : { "default": mod };
4
- };
5
- Object.defineProperty(exports, "__esModule", { value: true });
6
- /**@deprecated */
7
- const systemRegistry_1 = require("../../data/systemRegistry");
8
- const effect_1 = __importDefault(require("../../types/abstract/gameComponents/effect"));
9
- class eff_gen {
10
- constructor(input_f1, input_f2, activate_f) {
11
- this.input_f2 = input_f2;
12
- this.activate_f = activate_f;
13
- this.revealKeys = [];
14
- this.implyVar = [];
15
- this.input_f1_info = {
16
- init: input_f1,
17
- chained: []
18
- };
19
- }
20
- retarget(key, input_f1_new, input_f2_new, newActivate) {
21
- switch (key) {
22
- case "zone": {
23
- this.input_f1_info.chained.push(input_f1_new);
24
- this.input_f2 = input_f2_new;
25
- this.activate_f = newActivate(this.activate_f);
26
- return this;
27
- }
28
- case "card": {
29
- const res = new eff_gen_cards(this.input_f1_info.init, input_f2_new, newActivate(this.activate_f));
30
- res.revealKeys = this.revealKeys;
31
- res.implyVar = this.implyVar;
32
- res.input_f1_info.chained = this.input_f1_info.chained;
33
- res.input_f1_info.chained.push(input_f1_new);
34
- return res;
35
- }
36
- case "pos": {
37
- const res = new eff_gen_pos(this.input_f1_info.init, input_f2_new, newActivate(this.activate_f));
38
- res.revealKeys = this.revealKeys;
39
- res.implyVar = this.implyVar;
40
- res.input_f1_info.chained = this.input_f1_info.chained;
41
- res.input_f1_info.chained.push(input_f1_new);
42
- return res;
43
- }
44
- }
45
- throw new Error();
46
- }
47
- ;
48
- then(f) {
49
- this.input_f1_info.chained.push(f);
50
- return this;
51
- }
52
- shares(f) {
53
- this.implyVar.push(f);
54
- return this;
55
- }
56
- reveal(k) {
57
- if (typeof k === "string")
58
- this.revealKeys.push(k);
59
- else
60
- this.revealKeys.push(...k);
61
- return this;
62
- }
63
- fin() {
64
- const f1 = this.input_f1_info;
65
- const f2 = this.input_f2;
66
- const f3 = this.activate_f;
67
- const implyVar = this.implyVar;
68
- const revealKeys = this.revealKeys;
69
- const type = this.checkInputType;
70
- return class ExtendedEff extends effect_1.default {
71
- createInputObj(c, s, a) {
72
- let res = f1.init.bind(this)(c, s, a);
73
- res = f1.chained.reduce((prev, cur) => cur.bind(this)(prev), res);
74
- return f2.bind(this)(res);
75
- }
76
- activate_final(c, s, a, input) {
77
- if (!input)
78
- return [];
79
- const res = input.next();
80
- const ret = res.flatMap(i => i.type === type ? f3.bind(this)(i) : []);
81
- implyVar.forEach(f => {
82
- const [key, val] = f.bind(this)(ret, c, s, a);
83
- c.addShareMemory(this, key, val);
84
- });
85
- return ret;
86
- }
87
- getDisplayInput(c, system) {
88
- return revealKeys.map(k => { var _a; return (_a = this.attr.get(k)) !== null && _a !== void 0 ? _a : 0; });
89
- }
90
- };
91
- }
92
- }
93
- class eff_gen_zones extends eff_gen {
94
- constructor() {
95
- super(...arguments);
96
- this.checkInputType = systemRegistry_1.inputType.zone;
97
- }
98
- /**Down pushes the input to cards */
99
- cards(input_f2_new, newActivate) {
100
- return this.retarget("card", (p) => p.cards(), input_f2_new, newActivate);
101
- }
102
- pos(input_f2_new, newActivate) {
103
- return this.retarget("pos", (p) => p.pos(), input_f2_new, newActivate);
104
- }
105
- }
106
- class eff_gen_cards extends eff_gen {
107
- constructor() {
108
- super(...arguments);
109
- this.checkInputType = systemRegistry_1.inputType.card;
110
- }
111
- zones(input_f2_new, newActivate) {
112
- return this.retarget("zone", (p) => p.zones(), input_f2_new, newActivate);
113
- }
114
- pos(input_f2_new, newActivate) {
115
- return this.retarget("pos", (p) => p.pos(), input_f2_new, newActivate);
116
- }
117
- }
118
- class eff_gen_pos extends eff_gen {
119
- constructor() {
120
- super(...arguments);
121
- this.checkInputType = systemRegistry_1.inputType.position;
122
- }
123
- }
124
- const eff_manip = {
125
- combine(regen1, regen2) {
126
- }
127
- };
@@ -1,28 +0,0 @@
1
- import { loadOptions } from "../../effectTextParser";
2
- import Card from "../../types/abstract/gameComponents/card";
3
- import type Zone from "../../types/abstract/gameComponents/zone";
4
- import type queenSystem from "../queenSystem";
5
- import type { dry_system, player_stat } from "../../data/systemRegistry";
6
- import { parseMode, DisplayComponent } from "../../types/abstract/parser";
7
- import { LocalizedCard, LocalizedPlayer, LocalizedSystem, LocalizedZone } from "../../types/abstract/serializedGameComponents/Localized";
8
- import registryHandler from "./registryHandler";
9
- export default class Localizer {
10
- private loader;
11
- private parser;
12
- private loaded;
13
- private __s;
14
- get languageID(): import("../../types/abstract/gameComponents/settings").supporttedLanguages;
15
- get languageStr(): string;
16
- get currLanguageData(): Record<string, string> | undefined;
17
- constructor(s: dry_system, regs: registryHandler);
18
- load(l: loadOptions): Promise<void>;
19
- localizeStandaloneString(s: string, input: (number | string)[]): DisplayComponent[] | undefined;
20
- getLocalizedSymbol(s: string): string | undefined;
21
- getAndParseLocalizedSymbol(s: string, mode?: parseMode, card?: Card, pid?: number): DisplayComponent[] | undefined;
22
- localizeCard(c?: Card, mode?: parseMode): LocalizedCard | undefined;
23
- localizeZone(z?: Zone, mode?: parseMode): LocalizedZone | undefined;
24
- localizePlayer(player: player_stat, mode?: parseMode): LocalizedPlayer;
25
- localizeSystem(s?: queenSystem, mode?: parseMode): LocalizedSystem | undefined;
26
- localizeCardFromKey(s: queenSystem | undefined, c_key: string, variants?: string[], mode?: parseMode): LocalizedCard | undefined;
27
- get isLoaded(): boolean;
28
- }