qpremake 1.5.1
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.
- package/README.md +184 -0
- package/lib/_localizationFiles/English.d.ts +2 -0
- package/lib/_localizationFiles/English.js +307 -0
- package/lib/_mods/parserModules/addSymbol.d.ts +7 -0
- package/lib/_mods/parserModules/addSymbol.js +18 -0
- package/lib/_mods/parserModules/expression.d.ts +7 -0
- package/lib/_mods/parserModules/expression.js +45 -0
- package/lib/_mods/parserModules/expression_parser.d.ts +143 -0
- package/lib/_mods/parserModules/expression_parser.js +728 -0
- package/lib/_mods/parserModules/img.d.ts +8 -0
- package/lib/_mods/parserModules/img.js +42 -0
- package/lib/_mods/parserModules/qpOriginal.d.ts +5 -0
- package/lib/_mods/parserModules/qpOriginal.js +27 -0
- package/lib/_mods/parserModules/sectionID.d.ts +13 -0
- package/lib/_mods/parserModules/sectionID.js +56 -0
- package/lib/_mods/parserModules/tags.d.ts +9 -0
- package/lib/_mods/parserModules/tags.js +29 -0
- package/lib/_mods/parserModules/uaddminus.d.ts +9 -0
- package/lib/_mods/parserModules/uaddminus.js +42 -0
- package/lib/_mods/parserModules/variantCheck.d.ts +10 -0
- package/lib/_mods/parserModules/variantCheck.js +53 -0
- package/lib/_queenSystem/handler/actionGenrator.d.ts +994 -0
- package/lib/_queenSystem/handler/actionGenrator.js +646 -0
- package/lib/_queenSystem/handler/actionInputGenerator.d.ts +95 -0
- package/lib/_queenSystem/handler/actionInputGenerator.js +373 -0
- package/lib/_queenSystem/handler/actionInputRequesterGenerator.d.ts +92 -0
- package/lib/_queenSystem/handler/actionInputRequesterGenerator.js +341 -0
- package/lib/_queenSystem/handler/cardHandler.d.ts +20 -0
- package/lib/_queenSystem/handler/cardHandler.js +61 -0
- package/lib/_queenSystem/handler/effectGenerator.d.ts +1 -0
- package/lib/_queenSystem/handler/effectGenerator.js +127 -0
- package/lib/_queenSystem/handler/localizationHandler.d.ts +28 -0
- package/lib/_queenSystem/handler/localizationHandler.js +166 -0
- package/lib/_queenSystem/handler/modHandler.d.ts +10 -0
- package/lib/_queenSystem/handler/modHandler.js +36 -0
- package/lib/_queenSystem/handler/oldDataProcessor.d.ts +9 -0
- package/lib/_queenSystem/handler/oldDataProcessor.js +129 -0
- package/lib/_queenSystem/handler/registryHandler.d.ts +36 -0
- package/lib/_queenSystem/handler/registryHandler.js +63 -0
- package/lib/_queenSystem/handler/zoneHandler.d.ts +102 -0
- package/lib/_queenSystem/handler/zoneHandler.js +606 -0
- package/lib/_queenSystem/loader/loader_card.d.ts +20 -0
- package/lib/_queenSystem/loader/loader_card.js +124 -0
- package/lib/_queenSystem/loader/loader_effect.d.ts +27 -0
- package/lib/_queenSystem/loader/loader_effect.js +163 -0
- package/lib/_queenSystem/loader/loader_handler.d.ts +11 -0
- package/lib/_queenSystem/loader/loader_handler.js +24 -0
- package/lib/_queenSystem/loader/loader_localization.d.ts +11 -0
- package/lib/_queenSystem/loader/loader_localization.js +73 -0
- package/lib/_queenSystem/loader/loader_mod.d.ts +10 -0
- package/lib/_queenSystem/loader/loader_mod.js +72 -0
- package/lib/_queenSystem/loader/loader_subtype.d.ts +9 -0
- package/lib/_queenSystem/loader/loader_subtype.js +39 -0
- package/lib/_queenSystem/loader/loader_type.d.ts +9 -0
- package/lib/_queenSystem/loader/loader_type.js +39 -0
- package/lib/_queenSystem/loader/loader_zone.d.ts +14 -0
- package/lib/_queenSystem/loader/loader_zone.js +35 -0
- package/lib/_queenSystem/queenSystem.d.ts +127 -0
- package/lib/_queenSystem/queenSystem.js +996 -0
- package/lib/_queenSystem/renderer/rendererInterface.d.ts +9 -0
- package/lib/_queenSystem/renderer/rendererInterface.js +2 -0
- package/lib/data/actionRegistry.d.ts +56 -0
- package/lib/data/actionRegistry.js +60 -0
- package/lib/data/cardRegistry.d.ts +1162 -0
- package/lib/data/cardRegistry.js +716 -0
- package/lib/data/deckRegistry.d.ts +19 -0
- package/lib/data/deckRegistry.js +41 -0
- package/lib/data/effectRegistry.d.ts +465 -0
- package/lib/data/effectRegistry.js +151 -0
- package/lib/data/effectTypeRegistry.d.ts +14 -0
- package/lib/data/effectTypeRegistry.js +14 -0
- package/lib/data/operatorRegistry.d.ts +92 -0
- package/lib/data/operatorRegistry.js +82 -0
- package/lib/data/rarityRegistry.d.ts +28 -0
- package/lib/data/rarityRegistry.js +63 -0
- package/lib/data/registryRegistry.d.ts +10 -0
- package/lib/data/registryRegistry.js +14 -0
- package/lib/data/subtypeRegistry.d.ts +15 -0
- package/lib/data/subtypeRegistry.js +15 -0
- package/lib/data/systemRegistry.d.ts +253 -0
- package/lib/data/systemRegistry.js +56 -0
- package/lib/data/zoneRegistry.d.ts +43 -0
- package/lib/data/zoneRegistry.js +157 -0
- package/lib/effectTextParser/index.d.ts +42 -0
- package/lib/effectTextParser/index.js +316 -0
- package/lib/global/index.d.ts +8 -0
- package/lib/global/index.js +12 -0
- package/lib/index.d.ts +6344 -0
- package/lib/index.js +213 -0
- package/lib/specificEffects/e_cond.d.ts +11 -0
- package/lib/specificEffects/e_cond.js +36 -0
- package/lib/specificEffects/e_fruit.d.ts +3 -0
- package/lib/specificEffects/e_fruit.js +187 -0
- package/lib/specificEffects/e_generic.d.ts +191 -0
- package/lib/specificEffects/e_generic.js +662 -0
- package/lib/specificEffects/e_generic_cardTargetting.d.ts +38 -0
- package/lib/specificEffects/e_generic_cardTargetting.js +82 -0
- package/lib/specificEffects/e_generic_noneTargetting.d.ts +10 -0
- package/lib/specificEffects/e_generic_noneTargetting.js +26 -0
- package/lib/specificEffects/e_status.d.ts +80 -0
- package/lib/specificEffects/e_status.js +151 -0
- package/lib/specificEffects/e_test.d.ts +3 -0
- package/lib/specificEffects/e_test.js +21 -0
- package/lib/types/abstract/gameComponents/API.d.ts +19 -0
- package/lib/types/abstract/gameComponents/API.js +2 -0
- package/lib/types/abstract/gameComponents/card.d.ts +108 -0
- package/lib/types/abstract/gameComponents/card.js +771 -0
- package/lib/types/abstract/gameComponents/effect.d.ts +82 -0
- package/lib/types/abstract/gameComponents/effect.js +331 -0
- package/lib/types/abstract/gameComponents/effectSubtype.d.ts +22 -0
- package/lib/types/abstract/gameComponents/effectSubtype.js +40 -0
- package/lib/types/abstract/gameComponents/effectType.d.ts +11 -0
- package/lib/types/abstract/gameComponents/effectType.js +8 -0
- package/lib/types/abstract/gameComponents/settings.d.ts +80 -0
- package/lib/types/abstract/gameComponents/settings.js +68 -0
- package/lib/types/abstract/gameComponents/zone.d.ts +113 -0
- package/lib/types/abstract/gameComponents/zone.js +614 -0
- package/lib/types/abstract/gameComponents/zone_gridBased.d.ts +18 -0
- package/lib/types/abstract/gameComponents/zone_gridBased.js +58 -0
- package/lib/types/abstract/gameComponents/zone_stackBased.d.ts +13 -0
- package/lib/types/abstract/gameComponents/zone_stackBased.js +55 -0
- package/lib/types/abstract/generics/node.d.ts +23 -0
- package/lib/types/abstract/generics/node.js +46 -0
- package/lib/types/abstract/generics/position.d.ts +23 -0
- package/lib/types/abstract/generics/position.js +91 -0
- package/lib/types/abstract/generics/tree.d.ts +25 -0
- package/lib/types/abstract/generics/tree.js +153 -0
- package/lib/types/abstract/generics/universalResponse.d.ts +4 -0
- package/lib/types/abstract/generics/universalResponse.js +2 -0
- package/lib/types/abstract/generics/wraper.d.ts +21 -0
- package/lib/types/abstract/generics/wraper.js +56 -0
- package/lib/types/abstract/parser/component.d.ts +88 -0
- package/lib/types/abstract/parser/component.js +132 -0
- package/lib/types/abstract/parser/index.d.ts +6 -0
- package/lib/types/abstract/parser/index.js +28 -0
- package/lib/types/abstract/parser/modPack.d.ts +21 -0
- package/lib/types/abstract/parser/modPack.js +48 -0
- package/lib/types/abstract/parser/moduleInputObject.d.ts +12 -0
- package/lib/types/abstract/parser/moduleInputObject.js +21 -0
- package/lib/types/abstract/parser/options.d.ts +31 -0
- package/lib/types/abstract/parser/options.js +45 -0
- package/lib/types/abstract/serializedGameComponents/Gamestate.d.ts +46 -0
- package/lib/types/abstract/serializedGameComponents/Gamestate.js +70 -0
- package/lib/types/abstract/serializedGameComponents/Localized.d.ts +69 -0
- package/lib/types/abstract/serializedGameComponents/Localized.js +84 -0
- package/lib/types/defaultZones/ability.d.ts +10 -0
- package/lib/types/defaultZones/ability.js +22 -0
- package/lib/types/defaultZones/deck.d.ts +25 -0
- package/lib/types/defaultZones/deck.js +90 -0
- package/lib/types/defaultZones/drop.d.ts +5 -0
- package/lib/types/defaultZones/drop.js +13 -0
- package/lib/types/defaultZones/field.d.ts +11 -0
- package/lib/types/defaultZones/field.js +35 -0
- package/lib/types/defaultZones/grave.d.ts +8 -0
- package/lib/types/defaultZones/grave.js +21 -0
- package/lib/types/defaultZones/hand.d.ts +5 -0
- package/lib/types/defaultZones/hand.js +14 -0
- package/lib/types/defaultZones/storage.d.ts +9 -0
- package/lib/types/defaultZones/storage.js +21 -0
- package/lib/types/defaultZones/system.d.ts +12 -0
- package/lib/types/defaultZones/system.js +35 -0
- package/lib/types/defaultZones/void.d.ts +4 -0
- package/lib/types/defaultZones/void.js +10 -0
- package/lib/types/effects/effectSubtypes/subtype_chained.d.ts +10 -0
- package/lib/types/effects/effectSubtypes/subtype_chained.js +17 -0
- package/lib/types/effects/effectSubtypes/subtype_delayed.d.ts +9 -0
- package/lib/types/effects/effectSubtypes/subtype_delayed.js +16 -0
- package/lib/types/effects/effectSubtypes/subtype_fieldLock.d.ts +9 -0
- package/lib/types/effects/effectSubtypes/subtype_fieldLock.js +21 -0
- package/lib/types/effects/effectSubtypes/subtype_graveLock.d.ts +9 -0
- package/lib/types/effects/effectSubtypes/subtype_graveLock.js +21 -0
- package/lib/types/effects/effectSubtypes/subtype_hand_or_fieldLock.d.ts +9 -0
- package/lib/types/effects/effectSubtypes/subtype_hand_or_fieldLock.js +21 -0
- package/lib/types/effects/effectSubtypes/subtype_hardUnique.d.ts +9 -0
- package/lib/types/effects/effectSubtypes/subtype_hardUnique.js +15 -0
- package/lib/types/effects/effectSubtypes/subtype_instant.d.ts +8 -0
- package/lib/types/effects/effectSubtypes/subtype_instant.js +20 -0
- package/lib/types/effects/effectSubtypes/subtype_once.d.ts +12 -0
- package/lib/types/effects/effectSubtypes/subtype_once.js +27 -0
- package/lib/types/effects/effectSubtypes/subtype_unique.d.ts +9 -0
- package/lib/types/effects/effectSubtypes/subtype_unique.js +16 -0
- package/lib/types/effects/effectTypes/initEffect.d.ts +7 -0
- package/lib/types/effects/effectTypes/initEffect.js +23 -0
- package/lib/types/effects/effectTypes/lockEffect.d.ts +9 -0
- package/lib/types/effects/effectTypes/lockEffect.js +25 -0
- package/lib/types/effects/effectTypes/manualEffect.d.ts +9 -0
- package/lib/types/effects/effectTypes/manualEffect.js +18 -0
- package/lib/types/effects/effectTypes/passiveEffect.d.ts +9 -0
- package/lib/types/effects/effectTypes/passiveEffect.js +23 -0
- package/lib/types/effects/effectTypes/triggerEffect.d.ts +9 -0
- package/lib/types/effects/effectTypes/triggerEffect.js +28 -0
- package/lib/types/errors/cannotLoad.d.ts +5 -0
- package/lib/types/errors/cannotLoad.js +13 -0
- package/lib/types/errors/cardNotExist.d.ts +5 -0
- package/lib/types/errors/cardNotExist.js +13 -0
- package/lib/types/errors/cardNotInApplicableZone.d.ts +5 -0
- package/lib/types/errors/cardNotInApplicableZone.js +13 -0
- package/lib/types/errors/effectCondNotMet.d.ts +5 -0
- package/lib/types/errors/effectCondNotMet.js +13 -0
- package/lib/types/errors/effectNotExist.d.ts +5 -0
- package/lib/types/errors/effectNotExist.js +13 -0
- package/lib/types/errors/error.d.ts +17 -0
- package/lib/types/errors/error.js +42 -0
- package/lib/types/errors/incorrectActionType.d.ts +5 -0
- package/lib/types/errors/incorrectActionType.js +13 -0
- package/lib/types/errors/index.d.ts +16 -0
- package/lib/types/errors/index.js +36 -0
- package/lib/types/errors/invalidOrderMap.d.ts +6 -0
- package/lib/types/errors/invalidOrderMap.js +14 -0
- package/lib/types/errors/invalidPosition.d.ts +6 -0
- package/lib/types/errors/invalidPosition.js +13 -0
- package/lib/types/errors/subTypeOverrideConflict.d.ts +7 -0
- package/lib/types/errors/subTypeOverrideConflict.js +15 -0
- package/lib/types/errors/unknownError.d.ts +5 -0
- package/lib/types/errors/unknownError.js +13 -0
- package/lib/types/errors/unregisteredAction.d.ts +6 -0
- package/lib/types/errors/unregisteredAction.js +13 -0
- package/lib/types/errors/wrongEffectIdx.d.ts +5 -0
- package/lib/types/errors/wrongEffectIdx.js +14 -0
- package/lib/types/errors/zoneAttrConflict.d.ts +5 -0
- package/lib/types/errors/zoneAttrConflict.js +15 -0
- package/lib/types/errors/zoneFull.d.ts +5 -0
- package/lib/types/errors/zoneFull.js +13 -0
- package/lib/types/errors/zoneNotExist.d.ts +5 -0
- package/lib/types/errors/zoneNotExist.js +13 -0
- package/lib/types/misc.d.ts +97 -0
- package/lib/types/misc.js +8 -0
- package/lib/types/mods/effectTextParserModule.d.ts +16 -0
- package/lib/types/mods/effectTextParserModule.js +81 -0
- package/lib/types/mods/gameModule.d.ts +5 -0
- package/lib/types/mods/gameModule.js +8 -0
- package/lib/utils/index.d.ts +78 -0
- package/lib/utils/index.js +562 -0
- package/package.json +45 -0
|
@@ -0,0 +1,132 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
//specifies the general textComponent
|
|
3
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4
|
+
exports.SymbolComponent = exports.ReferenceComponent = exports.IconComponent = exports.ImageComponent = exports.NumberComponent = exports.TextComponent = exports.DisplayComponent = exports.componentID = exports.iconID = void 0;
|
|
5
|
+
var iconID;
|
|
6
|
+
(function (iconID) {
|
|
7
|
+
//arrows
|
|
8
|
+
iconID[iconID["arrowUp"] = 0] = "arrowUp";
|
|
9
|
+
iconID[iconID["arrowDown"] = 1] = "arrowDown";
|
|
10
|
+
iconID[iconID["arrowLeft"] = 2] = "arrowLeft";
|
|
11
|
+
iconID[iconID["arrowRight"] = 3] = "arrowRight";
|
|
12
|
+
//double arrows
|
|
13
|
+
iconID[iconID["doubleArrowDown"] = 10] = "doubleArrowDown";
|
|
14
|
+
iconID[iconID["doubleArrowUp"] = 11] = "doubleArrowUp";
|
|
15
|
+
iconID[iconID["doubleArrowLeft"] = 12] = "doubleArrowLeft";
|
|
16
|
+
iconID[iconID["doubleArrowRight"] = 13] = "doubleArrowRight";
|
|
17
|
+
//effect icon
|
|
18
|
+
iconID[iconID["bonded"] = 100] = "bonded";
|
|
19
|
+
iconID[iconID["cached"] = 101] = "cached";
|
|
20
|
+
iconID[iconID["chain"] = 102] = "chain";
|
|
21
|
+
iconID[iconID["consumable"] = 103] = "consumable";
|
|
22
|
+
iconID[iconID["death"] = 104] = "death";
|
|
23
|
+
iconID[iconID["defense"] = 105] = "defense";
|
|
24
|
+
iconID[iconID["dragoonLink"] = 106] = "dragoonLink";
|
|
25
|
+
iconID[iconID["effect_condition"] = 107] = "effect_condition";
|
|
26
|
+
iconID[iconID["exclusive"] = 108] = "exclusive";
|
|
27
|
+
iconID[iconID["execute"] = 109] = "execute";
|
|
28
|
+
iconID[iconID["hardUnique"] = 110] = "hardUnique";
|
|
29
|
+
iconID[iconID["init"] = 111] = "init";
|
|
30
|
+
iconID[iconID["instant"] = 112] = "instant";
|
|
31
|
+
iconID[iconID["lock"] = 113] = "lock";
|
|
32
|
+
iconID[iconID["manual"] = 114] = "manual";
|
|
33
|
+
iconID[iconID["once"] = 115] = "once";
|
|
34
|
+
iconID[iconID["passive"] = 116] = "passive";
|
|
35
|
+
iconID[iconID["preload"] = 117] = "preload";
|
|
36
|
+
//^ after reprogram or start game, auto draw into hand,
|
|
37
|
+
// dont count towards the draw limit
|
|
38
|
+
iconID[iconID["trigger"] = 118] = "trigger";
|
|
39
|
+
iconID[iconID["unique"] = 119] = "unique";
|
|
40
|
+
iconID[iconID["void"] = 120] = "void";
|
|
41
|
+
//damage type
|
|
42
|
+
iconID[iconID["dmg_magic"] = 200] = "dmg_magic";
|
|
43
|
+
iconID[iconID["dmg_phys"] = 201] = "dmg_phys";
|
|
44
|
+
//misc
|
|
45
|
+
iconID[iconID["crash"] = 1000] = "crash";
|
|
46
|
+
iconID[iconID["loot"] = 1001] = "loot";
|
|
47
|
+
iconID[iconID["player_health"] = 1002] = "player_health";
|
|
48
|
+
})(iconID || (exports.iconID = iconID = {}));
|
|
49
|
+
var componentID;
|
|
50
|
+
(function (componentID) {
|
|
51
|
+
componentID[componentID["error"] = -1] = "error";
|
|
52
|
+
componentID[componentID["number"] = 1] = "number";
|
|
53
|
+
componentID[componentID["text"] = 2] = "text";
|
|
54
|
+
componentID[componentID["image"] = 3] = "image";
|
|
55
|
+
componentID[componentID["reference"] = 4] = "reference";
|
|
56
|
+
componentID[componentID["symbol"] = 5] = "symbol";
|
|
57
|
+
})(componentID || (exports.componentID = componentID = {}));
|
|
58
|
+
class DisplayComponent {
|
|
59
|
+
constructor(id = componentID.error, errMsg, fromCmd, raw) {
|
|
60
|
+
this.sectionIDs = [];
|
|
61
|
+
this.id = id;
|
|
62
|
+
if (this.id == componentID.error || errMsg) {
|
|
63
|
+
this.errorFlag = true;
|
|
64
|
+
this.errorMsg = errMsg ? errMsg : "Unknown component";
|
|
65
|
+
}
|
|
66
|
+
else {
|
|
67
|
+
this.errorFlag = false;
|
|
68
|
+
this.errorMsg = "";
|
|
69
|
+
}
|
|
70
|
+
this.fromCmd = (fromCmd) ? fromCmd : "";
|
|
71
|
+
this.raw = (raw) ? raw : "";
|
|
72
|
+
}
|
|
73
|
+
addSectionID(newID) {
|
|
74
|
+
if (typeof newID == "string")
|
|
75
|
+
this.sectionIDs.push(newID);
|
|
76
|
+
else
|
|
77
|
+
this.sectionIDs.push(...newID);
|
|
78
|
+
return this;
|
|
79
|
+
}
|
|
80
|
+
is(id) {
|
|
81
|
+
return this.id === componentID[id];
|
|
82
|
+
}
|
|
83
|
+
}
|
|
84
|
+
exports.DisplayComponent = DisplayComponent;
|
|
85
|
+
class TextComponent extends DisplayComponent {
|
|
86
|
+
constructor(str, errMsg, fromCmd, raw) {
|
|
87
|
+
super(componentID.text, errMsg, fromCmd, raw);
|
|
88
|
+
this.num = -100;
|
|
89
|
+
this.str = str;
|
|
90
|
+
const num = Number(str);
|
|
91
|
+
if (!isNaN(num) && str.trim().length) {
|
|
92
|
+
this.id = componentID.number;
|
|
93
|
+
this.num = Number(str);
|
|
94
|
+
}
|
|
95
|
+
}
|
|
96
|
+
}
|
|
97
|
+
exports.TextComponent = TextComponent;
|
|
98
|
+
class NumberComponent extends DisplayComponent {
|
|
99
|
+
constructor(num, errMsg, fromCmd, raw) {
|
|
100
|
+
super(componentID.number, errMsg, fromCmd, raw);
|
|
101
|
+
this.num = num;
|
|
102
|
+
}
|
|
103
|
+
}
|
|
104
|
+
exports.NumberComponent = NumberComponent;
|
|
105
|
+
class ImageComponent extends DisplayComponent {
|
|
106
|
+
constructor(url, errMsg, fromCmd, raw) {
|
|
107
|
+
super(componentID.image, errMsg, fromCmd, raw);
|
|
108
|
+
this.url = url;
|
|
109
|
+
}
|
|
110
|
+
}
|
|
111
|
+
exports.ImageComponent = ImageComponent;
|
|
112
|
+
class IconComponent extends ImageComponent {
|
|
113
|
+
constructor(id, errMsg, fromCmd, raw) {
|
|
114
|
+
super(`https://raw.githubusercontent.com/qpProject/qpProject.github.io/refs/heads/main/icons/${iconID[id]}.png`, errMsg, fromCmd, raw);
|
|
115
|
+
this.iconID = id;
|
|
116
|
+
}
|
|
117
|
+
}
|
|
118
|
+
exports.IconComponent = IconComponent;
|
|
119
|
+
class ReferenceComponent extends DisplayComponent {
|
|
120
|
+
constructor(ref, errMsg, fromCmd, raw) {
|
|
121
|
+
super(componentID.reference, errMsg, fromCmd, raw);
|
|
122
|
+
this.ref = ref;
|
|
123
|
+
}
|
|
124
|
+
}
|
|
125
|
+
exports.ReferenceComponent = ReferenceComponent;
|
|
126
|
+
class SymbolComponent extends DisplayComponent {
|
|
127
|
+
constructor(id, errMsg, fromCmd, raw) {
|
|
128
|
+
super(componentID.symbol, errMsg, fromCmd, raw);
|
|
129
|
+
this.symbolID = id;
|
|
130
|
+
}
|
|
131
|
+
}
|
|
132
|
+
exports.SymbolComponent = SymbolComponent;
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { iconID, DisplayComponent, componentID, TextComponent, NumberComponent, ImageComponent, ReferenceComponent, IconComponent, SymbolComponent } from "./component";
|
|
2
|
+
import modPack from "./modPack";
|
|
3
|
+
import { ParserModule } from "../../mods/effectTextParserModule";
|
|
4
|
+
import moduleInputObject from "./moduleInputObject";
|
|
5
|
+
import { parseMode, parseOptions, loadOptions, lib_parse_option } from "./options";
|
|
6
|
+
export { iconID, DisplayComponent, componentID, TextComponent, NumberComponent, ImageComponent, ReferenceComponent, IconComponent, SymbolComponent, ParserModule, modPack, moduleInputObject, parseMode, parseOptions, loadOptions, parseMode as mode, lib_parse_option, };
|
|
@@ -0,0 +1,28 @@
|
|
|
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
|
+
exports.lib_parse_option = exports.mode = exports.loadOptions = exports.parseOptions = exports.parseMode = exports.moduleInputObject = exports.modPack = exports.ParserModule = exports.SymbolComponent = exports.IconComponent = exports.ReferenceComponent = exports.ImageComponent = exports.NumberComponent = exports.TextComponent = exports.componentID = exports.DisplayComponent = exports.iconID = void 0;
|
|
7
|
+
const component_1 = require("./component");
|
|
8
|
+
Object.defineProperty(exports, "iconID", { enumerable: true, get: function () { return component_1.iconID; } });
|
|
9
|
+
Object.defineProperty(exports, "DisplayComponent", { enumerable: true, get: function () { return component_1.DisplayComponent; } });
|
|
10
|
+
Object.defineProperty(exports, "componentID", { enumerable: true, get: function () { return component_1.componentID; } });
|
|
11
|
+
Object.defineProperty(exports, "TextComponent", { enumerable: true, get: function () { return component_1.TextComponent; } });
|
|
12
|
+
Object.defineProperty(exports, "NumberComponent", { enumerable: true, get: function () { return component_1.NumberComponent; } });
|
|
13
|
+
Object.defineProperty(exports, "ImageComponent", { enumerable: true, get: function () { return component_1.ImageComponent; } });
|
|
14
|
+
Object.defineProperty(exports, "ReferenceComponent", { enumerable: true, get: function () { return component_1.ReferenceComponent; } });
|
|
15
|
+
Object.defineProperty(exports, "IconComponent", { enumerable: true, get: function () { return component_1.IconComponent; } });
|
|
16
|
+
Object.defineProperty(exports, "SymbolComponent", { enumerable: true, get: function () { return component_1.SymbolComponent; } });
|
|
17
|
+
const modPack_1 = __importDefault(require("./modPack"));
|
|
18
|
+
exports.modPack = modPack_1.default;
|
|
19
|
+
const effectTextParserModule_1 = require("../../mods/effectTextParserModule");
|
|
20
|
+
Object.defineProperty(exports, "ParserModule", { enumerable: true, get: function () { return effectTextParserModule_1.ParserModule; } });
|
|
21
|
+
const moduleInputObject_1 = __importDefault(require("./moduleInputObject"));
|
|
22
|
+
exports.moduleInputObject = moduleInputObject_1.default;
|
|
23
|
+
const options_1 = require("./options");
|
|
24
|
+
Object.defineProperty(exports, "parseMode", { enumerable: true, get: function () { return options_1.parseMode; } });
|
|
25
|
+
Object.defineProperty(exports, "mode", { enumerable: true, get: function () { return options_1.parseMode; } });
|
|
26
|
+
Object.defineProperty(exports, "parseOptions", { enumerable: true, get: function () { return options_1.parseOptions; } });
|
|
27
|
+
Object.defineProperty(exports, "loadOptions", { enumerable: true, get: function () { return options_1.loadOptions; } });
|
|
28
|
+
Object.defineProperty(exports, "lib_parse_option", { enumerable: true, get: function () { return options_1.lib_parse_option; } });
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { DisplayComponent } from "./component";
|
|
2
|
+
import { ParserModule } from "../../mods/effectTextParserModule";
|
|
3
|
+
import moduleInputObject from "./moduleInputObject";
|
|
4
|
+
import { parseOptions } from "./options";
|
|
5
|
+
import type { nestedTree } from "../../misc";
|
|
6
|
+
declare class modPack extends ParserModule {
|
|
7
|
+
private moduleMap;
|
|
8
|
+
protected moduleArr: ParserModule[];
|
|
9
|
+
cmdName: string[];
|
|
10
|
+
requiredAttr: string[][];
|
|
11
|
+
doCheckRequiredAttr: boolean;
|
|
12
|
+
private doCheckRequiredAttrArr;
|
|
13
|
+
private cmdTrueIndex;
|
|
14
|
+
protected loadModules(): void;
|
|
15
|
+
generateInputObj(cmdIndex: number, attrObj: {
|
|
16
|
+
[attr: string]: string;
|
|
17
|
+
}, children: nestedTree<DisplayComponent>): moduleInputObject | undefined;
|
|
18
|
+
isValidAttr(cmdIndex: number, attrName: string, attr: string): boolean;
|
|
19
|
+
evaluate(cmd: string, args: moduleInputObject, option: parseOptions, raw: string): nestedTree<DisplayComponent>;
|
|
20
|
+
}
|
|
21
|
+
export default modPack;
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
const effectTextParserModule_1 = require("../../mods/effectTextParserModule");
|
|
4
|
+
class modPack extends effectTextParserModule_1.ParserModule {
|
|
5
|
+
constructor() {
|
|
6
|
+
super(...arguments);
|
|
7
|
+
this.moduleMap = new Map();
|
|
8
|
+
this.moduleArr = [];
|
|
9
|
+
this.cmdName = [];
|
|
10
|
+
this.requiredAttr = [];
|
|
11
|
+
this.doCheckRequiredAttr = false; //not used
|
|
12
|
+
this.doCheckRequiredAttrArr = [];
|
|
13
|
+
this.cmdTrueIndex = [];
|
|
14
|
+
}
|
|
15
|
+
loadModules() {
|
|
16
|
+
this.moduleArr.forEach((i, index) => {
|
|
17
|
+
var _a;
|
|
18
|
+
i.cmdName.forEach(j => {
|
|
19
|
+
this.moduleMap.set(j, index);
|
|
20
|
+
});
|
|
21
|
+
for (let k = 0; k < i.cmdName.length; k++) {
|
|
22
|
+
this.cmdName.push(i.cmdName[k]);
|
|
23
|
+
this.requiredAttr.push((_a = i.requiredAttr[k]) !== null && _a !== void 0 ? _a : []);
|
|
24
|
+
this.doCheckRequiredAttrArr.push(i.doCheckRequiredAttr);
|
|
25
|
+
this.cmdTrueIndex.push(k);
|
|
26
|
+
}
|
|
27
|
+
});
|
|
28
|
+
}
|
|
29
|
+
generateInputObj(cmdIndex, attrObj, children) {
|
|
30
|
+
const moduleIndex = this.moduleMap.get(this.cmdName[cmdIndex]);
|
|
31
|
+
if (moduleIndex === undefined)
|
|
32
|
+
return undefined;
|
|
33
|
+
return this.moduleArr[moduleIndex].generateInputObj(this.cmdTrueIndex[cmdIndex], attrObj, children);
|
|
34
|
+
}
|
|
35
|
+
isValidAttr(cmdIndex, attrName, attr) {
|
|
36
|
+
const moduleIndex = this.moduleMap.get(this.cmdName[cmdIndex]);
|
|
37
|
+
if (moduleIndex === undefined)
|
|
38
|
+
return false;
|
|
39
|
+
return this.moduleArr[moduleIndex].isValidAttr(this.cmdTrueIndex[cmdIndex], attrName, attr);
|
|
40
|
+
}
|
|
41
|
+
evaluate(cmd, args, option, raw) {
|
|
42
|
+
const moduleIndex = this.moduleMap.get(cmd);
|
|
43
|
+
if (moduleIndex === undefined)
|
|
44
|
+
return [];
|
|
45
|
+
return this.moduleArr[moduleIndex].evaluate(cmd, args, option, raw);
|
|
46
|
+
}
|
|
47
|
+
}
|
|
48
|
+
exports.default = modPack;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import type { DisplayComponent } from "./component";
|
|
2
|
+
import type { nestedTree } from "../../misc";
|
|
3
|
+
export default class moduleInputObject {
|
|
4
|
+
private paramMap;
|
|
5
|
+
private chilren;
|
|
6
|
+
constructor(attrObj: {
|
|
7
|
+
[attr: string]: string;
|
|
8
|
+
}, children: nestedTree<DisplayComponent>);
|
|
9
|
+
hasAttr(key: string): boolean;
|
|
10
|
+
getAttr(key: string): string | undefined;
|
|
11
|
+
getChilren(): nestedTree<DisplayComponent>;
|
|
12
|
+
}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
class moduleInputObject {
|
|
4
|
+
constructor(attrObj, children) {
|
|
5
|
+
this.paramMap = new Map();
|
|
6
|
+
Object.keys(attrObj).forEach(i => {
|
|
7
|
+
this.paramMap.set(i, attrObj[i]);
|
|
8
|
+
});
|
|
9
|
+
this.chilren = children;
|
|
10
|
+
}
|
|
11
|
+
hasAttr(key) {
|
|
12
|
+
return this.paramMap.has(key) && this.paramMap.get(key) != undefined;
|
|
13
|
+
}
|
|
14
|
+
getAttr(key) {
|
|
15
|
+
return this.paramMap.get(key);
|
|
16
|
+
}
|
|
17
|
+
getChilren() {
|
|
18
|
+
return this.chilren;
|
|
19
|
+
}
|
|
20
|
+
}
|
|
21
|
+
exports.default = moduleInputObject;
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import type { dry_card } from "../../../data/systemRegistry";
|
|
2
|
+
export declare enum parseMode {
|
|
3
|
+
"gameplay" = 0,
|
|
4
|
+
"catalog" = 1,
|
|
5
|
+
"reprogram" = 2,
|
|
6
|
+
"info" = 3,
|
|
7
|
+
"debug" = 4
|
|
8
|
+
}
|
|
9
|
+
declare class parseOptions {
|
|
10
|
+
flat_parse: boolean;
|
|
11
|
+
mode: parseMode;
|
|
12
|
+
cardData?: dry_card;
|
|
13
|
+
inputNumber: number[];
|
|
14
|
+
inputString: string[];
|
|
15
|
+
constructor(mode: parseMode, input: (number | string)[], flat_parse?: boolean, card?: dry_card);
|
|
16
|
+
}
|
|
17
|
+
declare class loadOptions {
|
|
18
|
+
modulesInUse: string[];
|
|
19
|
+
modulePath: string;
|
|
20
|
+
constructor(modulePath: string, modules?: string[]);
|
|
21
|
+
}
|
|
22
|
+
declare const lib_parse_option: {
|
|
23
|
+
preserveComments: boolean;
|
|
24
|
+
preserveXmlDeclaration: boolean;
|
|
25
|
+
preserveDocumentType: boolean;
|
|
26
|
+
ignoreUndefinedEntities: boolean;
|
|
27
|
+
includeOffsets: boolean;
|
|
28
|
+
sortAttributes: boolean;
|
|
29
|
+
preserveCdata: boolean;
|
|
30
|
+
};
|
|
31
|
+
export { parseOptions, loadOptions, lib_parse_option };
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.lib_parse_option = exports.loadOptions = exports.parseOptions = exports.parseMode = void 0;
|
|
4
|
+
//TODO : integrate cardData and effectData into this
|
|
5
|
+
var parseMode;
|
|
6
|
+
(function (parseMode) {
|
|
7
|
+
parseMode[parseMode["gameplay"] = 0] = "gameplay";
|
|
8
|
+
parseMode[parseMode["catalog"] = 1] = "catalog";
|
|
9
|
+
parseMode[parseMode["reprogram"] = 2] = "reprogram";
|
|
10
|
+
parseMode[parseMode["info"] = 3] = "info";
|
|
11
|
+
parseMode[parseMode["debug"] = 4] = "debug";
|
|
12
|
+
})(parseMode || (exports.parseMode = parseMode = {}));
|
|
13
|
+
class parseOptions {
|
|
14
|
+
constructor(mode, input, flat_parse = false, card) {
|
|
15
|
+
this.flat_parse = flat_parse;
|
|
16
|
+
this.mode = mode;
|
|
17
|
+
this.cardData = card;
|
|
18
|
+
this.inputNumber = [];
|
|
19
|
+
this.inputString = [];
|
|
20
|
+
input.forEach(i => {
|
|
21
|
+
if (typeof i == "string")
|
|
22
|
+
this.inputString.push(i);
|
|
23
|
+
else
|
|
24
|
+
this.inputNumber.push(i);
|
|
25
|
+
});
|
|
26
|
+
}
|
|
27
|
+
}
|
|
28
|
+
exports.parseOptions = parseOptions;
|
|
29
|
+
class loadOptions {
|
|
30
|
+
constructor(modulePath, modules = []) {
|
|
31
|
+
this.modulePath = modulePath;
|
|
32
|
+
this.modulesInUse = modules;
|
|
33
|
+
}
|
|
34
|
+
}
|
|
35
|
+
exports.loadOptions = loadOptions;
|
|
36
|
+
const lib_parse_option = {
|
|
37
|
+
preserveComments: false,
|
|
38
|
+
preserveXmlDeclaration: false,
|
|
39
|
+
preserveDocumentType: false,
|
|
40
|
+
ignoreUndefinedEntities: false,
|
|
41
|
+
includeOffsets: true,
|
|
42
|
+
sortAttributes: false,
|
|
43
|
+
preserveCdata: false,
|
|
44
|
+
};
|
|
45
|
+
exports.lib_parse_option = lib_parse_option;
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
import type { partitionData } from "../../../data/cardRegistry";
|
|
2
|
+
import type { deckRegistry } from "../../../data/deckRegistry";
|
|
3
|
+
import type effectTypeRegistry from "../../../data/effectTypeRegistry";
|
|
4
|
+
import type { operatorID } from "../../../data/operatorRegistry";
|
|
5
|
+
import type { subtypeName } from "../../../data/subtypeRegistry";
|
|
6
|
+
import type { playerTypeID } from "../../../data/zoneRegistry";
|
|
7
|
+
export declare class Serialized_effect {
|
|
8
|
+
dataID: string;
|
|
9
|
+
typeID: keyof typeof effectTypeRegistry;
|
|
10
|
+
subTypeIDs: subtypeName[];
|
|
11
|
+
displayID_default: string;
|
|
12
|
+
attr: Record<string, number>;
|
|
13
|
+
constructor(dataID: string, typeID: keyof typeof effectTypeRegistry, subTypeIDs: subtypeName[], displayID_default: string | undefined, //undefined means use effectID
|
|
14
|
+
attr: Map<string, any>);
|
|
15
|
+
}
|
|
16
|
+
export declare class SerializedCard {
|
|
17
|
+
dataID: string;
|
|
18
|
+
variants: string[];
|
|
19
|
+
effects: Serialized_effect[];
|
|
20
|
+
statusEffects: Serialized_effect[];
|
|
21
|
+
partitions: partitionData[];
|
|
22
|
+
attr: Record<string, any>;
|
|
23
|
+
constructor(dataID: string, variants: string[] | undefined, effects: Serialized_effect[], statusEffects: Serialized_effect[], partitions: partitionData[], attr: Map<string, any>);
|
|
24
|
+
}
|
|
25
|
+
export declare class SerializedZone {
|
|
26
|
+
classID: string;
|
|
27
|
+
dataID: string;
|
|
28
|
+
cardArr: (SerializedCard | undefined)[];
|
|
29
|
+
types: number[];
|
|
30
|
+
attr: Record<string, any>;
|
|
31
|
+
constructor(classID: string, dataID: string, cardArr: (SerializedCard | undefined)[], types: number[], attr: Map<string, any>);
|
|
32
|
+
}
|
|
33
|
+
export declare class SerializedPlayer {
|
|
34
|
+
pType: playerTypeID;
|
|
35
|
+
heart: number;
|
|
36
|
+
operator: operatorID;
|
|
37
|
+
deckName?: deckRegistry | undefined;
|
|
38
|
+
constructor(pType: playerTypeID, heart: number, operator: operatorID, deckName?: deckRegistry | undefined);
|
|
39
|
+
}
|
|
40
|
+
export declare class SerializedSystem {
|
|
41
|
+
players: SerializedPlayer[];
|
|
42
|
+
zones: SerializedZone[];
|
|
43
|
+
turn: number;
|
|
44
|
+
wave: number;
|
|
45
|
+
constructor(players: SerializedPlayer[], zones: SerializedZone[], turn: number, wave: number);
|
|
46
|
+
}
|
|
@@ -0,0 +1,70 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
//For saving / loading
|
|
3
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4
|
+
exports.SerializedSystem = exports.SerializedPlayer = exports.SerializedZone = exports.SerializedCard = exports.Serialized_effect = void 0;
|
|
5
|
+
class Serialized_effect {
|
|
6
|
+
constructor(
|
|
7
|
+
// public id : string, //generated again
|
|
8
|
+
dataID, typeID, subTypeIDs, displayID_default = dataID, //undefined means use effectID
|
|
9
|
+
attr) {
|
|
10
|
+
this.dataID = dataID;
|
|
11
|
+
this.typeID = typeID;
|
|
12
|
+
this.subTypeIDs = subTypeIDs;
|
|
13
|
+
this.displayID_default = displayID_default;
|
|
14
|
+
this.attr = {};
|
|
15
|
+
attr.forEach((val, key) => {
|
|
16
|
+
if (typeof val === "number")
|
|
17
|
+
this.attr[key] = val;
|
|
18
|
+
});
|
|
19
|
+
}
|
|
20
|
+
}
|
|
21
|
+
exports.Serialized_effect = Serialized_effect;
|
|
22
|
+
class SerializedCard {
|
|
23
|
+
constructor(
|
|
24
|
+
// public id : string, //generated again
|
|
25
|
+
dataID, variants = [],
|
|
26
|
+
//I have to save partition too ahhh
|
|
27
|
+
effects, statusEffects, partitions, attr) {
|
|
28
|
+
this.dataID = dataID;
|
|
29
|
+
this.variants = variants;
|
|
30
|
+
this.effects = effects;
|
|
31
|
+
this.statusEffects = statusEffects;
|
|
32
|
+
this.partitions = partitions;
|
|
33
|
+
this.attr = {};
|
|
34
|
+
attr.forEach((val, key) => {
|
|
35
|
+
this.attr[key] = val; //Hopefully serializable
|
|
36
|
+
});
|
|
37
|
+
}
|
|
38
|
+
}
|
|
39
|
+
exports.SerializedCard = SerializedCard;
|
|
40
|
+
class SerializedZone {
|
|
41
|
+
constructor(classID, dataID, cardArr, types, attr) {
|
|
42
|
+
this.classID = classID;
|
|
43
|
+
this.dataID = dataID;
|
|
44
|
+
this.cardArr = cardArr;
|
|
45
|
+
this.types = types;
|
|
46
|
+
this.attr = {};
|
|
47
|
+
attr.forEach((val, key) => {
|
|
48
|
+
this.attr[key] = val; //Hopefully serializable
|
|
49
|
+
});
|
|
50
|
+
}
|
|
51
|
+
}
|
|
52
|
+
exports.SerializedZone = SerializedZone;
|
|
53
|
+
class SerializedPlayer {
|
|
54
|
+
constructor(pType, heart, operator, deckName) {
|
|
55
|
+
this.pType = pType;
|
|
56
|
+
this.heart = heart;
|
|
57
|
+
this.operator = operator;
|
|
58
|
+
this.deckName = deckName;
|
|
59
|
+
}
|
|
60
|
+
}
|
|
61
|
+
exports.SerializedPlayer = SerializedPlayer;
|
|
62
|
+
class SerializedSystem {
|
|
63
|
+
constructor(players, zones, turn, wave) {
|
|
64
|
+
this.players = players;
|
|
65
|
+
this.zones = zones;
|
|
66
|
+
this.turn = turn;
|
|
67
|
+
this.wave = wave;
|
|
68
|
+
}
|
|
69
|
+
}
|
|
70
|
+
exports.SerializedSystem = SerializedSystem;
|
|
@@ -0,0 +1,69 @@
|
|
|
1
|
+
import type { rarityRegistry } from "../../../data/rarityRegistry";
|
|
2
|
+
import type { playerTypeID, zoneRegistry } from "../../../data/zoneRegistry";
|
|
3
|
+
import type { DisplayComponent } from "../parser";
|
|
4
|
+
type LocalizedString = DisplayComponent[];
|
|
5
|
+
export declare class LocalizedEffect {
|
|
6
|
+
id: number;
|
|
7
|
+
text: LocalizedString;
|
|
8
|
+
type: LocalizedString;
|
|
9
|
+
subtypes: LocalizedString[];
|
|
10
|
+
typeDesc?: LocalizedString | undefined;
|
|
11
|
+
subtypesDesc?: (LocalizedString | undefined)[] | undefined;
|
|
12
|
+
constructor(id: number, //pid technically
|
|
13
|
+
text: LocalizedString, type: LocalizedString, subtypes: LocalizedString[], typeDesc?: LocalizedString | undefined, subtypesDesc?: (LocalizedString | undefined)[] | undefined);
|
|
14
|
+
}
|
|
15
|
+
export declare class LocalizedCard {
|
|
16
|
+
id: string;
|
|
17
|
+
name: LocalizedString;
|
|
18
|
+
extensions: LocalizedString[];
|
|
19
|
+
effects: LocalizedEffect[];
|
|
20
|
+
statusEffects: LocalizedEffect[];
|
|
21
|
+
zoneID: number;
|
|
22
|
+
pos: number[];
|
|
23
|
+
atk: number;
|
|
24
|
+
hp: number;
|
|
25
|
+
maxAtk: number;
|
|
26
|
+
maxHp: number;
|
|
27
|
+
level: number;
|
|
28
|
+
rarity: rarityRegistry;
|
|
29
|
+
rarityName: LocalizedString;
|
|
30
|
+
archtype: LocalizedString[];
|
|
31
|
+
constructor(id: string, name: LocalizedString, extensions: LocalizedString[], effects: LocalizedEffect[], statusEffects: LocalizedEffect[], zoneID: number, pos: number[], atk: number, //display stat
|
|
32
|
+
hp: number, //display stat
|
|
33
|
+
maxAtk: number, maxHp: number, level: number, rarity: rarityRegistry, rarityName: LocalizedString, archtype: LocalizedString[]);
|
|
34
|
+
}
|
|
35
|
+
export declare class LocalizedZone {
|
|
36
|
+
id: number;
|
|
37
|
+
pid: number;
|
|
38
|
+
type: zoneRegistry[];
|
|
39
|
+
typeName: LocalizedString[];
|
|
40
|
+
name: LocalizedString;
|
|
41
|
+
cards: (LocalizedCard | undefined)[];
|
|
42
|
+
shape: number[];
|
|
43
|
+
constructor(id: number, pid: number, type: zoneRegistry[], typeName: LocalizedString[], name: LocalizedString, cards: (LocalizedCard | undefined)[], shape: number[]);
|
|
44
|
+
}
|
|
45
|
+
export declare class LocalizedAction {
|
|
46
|
+
id: number;
|
|
47
|
+
name: LocalizedString;
|
|
48
|
+
constructor(id: number, name: LocalizedString);
|
|
49
|
+
}
|
|
50
|
+
export declare class LocalizedPlayer {
|
|
51
|
+
id: number;
|
|
52
|
+
type: playerTypeID;
|
|
53
|
+
pType: LocalizedString;
|
|
54
|
+
heart: number;
|
|
55
|
+
maxHeart: number;
|
|
56
|
+
operator: LocalizedString;
|
|
57
|
+
deckName: LocalizedString;
|
|
58
|
+
constructor(id: number, type: playerTypeID, pType: LocalizedString, heart: number, maxHeart: number, operator: LocalizedString, deckName: LocalizedString);
|
|
59
|
+
}
|
|
60
|
+
export declare class LocalizedSystem {
|
|
61
|
+
players: LocalizedPlayer[];
|
|
62
|
+
zones: LocalizedZone[];
|
|
63
|
+
action: LocalizedAction;
|
|
64
|
+
phase: number;
|
|
65
|
+
turn: number;
|
|
66
|
+
wave: number;
|
|
67
|
+
constructor(players: LocalizedPlayer[], zones: LocalizedZone[], action: LocalizedAction, phase: number, turn: number, wave: number);
|
|
68
|
+
}
|
|
69
|
+
export {};
|
|
@@ -0,0 +1,84 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.LocalizedSystem = exports.LocalizedPlayer = exports.LocalizedAction = exports.LocalizedZone = exports.LocalizedCard = exports.LocalizedEffect = void 0;
|
|
4
|
+
class LocalizedEffect {
|
|
5
|
+
constructor(id, //pid technically
|
|
6
|
+
text, type, subtypes, typeDesc, subtypesDesc) {
|
|
7
|
+
this.id = id;
|
|
8
|
+
this.text = text;
|
|
9
|
+
this.type = type;
|
|
10
|
+
this.subtypes = subtypes;
|
|
11
|
+
this.typeDesc = typeDesc;
|
|
12
|
+
this.subtypesDesc = subtypesDesc;
|
|
13
|
+
}
|
|
14
|
+
}
|
|
15
|
+
exports.LocalizedEffect = LocalizedEffect;
|
|
16
|
+
class LocalizedCard {
|
|
17
|
+
constructor(id, name, extensions, effects, statusEffects, zoneID, pos,
|
|
18
|
+
//stat
|
|
19
|
+
atk, //display stat
|
|
20
|
+
hp, //display stat
|
|
21
|
+
maxAtk, maxHp, level, rarity, rarityName, archtype) {
|
|
22
|
+
this.id = id;
|
|
23
|
+
this.name = name;
|
|
24
|
+
this.extensions = extensions;
|
|
25
|
+
this.effects = effects;
|
|
26
|
+
this.statusEffects = statusEffects;
|
|
27
|
+
this.zoneID = zoneID;
|
|
28
|
+
this.pos = pos;
|
|
29
|
+
this.atk = atk;
|
|
30
|
+
this.hp = hp;
|
|
31
|
+
this.maxAtk = maxAtk;
|
|
32
|
+
this.maxHp = maxHp;
|
|
33
|
+
this.level = level;
|
|
34
|
+
this.rarity = rarity;
|
|
35
|
+
this.rarityName = rarityName;
|
|
36
|
+
this.archtype = archtype;
|
|
37
|
+
}
|
|
38
|
+
}
|
|
39
|
+
exports.LocalizedCard = LocalizedCard;
|
|
40
|
+
class LocalizedZone {
|
|
41
|
+
constructor(id, pid, type, typeName, name, cards, shape) {
|
|
42
|
+
this.id = id;
|
|
43
|
+
this.pid = pid;
|
|
44
|
+
this.type = type;
|
|
45
|
+
this.typeName = typeName;
|
|
46
|
+
this.name = name;
|
|
47
|
+
this.cards = cards;
|
|
48
|
+
this.shape = shape;
|
|
49
|
+
while (cards.length && cards.at(-1) === undefined)
|
|
50
|
+
cards.splice(-1, 1);
|
|
51
|
+
this.cards = cards;
|
|
52
|
+
}
|
|
53
|
+
}
|
|
54
|
+
exports.LocalizedZone = LocalizedZone;
|
|
55
|
+
class LocalizedAction {
|
|
56
|
+
constructor(id, name) {
|
|
57
|
+
this.id = id;
|
|
58
|
+
this.name = name;
|
|
59
|
+
}
|
|
60
|
+
}
|
|
61
|
+
exports.LocalizedAction = LocalizedAction;
|
|
62
|
+
class LocalizedPlayer {
|
|
63
|
+
constructor(id, type, pType, heart, maxHeart, operator, deckName) {
|
|
64
|
+
this.id = id;
|
|
65
|
+
this.type = type;
|
|
66
|
+
this.pType = pType;
|
|
67
|
+
this.heart = heart;
|
|
68
|
+
this.maxHeart = maxHeart;
|
|
69
|
+
this.operator = operator;
|
|
70
|
+
this.deckName = deckName;
|
|
71
|
+
}
|
|
72
|
+
}
|
|
73
|
+
exports.LocalizedPlayer = LocalizedPlayer;
|
|
74
|
+
class LocalizedSystem {
|
|
75
|
+
constructor(players, zones, action, phase, turn, wave) {
|
|
76
|
+
this.players = players;
|
|
77
|
+
this.zones = zones;
|
|
78
|
+
this.action = action;
|
|
79
|
+
this.phase = phase;
|
|
80
|
+
this.turn = turn;
|
|
81
|
+
this.wave = wave;
|
|
82
|
+
}
|
|
83
|
+
}
|
|
84
|
+
exports.LocalizedSystem = LocalizedSystem;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import Card from "../abstract/gameComponents/card";
|
|
2
|
+
import zone_stack from "../abstract/gameComponents/zone_stackBased";
|
|
3
|
+
import res from "../abstract/generics/universalResponse";
|
|
4
|
+
declare class Ability extends zone_stack {
|
|
5
|
+
get maxCoolDown(): number;
|
|
6
|
+
set maxCoolDown(newVal: number);
|
|
7
|
+
currentCoolDown: number;
|
|
8
|
+
remove(c: Card): res;
|
|
9
|
+
}
|
|
10
|
+
export default Ability;
|
|
@@ -0,0 +1,22 @@
|
|
|
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 zone_stackBased_1 = __importDefault(require("../abstract/gameComponents/zone_stackBased"));
|
|
7
|
+
class Ability extends zone_stackBased_1.default {
|
|
8
|
+
constructor() {
|
|
9
|
+
//TODO : figure out wtf this does
|
|
10
|
+
//currently doing nothing but storing the ability card
|
|
11
|
+
super(...arguments);
|
|
12
|
+
this.currentCoolDown = this.maxCoolDown;
|
|
13
|
+
}
|
|
14
|
+
get maxCoolDown() { var _a; return (_a = this.attr.get("maxCoolDown")) !== null && _a !== void 0 ? _a : -1; }
|
|
15
|
+
;
|
|
16
|
+
set maxCoolDown(newVal) { this.attr.set("maxCoolDown", newVal); }
|
|
17
|
+
;
|
|
18
|
+
remove(c) {
|
|
19
|
+
return [undefined, []];
|
|
20
|
+
}
|
|
21
|
+
}
|
|
22
|
+
exports.default = Ability;
|