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,646 @@
|
|
|
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.actionFormRegistry = exports.actionConstructorRegistry = exports.Action_class = void 0;
|
|
7
|
+
exports.getDefaultObjContructionObj = getDefaultObjContructionObj;
|
|
8
|
+
const actionRegistry_1 = __importDefault(require("../../data/actionRegistry"));
|
|
9
|
+
const systemRegistry_1 = require("../../data/systemRegistry");
|
|
10
|
+
const zoneRegistry_1 = require("../../data/zoneRegistry");
|
|
11
|
+
const position_1 = __importDefault(require("../../types/abstract/generics/position"));
|
|
12
|
+
class Action_class {
|
|
13
|
+
cost() {
|
|
14
|
+
this.isCost = true;
|
|
15
|
+
this.attr.set("canBeChainedTo", false);
|
|
16
|
+
this.attr.set("canBeTriggeredTo", false);
|
|
17
|
+
}
|
|
18
|
+
deleteInputObj() {
|
|
19
|
+
this.attr.delete("input");
|
|
20
|
+
}
|
|
21
|
+
clone() {
|
|
22
|
+
return Utils.clone(this);
|
|
23
|
+
}
|
|
24
|
+
copy(a) {
|
|
25
|
+
this.id = a.id;
|
|
26
|
+
this.typeID = a.typeID;
|
|
27
|
+
this.isDisabled = a.isDisabled;
|
|
28
|
+
this.targets = a.targets;
|
|
29
|
+
this.cause = a.cause;
|
|
30
|
+
this.originalCause = a.originalCause;
|
|
31
|
+
this.originalTargets = a.originalTargets;
|
|
32
|
+
this.modifiedSinceLastAccessed = true;
|
|
33
|
+
this.checkers = a.checkers;
|
|
34
|
+
this.__inputs = a.__inputs;
|
|
35
|
+
// this.isInputsApplied_internal = a.isInputsApplied_internal;
|
|
36
|
+
this.attr = a.attr;
|
|
37
|
+
}
|
|
38
|
+
// protected isInputsApplied_internal = false;
|
|
39
|
+
// get isInputsApplied() {
|
|
40
|
+
// return this.inputs === undefined || this.isInputsApplied_internal
|
|
41
|
+
// }
|
|
42
|
+
// isChain: boolean; //if false, attach as new tree, if not, attach to curr action
|
|
43
|
+
//isChain is not up to the action, its up to whatever type and subtype is attached
|
|
44
|
+
//somewhat
|
|
45
|
+
//if no trigger, no passive, no chained subtype, isChain here is used instead
|
|
46
|
+
//so isChain here is a default
|
|
47
|
+
flat() {
|
|
48
|
+
let x = {
|
|
49
|
+
targets: this.targets,
|
|
50
|
+
cause: this.cause,
|
|
51
|
+
originalTargets: this.originalTargets,
|
|
52
|
+
originalCause: this.originalCause,
|
|
53
|
+
modifiedSinceLastAccessed: this.modifiedSinceLastAccessed,
|
|
54
|
+
isDisabled: this.isDisabled,
|
|
55
|
+
id: this.id,
|
|
56
|
+
typeID: this.typeID,
|
|
57
|
+
isChain: this.isChain,
|
|
58
|
+
canBeChainedTo: this.canBeChainedTo,
|
|
59
|
+
canBeTriggeredTo: this.canBeTriggeredTo,
|
|
60
|
+
attr: {}
|
|
61
|
+
};
|
|
62
|
+
this.attr.forEach((val, key) => {
|
|
63
|
+
x.attr[key] = val;
|
|
64
|
+
});
|
|
65
|
+
return x;
|
|
66
|
+
}
|
|
67
|
+
flatAttr() {
|
|
68
|
+
let x = {};
|
|
69
|
+
this.attr.forEach((val, key) => {
|
|
70
|
+
x[key] = val;
|
|
71
|
+
});
|
|
72
|
+
return x;
|
|
73
|
+
}
|
|
74
|
+
resolvable(s, z, c, eff, subtype) {
|
|
75
|
+
//Oct 5th, i forgor what this is for but it breaks for stuff with multiple of the same type
|
|
76
|
+
//like a_draw
|
|
77
|
+
//no way the id check matches 2 times for 2 different zones man
|
|
78
|
+
//this now checks for at least 1 one per type thats in the target
|
|
79
|
+
//i.e if target has 2 zones, only 1 zone needs to match teh condition
|
|
80
|
+
//TODO : figure out what i was trying to do here
|
|
81
|
+
const seenTypes = new Set();
|
|
82
|
+
return this.targets.every(target => {
|
|
83
|
+
if (seenTypes.has(target.type))
|
|
84
|
+
return true;
|
|
85
|
+
seenTypes.add(target.type);
|
|
86
|
+
switch (target.type) {
|
|
87
|
+
case systemRegistry_1.identificationType.zone: return z ? this.checkers.zone(target, z) : false;
|
|
88
|
+
case systemRegistry_1.identificationType.card: return (c && z) ? this.checkers.card(target, c, z) : false;
|
|
89
|
+
case systemRegistry_1.identificationType.effect: return (eff && c && z) ? this.checkers.effect(target, eff, c, z) : false;
|
|
90
|
+
case systemRegistry_1.identificationType.effectSubtype: return (subtype && eff && c && z) ? this.checkers.effectSubtype(target, subtype, eff, c, z) : false;
|
|
91
|
+
default: return true;
|
|
92
|
+
}
|
|
93
|
+
});
|
|
94
|
+
}
|
|
95
|
+
get isChain() {
|
|
96
|
+
let t = this.attr.get("isChain");
|
|
97
|
+
if (typeof t === "boolean")
|
|
98
|
+
return t;
|
|
99
|
+
else
|
|
100
|
+
this.isChain = true;
|
|
101
|
+
return true;
|
|
102
|
+
}
|
|
103
|
+
set isChain(newVal) {
|
|
104
|
+
this.attr.set("isChain", newVal);
|
|
105
|
+
}
|
|
106
|
+
get canBeChainedTo() { return Boolean(this.attr.get("canBeChainedTo")); }
|
|
107
|
+
;
|
|
108
|
+
get canBeTriggeredTo() { return Boolean(this.attr.get("canBeTriggeredTo")); }
|
|
109
|
+
;
|
|
110
|
+
get firstCardTarget() {
|
|
111
|
+
return this.targets.find(i => i.type === systemRegistry_1.identificationType.card);
|
|
112
|
+
}
|
|
113
|
+
get firstPosTarget() {
|
|
114
|
+
return this.targets.find(i => i.type === systemRegistry_1.identificationType.position);
|
|
115
|
+
}
|
|
116
|
+
get firstZoneTarget() {
|
|
117
|
+
return this.targets.find(i => i.type === systemRegistry_1.identificationType.zone);
|
|
118
|
+
}
|
|
119
|
+
constructor(o) {
|
|
120
|
+
var _a, _b;
|
|
121
|
+
this.id = NaN;
|
|
122
|
+
this.isDisabled = false;
|
|
123
|
+
this.isCost = false;
|
|
124
|
+
this.attr = new Map();
|
|
125
|
+
this.__inputs = [];
|
|
126
|
+
this.typeID = o.type;
|
|
127
|
+
this.isChain = (o.isChainDefault === false) ? false : true;
|
|
128
|
+
this.targets = ((_a = o.targets) !== null && _a !== void 0 ? _a : []);
|
|
129
|
+
this.cause = ((_b = o.cause) !== null && _b !== void 0 ? _b : {
|
|
130
|
+
type: systemRegistry_1.identificationType.none
|
|
131
|
+
});
|
|
132
|
+
this.originalCause = this.cause;
|
|
133
|
+
this.originalTargets = this.targets;
|
|
134
|
+
this.modifyAttr("canBeChainedTo", (o.canBeChainTo === false) ? false : true);
|
|
135
|
+
this.modifyAttr("canBeTriggeredTo", (o.canBeTriggeredTo === false) ? false : true);
|
|
136
|
+
this.modifiedSinceLastAccessed = false;
|
|
137
|
+
//binding checker
|
|
138
|
+
this.checkers = defaultChecker;
|
|
139
|
+
if (o.checkers) {
|
|
140
|
+
Utils.patchGeneric(this.checkers, o.checkers);
|
|
141
|
+
}
|
|
142
|
+
Object.entries(o).forEach(([key, val]) => {
|
|
143
|
+
if (key !== "type" &&
|
|
144
|
+
key !== "targets" &&
|
|
145
|
+
key !== "cause" &&
|
|
146
|
+
val !== undefined) {
|
|
147
|
+
this.attr.set(key, val);
|
|
148
|
+
}
|
|
149
|
+
});
|
|
150
|
+
}
|
|
151
|
+
dontchain() {
|
|
152
|
+
this.isChain = false;
|
|
153
|
+
return this;
|
|
154
|
+
}
|
|
155
|
+
chain() {
|
|
156
|
+
this.isChain = true;
|
|
157
|
+
return this;
|
|
158
|
+
}
|
|
159
|
+
assignID(n) {
|
|
160
|
+
this.id = n;
|
|
161
|
+
}
|
|
162
|
+
get hasCardTarget() {
|
|
163
|
+
return this.targets.length !== 0 && this.targets.some(i => i.type === systemRegistry_1.identificationType.card);
|
|
164
|
+
}
|
|
165
|
+
get hasActionTarget() {
|
|
166
|
+
return this.targets.length !== 0 && this.targets.some(i => i.type === systemRegistry_1.identificationType.action);
|
|
167
|
+
}
|
|
168
|
+
get hasCause() {
|
|
169
|
+
return this.cause.type !== systemRegistry_1.identificationType.none;
|
|
170
|
+
}
|
|
171
|
+
//dont have cause -> cause is from playerAction
|
|
172
|
+
// get fromPlayer() {
|
|
173
|
+
// return this.hasCause;
|
|
174
|
+
// }
|
|
175
|
+
get fromCard() {
|
|
176
|
+
return this.cause.type === systemRegistry_1.identificationType.card;
|
|
177
|
+
}
|
|
178
|
+
get type() {
|
|
179
|
+
return actionRegistry_1.default[this.typeID];
|
|
180
|
+
}
|
|
181
|
+
// get requireInput() {
|
|
182
|
+
// return this.inputs !== undefined
|
|
183
|
+
// }
|
|
184
|
+
verifyNewValue(key, newVal) {
|
|
185
|
+
if (key === "target")
|
|
186
|
+
return true; //handled later
|
|
187
|
+
if (key === "canBeChainedTo" && typeof newVal === "boolean")
|
|
188
|
+
return true;
|
|
189
|
+
if (key === "canBeTriggeredTo" && typeof newVal === "boolean")
|
|
190
|
+
return true;
|
|
191
|
+
let oldVal = this.attr.get(key);
|
|
192
|
+
if (Utils.getTypeSigature(oldVal) === Utils.getTypeSigature(newVal))
|
|
193
|
+
return true;
|
|
194
|
+
return false;
|
|
195
|
+
}
|
|
196
|
+
modifyAttr(key, newVal) {
|
|
197
|
+
if (newVal === this.attr.get(key))
|
|
198
|
+
return;
|
|
199
|
+
//check type
|
|
200
|
+
if (!this.verifyNewValue(key, newVal))
|
|
201
|
+
return;
|
|
202
|
+
if (key === "target") {
|
|
203
|
+
if (Array.isArray(newVal)) {
|
|
204
|
+
if (this.targets.length !== newVal.length)
|
|
205
|
+
return;
|
|
206
|
+
newVal = newVal.map((i, index) => this.verifyTarget(i, this.targets[index].type));
|
|
207
|
+
if (newVal.some((i) => i === undefined))
|
|
208
|
+
return;
|
|
209
|
+
this.targets = newVal;
|
|
210
|
+
this.modifiedSinceLastAccessed = true;
|
|
211
|
+
return;
|
|
212
|
+
}
|
|
213
|
+
else {
|
|
214
|
+
if (this.targets.length !== 1)
|
|
215
|
+
return;
|
|
216
|
+
newVal = this.verifyTarget(newVal, this.targets[0].type);
|
|
217
|
+
if (!newVal)
|
|
218
|
+
return;
|
|
219
|
+
this.targets = [newVal];
|
|
220
|
+
this.modifiedSinceLastAccessed = true;
|
|
221
|
+
return;
|
|
222
|
+
}
|
|
223
|
+
}
|
|
224
|
+
this.modifiedSinceLastAccessed = true;
|
|
225
|
+
this.attr.set(key, newVal);
|
|
226
|
+
}
|
|
227
|
+
verifyTarget(val, compareType) {
|
|
228
|
+
if (typeof val !== "object")
|
|
229
|
+
return undefined;
|
|
230
|
+
if (typeof val.type !== "number")
|
|
231
|
+
return undefined;
|
|
232
|
+
if (val.type !== compareType)
|
|
233
|
+
return undefined;
|
|
234
|
+
switch (val.type) {
|
|
235
|
+
case systemRegistry_1.identificationType.none: return val;
|
|
236
|
+
case systemRegistry_1.identificationType.player:
|
|
237
|
+
case systemRegistry_1.identificationType.zone: {
|
|
238
|
+
if (typeof val.id === "number")
|
|
239
|
+
return val;
|
|
240
|
+
else
|
|
241
|
+
return undefined;
|
|
242
|
+
}
|
|
243
|
+
case systemRegistry_1.identificationType.card: {
|
|
244
|
+
if (typeof val.id === "string")
|
|
245
|
+
return val;
|
|
246
|
+
else
|
|
247
|
+
return undefined;
|
|
248
|
+
}
|
|
249
|
+
case systemRegistry_1.identificationType.effect: {
|
|
250
|
+
if (typeof val.cid === "string" && typeof val.eid === "string")
|
|
251
|
+
return val;
|
|
252
|
+
return undefined;
|
|
253
|
+
}
|
|
254
|
+
case systemRegistry_1.identificationType.position: {
|
|
255
|
+
if (val.pos instanceof position_1.default)
|
|
256
|
+
return val;
|
|
257
|
+
return undefined;
|
|
258
|
+
}
|
|
259
|
+
case systemRegistry_1.identificationType.action: {
|
|
260
|
+
if (val.action instanceof Action_class)
|
|
261
|
+
return val;
|
|
262
|
+
return undefined;
|
|
263
|
+
}
|
|
264
|
+
case systemRegistry_1.identificationType.effectSubtype: {
|
|
265
|
+
if (typeof val.cid === "string" && typeof val.eid === "string" && typeof val.stid === "string")
|
|
266
|
+
return val;
|
|
267
|
+
return undefined;
|
|
268
|
+
}
|
|
269
|
+
default: return undefined;
|
|
270
|
+
}
|
|
271
|
+
}
|
|
272
|
+
// private verifyInput_all(input : inputData[]){
|
|
273
|
+
// const obj = this.inputs
|
|
274
|
+
// if(!obj) return false
|
|
275
|
+
// return input.length === obj.inputs.length && input.every((i, index) => i.type === obj.inputs[index])
|
|
276
|
+
// }
|
|
277
|
+
verifyInput_target_all(input) {
|
|
278
|
+
return (input.length === this.targets.length &&
|
|
279
|
+
input.every((i, index) => (typeof i.data === "object" && (!Array.isArray(i.data)) && i.data.type === this.targets[index].type)));
|
|
280
|
+
}
|
|
281
|
+
//false : no restriction
|
|
282
|
+
//true : completed
|
|
283
|
+
//inputData[] : restricted to this set
|
|
284
|
+
// applyUserInput(system : dry_system, input?: inputData): boolean | inputData[]{
|
|
285
|
+
// const obj = this.inputs
|
|
286
|
+
// if(!obj) return true
|
|
287
|
+
// let v : inputData[] | -1 | void = obj.getValid.next(input as any).value
|
|
288
|
+
// let nextInputType = obj.inputs[this.__inputs.length]
|
|
289
|
+
// if(input === undefined){
|
|
290
|
+
// if(Array.isArray(v)) return v;
|
|
291
|
+
// return this.__getAllInputs(system, nextInputType);
|
|
292
|
+
// } //first next
|
|
293
|
+
// if(this.__inputs.length >= obj.inputs.length) return true;
|
|
294
|
+
// this.__inputs.push(input);
|
|
295
|
+
// if(this.__inputs.length === obj.inputs.length) {
|
|
296
|
+
// this.isInputsApplied_internal = true;
|
|
297
|
+
// obj.applyInput(system, this, this.__inputs);
|
|
298
|
+
// return true;
|
|
299
|
+
// } else {
|
|
300
|
+
// if(v === undefined) throw new Error(`try to apply input when input is finished taking`)
|
|
301
|
+
// if(Array.isArray(v)) return v;
|
|
302
|
+
// return this.__getAllInputs(system, nextInputType);
|
|
303
|
+
// }
|
|
304
|
+
// }
|
|
305
|
+
disable() {
|
|
306
|
+
this.isDisabled = true;
|
|
307
|
+
}
|
|
308
|
+
enable() {
|
|
309
|
+
this.isDisabled = false;
|
|
310
|
+
}
|
|
311
|
+
is(type) {
|
|
312
|
+
return this.typeID === actionRegistry_1.default[type];
|
|
313
|
+
}
|
|
314
|
+
}
|
|
315
|
+
exports.Action_class = Action_class;
|
|
316
|
+
function defaultChecker_zone(target, currZone) {
|
|
317
|
+
return target.zone.id === currZone.id;
|
|
318
|
+
}
|
|
319
|
+
function defaultCheker_card(target, currCard, currZone, strict = false) {
|
|
320
|
+
return target.card.id === currCard.id && (!strict || target.card.pos.is(currCard.pos));
|
|
321
|
+
}
|
|
322
|
+
function defaultChecker_effect(target, currEffect, currCard, currZone, recur = true, strict = false) {
|
|
323
|
+
return target.eff.id === currEffect.id && (!recur || defaultCheker_card(target, currCard, currZone, strict));
|
|
324
|
+
}
|
|
325
|
+
function defaultChecker_effectSubtype(target, currSubtype, currEffect, currCard, currZone, recur = false, strict = false) {
|
|
326
|
+
return target.subtype.dataID === currSubtype.dataID && defaultChecker_effect(target, currEffect, currCard, currZone, recur, strict);
|
|
327
|
+
}
|
|
328
|
+
const defaultChecker = {
|
|
329
|
+
zone: defaultChecker_zone,
|
|
330
|
+
card: defaultCheker_card,
|
|
331
|
+
effect: defaultChecker_effect,
|
|
332
|
+
effectSubtype: defaultChecker_effectSubtype
|
|
333
|
+
};
|
|
334
|
+
function form_card(s) {
|
|
335
|
+
return (card) => {
|
|
336
|
+
return {
|
|
337
|
+
type: systemRegistry_1.identificationType.card,
|
|
338
|
+
sys: s,
|
|
339
|
+
card: card,
|
|
340
|
+
is(card) {
|
|
341
|
+
return card.id === this.card.id;
|
|
342
|
+
}
|
|
343
|
+
};
|
|
344
|
+
};
|
|
345
|
+
}
|
|
346
|
+
function form_action(s) {
|
|
347
|
+
return (a) => {
|
|
348
|
+
return {
|
|
349
|
+
type: systemRegistry_1.identificationType.action,
|
|
350
|
+
sys: s,
|
|
351
|
+
action: a,
|
|
352
|
+
is(type) {
|
|
353
|
+
return this.action.is(type);
|
|
354
|
+
}
|
|
355
|
+
};
|
|
356
|
+
};
|
|
357
|
+
}
|
|
358
|
+
function form_effect(s) {
|
|
359
|
+
return (card, eff) => {
|
|
360
|
+
return {
|
|
361
|
+
type: systemRegistry_1.identificationType.effect,
|
|
362
|
+
sys: s,
|
|
363
|
+
card: card,
|
|
364
|
+
eff: eff,
|
|
365
|
+
is(card, eff) {
|
|
366
|
+
return this.card.is(card) && this.eff.is(eff);
|
|
367
|
+
},
|
|
368
|
+
};
|
|
369
|
+
};
|
|
370
|
+
}
|
|
371
|
+
function form_zone(s) {
|
|
372
|
+
return (zone) => {
|
|
373
|
+
return {
|
|
374
|
+
type: systemRegistry_1.identificationType.zone,
|
|
375
|
+
sys: s,
|
|
376
|
+
zone: zone,
|
|
377
|
+
is(p) {
|
|
378
|
+
return this.zone.is(p);
|
|
379
|
+
},
|
|
380
|
+
of(p) {
|
|
381
|
+
return this.zone.of(p);
|
|
382
|
+
}
|
|
383
|
+
};
|
|
384
|
+
};
|
|
385
|
+
}
|
|
386
|
+
function form_position(s) {
|
|
387
|
+
return (pos) => {
|
|
388
|
+
return {
|
|
389
|
+
type: systemRegistry_1.identificationType.position,
|
|
390
|
+
sys: s,
|
|
391
|
+
pos: pos,
|
|
392
|
+
is(pos) {
|
|
393
|
+
return this.pos.is(pos);
|
|
394
|
+
},
|
|
395
|
+
};
|
|
396
|
+
};
|
|
397
|
+
}
|
|
398
|
+
function form_player(s) {
|
|
399
|
+
return (pid) => {
|
|
400
|
+
return {
|
|
401
|
+
type: systemRegistry_1.identificationType.player,
|
|
402
|
+
sys: s,
|
|
403
|
+
id: pid,
|
|
404
|
+
is(player_owned_obj) {
|
|
405
|
+
return player_owned_obj.playerIndex === this.id;
|
|
406
|
+
},
|
|
407
|
+
};
|
|
408
|
+
};
|
|
409
|
+
}
|
|
410
|
+
function form_partition(s) {
|
|
411
|
+
return (pid) => {
|
|
412
|
+
return {
|
|
413
|
+
type: systemRegistry_1.identificationType.partition,
|
|
414
|
+
sys: s,
|
|
415
|
+
pid,
|
|
416
|
+
is(n) {
|
|
417
|
+
return n === pid;
|
|
418
|
+
}
|
|
419
|
+
};
|
|
420
|
+
};
|
|
421
|
+
}
|
|
422
|
+
function form_subtype(s) {
|
|
423
|
+
return (card, eff, subtype) => {
|
|
424
|
+
return {
|
|
425
|
+
type: systemRegistry_1.identificationType.effectSubtype,
|
|
426
|
+
sys: s,
|
|
427
|
+
card: card,
|
|
428
|
+
eff: eff,
|
|
429
|
+
subtype: subtype,
|
|
430
|
+
is(card, eff, subtype) {
|
|
431
|
+
return this.card.is(card) && this.eff.is(eff) && this.subtype.dataID === subtype.dataID;
|
|
432
|
+
},
|
|
433
|
+
};
|
|
434
|
+
};
|
|
435
|
+
}
|
|
436
|
+
function form_none() {
|
|
437
|
+
return {
|
|
438
|
+
type: systemRegistry_1.identificationType.none
|
|
439
|
+
};
|
|
440
|
+
}
|
|
441
|
+
function form_system() {
|
|
442
|
+
return {
|
|
443
|
+
type: systemRegistry_1.identificationType.system
|
|
444
|
+
};
|
|
445
|
+
}
|
|
446
|
+
function ActionAssembler_base(name, targets, cause, info) {
|
|
447
|
+
const o1 = getDefaultObjContructionObj(actionRegistry_1.default[name]);
|
|
448
|
+
const o2 = Object.assign(Object.assign({ targets: targets, cause: cause }, o1), info);
|
|
449
|
+
return new Action_class(o2);
|
|
450
|
+
}
|
|
451
|
+
//end overload-with info section
|
|
452
|
+
function ActionAssembler(name, ...f) {
|
|
453
|
+
//for a general solution, we curried up to f[len - 2], if that last element is an object, we stop
|
|
454
|
+
//so the standard calls is (s, ...p) => ...ps
|
|
455
|
+
//we pre-curried the first param, then reuse s for the rest
|
|
456
|
+
if (f.length === 0)
|
|
457
|
+
return (cause, infoObj = {}) => ActionAssembler_base(name, [form_none()], cause, infoObj);
|
|
458
|
+
const extractLast = (typeof (f[f.length - 1]) === "object");
|
|
459
|
+
if (f.length === 1 && extractLast)
|
|
460
|
+
return (cause, infoObj = {}) => ActionAssembler_base(name, [form_none()], cause, infoObj);
|
|
461
|
+
if (extractLast)
|
|
462
|
+
f.splice(-1, 1);
|
|
463
|
+
// console.log("DEBUG1: " + name + " -- " + f.map(i => (typeof i === "object") ? Object.keys(i).join("==") : typeof i).join("_") + extractLast);
|
|
464
|
+
return (s, ...p) => {
|
|
465
|
+
const [first, ...rest] = f.map(i => i(s));
|
|
466
|
+
// console.log("DEBUG2: " + name + " -- " + f.map(i => (typeof i === "object") ? Object.keys(i).join("==") : typeof i).join("_") + extractLast);
|
|
467
|
+
return Utils.genericCurrier(rest, (resArr) => {
|
|
468
|
+
resArr.unshift(first(...p));
|
|
469
|
+
return (cause, infoObj = {}) => ActionAssembler_base(name, resArr, cause, infoObj);
|
|
470
|
+
});
|
|
471
|
+
};
|
|
472
|
+
}
|
|
473
|
+
function modifyActionContructor(type) {
|
|
474
|
+
return (s, action) => (cause) => (p) => ActionAssembler_base("a_modify_action", [form_action(s)(action)], cause, p);
|
|
475
|
+
}
|
|
476
|
+
function addEffectContructor(type, isStatus) {
|
|
477
|
+
return (s, card) => (cause, p) => ActionAssembler_base((isStatus ? "a_add_status_effect" : "a_add_effect"), [form_card(s)(card)], cause, Object.assign(Object.assign({}, p), { typeID: type }));
|
|
478
|
+
}
|
|
479
|
+
//default restriction is the loosest possible restriction
|
|
480
|
+
//card : none (practically)
|
|
481
|
+
//zone : none (practically)
|
|
482
|
+
//effect : same card
|
|
483
|
+
//effect subtype : same effect
|
|
484
|
+
function getDefaultObjContructionObj(id) {
|
|
485
|
+
let o = {
|
|
486
|
+
type: id
|
|
487
|
+
};
|
|
488
|
+
switch (id) {
|
|
489
|
+
case actionRegistry_1.default.a_activate_effect_internal: {
|
|
490
|
+
o.canBeChainTo = false,
|
|
491
|
+
o.canBeTriggeredTo = true;
|
|
492
|
+
break;
|
|
493
|
+
}
|
|
494
|
+
case actionRegistry_1.default.a_turn_end: {
|
|
495
|
+
o.canBeTriggeredTo = false;
|
|
496
|
+
break;
|
|
497
|
+
}
|
|
498
|
+
case actionRegistry_1.default.error: {
|
|
499
|
+
o.canBeChainTo = false,
|
|
500
|
+
o.canBeTriggeredTo = false;
|
|
501
|
+
break;
|
|
502
|
+
}
|
|
503
|
+
case actionRegistry_1.default.a_deal_damage_internal: {
|
|
504
|
+
o.canBeChainTo = false,
|
|
505
|
+
o.canBeTriggeredTo = true;
|
|
506
|
+
break;
|
|
507
|
+
}
|
|
508
|
+
case actionRegistry_1.default.a_deal_damage_card: {
|
|
509
|
+
o.checkers = {
|
|
510
|
+
card: (target, currCard, currZone) => {
|
|
511
|
+
//move whereever you want, if its still on the field, its damagable
|
|
512
|
+
if (!defaultCheker_card(target, currCard, currZone))
|
|
513
|
+
return false;
|
|
514
|
+
return currZone.types.some(i => {
|
|
515
|
+
return i === zoneRegistry_1.zoneRegistry.z_deck || i === zoneRegistry_1.zoneRegistry.z_field || i === zoneRegistry_1.zoneRegistry.z_hand;
|
|
516
|
+
});
|
|
517
|
+
}
|
|
518
|
+
};
|
|
519
|
+
break;
|
|
520
|
+
}
|
|
521
|
+
case actionRegistry_1.default.a_destroy: {
|
|
522
|
+
o.checkers = {
|
|
523
|
+
card: (target, currCard, currZone) => {
|
|
524
|
+
//move whereever you want, if its not in grave, its destroyable
|
|
525
|
+
if (!defaultCheker_card(target, currCard, currZone))
|
|
526
|
+
return false;
|
|
527
|
+
return currZone.types.some(i => {
|
|
528
|
+
return i === zoneRegistry_1.zoneRegistry.z_deck || i === zoneRegistry_1.zoneRegistry.z_field || i === zoneRegistry_1.zoneRegistry.z_hand;
|
|
529
|
+
});
|
|
530
|
+
}
|
|
531
|
+
};
|
|
532
|
+
break;
|
|
533
|
+
}
|
|
534
|
+
case actionRegistry_1.default.a_execute: {
|
|
535
|
+
o.checkers = {
|
|
536
|
+
card: (target, currCard, currZone) => {
|
|
537
|
+
//move whereever you want, if its still on the field, its damagable
|
|
538
|
+
if (!defaultCheker_card(target, currCard, currZone))
|
|
539
|
+
return false;
|
|
540
|
+
return currZone.types.some(i => {
|
|
541
|
+
return i === zoneRegistry_1.zoneRegistry.z_deck || i === zoneRegistry_1.zoneRegistry.z_field || i === zoneRegistry_1.zoneRegistry.z_hand;
|
|
542
|
+
});
|
|
543
|
+
}
|
|
544
|
+
};
|
|
545
|
+
break;
|
|
546
|
+
}
|
|
547
|
+
case actionRegistry_1.default.a_pos_change: {
|
|
548
|
+
o.checkers = {
|
|
549
|
+
card: (target, currCard, currZone) => {
|
|
550
|
+
//pos_change default is strict
|
|
551
|
+
return defaultCheker_card(target, currCard, currZone, true);
|
|
552
|
+
}
|
|
553
|
+
};
|
|
554
|
+
break;
|
|
555
|
+
}
|
|
556
|
+
}
|
|
557
|
+
return o;
|
|
558
|
+
}
|
|
559
|
+
const actionConstructorRegistry = {
|
|
560
|
+
error: ActionAssembler("error"),
|
|
561
|
+
a_null: ActionAssembler("a_null"),
|
|
562
|
+
a_negate_action: ActionAssembler("a_negate_action"),
|
|
563
|
+
a_do_threat_burn: ActionAssembler("a_do_threat_burn"),
|
|
564
|
+
a_force_end_game: ActionAssembler("a_force_end_game"),
|
|
565
|
+
a_increase_turn_count: ActionAssembler("a_increase_turn_count"),
|
|
566
|
+
a_set_threat_level: ActionAssembler("a_set_threat_level", {
|
|
567
|
+
newThreatLevel: 0
|
|
568
|
+
}),
|
|
569
|
+
a_turn_end: ActionAssembler("a_turn_end", {
|
|
570
|
+
doIncreaseTurnCount: true
|
|
571
|
+
}),
|
|
572
|
+
a_turn_reset: ActionAssembler("a_turn_reset"),
|
|
573
|
+
a_turn_start: ActionAssembler("a_turn_start"),
|
|
574
|
+
a_reprogram_start: ActionAssembler("a_reprogram_start"),
|
|
575
|
+
a_reprogram_end: ActionAssembler("a_reprogram_end"),
|
|
576
|
+
a_clear_all_status_effect: ActionAssembler("a_clear_all_status_effect", form_card),
|
|
577
|
+
a_clear_all_counters: ActionAssembler("a_clear_all_counters", form_card),
|
|
578
|
+
a_deal_damage_card: ActionAssembler("a_deal_damage_card", form_card, {
|
|
579
|
+
dmg: 0,
|
|
580
|
+
dmgType: 0
|
|
581
|
+
}),
|
|
582
|
+
a_deal_damage_position: ActionAssembler("a_deal_damage_position", form_position, {
|
|
583
|
+
dmg: 0,
|
|
584
|
+
dmgType: 0
|
|
585
|
+
}),
|
|
586
|
+
a_deal_damage_internal: ActionAssembler("a_deal_damage_internal", form_card, {
|
|
587
|
+
dmg: 0,
|
|
588
|
+
dmgType: 0
|
|
589
|
+
}),
|
|
590
|
+
a_deal_heart_damage: ActionAssembler("a_deal_heart_damage", form_player, {
|
|
591
|
+
dmg: 0,
|
|
592
|
+
}),
|
|
593
|
+
a_destroy: ActionAssembler("a_destroy", form_card),
|
|
594
|
+
a_disable_card: ActionAssembler("a_disable_card", form_card),
|
|
595
|
+
a_enable_card: ActionAssembler("a_enable_card", form_card),
|
|
596
|
+
a_execute: ActionAssembler("a_execute", form_card),
|
|
597
|
+
a_pos_change: ActionAssembler("a_pos_change", form_card, form_position),
|
|
598
|
+
a_pos_change_force: ActionAssembler("a_pos_change_force", form_card, form_position),
|
|
599
|
+
a_attack: ActionAssembler("a_attack", form_card, {}),
|
|
600
|
+
a_deal_damage_ahead: ActionAssembler("a_deal_damage_ahead", form_card, {}),
|
|
601
|
+
a_reset_card: ActionAssembler("a_reset_card", form_card),
|
|
602
|
+
a_decompile: ActionAssembler("a_decompile", form_card),
|
|
603
|
+
a_void: ActionAssembler("a_void", form_card),
|
|
604
|
+
a_reset_all_once: ActionAssembler("a_reset_all_once", form_card),
|
|
605
|
+
a_declare_activation: ActionAssembler("a_declare_activation", form_effect),
|
|
606
|
+
a_reset_effect: ActionAssembler("a_reset_effect", form_effect),
|
|
607
|
+
a_activate_effect: ActionAssembler("a_activate_effect", form_card, form_partition),
|
|
608
|
+
a_activate_effect_internal: ActionAssembler("a_activate_effect_internal", form_card, form_partition),
|
|
609
|
+
a_add_status_effect: addEffectContructor,
|
|
610
|
+
a_add_effect: addEffectContructor,
|
|
611
|
+
a_duplicate_effect: ActionAssembler("a_duplicate_effect", form_card, form_card, form_partition, {}), //duplicate partition of card[1] into card[0]
|
|
612
|
+
a_duplicate_card: ActionAssembler("a_duplicate_card", form_card, form_position, {}), //duplicate card onto position
|
|
613
|
+
a_remove_status_effect: ActionAssembler("a_remove_status_effect", form_effect),
|
|
614
|
+
a_remove_effect: ActionAssembler("a_remove_effect", form_card, form_partition),
|
|
615
|
+
a_remove_all_effects: ActionAssembler("a_remove_all_effects", form_card),
|
|
616
|
+
a_activate_effect_subtype: ActionAssembler("a_activate_effect_subtype", form_subtype, {
|
|
617
|
+
newEffectData: 0
|
|
618
|
+
}),
|
|
619
|
+
a_modify_action: modifyActionContructor,
|
|
620
|
+
a_replace_action: ActionAssembler("a_replace_action", form_action),
|
|
621
|
+
a_zone_interact: ActionAssembler("a_zone_interact", form_zone),
|
|
622
|
+
a_shuffle: ActionAssembler("a_shuffle", form_zone, {
|
|
623
|
+
shuffleMap: {}
|
|
624
|
+
}),
|
|
625
|
+
a_draw: ActionAssembler("a_draw", form_zone, form_zone, {
|
|
626
|
+
cooldown: 0,
|
|
627
|
+
doTurnReset: true,
|
|
628
|
+
actuallyDraw: true,
|
|
629
|
+
}),
|
|
630
|
+
a_add_top: ActionAssembler("a_add_top", form_card, form_zone),
|
|
631
|
+
a_get_input: ActionAssembler("a_get_input", {}),
|
|
632
|
+
a_delay: ActionAssembler("a_delay", {}),
|
|
633
|
+
};
|
|
634
|
+
exports.actionConstructorRegistry = actionConstructorRegistry;
|
|
635
|
+
const actionFormRegistry = {
|
|
636
|
+
action: (s, a) => form_action(s)(a),
|
|
637
|
+
card: (s, c) => form_card(s)(c),
|
|
638
|
+
effect: (s, c, eff) => form_effect(s)(c, eff),
|
|
639
|
+
subtype: (s, c, eff, subtype) => form_subtype(s)(c, eff, subtype),
|
|
640
|
+
position: (s, pos) => form_position(s)(pos),
|
|
641
|
+
zone: (s, zone) => form_zone(s)(zone),
|
|
642
|
+
player: (s, pid) => form_player(s)(pid),
|
|
643
|
+
none: form_none,
|
|
644
|
+
system: form_system
|
|
645
|
+
};
|
|
646
|
+
exports.actionFormRegistry = actionFormRegistry;
|