ygopro-msg-encode 1.1.20 → 1.1.22

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 CHANGED
@@ -111,6 +111,7 @@ __export(index_exports, {
111
111
  YGOProMsgChainSolving: () => YGOProMsgChainSolving,
112
112
  YGOProMsgChained: () => YGOProMsgChained,
113
113
  YGOProMsgChaining: () => YGOProMsgChaining,
114
+ YGOProMsgChaining_CardLocation: () => YGOProMsgChaining_CardLocation,
114
115
  YGOProMsgConfirmCards: () => YGOProMsgConfirmCards,
115
116
  YGOProMsgConfirmCards_CardInfo: () => YGOProMsgConfirmCards_CardInfo,
116
117
  YGOProMsgConfirmDeckTop: () => YGOProMsgConfirmDeckTop,
@@ -3339,6 +3340,19 @@ __decorateClass([
3339
3340
  var YGOProMsgChained = _YGOProMsgChained;
3340
3341
 
3341
3342
  // src/protos/msg/proto/chaining.ts
3343
+ var _YGOProMsgChaining_CardLocation = class _YGOProMsgChaining_CardLocation {
3344
+ };
3345
+ __name(_YGOProMsgChaining_CardLocation, "YGOProMsgChaining_CardLocation");
3346
+ __decorateClass([
3347
+ BinaryField("u8", 0)
3348
+ ], _YGOProMsgChaining_CardLocation.prototype, "controller", 2);
3349
+ __decorateClass([
3350
+ BinaryField("u8", 1)
3351
+ ], _YGOProMsgChaining_CardLocation.prototype, "location", 2);
3352
+ __decorateClass([
3353
+ BinaryField("u8", 2)
3354
+ ], _YGOProMsgChaining_CardLocation.prototype, "sequence", 2);
3355
+ var YGOProMsgChaining_CardLocation = _YGOProMsgChaining_CardLocation;
3342
3356
  var _YGOProMsgChaining = class _YGOProMsgChaining extends YGOProMsgBase {
3343
3357
  };
3344
3358
  __name(_YGOProMsgChaining, "YGOProMsgChaining");
@@ -3359,14 +3373,14 @@ __decorateClass([
3359
3373
  BinaryField("u8", 7)
3360
3374
  ], _YGOProMsgChaining.prototype, "subsequence", 2);
3361
3375
  __decorateClass([
3362
- BinaryField("u8", 8)
3363
- ], _YGOProMsgChaining.prototype, "chainCount", 2);
3376
+ BinaryField(() => YGOProMsgChaining_CardLocation, 8)
3377
+ ], _YGOProMsgChaining.prototype, "chainCardLocation", 2);
3364
3378
  __decorateClass([
3365
- BinaryField("i32", 9)
3379
+ BinaryField("i32", 11)
3366
3380
  ], _YGOProMsgChaining.prototype, "desc", 2);
3367
3381
  __decorateClass([
3368
- BinaryField("u8", 13)
3369
- ], _YGOProMsgChaining.prototype, "chainPlayer", 2);
3382
+ BinaryField("u8", 15)
3383
+ ], _YGOProMsgChaining.prototype, "chainCount", 2);
3370
3384
  var YGOProMsgChaining = _YGOProMsgChaining;
3371
3385
 
3372
3386
  // src/protos/msg/proto/confirm-cards.ts
@@ -4361,6 +4375,18 @@ __decorateClass([
4361
4375
  ], _YGOProMsgSelectCard_CardInfo.prototype, "subsequence", 2);
4362
4376
  var YGOProMsgSelectCard_CardInfo = _YGOProMsgSelectCard_CardInfo;
4363
4377
  var _YGOProMsgSelectCard = class _YGOProMsgSelectCard extends YGOProMsgResponseBase {
4378
+ maskedView(playerId) {
4379
+ const view = this.copy();
4380
+ for (const card of view.cards || []) {
4381
+ if (card.controller !== playerId) {
4382
+ card.code = 0;
4383
+ }
4384
+ }
4385
+ return view;
4386
+ }
4387
+ playerView(playerId) {
4388
+ return this.maskedView(playerId);
4389
+ }
4364
4390
  responsePlayer() {
4365
4391
  return this.player;
4366
4392
  }
@@ -5091,6 +5117,18 @@ __decorateClass([
5091
5117
  ], _YGOProMsgSelectTribute_CardInfo.prototype, "releaseParam", 2);
5092
5118
  var YGOProMsgSelectTribute_CardInfo = _YGOProMsgSelectTribute_CardInfo;
5093
5119
  var _YGOProMsgSelectTribute = class _YGOProMsgSelectTribute extends YGOProMsgResponseBase {
5120
+ maskedView(playerId) {
5121
+ const view = this.copy();
5122
+ for (const card of view.cards || []) {
5123
+ if (card.controller !== playerId) {
5124
+ card.code = 0;
5125
+ }
5126
+ }
5127
+ return view;
5128
+ }
5129
+ playerView(playerId) {
5130
+ return this.maskedView(playerId);
5131
+ }
5094
5132
  responsePlayer() {
5095
5133
  return this.player;
5096
5134
  }
@@ -5178,6 +5216,23 @@ __decorateClass([
5178
5216
  ], _YGOProMsgSelectUnselectCard_CardInfo.prototype, "subsequence", 2);
5179
5217
  var YGOProMsgSelectUnselectCard_CardInfo = _YGOProMsgSelectUnselectCard_CardInfo;
5180
5218
  var _YGOProMsgSelectUnselectCard = class _YGOProMsgSelectUnselectCard extends YGOProMsgResponseBase {
5219
+ maskedView(playerId) {
5220
+ const view = this.copy();
5221
+ for (const card of view.selectableCards || []) {
5222
+ if (card.controller !== playerId) {
5223
+ card.code = 0;
5224
+ }
5225
+ }
5226
+ for (const card of view.unselectableCards || []) {
5227
+ if (card.controller !== playerId) {
5228
+ card.code = 0;
5229
+ }
5230
+ }
5231
+ return view;
5232
+ }
5233
+ playerView(playerId) {
5234
+ return this.maskedView(playerId);
5235
+ }
5181
5236
  responsePlayer() {
5182
5237
  return this.player;
5183
5238
  }
@@ -6596,6 +6651,7 @@ YGOProStoc.register(YGOProStocSrvproRoomlist);
6596
6651
  YGOProMsgChainSolving,
6597
6652
  YGOProMsgChained,
6598
6653
  YGOProMsgChaining,
6654
+ YGOProMsgChaining_CardLocation,
6599
6655
  YGOProMsgConfirmCards,
6600
6656
  YGOProMsgConfirmCards_CardInfo,
6601
6657
  YGOProMsgConfirmDeckTop,