qpremake 1.5.3 → 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.
- package/README.md +5 -3
- package/package.json +2 -7
- package/lib/_localizationFiles/English.d.ts +0 -2
- package/lib/_localizationFiles/English.js +0 -307
- package/lib/_mods/parserModules/addSymbol.d.ts +0 -7
- package/lib/_mods/parserModules/addSymbol.js +0 -18
- package/lib/_mods/parserModules/expression.d.ts +0 -7
- package/lib/_mods/parserModules/expression.js +0 -45
- package/lib/_mods/parserModules/expression_parser.d.ts +0 -143
- package/lib/_mods/parserModules/expression_parser.js +0 -728
- package/lib/_mods/parserModules/img.d.ts +0 -8
- package/lib/_mods/parserModules/img.js +0 -42
- package/lib/_mods/parserModules/qpOriginal.d.ts +0 -5
- package/lib/_mods/parserModules/qpOriginal.js +0 -27
- package/lib/_mods/parserModules/sectionID.d.ts +0 -13
- package/lib/_mods/parserModules/sectionID.js +0 -56
- package/lib/_mods/parserModules/tags.d.ts +0 -9
- package/lib/_mods/parserModules/tags.js +0 -29
- package/lib/_mods/parserModules/uaddminus.d.ts +0 -9
- package/lib/_mods/parserModules/uaddminus.js +0 -42
- package/lib/_mods/parserModules/variantCheck.d.ts +0 -10
- package/lib/_mods/parserModules/variantCheck.js +0 -53
- package/lib/_queenSystem/handler/actionGenrator.d.ts +0 -994
- package/lib/_queenSystem/handler/actionGenrator.js +0 -646
- package/lib/_queenSystem/handler/actionInputGenerator.d.ts +0 -95
- package/lib/_queenSystem/handler/actionInputGenerator.js +0 -373
- package/lib/_queenSystem/handler/actionInputRequesterGenerator.d.ts +0 -92
- package/lib/_queenSystem/handler/actionInputRequesterGenerator.js +0 -341
- package/lib/_queenSystem/handler/cardHandler.d.ts +0 -20
- package/lib/_queenSystem/handler/cardHandler.js +0 -61
- package/lib/_queenSystem/handler/effectGenerator.d.ts +0 -1
- package/lib/_queenSystem/handler/effectGenerator.js +0 -127
- package/lib/_queenSystem/handler/localizationHandler.d.ts +0 -28
- package/lib/_queenSystem/handler/localizationHandler.js +0 -166
- package/lib/_queenSystem/handler/modHandler.d.ts +0 -10
- package/lib/_queenSystem/handler/modHandler.js +0 -36
- package/lib/_queenSystem/handler/oldDataProcessor.d.ts +0 -9
- package/lib/_queenSystem/handler/oldDataProcessor.js +0 -129
- package/lib/_queenSystem/handler/registryHandler.d.ts +0 -36
- package/lib/_queenSystem/handler/registryHandler.js +0 -63
- package/lib/_queenSystem/handler/zoneHandler.d.ts +0 -102
- package/lib/_queenSystem/handler/zoneHandler.js +0 -606
- package/lib/_queenSystem/loader/loader_card.d.ts +0 -20
- package/lib/_queenSystem/loader/loader_card.js +0 -124
- package/lib/_queenSystem/loader/loader_effect.d.ts +0 -27
- package/lib/_queenSystem/loader/loader_effect.js +0 -163
- package/lib/_queenSystem/loader/loader_handler.d.ts +0 -11
- package/lib/_queenSystem/loader/loader_handler.js +0 -24
- package/lib/_queenSystem/loader/loader_localization.d.ts +0 -11
- package/lib/_queenSystem/loader/loader_localization.js +0 -73
- package/lib/_queenSystem/loader/loader_mod.d.ts +0 -10
- package/lib/_queenSystem/loader/loader_mod.js +0 -72
- package/lib/_queenSystem/loader/loader_subtype.d.ts +0 -9
- package/lib/_queenSystem/loader/loader_subtype.js +0 -39
- package/lib/_queenSystem/loader/loader_type.d.ts +0 -9
- package/lib/_queenSystem/loader/loader_type.js +0 -39
- package/lib/_queenSystem/loader/loader_zone.d.ts +0 -14
- package/lib/_queenSystem/loader/loader_zone.js +0 -35
- package/lib/_queenSystem/queenSystem.d.ts +0 -127
- package/lib/_queenSystem/queenSystem.js +0 -996
- package/lib/_queenSystem/renderer/rendererInterface.d.ts +0 -27
- package/lib/_queenSystem/renderer/rendererInterface.js +0 -25
- package/lib/data/actionRegistry.d.ts +0 -56
- package/lib/data/actionRegistry.js +0 -60
- package/lib/data/cardRegistry.d.ts +0 -1162
- package/lib/data/cardRegistry.js +0 -716
- package/lib/data/deckRegistry.d.ts +0 -19
- package/lib/data/deckRegistry.js +0 -41
- package/lib/data/effectRegistry.d.ts +0 -465
- package/lib/data/effectRegistry.js +0 -151
- package/lib/data/effectTypeRegistry.d.ts +0 -14
- package/lib/data/effectTypeRegistry.js +0 -14
- package/lib/data/operatorRegistry.d.ts +0 -92
- package/lib/data/operatorRegistry.js +0 -82
- package/lib/data/rarityRegistry.d.ts +0 -28
- package/lib/data/rarityRegistry.js +0 -63
- package/lib/data/registryRegistry.d.ts +0 -10
- package/lib/data/registryRegistry.js +0 -14
- package/lib/data/subtypeRegistry.d.ts +0 -15
- package/lib/data/subtypeRegistry.js +0 -15
- package/lib/data/systemRegistry.d.ts +0 -253
- package/lib/data/systemRegistry.js +0 -56
- package/lib/data/zoneRegistry.d.ts +0 -43
- package/lib/data/zoneRegistry.js +0 -157
- package/lib/effectTextParser/index.d.ts +0 -42
- package/lib/effectTextParser/index.js +0 -316
- package/lib/global/index.d.ts +0 -8
- package/lib/global/index.js +0 -12
- package/lib/index.d.ts +0 -6335
- package/lib/index.js +0 -205
- package/lib/specificEffects/e_cond.d.ts +0 -11
- package/lib/specificEffects/e_cond.js +0 -36
- package/lib/specificEffects/e_fruit.d.ts +0 -3
- package/lib/specificEffects/e_fruit.js +0 -187
- package/lib/specificEffects/e_generic.d.ts +0 -191
- package/lib/specificEffects/e_generic.js +0 -662
- package/lib/specificEffects/e_generic_cardTargetting.d.ts +0 -38
- package/lib/specificEffects/e_generic_cardTargetting.js +0 -82
- package/lib/specificEffects/e_generic_noneTargetting.d.ts +0 -10
- package/lib/specificEffects/e_generic_noneTargetting.js +0 -26
- package/lib/specificEffects/e_status.d.ts +0 -80
- package/lib/specificEffects/e_status.js +0 -151
- package/lib/specificEffects/e_test.d.ts +0 -3
- package/lib/specificEffects/e_test.js +0 -21
- package/lib/types/abstract/gameComponents/API.d.ts +0 -19
- package/lib/types/abstract/gameComponents/API.js +0 -2
- package/lib/types/abstract/gameComponents/card.d.ts +0 -108
- package/lib/types/abstract/gameComponents/card.js +0 -771
- package/lib/types/abstract/gameComponents/effect.d.ts +0 -82
- package/lib/types/abstract/gameComponents/effect.js +0 -331
- package/lib/types/abstract/gameComponents/effectSubtype.d.ts +0 -22
- package/lib/types/abstract/gameComponents/effectSubtype.js +0 -40
- package/lib/types/abstract/gameComponents/effectType.d.ts +0 -11
- package/lib/types/abstract/gameComponents/effectType.js +0 -8
- package/lib/types/abstract/gameComponents/settings.d.ts +0 -80
- package/lib/types/abstract/gameComponents/settings.js +0 -72
- package/lib/types/abstract/gameComponents/zone.d.ts +0 -113
- package/lib/types/abstract/gameComponents/zone.js +0 -614
- package/lib/types/abstract/gameComponents/zone_gridBased.d.ts +0 -18
- package/lib/types/abstract/gameComponents/zone_gridBased.js +0 -58
- package/lib/types/abstract/gameComponents/zone_stackBased.d.ts +0 -13
- package/lib/types/abstract/gameComponents/zone_stackBased.js +0 -55
- package/lib/types/abstract/generics/node.d.ts +0 -23
- package/lib/types/abstract/generics/node.js +0 -46
- package/lib/types/abstract/generics/position.d.ts +0 -23
- package/lib/types/abstract/generics/position.js +0 -91
- package/lib/types/abstract/generics/tree.d.ts +0 -25
- package/lib/types/abstract/generics/tree.js +0 -153
- package/lib/types/abstract/generics/universalResponse.d.ts +0 -4
- package/lib/types/abstract/generics/universalResponse.js +0 -2
- package/lib/types/abstract/generics/wraper.d.ts +0 -21
- package/lib/types/abstract/generics/wraper.js +0 -56
- package/lib/types/abstract/parser/component.d.ts +0 -88
- package/lib/types/abstract/parser/component.js +0 -132
- package/lib/types/abstract/parser/index.d.ts +0 -6
- package/lib/types/abstract/parser/index.js +0 -28
- package/lib/types/abstract/parser/modPack.d.ts +0 -21
- package/lib/types/abstract/parser/modPack.js +0 -48
- package/lib/types/abstract/parser/moduleInputObject.d.ts +0 -12
- package/lib/types/abstract/parser/moduleInputObject.js +0 -21
- package/lib/types/abstract/parser/options.d.ts +0 -31
- package/lib/types/abstract/parser/options.js +0 -45
- package/lib/types/abstract/serializedGameComponents/Gamestate.d.ts +0 -46
- package/lib/types/abstract/serializedGameComponents/Gamestate.js +0 -70
- package/lib/types/abstract/serializedGameComponents/Localized.d.ts +0 -69
- package/lib/types/abstract/serializedGameComponents/Localized.js +0 -84
- package/lib/types/defaultZones/ability.d.ts +0 -10
- package/lib/types/defaultZones/ability.js +0 -22
- package/lib/types/defaultZones/deck.d.ts +0 -25
- package/lib/types/defaultZones/deck.js +0 -90
- package/lib/types/defaultZones/drop.d.ts +0 -5
- package/lib/types/defaultZones/drop.js +0 -13
- package/lib/types/defaultZones/field.d.ts +0 -11
- package/lib/types/defaultZones/field.js +0 -35
- package/lib/types/defaultZones/grave.d.ts +0 -8
- package/lib/types/defaultZones/grave.js +0 -21
- package/lib/types/defaultZones/hand.d.ts +0 -5
- package/lib/types/defaultZones/hand.js +0 -14
- package/lib/types/defaultZones/storage.d.ts +0 -9
- package/lib/types/defaultZones/storage.js +0 -21
- package/lib/types/defaultZones/system.d.ts +0 -12
- package/lib/types/defaultZones/system.js +0 -35
- package/lib/types/defaultZones/void.d.ts +0 -4
- package/lib/types/defaultZones/void.js +0 -10
- package/lib/types/effects/effectSubtypes/subtype_chained.d.ts +0 -10
- package/lib/types/effects/effectSubtypes/subtype_chained.js +0 -17
- package/lib/types/effects/effectSubtypes/subtype_delayed.d.ts +0 -9
- package/lib/types/effects/effectSubtypes/subtype_delayed.js +0 -16
- package/lib/types/effects/effectSubtypes/subtype_fieldLock.d.ts +0 -9
- package/lib/types/effects/effectSubtypes/subtype_fieldLock.js +0 -21
- package/lib/types/effects/effectSubtypes/subtype_graveLock.d.ts +0 -9
- package/lib/types/effects/effectSubtypes/subtype_graveLock.js +0 -21
- package/lib/types/effects/effectSubtypes/subtype_hand_or_fieldLock.d.ts +0 -9
- package/lib/types/effects/effectSubtypes/subtype_hand_or_fieldLock.js +0 -21
- package/lib/types/effects/effectSubtypes/subtype_hardUnique.d.ts +0 -9
- package/lib/types/effects/effectSubtypes/subtype_hardUnique.js +0 -15
- package/lib/types/effects/effectSubtypes/subtype_instant.d.ts +0 -8
- package/lib/types/effects/effectSubtypes/subtype_instant.js +0 -20
- package/lib/types/effects/effectSubtypes/subtype_once.d.ts +0 -12
- package/lib/types/effects/effectSubtypes/subtype_once.js +0 -27
- package/lib/types/effects/effectSubtypes/subtype_unique.d.ts +0 -9
- package/lib/types/effects/effectSubtypes/subtype_unique.js +0 -16
- package/lib/types/effects/effectTypes/initEffect.d.ts +0 -7
- package/lib/types/effects/effectTypes/initEffect.js +0 -23
- package/lib/types/effects/effectTypes/lockEffect.d.ts +0 -9
- package/lib/types/effects/effectTypes/lockEffect.js +0 -25
- package/lib/types/effects/effectTypes/manualEffect.d.ts +0 -9
- package/lib/types/effects/effectTypes/manualEffect.js +0 -18
- package/lib/types/effects/effectTypes/passiveEffect.d.ts +0 -9
- package/lib/types/effects/effectTypes/passiveEffect.js +0 -23
- package/lib/types/effects/effectTypes/triggerEffect.d.ts +0 -9
- package/lib/types/effects/effectTypes/triggerEffect.js +0 -28
- package/lib/types/errors/cannotLoad.d.ts +0 -5
- package/lib/types/errors/cannotLoad.js +0 -13
- package/lib/types/errors/cardNotExist.d.ts +0 -5
- package/lib/types/errors/cardNotExist.js +0 -13
- package/lib/types/errors/cardNotInApplicableZone.d.ts +0 -5
- package/lib/types/errors/cardNotInApplicableZone.js +0 -13
- package/lib/types/errors/effectCondNotMet.d.ts +0 -5
- package/lib/types/errors/effectCondNotMet.js +0 -13
- package/lib/types/errors/effectNotExist.d.ts +0 -5
- package/lib/types/errors/effectNotExist.js +0 -13
- package/lib/types/errors/error.d.ts +0 -17
- package/lib/types/errors/error.js +0 -42
- package/lib/types/errors/incorrectActionType.d.ts +0 -5
- package/lib/types/errors/incorrectActionType.js +0 -13
- package/lib/types/errors/index.d.ts +0 -16
- package/lib/types/errors/index.js +0 -36
- package/lib/types/errors/invalidOrderMap.d.ts +0 -6
- package/lib/types/errors/invalidOrderMap.js +0 -14
- package/lib/types/errors/invalidPosition.d.ts +0 -6
- package/lib/types/errors/invalidPosition.js +0 -13
- package/lib/types/errors/subTypeOverrideConflict.d.ts +0 -7
- package/lib/types/errors/subTypeOverrideConflict.js +0 -15
- package/lib/types/errors/unknownError.d.ts +0 -5
- package/lib/types/errors/unknownError.js +0 -13
- package/lib/types/errors/unregisteredAction.d.ts +0 -6
- package/lib/types/errors/unregisteredAction.js +0 -13
- package/lib/types/errors/wrongEffectIdx.d.ts +0 -5
- package/lib/types/errors/wrongEffectIdx.js +0 -14
- package/lib/types/errors/zoneAttrConflict.d.ts +0 -5
- package/lib/types/errors/zoneAttrConflict.js +0 -15
- package/lib/types/errors/zoneFull.d.ts +0 -5
- package/lib/types/errors/zoneFull.js +0 -13
- package/lib/types/errors/zoneNotExist.d.ts +0 -5
- package/lib/types/errors/zoneNotExist.js +0 -13
- package/lib/types/misc.d.ts +0 -97
- package/lib/types/misc.js +0 -8
- package/lib/types/mods/effectTextParserModule.d.ts +0 -16
- package/lib/types/mods/effectTextParserModule.js +0 -81
- package/lib/types/mods/gameModule.d.ts +0 -5
- package/lib/types/mods/gameModule.js +0 -8
- package/lib/utils/index.d.ts +0 -78
- package/lib/utils/index.js +0 -562
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
import { DisplayComponent, ParserModule, moduleInputObject, parseOptions } from '../../types/abstract/parser';
|
|
2
|
-
export default class imgModule extends ParserModule {
|
|
3
|
-
cmdName: string[];
|
|
4
|
-
requiredAttr: never[][];
|
|
5
|
-
doCheckRequiredAttr: boolean;
|
|
6
|
-
private getIconID;
|
|
7
|
-
evaluate(cmd: string, args: moduleInputObject, option: parseOptions, raw: string): DisplayComponent[];
|
|
8
|
-
}
|
|
@@ -1,42 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
const parser_1 = require("../../types/abstract/parser");
|
|
4
|
-
class imgModule extends parser_1.ParserModule {
|
|
5
|
-
constructor() {
|
|
6
|
-
super(...arguments);
|
|
7
|
-
this.cmdName = ['img', 'icon'];
|
|
8
|
-
this.requiredAttr = [[], []];
|
|
9
|
-
this.doCheckRequiredAttr = false;
|
|
10
|
-
}
|
|
11
|
-
getIconID(key) {
|
|
12
|
-
let k = key;
|
|
13
|
-
let x = parser_1.iconID[k];
|
|
14
|
-
if (!x)
|
|
15
|
-
return [parser_1.iconID.crash, false];
|
|
16
|
-
return [x, true];
|
|
17
|
-
}
|
|
18
|
-
evaluate(cmd, args, option, raw) {
|
|
19
|
-
let isInIconMode = false;
|
|
20
|
-
let str = args.getAttr('id');
|
|
21
|
-
if (str)
|
|
22
|
-
isInIconMode = true;
|
|
23
|
-
else
|
|
24
|
-
str = args.getAttr('url');
|
|
25
|
-
if (str)
|
|
26
|
-
isInIconMode = false;
|
|
27
|
-
else
|
|
28
|
-
return [];
|
|
29
|
-
if (isInIconMode) {
|
|
30
|
-
let [iconID, isCorrect] = this.getIconID(str);
|
|
31
|
-
return [
|
|
32
|
-
new parser_1.IconComponent(iconID, isCorrect ? undefined : `Wrong iconID, received = ${str}`, cmd, raw)
|
|
33
|
-
];
|
|
34
|
-
}
|
|
35
|
-
else {
|
|
36
|
-
return [
|
|
37
|
-
new parser_1.ImageComponent(str, undefined, cmd, raw)
|
|
38
|
-
];
|
|
39
|
-
}
|
|
40
|
-
}
|
|
41
|
-
}
|
|
42
|
-
exports.default = imgModule;
|
|
@@ -1,27 +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 expression_1 = __importDefault(require("./expression"));
|
|
7
|
-
const img_1 = __importDefault(require("./img"));
|
|
8
|
-
const sectionID_1 = __importDefault(require("./sectionID"));
|
|
9
|
-
const tags_1 = __importDefault(require("./tags"));
|
|
10
|
-
const uaddminus_1 = __importDefault(require("./uaddminus"));
|
|
11
|
-
const variantCheck_1 = __importDefault(require("./variantCheck"));
|
|
12
|
-
const parser_1 = require("../../types/abstract/parser");
|
|
13
|
-
class qpOriginalPack extends parser_1.modPack {
|
|
14
|
-
constructor() {
|
|
15
|
-
super();
|
|
16
|
-
this.moduleArr = [
|
|
17
|
-
new img_1.default(),
|
|
18
|
-
new sectionID_1.default(),
|
|
19
|
-
new uaddminus_1.default(),
|
|
20
|
-
new variantCheck_1.default(),
|
|
21
|
-
new tags_1.default(),
|
|
22
|
-
new expression_1.default(),
|
|
23
|
-
];
|
|
24
|
-
this.loadModules();
|
|
25
|
-
}
|
|
26
|
-
}
|
|
27
|
-
exports.default = qpOriginalPack;
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
import { DisplayComponent, ParserModule, moduleInputObject, parseOptions } from '../../types/abstract/parser';
|
|
2
|
-
import type { nestedTree } from '../../types/misc';
|
|
3
|
-
export default class sectionIDModule extends ParserModule {
|
|
4
|
-
private quickKeyword;
|
|
5
|
-
private normalKeyword;
|
|
6
|
-
private pastKeyword;
|
|
7
|
-
private colorKeyword;
|
|
8
|
-
cmdName: string[];
|
|
9
|
-
requiredAttr: any[];
|
|
10
|
-
doCheckRequiredAttr: boolean;
|
|
11
|
-
private recurModify;
|
|
12
|
-
evaluate(cmd: string, args: moduleInputObject, option: parseOptions, raw: string): nestedTree<DisplayComponent>;
|
|
13
|
-
}
|
|
@@ -1,56 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
const parser_1 = require("../../types/abstract/parser");
|
|
4
|
-
class sectionIDModule extends parser_1.ParserModule {
|
|
5
|
-
constructor() {
|
|
6
|
-
super(...arguments);
|
|
7
|
-
this.quickKeyword = ['void', 'decompile', 'pathed', 'exposed', 'exec', 'align', 'cover', 'suspend', 'automate'];
|
|
8
|
-
this.normalKeyword = ['key', 'physical', 'magic', 'health', 'attack', 'specialbuff'];
|
|
9
|
-
this.pastKeyword = ['decompiled', 'exec-ed', 'aligned'];
|
|
10
|
-
this.colorKeyword = ['red', 'green', 'blue', 'white', 'black', 'yellow', 'orange', 'purple'];
|
|
11
|
-
this.cmdName = [
|
|
12
|
-
...this.normalKeyword,
|
|
13
|
-
...this.pastKeyword,
|
|
14
|
-
...this.quickKeyword,
|
|
15
|
-
...this.colorKeyword,
|
|
16
|
-
'physical2', 'magic2',
|
|
17
|
-
];
|
|
18
|
-
this.requiredAttr = new Array(this.cmdName.length).fill([]);
|
|
19
|
-
this.doCheckRequiredAttr = false;
|
|
20
|
-
}
|
|
21
|
-
recurModify(tree, sectionID, upperCase) {
|
|
22
|
-
tree.forEach(i => {
|
|
23
|
-
if (i instanceof parser_1.DisplayComponent) {
|
|
24
|
-
i.addSectionID(sectionID);
|
|
25
|
-
if (i.id == parser_1.componentID.text && upperCase) {
|
|
26
|
-
i.str = i.str.toUpperCase();
|
|
27
|
-
}
|
|
28
|
-
}
|
|
29
|
-
else {
|
|
30
|
-
this.recurModify(i, sectionID, upperCase);
|
|
31
|
-
}
|
|
32
|
-
;
|
|
33
|
-
});
|
|
34
|
-
}
|
|
35
|
-
evaluate(cmd, args, option, raw) {
|
|
36
|
-
let quickFlag = this.quickKeyword.includes(cmd);
|
|
37
|
-
let addIconFlag = cmd.endsWith('2');
|
|
38
|
-
let x = cmd;
|
|
39
|
-
if (addIconFlag)
|
|
40
|
-
x = x.slice(0, -1);
|
|
41
|
-
let final = args.getChilren();
|
|
42
|
-
if (quickFlag && !final.length) {
|
|
43
|
-
//special behavior
|
|
44
|
-
// x = x.toLowerCase()
|
|
45
|
-
return [
|
|
46
|
-
new parser_1.SymbolComponent("key_" + x, undefined, cmd, raw)
|
|
47
|
-
];
|
|
48
|
-
}
|
|
49
|
-
this.recurModify(final, x, quickFlag);
|
|
50
|
-
if (addIconFlag) {
|
|
51
|
-
final = [final, [new parser_1.IconComponent((x == "physical") ? parser_1.iconID.dmg_phys : parser_1.iconID.dmg_magic, undefined, cmd, raw)]];
|
|
52
|
-
}
|
|
53
|
-
return final;
|
|
54
|
-
}
|
|
55
|
-
}
|
|
56
|
-
exports.default = sectionIDModule;
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
import { DisplayComponent, ParserModule, moduleInputObject, parseOptions } from '../../types/abstract/parser';
|
|
2
|
-
import type { nestedTree } from '../../types/misc';
|
|
3
|
-
export default class tagsModule extends ParserModule {
|
|
4
|
-
cmdName: string[];
|
|
5
|
-
requiredAttr: string[][];
|
|
6
|
-
doCheckRequiredAttr: boolean;
|
|
7
|
-
private recurModify;
|
|
8
|
-
evaluate(cmd: string, args: moduleInputObject, option: parseOptions, raw: string): nestedTree<DisplayComponent>;
|
|
9
|
-
}
|
|
@@ -1,29 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
const parser_1 = require("../../types/abstract/parser");
|
|
4
|
-
class tagsModule extends parser_1.ParserModule {
|
|
5
|
-
constructor() {
|
|
6
|
-
super(...arguments);
|
|
7
|
-
this.cmdName = ["tags"];
|
|
8
|
-
this.requiredAttr = [["ID"]];
|
|
9
|
-
this.doCheckRequiredAttr = true;
|
|
10
|
-
}
|
|
11
|
-
recurModify(tree, sectionIDs) {
|
|
12
|
-
tree.forEach(i => {
|
|
13
|
-
if (i instanceof parser_1.DisplayComponent) {
|
|
14
|
-
i.addSectionID(sectionIDs);
|
|
15
|
-
}
|
|
16
|
-
else {
|
|
17
|
-
this.recurModify(i, sectionIDs);
|
|
18
|
-
}
|
|
19
|
-
;
|
|
20
|
-
});
|
|
21
|
-
}
|
|
22
|
-
evaluate(cmd, args, option, raw) {
|
|
23
|
-
let IDs = args.getAttr("ID").split(" ");
|
|
24
|
-
let final = args.getChilren();
|
|
25
|
-
this.recurModify(final, IDs);
|
|
26
|
-
return final;
|
|
27
|
-
}
|
|
28
|
-
}
|
|
29
|
-
exports.default = tagsModule;
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
import { DisplayComponent, ParserModule, moduleInputObject, parseOptions } from '../../types/abstract/parser';
|
|
2
|
-
import type { nestedTree } from '../../types/misc';
|
|
3
|
-
export default class uadduminusModule extends ParserModule {
|
|
4
|
-
cmdName: string[];
|
|
5
|
-
requiredAttr: never[][];
|
|
6
|
-
doCheckRequiredAttr: boolean;
|
|
7
|
-
private recurModify;
|
|
8
|
-
evaluate(cmd: string, args: moduleInputObject, option: parseOptions, raw: string): nestedTree<DisplayComponent>;
|
|
9
|
-
}
|
|
@@ -1,42 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
const parser_1 = require("../../types/abstract/parser");
|
|
4
|
-
class uadduminusModule extends parser_1.ParserModule {
|
|
5
|
-
constructor() {
|
|
6
|
-
super(...arguments);
|
|
7
|
-
this.cmdName = ['uadd', 'uminus'];
|
|
8
|
-
this.requiredAttr = [[], []];
|
|
9
|
-
this.doCheckRequiredAttr = false;
|
|
10
|
-
}
|
|
11
|
-
recurModify(tree, sectionID) {
|
|
12
|
-
tree.forEach(i => {
|
|
13
|
-
if (i instanceof parser_1.DisplayComponent) {
|
|
14
|
-
i.addSectionID(sectionID);
|
|
15
|
-
}
|
|
16
|
-
else {
|
|
17
|
-
this.recurModify(i, sectionID);
|
|
18
|
-
}
|
|
19
|
-
;
|
|
20
|
-
});
|
|
21
|
-
}
|
|
22
|
-
evaluate(cmd, args, option, raw) {
|
|
23
|
-
let k = args.getChilren();
|
|
24
|
-
if (option.mode == parser_1.mode.debug)
|
|
25
|
-
return k;
|
|
26
|
-
//remove bracket by default
|
|
27
|
-
let upgradeFlag = option.cardData && option.cardData.variants.join(" ").toLowerCase().includes("upgrade");
|
|
28
|
-
if ((upgradeFlag && cmd == "uminus") || (!upgradeFlag && cmd == "uadd")) {
|
|
29
|
-
return [];
|
|
30
|
-
}
|
|
31
|
-
if (option.mode == parser_1.mode.info) {
|
|
32
|
-
k = [
|
|
33
|
-
[new parser_1.TextComponent("[", undefined, cmd, raw)],
|
|
34
|
-
k,
|
|
35
|
-
[new parser_1.TextComponent("]", undefined, cmd, raw)]
|
|
36
|
-
];
|
|
37
|
-
}
|
|
38
|
-
this.recurModify(k, cmd);
|
|
39
|
-
return k;
|
|
40
|
-
}
|
|
41
|
-
}
|
|
42
|
-
exports.default = uadduminusModule;
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
import { DisplayComponent, ParserModule, moduleInputObject, parseOptions } from '../../types/abstract/parser';
|
|
2
|
-
import type { nestedTree } from '../../types/misc';
|
|
3
|
-
export default class variantCheckModule extends ParserModule {
|
|
4
|
-
cmdName: string[];
|
|
5
|
-
requiredAttr: any[];
|
|
6
|
-
doCheckRequiredAttr: boolean;
|
|
7
|
-
isValidAttr(cmdIndex: number, attrName: string, attr: string): boolean;
|
|
8
|
-
private recurModify;
|
|
9
|
-
evaluate(cmd: string, args: moduleInputObject, option: parseOptions, raw: string): nestedTree<DisplayComponent>;
|
|
10
|
-
}
|
|
@@ -1,53 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
const parser_1 = require("../../types/abstract/parser");
|
|
4
|
-
class variantCheckModule extends parser_1.ParserModule {
|
|
5
|
-
constructor() {
|
|
6
|
-
super(...arguments);
|
|
7
|
-
this.cmdName = [
|
|
8
|
-
'variantInclude', 'variantExclude'
|
|
9
|
-
];
|
|
10
|
-
this.requiredAttr = new Array(2).fill(["variantID"]);
|
|
11
|
-
this.doCheckRequiredAttr = true;
|
|
12
|
-
}
|
|
13
|
-
isValidAttr(cmdIndex, attrName, attr) {
|
|
14
|
-
const k = attr.split(" ");
|
|
15
|
-
for (let i = 0; i < k.length; i++) {
|
|
16
|
-
if (!k[i].length)
|
|
17
|
-
return false;
|
|
18
|
-
}
|
|
19
|
-
return true;
|
|
20
|
-
}
|
|
21
|
-
recurModify(tree, sectionID) {
|
|
22
|
-
tree.forEach(i => {
|
|
23
|
-
if (i instanceof parser_1.DisplayComponent) {
|
|
24
|
-
i.addSectionID(sectionID);
|
|
25
|
-
}
|
|
26
|
-
else {
|
|
27
|
-
this.recurModify(i, sectionID);
|
|
28
|
-
}
|
|
29
|
-
;
|
|
30
|
-
});
|
|
31
|
-
}
|
|
32
|
-
evaluate(cmd, args, option, raw) {
|
|
33
|
-
let k = args.getChilren();
|
|
34
|
-
if (option.mode == parser_1.mode.debug)
|
|
35
|
-
return k;
|
|
36
|
-
//remove bracket by default
|
|
37
|
-
const checkVariant = args.getAttr("expr").split(' ');
|
|
38
|
-
let correctVariantFlag = option.cardData && option.cardData.variants.some(i => checkVariant.includes(i));
|
|
39
|
-
if ((correctVariantFlag && cmd == "variantExclude") || (!correctVariantFlag && cmd == "variantInclude")) {
|
|
40
|
-
return [];
|
|
41
|
-
}
|
|
42
|
-
if (option.mode == parser_1.mode.info) {
|
|
43
|
-
k = [
|
|
44
|
-
[new parser_1.TextComponent("[", undefined, cmd, raw)],
|
|
45
|
-
k,
|
|
46
|
-
[new parser_1.TextComponent("]", undefined, cmd, raw)]
|
|
47
|
-
];
|
|
48
|
-
}
|
|
49
|
-
this.recurModify(k, cmd);
|
|
50
|
-
return k;
|
|
51
|
-
}
|
|
52
|
-
}
|
|
53
|
-
exports.default = variantCheckModule;
|