ygopro-msg-encode 1.1.20 → 1.1.21
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/dist/index.cjs +41 -0
- package/dist/index.cjs.map +2 -2
- package/dist/index.mjs +41 -0
- package/dist/index.mjs.map +2 -2
- package/dist/src/protos/msg/proto/select-card.d.ts +2 -0
- package/dist/src/protos/msg/proto/select-tribute.d.ts +2 -0
- package/dist/src/protos/msg/proto/select-unselect-card.d.ts +2 -0
- package/package.json +1 -1
package/dist/index.cjs
CHANGED
|
@@ -4361,6 +4361,18 @@ __decorateClass([
|
|
|
4361
4361
|
], _YGOProMsgSelectCard_CardInfo.prototype, "subsequence", 2);
|
|
4362
4362
|
var YGOProMsgSelectCard_CardInfo = _YGOProMsgSelectCard_CardInfo;
|
|
4363
4363
|
var _YGOProMsgSelectCard = class _YGOProMsgSelectCard extends YGOProMsgResponseBase {
|
|
4364
|
+
maskedView(playerId) {
|
|
4365
|
+
const view = this.copy();
|
|
4366
|
+
for (const card of view.cards || []) {
|
|
4367
|
+
if (card.controller !== playerId) {
|
|
4368
|
+
card.code = 0;
|
|
4369
|
+
}
|
|
4370
|
+
}
|
|
4371
|
+
return view;
|
|
4372
|
+
}
|
|
4373
|
+
playerView(playerId) {
|
|
4374
|
+
return this.maskedView(playerId);
|
|
4375
|
+
}
|
|
4364
4376
|
responsePlayer() {
|
|
4365
4377
|
return this.player;
|
|
4366
4378
|
}
|
|
@@ -5091,6 +5103,18 @@ __decorateClass([
|
|
|
5091
5103
|
], _YGOProMsgSelectTribute_CardInfo.prototype, "releaseParam", 2);
|
|
5092
5104
|
var YGOProMsgSelectTribute_CardInfo = _YGOProMsgSelectTribute_CardInfo;
|
|
5093
5105
|
var _YGOProMsgSelectTribute = class _YGOProMsgSelectTribute extends YGOProMsgResponseBase {
|
|
5106
|
+
maskedView(playerId) {
|
|
5107
|
+
const view = this.copy();
|
|
5108
|
+
for (const card of view.cards || []) {
|
|
5109
|
+
if (card.controller !== playerId) {
|
|
5110
|
+
card.code = 0;
|
|
5111
|
+
}
|
|
5112
|
+
}
|
|
5113
|
+
return view;
|
|
5114
|
+
}
|
|
5115
|
+
playerView(playerId) {
|
|
5116
|
+
return this.maskedView(playerId);
|
|
5117
|
+
}
|
|
5094
5118
|
responsePlayer() {
|
|
5095
5119
|
return this.player;
|
|
5096
5120
|
}
|
|
@@ -5178,6 +5202,23 @@ __decorateClass([
|
|
|
5178
5202
|
], _YGOProMsgSelectUnselectCard_CardInfo.prototype, "subsequence", 2);
|
|
5179
5203
|
var YGOProMsgSelectUnselectCard_CardInfo = _YGOProMsgSelectUnselectCard_CardInfo;
|
|
5180
5204
|
var _YGOProMsgSelectUnselectCard = class _YGOProMsgSelectUnselectCard extends YGOProMsgResponseBase {
|
|
5205
|
+
maskedView(playerId) {
|
|
5206
|
+
const view = this.copy();
|
|
5207
|
+
for (const card of view.selectableCards || []) {
|
|
5208
|
+
if (card.controller !== playerId) {
|
|
5209
|
+
card.code = 0;
|
|
5210
|
+
}
|
|
5211
|
+
}
|
|
5212
|
+
for (const card of view.unselectableCards || []) {
|
|
5213
|
+
if (card.controller !== playerId) {
|
|
5214
|
+
card.code = 0;
|
|
5215
|
+
}
|
|
5216
|
+
}
|
|
5217
|
+
return view;
|
|
5218
|
+
}
|
|
5219
|
+
playerView(playerId) {
|
|
5220
|
+
return this.maskedView(playerId);
|
|
5221
|
+
}
|
|
5181
5222
|
responsePlayer() {
|
|
5182
5223
|
return this.player;
|
|
5183
5224
|
}
|