ygopro-msg-encode 1.1.11 → 1.1.13
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 +659 -480
- package/dist/index.cjs.map +3 -3
- package/dist/index.mjs +709 -530
- package/dist/index.mjs.map +3 -3
- package/dist/src/protos/msg/base.d.ts +3 -0
- package/dist/src/protos/msg/index.d.ts +1 -0
- package/dist/src/protos/msg/proto/chain-end.d.ts +4 -0
- package/dist/src/protos/msg/proto/chain-solved.d.ts +4 -0
- package/dist/src/protos/msg/proto/chained.d.ts +4 -0
- package/dist/src/protos/msg/proto/damage-step-end.d.ts +4 -0
- package/dist/src/protos/msg/proto/damage-step-start.d.ts +4 -0
- package/dist/src/protos/msg/proto/flipsummoned.d.ts +4 -0
- package/dist/src/protos/msg/proto/flipsummoning.d.ts +2 -0
- package/dist/src/protos/msg/proto/move.d.ts +2 -0
- package/dist/src/protos/msg/proto/new-phase.d.ts +4 -0
- package/dist/src/protos/msg/proto/new-turn.d.ts +4 -0
- package/dist/src/protos/msg/proto/pos-change.d.ts +2 -0
- package/dist/src/protos/msg/proto/select-battlecmd.d.ts +4 -0
- package/dist/src/protos/msg/proto/select-idlecmd.d.ts +4 -0
- package/dist/src/protos/msg/proto/shuffle-hand.d.ts +4 -0
- package/dist/src/protos/msg/proto/shuffle-set-card.d.ts +4 -0
- package/dist/src/protos/msg/proto/spsummoned.d.ts +4 -0
- package/dist/src/protos/msg/proto/summoned.d.ts +4 -0
- package/dist/src/protos/msg/proto/swap.d.ts +2 -0
- package/dist/src/protos/msg/proto/tag-swap.d.ts +4 -0
- package/dist/src/protos/msg/proto/update-card.d.ts +2 -0
- package/dist/src/protos/msg/query-location.d.ts +7 -0
- package/dist/src/protos/msg/with-response-base.d.ts +2 -2
- package/package.json +1 -1
package/dist/index.cjs
CHANGED
|
@@ -1772,10 +1772,7 @@ var _YGOProCtosExternalAddress = class _YGOProCtosExternalAddress extends YGOPro
|
|
|
1772
1772
|
return this;
|
|
1773
1773
|
}
|
|
1774
1774
|
toPayload() {
|
|
1775
|
-
const text = this.hostname.length > CTOS_EXTERNAL_ADDRESS_MAX_HOSTNAME_LENGTH ? this.hostname.substring(
|
|
1776
|
-
0,
|
|
1777
|
-
CTOS_EXTERNAL_ADDRESS_MAX_HOSTNAME_LENGTH
|
|
1778
|
-
) : this.hostname;
|
|
1775
|
+
const text = this.hostname.length > CTOS_EXTERNAL_ADDRESS_MAX_HOSTNAME_LENGTH ? this.hostname.substring(0, CTOS_EXTERNAL_ADDRESS_MAX_HOSTNAME_LENGTH) : this.hostname;
|
|
1779
1776
|
const utf16 = new Uint16Array(text.length + 1);
|
|
1780
1777
|
for (let i = 0; i < text.length; i++) {
|
|
1781
1778
|
utf16[i] = text.charCodeAt(i);
|
|
@@ -2012,6 +2009,12 @@ var _YGOProMsgBase = class _YGOProMsgBase extends PayloadBase {
|
|
|
2012
2009
|
getSendTargets() {
|
|
2013
2010
|
return SEND_TO_ALL;
|
|
2014
2011
|
}
|
|
2012
|
+
getRequireRefreshZones() {
|
|
2013
|
+
return [];
|
|
2014
|
+
}
|
|
2015
|
+
getRequireRefreshCards() {
|
|
2016
|
+
return [];
|
|
2017
|
+
}
|
|
2015
2018
|
};
|
|
2016
2019
|
__name(_YGOProMsgBase, "YGOProMsgBase");
|
|
2017
2020
|
var YGOProMsgBase = _YGOProMsgBase;
|
|
@@ -2043,6 +2046,9 @@ var _YGOProMsgResponseBase = class _YGOProMsgResponseBase extends YGOProMsgBase
|
|
|
2043
2046
|
defaultResponse() {
|
|
2044
2047
|
return void 0;
|
|
2045
2048
|
}
|
|
2049
|
+
responsePlayer() {
|
|
2050
|
+
return 0;
|
|
2051
|
+
}
|
|
2046
2052
|
getSendTargets() {
|
|
2047
2053
|
return [this.responsePlayer()];
|
|
2048
2054
|
}
|
|
@@ -2323,488 +2329,35 @@ var _YGOProMsgCardTarget_CardLocation = class _YGOProMsgCardTarget_CardLocation
|
|
|
2323
2329
|
__name(_YGOProMsgCardTarget_CardLocation, "YGOProMsgCardTarget_CardLocation");
|
|
2324
2330
|
__decorateClass([
|
|
2325
2331
|
BinaryField("u8", 0)
|
|
2326
|
-
], _YGOProMsgCardTarget_CardLocation.prototype, "controller", 2);
|
|
2327
|
-
__decorateClass([
|
|
2328
|
-
BinaryField("u8", 1)
|
|
2329
|
-
], _YGOProMsgCardTarget_CardLocation.prototype, "location", 2);
|
|
2330
|
-
__decorateClass([
|
|
2331
|
-
BinaryField("u8", 2)
|
|
2332
|
-
], _YGOProMsgCardTarget_CardLocation.prototype, "sequence", 2);
|
|
2333
|
-
var YGOProMsgCardTarget_CardLocation = _YGOProMsgCardTarget_CardLocation;
|
|
2334
|
-
var _YGOProMsgCardTarget = class _YGOProMsgCardTarget extends YGOProMsgBase {
|
|
2335
|
-
};
|
|
2336
|
-
__name(_YGOProMsgCardTarget, "YGOProMsgCardTarget");
|
|
2337
|
-
_YGOProMsgCardTarget.identifier = OcgcoreCommonConstants.MSG_CARD_TARGET;
|
|
2338
|
-
__decorateClass([
|
|
2339
|
-
BinaryField(() => YGOProMsgCardTarget_CardLocation, 0)
|
|
2340
|
-
], _YGOProMsgCardTarget.prototype, "card1", 2);
|
|
2341
|
-
__decorateClass([
|
|
2342
|
-
BinaryField(() => YGOProMsgCardTarget_CardLocation, 3)
|
|
2343
|
-
], _YGOProMsgCardTarget.prototype, "card2", 2);
|
|
2344
|
-
var YGOProMsgCardTarget = _YGOProMsgCardTarget;
|
|
2345
|
-
|
|
2346
|
-
// src/protos/msg/proto/chain-disabled.ts
|
|
2347
|
-
var _YGOProMsgChainDisabled = class _YGOProMsgChainDisabled extends YGOProMsgBase {
|
|
2348
|
-
};
|
|
2349
|
-
__name(_YGOProMsgChainDisabled, "YGOProMsgChainDisabled");
|
|
2350
|
-
_YGOProMsgChainDisabled.identifier = OcgcoreCommonConstants.MSG_CHAIN_DISABLED;
|
|
2351
|
-
__decorateClass([
|
|
2352
|
-
BinaryField("u8", 0)
|
|
2353
|
-
], _YGOProMsgChainDisabled.prototype, "chainCount", 2);
|
|
2354
|
-
var YGOProMsgChainDisabled = _YGOProMsgChainDisabled;
|
|
2355
|
-
|
|
2356
|
-
// src/protos/msg/proto/chain-end.ts
|
|
2357
|
-
var _YGOProMsgChainEnd = class _YGOProMsgChainEnd extends YGOProMsgBase {
|
|
2358
|
-
};
|
|
2359
|
-
__name(_YGOProMsgChainEnd, "YGOProMsgChainEnd");
|
|
2360
|
-
_YGOProMsgChainEnd.identifier = OcgcoreCommonConstants.MSG_CHAIN_END;
|
|
2361
|
-
var YGOProMsgChainEnd = _YGOProMsgChainEnd;
|
|
2362
|
-
|
|
2363
|
-
// src/protos/msg/proto/chain-negated.ts
|
|
2364
|
-
var _YGOProMsgChainNegated = class _YGOProMsgChainNegated extends YGOProMsgBase {
|
|
2365
|
-
};
|
|
2366
|
-
__name(_YGOProMsgChainNegated, "YGOProMsgChainNegated");
|
|
2367
|
-
_YGOProMsgChainNegated.identifier = OcgcoreCommonConstants.MSG_CHAIN_NEGATED;
|
|
2368
|
-
__decorateClass([
|
|
2369
|
-
BinaryField("u8", 0)
|
|
2370
|
-
], _YGOProMsgChainNegated.prototype, "chainCount", 2);
|
|
2371
|
-
var YGOProMsgChainNegated = _YGOProMsgChainNegated;
|
|
2372
|
-
|
|
2373
|
-
// src/protos/msg/proto/chain-solved.ts
|
|
2374
|
-
var _YGOProMsgChainSolved = class _YGOProMsgChainSolved extends YGOProMsgBase {
|
|
2375
|
-
};
|
|
2376
|
-
__name(_YGOProMsgChainSolved, "YGOProMsgChainSolved");
|
|
2377
|
-
_YGOProMsgChainSolved.identifier = OcgcoreCommonConstants.MSG_CHAIN_SOLVED;
|
|
2378
|
-
__decorateClass([
|
|
2379
|
-
BinaryField("u8", 0)
|
|
2380
|
-
], _YGOProMsgChainSolved.prototype, "chainCount", 2);
|
|
2381
|
-
var YGOProMsgChainSolved = _YGOProMsgChainSolved;
|
|
2382
|
-
|
|
2383
|
-
// src/protos/msg/proto/chain-solving.ts
|
|
2384
|
-
var _YGOProMsgChainSolving = class _YGOProMsgChainSolving extends YGOProMsgBase {
|
|
2385
|
-
};
|
|
2386
|
-
__name(_YGOProMsgChainSolving, "YGOProMsgChainSolving");
|
|
2387
|
-
_YGOProMsgChainSolving.identifier = OcgcoreCommonConstants.MSG_CHAIN_SOLVING;
|
|
2388
|
-
__decorateClass([
|
|
2389
|
-
BinaryField("u8", 0)
|
|
2390
|
-
], _YGOProMsgChainSolving.prototype, "chainCount", 2);
|
|
2391
|
-
var YGOProMsgChainSolving = _YGOProMsgChainSolving;
|
|
2392
|
-
|
|
2393
|
-
// src/protos/msg/proto/chained.ts
|
|
2394
|
-
var _YGOProMsgChained = class _YGOProMsgChained extends YGOProMsgBase {
|
|
2395
|
-
};
|
|
2396
|
-
__name(_YGOProMsgChained, "YGOProMsgChained");
|
|
2397
|
-
_YGOProMsgChained.identifier = OcgcoreCommonConstants.MSG_CHAINED;
|
|
2398
|
-
__decorateClass([
|
|
2399
|
-
BinaryField("u8", 0)
|
|
2400
|
-
], _YGOProMsgChained.prototype, "chainCount", 2);
|
|
2401
|
-
var YGOProMsgChained = _YGOProMsgChained;
|
|
2402
|
-
|
|
2403
|
-
// src/protos/msg/proto/chaining.ts
|
|
2404
|
-
var _YGOProMsgChaining = class _YGOProMsgChaining extends YGOProMsgBase {
|
|
2405
|
-
};
|
|
2406
|
-
__name(_YGOProMsgChaining, "YGOProMsgChaining");
|
|
2407
|
-
_YGOProMsgChaining.identifier = OcgcoreCommonConstants.MSG_CHAINING;
|
|
2408
|
-
__decorateClass([
|
|
2409
|
-
BinaryField("i32", 0)
|
|
2410
|
-
], _YGOProMsgChaining.prototype, "code", 2);
|
|
2411
|
-
__decorateClass([
|
|
2412
|
-
BinaryField("u8", 4)
|
|
2413
|
-
], _YGOProMsgChaining.prototype, "controller", 2);
|
|
2414
|
-
__decorateClass([
|
|
2415
|
-
BinaryField("u8", 5)
|
|
2416
|
-
], _YGOProMsgChaining.prototype, "location", 2);
|
|
2417
|
-
__decorateClass([
|
|
2418
|
-
BinaryField("u8", 6)
|
|
2419
|
-
], _YGOProMsgChaining.prototype, "sequence", 2);
|
|
2420
|
-
__decorateClass([
|
|
2421
|
-
BinaryField("u8", 7)
|
|
2422
|
-
], _YGOProMsgChaining.prototype, "subsequence", 2);
|
|
2423
|
-
__decorateClass([
|
|
2424
|
-
BinaryField("u8", 8)
|
|
2425
|
-
], _YGOProMsgChaining.prototype, "chainCount", 2);
|
|
2426
|
-
__decorateClass([
|
|
2427
|
-
BinaryField("i32", 9)
|
|
2428
|
-
], _YGOProMsgChaining.prototype, "desc", 2);
|
|
2429
|
-
__decorateClass([
|
|
2430
|
-
BinaryField("u8", 13)
|
|
2431
|
-
], _YGOProMsgChaining.prototype, "chainPlayer", 2);
|
|
2432
|
-
var YGOProMsgChaining = _YGOProMsgChaining;
|
|
2433
|
-
|
|
2434
|
-
// src/protos/msg/proto/confirm-cards.ts
|
|
2435
|
-
var _YGOProMsgConfirmCards_CardInfo = class _YGOProMsgConfirmCards_CardInfo {
|
|
2436
|
-
};
|
|
2437
|
-
__name(_YGOProMsgConfirmCards_CardInfo, "YGOProMsgConfirmCards_CardInfo");
|
|
2438
|
-
__decorateClass([
|
|
2439
|
-
BinaryField("i32", 0)
|
|
2440
|
-
], _YGOProMsgConfirmCards_CardInfo.prototype, "code", 2);
|
|
2441
|
-
__decorateClass([
|
|
2442
|
-
BinaryField("u8", 4)
|
|
2443
|
-
], _YGOProMsgConfirmCards_CardInfo.prototype, "controller", 2);
|
|
2444
|
-
__decorateClass([
|
|
2445
|
-
BinaryField("u8", 5)
|
|
2446
|
-
], _YGOProMsgConfirmCards_CardInfo.prototype, "location", 2);
|
|
2447
|
-
__decorateClass([
|
|
2448
|
-
BinaryField("u8", 6)
|
|
2449
|
-
], _YGOProMsgConfirmCards_CardInfo.prototype, "sequence", 2);
|
|
2450
|
-
var YGOProMsgConfirmCards_CardInfo = _YGOProMsgConfirmCards_CardInfo;
|
|
2451
|
-
var _YGOProMsgConfirmCards = class _YGOProMsgConfirmCards extends YGOProMsgBase {
|
|
2452
|
-
// 对方视角可能需要隐藏卡片信息
|
|
2453
|
-
opponentView() {
|
|
2454
|
-
const view = this.copy();
|
|
2455
|
-
view.cards = view.cards.map((card) => {
|
|
2456
|
-
const c = { ...card };
|
|
2457
|
-
if (!(c.code & 2147483648)) {
|
|
2458
|
-
c.code = 0;
|
|
2459
|
-
}
|
|
2460
|
-
return c;
|
|
2461
|
-
});
|
|
2462
|
-
return view;
|
|
2463
|
-
}
|
|
2464
|
-
getSendTargets() {
|
|
2465
|
-
if (this.cards.length > 0 && this.cards[0].location === 1) {
|
|
2466
|
-
return [this.player];
|
|
2467
|
-
}
|
|
2468
|
-
return SEND_TO_ALL;
|
|
2469
|
-
}
|
|
2470
|
-
};
|
|
2471
|
-
__name(_YGOProMsgConfirmCards, "YGOProMsgConfirmCards");
|
|
2472
|
-
_YGOProMsgConfirmCards.identifier = OcgcoreCommonConstants.MSG_CONFIRM_CARDS;
|
|
2473
|
-
__decorateClass([
|
|
2474
|
-
BinaryField("u8", 0)
|
|
2475
|
-
], _YGOProMsgConfirmCards.prototype, "player", 2);
|
|
2476
|
-
__decorateClass([
|
|
2477
|
-
BinaryField("u8", 1)
|
|
2478
|
-
], _YGOProMsgConfirmCards.prototype, "skipPanel", 2);
|
|
2479
|
-
__decorateClass([
|
|
2480
|
-
BinaryField("u8", 2)
|
|
2481
|
-
], _YGOProMsgConfirmCards.prototype, "count", 2);
|
|
2482
|
-
__decorateClass([
|
|
2483
|
-
BinaryField(() => YGOProMsgConfirmCards_CardInfo, 3, (obj) => obj.count)
|
|
2484
|
-
], _YGOProMsgConfirmCards.prototype, "cards", 2);
|
|
2485
|
-
var YGOProMsgConfirmCards = _YGOProMsgConfirmCards;
|
|
2486
|
-
|
|
2487
|
-
// src/protos/msg/proto/confirm-decktop.ts
|
|
2488
|
-
var _YGOProMsgConfirmDeckTop_CardInfo = class _YGOProMsgConfirmDeckTop_CardInfo {
|
|
2489
|
-
};
|
|
2490
|
-
__name(_YGOProMsgConfirmDeckTop_CardInfo, "YGOProMsgConfirmDeckTop_CardInfo");
|
|
2491
|
-
__decorateClass([
|
|
2492
|
-
BinaryField("i32", 0)
|
|
2493
|
-
], _YGOProMsgConfirmDeckTop_CardInfo.prototype, "code", 2);
|
|
2494
|
-
__decorateClass([
|
|
2495
|
-
BinaryField("u8", 4)
|
|
2496
|
-
], _YGOProMsgConfirmDeckTop_CardInfo.prototype, "controller", 2);
|
|
2497
|
-
__decorateClass([
|
|
2498
|
-
BinaryField("u8", 5)
|
|
2499
|
-
], _YGOProMsgConfirmDeckTop_CardInfo.prototype, "location", 2);
|
|
2500
|
-
__decorateClass([
|
|
2501
|
-
BinaryField("u8", 6)
|
|
2502
|
-
], _YGOProMsgConfirmDeckTop_CardInfo.prototype, "sequence", 2);
|
|
2503
|
-
var YGOProMsgConfirmDeckTop_CardInfo = _YGOProMsgConfirmDeckTop_CardInfo;
|
|
2504
|
-
var _YGOProMsgConfirmDeckTop = class _YGOProMsgConfirmDeckTop extends YGOProMsgBase {
|
|
2505
|
-
// 对方视角可能需要隐藏卡片信息
|
|
2506
|
-
opponentView() {
|
|
2507
|
-
const view = this.copy();
|
|
2508
|
-
view.cards = view.cards.map((card) => {
|
|
2509
|
-
const c = { ...card };
|
|
2510
|
-
if (!(c.code & 2147483648)) {
|
|
2511
|
-
c.code = 0;
|
|
2512
|
-
}
|
|
2513
|
-
return c;
|
|
2514
|
-
});
|
|
2515
|
-
return view;
|
|
2516
|
-
}
|
|
2517
|
-
// confirm-decktop 使用基类的 playerView (基于 player 字段)
|
|
2518
|
-
};
|
|
2519
|
-
__name(_YGOProMsgConfirmDeckTop, "YGOProMsgConfirmDeckTop");
|
|
2520
|
-
_YGOProMsgConfirmDeckTop.identifier = OcgcoreCommonConstants.MSG_CONFIRM_DECKTOP;
|
|
2521
|
-
__decorateClass([
|
|
2522
|
-
BinaryField("u8", 0)
|
|
2523
|
-
], _YGOProMsgConfirmDeckTop.prototype, "player", 2);
|
|
2524
|
-
__decorateClass([
|
|
2525
|
-
BinaryField("u8", 1)
|
|
2526
|
-
], _YGOProMsgConfirmDeckTop.prototype, "count", 2);
|
|
2527
|
-
__decorateClass([
|
|
2528
|
-
BinaryField(() => YGOProMsgConfirmDeckTop_CardInfo, 2, (obj) => obj.count)
|
|
2529
|
-
], _YGOProMsgConfirmDeckTop.prototype, "cards", 2);
|
|
2530
|
-
var YGOProMsgConfirmDeckTop = _YGOProMsgConfirmDeckTop;
|
|
2531
|
-
|
|
2532
|
-
// src/protos/msg/proto/confirm-extratop.ts
|
|
2533
|
-
var _YGOProMsgConfirmExtraTop_CardInfo = class _YGOProMsgConfirmExtraTop_CardInfo {
|
|
2534
|
-
};
|
|
2535
|
-
__name(_YGOProMsgConfirmExtraTop_CardInfo, "YGOProMsgConfirmExtraTop_CardInfo");
|
|
2536
|
-
__decorateClass([
|
|
2537
|
-
BinaryField("i32", 0)
|
|
2538
|
-
], _YGOProMsgConfirmExtraTop_CardInfo.prototype, "code", 2);
|
|
2539
|
-
__decorateClass([
|
|
2540
|
-
BinaryField("u8", 4)
|
|
2541
|
-
], _YGOProMsgConfirmExtraTop_CardInfo.prototype, "controller", 2);
|
|
2542
|
-
__decorateClass([
|
|
2543
|
-
BinaryField("u8", 5)
|
|
2544
|
-
], _YGOProMsgConfirmExtraTop_CardInfo.prototype, "location", 2);
|
|
2545
|
-
__decorateClass([
|
|
2546
|
-
BinaryField("u8", 6)
|
|
2547
|
-
], _YGOProMsgConfirmExtraTop_CardInfo.prototype, "sequence", 2);
|
|
2548
|
-
var YGOProMsgConfirmExtraTop_CardInfo = _YGOProMsgConfirmExtraTop_CardInfo;
|
|
2549
|
-
var _YGOProMsgConfirmExtraTop = class _YGOProMsgConfirmExtraTop extends YGOProMsgBase {
|
|
2550
|
-
// 对方视角可能需要隐藏卡片信息
|
|
2551
|
-
opponentView() {
|
|
2552
|
-
const view = this.copy();
|
|
2553
|
-
view.cards = view.cards.map((card) => {
|
|
2554
|
-
const c = { ...card };
|
|
2555
|
-
if (!(c.code & 2147483648)) {
|
|
2556
|
-
c.code = 0;
|
|
2557
|
-
}
|
|
2558
|
-
return c;
|
|
2559
|
-
});
|
|
2560
|
-
return view;
|
|
2561
|
-
}
|
|
2562
|
-
// confirm-extratop 使用基类的 playerView (基于 player 字段)
|
|
2563
|
-
};
|
|
2564
|
-
__name(_YGOProMsgConfirmExtraTop, "YGOProMsgConfirmExtraTop");
|
|
2565
|
-
_YGOProMsgConfirmExtraTop.identifier = OcgcoreCommonConstants.MSG_CONFIRM_EXTRATOP;
|
|
2566
|
-
__decorateClass([
|
|
2567
|
-
BinaryField("u8", 0)
|
|
2568
|
-
], _YGOProMsgConfirmExtraTop.prototype, "player", 2);
|
|
2569
|
-
__decorateClass([
|
|
2570
|
-
BinaryField("u8", 1)
|
|
2571
|
-
], _YGOProMsgConfirmExtraTop.prototype, "count", 2);
|
|
2572
|
-
__decorateClass([
|
|
2573
|
-
BinaryField(() => YGOProMsgConfirmExtraTop_CardInfo, 2, (obj) => obj.count)
|
|
2574
|
-
], _YGOProMsgConfirmExtraTop.prototype, "cards", 2);
|
|
2575
|
-
var YGOProMsgConfirmExtraTop = _YGOProMsgConfirmExtraTop;
|
|
2576
|
-
|
|
2577
|
-
// src/protos/msg/proto/damage.ts
|
|
2578
|
-
var _YGOProMsgDamage = class _YGOProMsgDamage extends YGOProMsgBase {
|
|
2579
|
-
};
|
|
2580
|
-
__name(_YGOProMsgDamage, "YGOProMsgDamage");
|
|
2581
|
-
_YGOProMsgDamage.identifier = OcgcoreCommonConstants.MSG_DAMAGE;
|
|
2582
|
-
__decorateClass([
|
|
2583
|
-
BinaryField("u8", 0)
|
|
2584
|
-
], _YGOProMsgDamage.prototype, "player", 2);
|
|
2585
|
-
__decorateClass([
|
|
2586
|
-
BinaryField("i32", 1)
|
|
2587
|
-
], _YGOProMsgDamage.prototype, "value", 2);
|
|
2588
|
-
var YGOProMsgDamage = _YGOProMsgDamage;
|
|
2589
|
-
|
|
2590
|
-
// src/protos/msg/proto/damage-step-end.ts
|
|
2591
|
-
var _YGOProMsgDamageStepEnd = class _YGOProMsgDamageStepEnd extends YGOProMsgBase {
|
|
2592
|
-
};
|
|
2593
|
-
__name(_YGOProMsgDamageStepEnd, "YGOProMsgDamageStepEnd");
|
|
2594
|
-
_YGOProMsgDamageStepEnd.identifier = OcgcoreCommonConstants.MSG_DAMAGE_STEP_END;
|
|
2595
|
-
var YGOProMsgDamageStepEnd = _YGOProMsgDamageStepEnd;
|
|
2596
|
-
|
|
2597
|
-
// src/protos/msg/proto/damage-step-start.ts
|
|
2598
|
-
var _YGOProMsgDamageStepStart = class _YGOProMsgDamageStepStart extends YGOProMsgBase {
|
|
2599
|
-
};
|
|
2600
|
-
__name(_YGOProMsgDamageStepStart, "YGOProMsgDamageStepStart");
|
|
2601
|
-
_YGOProMsgDamageStepStart.identifier = OcgcoreCommonConstants.MSG_DAMAGE_STEP_START;
|
|
2602
|
-
var YGOProMsgDamageStepStart = _YGOProMsgDamageStepStart;
|
|
2603
|
-
|
|
2604
|
-
// src/protos/msg/proto/deck-top.ts
|
|
2605
|
-
var _YGOProMsgDeckTop = class _YGOProMsgDeckTop extends YGOProMsgBase {
|
|
2606
|
-
// 对方视角可能需要隐藏卡片信息
|
|
2607
|
-
opponentView() {
|
|
2608
|
-
const view = this.copy();
|
|
2609
|
-
if (!(view.code & 2147483648)) {
|
|
2610
|
-
view.code = 0;
|
|
2611
|
-
}
|
|
2612
|
-
return view;
|
|
2613
|
-
}
|
|
2614
|
-
// deck-top 使用基类的 playerView (基于 player 字段)
|
|
2615
|
-
};
|
|
2616
|
-
__name(_YGOProMsgDeckTop, "YGOProMsgDeckTop");
|
|
2617
|
-
_YGOProMsgDeckTop.identifier = OcgcoreCommonConstants.MSG_DECK_TOP;
|
|
2618
|
-
__decorateClass([
|
|
2619
|
-
BinaryField("u8", 0)
|
|
2620
|
-
], _YGOProMsgDeckTop.prototype, "player", 2);
|
|
2621
|
-
__decorateClass([
|
|
2622
|
-
BinaryField("u8", 1)
|
|
2623
|
-
], _YGOProMsgDeckTop.prototype, "sequence", 2);
|
|
2624
|
-
__decorateClass([
|
|
2625
|
-
BinaryField("i32", 2)
|
|
2626
|
-
], _YGOProMsgDeckTop.prototype, "code", 2);
|
|
2627
|
-
var YGOProMsgDeckTop = _YGOProMsgDeckTop;
|
|
2628
|
-
|
|
2629
|
-
// src/protos/msg/proto/draw.ts
|
|
2630
|
-
var _YGOProMsgDraw = class _YGOProMsgDraw extends YGOProMsgBase {
|
|
2631
|
-
// 对方视角需要隐藏抽到的卡(如果卡片标志位 0x80 未设置)
|
|
2632
|
-
opponentView() {
|
|
2633
|
-
const view = this.copy();
|
|
2634
|
-
view.cards = view.cards.map((card) => {
|
|
2635
|
-
if (!(card & 2147483648)) {
|
|
2636
|
-
return 0;
|
|
2637
|
-
}
|
|
2638
|
-
return card;
|
|
2639
|
-
});
|
|
2640
|
-
return view;
|
|
2641
|
-
}
|
|
2642
|
-
};
|
|
2643
|
-
__name(_YGOProMsgDraw, "YGOProMsgDraw");
|
|
2644
|
-
_YGOProMsgDraw.identifier = OcgcoreCommonConstants.MSG_DRAW;
|
|
2645
|
-
__decorateClass([
|
|
2646
|
-
BinaryField("u8", 0)
|
|
2647
|
-
], _YGOProMsgDraw.prototype, "player", 2);
|
|
2648
|
-
__decorateClass([
|
|
2649
|
-
BinaryField("u8", 1)
|
|
2650
|
-
], _YGOProMsgDraw.prototype, "count", 2);
|
|
2651
|
-
__decorateClass([
|
|
2652
|
-
BinaryField("i32", 2, (obj) => obj.count)
|
|
2653
|
-
], _YGOProMsgDraw.prototype, "cards", 2);
|
|
2654
|
-
var YGOProMsgDraw = _YGOProMsgDraw;
|
|
2655
|
-
|
|
2656
|
-
// src/protos/msg/proto/equip.ts
|
|
2657
|
-
var _YGOProMsgEquip_CardLocation = class _YGOProMsgEquip_CardLocation {
|
|
2658
|
-
};
|
|
2659
|
-
__name(_YGOProMsgEquip_CardLocation, "YGOProMsgEquip_CardLocation");
|
|
2660
|
-
__decorateClass([
|
|
2661
|
-
BinaryField("u8", 0)
|
|
2662
|
-
], _YGOProMsgEquip_CardLocation.prototype, "controller", 2);
|
|
2663
|
-
__decorateClass([
|
|
2664
|
-
BinaryField("u8", 1)
|
|
2665
|
-
], _YGOProMsgEquip_CardLocation.prototype, "location", 2);
|
|
2666
|
-
__decorateClass([
|
|
2667
|
-
BinaryField("u8", 2)
|
|
2668
|
-
], _YGOProMsgEquip_CardLocation.prototype, "sequence", 2);
|
|
2669
|
-
var YGOProMsgEquip_CardLocation = _YGOProMsgEquip_CardLocation;
|
|
2670
|
-
var _YGOProMsgEquip = class _YGOProMsgEquip extends YGOProMsgBase {
|
|
2671
|
-
};
|
|
2672
|
-
__name(_YGOProMsgEquip, "YGOProMsgEquip");
|
|
2673
|
-
_YGOProMsgEquip.identifier = OcgcoreCommonConstants.MSG_EQUIP;
|
|
2674
|
-
__decorateClass([
|
|
2675
|
-
BinaryField(() => YGOProMsgEquip_CardLocation, 0)
|
|
2676
|
-
], _YGOProMsgEquip.prototype, "equip", 2);
|
|
2677
|
-
__decorateClass([
|
|
2678
|
-
BinaryField(() => YGOProMsgEquip_CardLocation, 3)
|
|
2679
|
-
], _YGOProMsgEquip.prototype, "target", 2);
|
|
2680
|
-
__decorateClass([
|
|
2681
|
-
BinaryField("u8", 6)
|
|
2682
|
-
], _YGOProMsgEquip.prototype, "position", 2);
|
|
2683
|
-
var YGOProMsgEquip = _YGOProMsgEquip;
|
|
2684
|
-
|
|
2685
|
-
// src/protos/msg/proto/field-disabled.ts
|
|
2686
|
-
var _YGOProMsgFieldDisabled = class _YGOProMsgFieldDisabled extends YGOProMsgBase {
|
|
2687
|
-
};
|
|
2688
|
-
__name(_YGOProMsgFieldDisabled, "YGOProMsgFieldDisabled");
|
|
2689
|
-
_YGOProMsgFieldDisabled.identifier = OcgcoreCommonConstants.MSG_FIELD_DISABLED;
|
|
2690
|
-
__decorateClass([
|
|
2691
|
-
BinaryField("u32", 0)
|
|
2692
|
-
], _YGOProMsgFieldDisabled.prototype, "disabledField", 2);
|
|
2693
|
-
var YGOProMsgFieldDisabled = _YGOProMsgFieldDisabled;
|
|
2694
|
-
|
|
2695
|
-
// src/protos/msg/proto/flipsummoned.ts
|
|
2696
|
-
var _YGOProMsgFlipSummoned = class _YGOProMsgFlipSummoned extends YGOProMsgBase {
|
|
2697
|
-
};
|
|
2698
|
-
__name(_YGOProMsgFlipSummoned, "YGOProMsgFlipSummoned");
|
|
2699
|
-
_YGOProMsgFlipSummoned.identifier = OcgcoreCommonConstants.MSG_FLIPSUMMONED;
|
|
2700
|
-
var YGOProMsgFlipSummoned = _YGOProMsgFlipSummoned;
|
|
2701
|
-
|
|
2702
|
-
// src/protos/msg/proto/flipsummoning.ts
|
|
2703
|
-
var _YGOProMsgFlipSummoning = class _YGOProMsgFlipSummoning extends YGOProMsgBase {
|
|
2704
|
-
};
|
|
2705
|
-
__name(_YGOProMsgFlipSummoning, "YGOProMsgFlipSummoning");
|
|
2706
|
-
_YGOProMsgFlipSummoning.identifier = OcgcoreCommonConstants.MSG_FLIPSUMMONING;
|
|
2707
|
-
__decorateClass([
|
|
2708
|
-
BinaryField("i32", 0)
|
|
2709
|
-
], _YGOProMsgFlipSummoning.prototype, "code", 2);
|
|
2710
|
-
__decorateClass([
|
|
2711
|
-
BinaryField("u8", 4)
|
|
2712
|
-
], _YGOProMsgFlipSummoning.prototype, "controller", 2);
|
|
2713
|
-
__decorateClass([
|
|
2714
|
-
BinaryField("u8", 5)
|
|
2715
|
-
], _YGOProMsgFlipSummoning.prototype, "location", 2);
|
|
2716
|
-
__decorateClass([
|
|
2717
|
-
BinaryField("u8", 6)
|
|
2718
|
-
], _YGOProMsgFlipSummoning.prototype, "sequence", 2);
|
|
2719
|
-
__decorateClass([
|
|
2720
|
-
BinaryField("u8", 7)
|
|
2721
|
-
], _YGOProMsgFlipSummoning.prototype, "position", 2);
|
|
2722
|
-
var YGOProMsgFlipSummoning = _YGOProMsgFlipSummoning;
|
|
2723
|
-
|
|
2724
|
-
// src/protos/msg/proto/hand-res.ts
|
|
2725
|
-
var _YGOProMsgHandRes = class _YGOProMsgHandRes extends YGOProMsgBase {
|
|
2726
|
-
};
|
|
2727
|
-
__name(_YGOProMsgHandRes, "YGOProMsgHandRes");
|
|
2728
|
-
_YGOProMsgHandRes.identifier = OcgcoreCommonConstants.MSG_HAND_RES;
|
|
2729
|
-
__decorateClass([
|
|
2730
|
-
BinaryField("u8", 0)
|
|
2731
|
-
], _YGOProMsgHandRes.prototype, "result", 2);
|
|
2732
|
-
var YGOProMsgHandRes = _YGOProMsgHandRes;
|
|
2733
|
-
|
|
2734
|
-
// src/protos/msg/proto/hint.ts
|
|
2735
|
-
var HINT_TYPES_SEND_TO_SELF = /* @__PURE__ */ new Set([1, 2, 3, 5]);
|
|
2736
|
-
var HINT_TYPES_SEND_TO_OPPONENT = /* @__PURE__ */ new Set([4, 6, 7, 8, 9, 11]);
|
|
2737
|
-
var _YGOProMsgHint = class _YGOProMsgHint extends YGOProMsgBase {
|
|
2738
|
-
getSendTargets() {
|
|
2739
|
-
if (HINT_TYPES_SEND_TO_SELF.has(this.type)) {
|
|
2740
|
-
return [this.player];
|
|
2741
|
-
}
|
|
2742
|
-
if (HINT_TYPES_SEND_TO_OPPONENT.has(this.type)) {
|
|
2743
|
-
return [1 - this.player, 7 /* OBSERVER */];
|
|
2744
|
-
}
|
|
2745
|
-
return SEND_TO_ALL;
|
|
2746
|
-
}
|
|
2747
|
-
};
|
|
2748
|
-
__name(_YGOProMsgHint, "YGOProMsgHint");
|
|
2749
|
-
_YGOProMsgHint.identifier = OcgcoreCommonConstants.MSG_HINT;
|
|
2750
|
-
__decorateClass([
|
|
2751
|
-
BinaryField("u8", 0)
|
|
2752
|
-
], _YGOProMsgHint.prototype, "type", 2);
|
|
2753
|
-
__decorateClass([
|
|
2754
|
-
BinaryField("u8", 1)
|
|
2755
|
-
], _YGOProMsgHint.prototype, "player", 2);
|
|
2756
|
-
__decorateClass([
|
|
2757
|
-
BinaryField("i32", 2)
|
|
2758
|
-
], _YGOProMsgHint.prototype, "desc", 2);
|
|
2759
|
-
var YGOProMsgHint = _YGOProMsgHint;
|
|
2760
|
-
|
|
2761
|
-
// src/protos/msg/proto/lpupdate.ts
|
|
2762
|
-
var _YGOProMsgLpUpdate = class _YGOProMsgLpUpdate extends YGOProMsgBase {
|
|
2763
|
-
};
|
|
2764
|
-
__name(_YGOProMsgLpUpdate, "YGOProMsgLpUpdate");
|
|
2765
|
-
_YGOProMsgLpUpdate.identifier = OcgcoreCommonConstants.MSG_LPUPDATE;
|
|
2766
|
-
__decorateClass([
|
|
2767
|
-
BinaryField("u8", 0)
|
|
2768
|
-
], _YGOProMsgLpUpdate.prototype, "player", 2);
|
|
2769
|
-
__decorateClass([
|
|
2770
|
-
BinaryField("i32", 1)
|
|
2771
|
-
], _YGOProMsgLpUpdate.prototype, "lp", 2);
|
|
2772
|
-
var YGOProMsgLpUpdate = _YGOProMsgLpUpdate;
|
|
2773
|
-
|
|
2774
|
-
// src/protos/msg/proto/match-kill.ts
|
|
2775
|
-
var _YGOProMsgMatchKill = class _YGOProMsgMatchKill extends YGOProMsgBase {
|
|
2776
|
-
};
|
|
2777
|
-
__name(_YGOProMsgMatchKill, "YGOProMsgMatchKill");
|
|
2778
|
-
_YGOProMsgMatchKill.identifier = OcgcoreCommonConstants.MSG_MATCH_KILL;
|
|
2779
|
-
__decorateClass([
|
|
2780
|
-
BinaryField("i32", 0)
|
|
2781
|
-
], _YGOProMsgMatchKill.prototype, "code", 2);
|
|
2782
|
-
var YGOProMsgMatchKill = _YGOProMsgMatchKill;
|
|
2783
|
-
|
|
2784
|
-
// src/protos/msg/proto/missed-effect.ts
|
|
2785
|
-
var _YGOProMsgMissedEffect = class _YGOProMsgMissedEffect extends YGOProMsgBase {
|
|
2786
|
-
getSendTargets() {
|
|
2787
|
-
return [this.controller];
|
|
2788
|
-
}
|
|
2789
|
-
};
|
|
2790
|
-
__name(_YGOProMsgMissedEffect, "YGOProMsgMissedEffect");
|
|
2791
|
-
_YGOProMsgMissedEffect.identifier = OcgcoreCommonConstants.MSG_MISSED_EFFECT;
|
|
2792
|
-
__decorateClass([
|
|
2793
|
-
BinaryField("u8", 0)
|
|
2794
|
-
], _YGOProMsgMissedEffect.prototype, "controller", 2);
|
|
2332
|
+
], _YGOProMsgCardTarget_CardLocation.prototype, "controller", 2);
|
|
2795
2333
|
__decorateClass([
|
|
2796
2334
|
BinaryField("u8", 1)
|
|
2797
|
-
],
|
|
2335
|
+
], _YGOProMsgCardTarget_CardLocation.prototype, "location", 2);
|
|
2798
2336
|
__decorateClass([
|
|
2799
2337
|
BinaryField("u8", 2)
|
|
2800
|
-
],
|
|
2338
|
+
], _YGOProMsgCardTarget_CardLocation.prototype, "sequence", 2);
|
|
2339
|
+
var YGOProMsgCardTarget_CardLocation = _YGOProMsgCardTarget_CardLocation;
|
|
2340
|
+
var _YGOProMsgCardTarget = class _YGOProMsgCardTarget extends YGOProMsgBase {
|
|
2341
|
+
};
|
|
2342
|
+
__name(_YGOProMsgCardTarget, "YGOProMsgCardTarget");
|
|
2343
|
+
_YGOProMsgCardTarget.identifier = OcgcoreCommonConstants.MSG_CARD_TARGET;
|
|
2801
2344
|
__decorateClass([
|
|
2802
|
-
BinaryField(
|
|
2803
|
-
],
|
|
2345
|
+
BinaryField(() => YGOProMsgCardTarget_CardLocation, 0)
|
|
2346
|
+
], _YGOProMsgCardTarget.prototype, "card1", 2);
|
|
2804
2347
|
__decorateClass([
|
|
2805
|
-
BinaryField(
|
|
2806
|
-
],
|
|
2807
|
-
var
|
|
2348
|
+
BinaryField(() => YGOProMsgCardTarget_CardLocation, 3)
|
|
2349
|
+
], _YGOProMsgCardTarget.prototype, "card2", 2);
|
|
2350
|
+
var YGOProMsgCardTarget = _YGOProMsgCardTarget;
|
|
2351
|
+
|
|
2352
|
+
// src/protos/msg/proto/chain-disabled.ts
|
|
2353
|
+
var _YGOProMsgChainDisabled = class _YGOProMsgChainDisabled extends YGOProMsgBase {
|
|
2354
|
+
};
|
|
2355
|
+
__name(_YGOProMsgChainDisabled, "YGOProMsgChainDisabled");
|
|
2356
|
+
_YGOProMsgChainDisabled.identifier = OcgcoreCommonConstants.MSG_CHAIN_DISABLED;
|
|
2357
|
+
__decorateClass([
|
|
2358
|
+
BinaryField("u8", 0)
|
|
2359
|
+
], _YGOProMsgChainDisabled.prototype, "chainCount", 2);
|
|
2360
|
+
var YGOProMsgChainDisabled = _YGOProMsgChainDisabled;
|
|
2808
2361
|
|
|
2809
2362
|
// src/vendor/script-constants.ts
|
|
2810
2363
|
var OcgcoreScriptConstants = {
|
|
@@ -3644,6 +3197,508 @@ var OcgcoreScriptConstants = {
|
|
|
3644
3197
|
TYPE_XYZ: 8388608
|
|
3645
3198
|
};
|
|
3646
3199
|
|
|
3200
|
+
// src/protos/msg/proto/chain-end.ts
|
|
3201
|
+
var _YGOProMsgChainEnd = class _YGOProMsgChainEnd extends YGOProMsgBase {
|
|
3202
|
+
getRequireRefreshZones() {
|
|
3203
|
+
const location = OcgcoreScriptConstants.LOCATION_MZONE | OcgcoreScriptConstants.LOCATION_SZONE | OcgcoreScriptConstants.LOCATION_HAND;
|
|
3204
|
+
return [
|
|
3205
|
+
{ player: 0, location },
|
|
3206
|
+
{ player: 1, location }
|
|
3207
|
+
];
|
|
3208
|
+
}
|
|
3209
|
+
};
|
|
3210
|
+
__name(_YGOProMsgChainEnd, "YGOProMsgChainEnd");
|
|
3211
|
+
_YGOProMsgChainEnd.identifier = OcgcoreCommonConstants.MSG_CHAIN_END;
|
|
3212
|
+
var YGOProMsgChainEnd = _YGOProMsgChainEnd;
|
|
3213
|
+
|
|
3214
|
+
// src/protos/msg/proto/chain-negated.ts
|
|
3215
|
+
var _YGOProMsgChainNegated = class _YGOProMsgChainNegated extends YGOProMsgBase {
|
|
3216
|
+
};
|
|
3217
|
+
__name(_YGOProMsgChainNegated, "YGOProMsgChainNegated");
|
|
3218
|
+
_YGOProMsgChainNegated.identifier = OcgcoreCommonConstants.MSG_CHAIN_NEGATED;
|
|
3219
|
+
__decorateClass([
|
|
3220
|
+
BinaryField("u8", 0)
|
|
3221
|
+
], _YGOProMsgChainNegated.prototype, "chainCount", 2);
|
|
3222
|
+
var YGOProMsgChainNegated = _YGOProMsgChainNegated;
|
|
3223
|
+
|
|
3224
|
+
// src/protos/msg/proto/chain-solved.ts
|
|
3225
|
+
var _YGOProMsgChainSolved = class _YGOProMsgChainSolved extends YGOProMsgBase {
|
|
3226
|
+
getRequireRefreshZones() {
|
|
3227
|
+
const location = OcgcoreScriptConstants.LOCATION_MZONE | OcgcoreScriptConstants.LOCATION_SZONE | OcgcoreScriptConstants.LOCATION_HAND;
|
|
3228
|
+
return [
|
|
3229
|
+
{ player: 0, location },
|
|
3230
|
+
{ player: 1, location }
|
|
3231
|
+
];
|
|
3232
|
+
}
|
|
3233
|
+
};
|
|
3234
|
+
__name(_YGOProMsgChainSolved, "YGOProMsgChainSolved");
|
|
3235
|
+
_YGOProMsgChainSolved.identifier = OcgcoreCommonConstants.MSG_CHAIN_SOLVED;
|
|
3236
|
+
__decorateClass([
|
|
3237
|
+
BinaryField("u8", 0)
|
|
3238
|
+
], _YGOProMsgChainSolved.prototype, "chainCount", 2);
|
|
3239
|
+
var YGOProMsgChainSolved = _YGOProMsgChainSolved;
|
|
3240
|
+
|
|
3241
|
+
// src/protos/msg/proto/chain-solving.ts
|
|
3242
|
+
var _YGOProMsgChainSolving = class _YGOProMsgChainSolving extends YGOProMsgBase {
|
|
3243
|
+
};
|
|
3244
|
+
__name(_YGOProMsgChainSolving, "YGOProMsgChainSolving");
|
|
3245
|
+
_YGOProMsgChainSolving.identifier = OcgcoreCommonConstants.MSG_CHAIN_SOLVING;
|
|
3246
|
+
__decorateClass([
|
|
3247
|
+
BinaryField("u8", 0)
|
|
3248
|
+
], _YGOProMsgChainSolving.prototype, "chainCount", 2);
|
|
3249
|
+
var YGOProMsgChainSolving = _YGOProMsgChainSolving;
|
|
3250
|
+
|
|
3251
|
+
// src/protos/msg/proto/chained.ts
|
|
3252
|
+
var _YGOProMsgChained = class _YGOProMsgChained extends YGOProMsgBase {
|
|
3253
|
+
getRequireRefreshZones() {
|
|
3254
|
+
const location = OcgcoreScriptConstants.LOCATION_MZONE | OcgcoreScriptConstants.LOCATION_SZONE | OcgcoreScriptConstants.LOCATION_HAND;
|
|
3255
|
+
return [
|
|
3256
|
+
{ player: 0, location },
|
|
3257
|
+
{ player: 1, location }
|
|
3258
|
+
];
|
|
3259
|
+
}
|
|
3260
|
+
};
|
|
3261
|
+
__name(_YGOProMsgChained, "YGOProMsgChained");
|
|
3262
|
+
_YGOProMsgChained.identifier = OcgcoreCommonConstants.MSG_CHAINED;
|
|
3263
|
+
__decorateClass([
|
|
3264
|
+
BinaryField("u8", 0)
|
|
3265
|
+
], _YGOProMsgChained.prototype, "chainCount", 2);
|
|
3266
|
+
var YGOProMsgChained = _YGOProMsgChained;
|
|
3267
|
+
|
|
3268
|
+
// src/protos/msg/proto/chaining.ts
|
|
3269
|
+
var _YGOProMsgChaining = class _YGOProMsgChaining extends YGOProMsgBase {
|
|
3270
|
+
};
|
|
3271
|
+
__name(_YGOProMsgChaining, "YGOProMsgChaining");
|
|
3272
|
+
_YGOProMsgChaining.identifier = OcgcoreCommonConstants.MSG_CHAINING;
|
|
3273
|
+
__decorateClass([
|
|
3274
|
+
BinaryField("i32", 0)
|
|
3275
|
+
], _YGOProMsgChaining.prototype, "code", 2);
|
|
3276
|
+
__decorateClass([
|
|
3277
|
+
BinaryField("u8", 4)
|
|
3278
|
+
], _YGOProMsgChaining.prototype, "controller", 2);
|
|
3279
|
+
__decorateClass([
|
|
3280
|
+
BinaryField("u8", 5)
|
|
3281
|
+
], _YGOProMsgChaining.prototype, "location", 2);
|
|
3282
|
+
__decorateClass([
|
|
3283
|
+
BinaryField("u8", 6)
|
|
3284
|
+
], _YGOProMsgChaining.prototype, "sequence", 2);
|
|
3285
|
+
__decorateClass([
|
|
3286
|
+
BinaryField("u8", 7)
|
|
3287
|
+
], _YGOProMsgChaining.prototype, "subsequence", 2);
|
|
3288
|
+
__decorateClass([
|
|
3289
|
+
BinaryField("u8", 8)
|
|
3290
|
+
], _YGOProMsgChaining.prototype, "chainCount", 2);
|
|
3291
|
+
__decorateClass([
|
|
3292
|
+
BinaryField("i32", 9)
|
|
3293
|
+
], _YGOProMsgChaining.prototype, "desc", 2);
|
|
3294
|
+
__decorateClass([
|
|
3295
|
+
BinaryField("u8", 13)
|
|
3296
|
+
], _YGOProMsgChaining.prototype, "chainPlayer", 2);
|
|
3297
|
+
var YGOProMsgChaining = _YGOProMsgChaining;
|
|
3298
|
+
|
|
3299
|
+
// src/protos/msg/proto/confirm-cards.ts
|
|
3300
|
+
var _YGOProMsgConfirmCards_CardInfo = class _YGOProMsgConfirmCards_CardInfo {
|
|
3301
|
+
};
|
|
3302
|
+
__name(_YGOProMsgConfirmCards_CardInfo, "YGOProMsgConfirmCards_CardInfo");
|
|
3303
|
+
__decorateClass([
|
|
3304
|
+
BinaryField("i32", 0)
|
|
3305
|
+
], _YGOProMsgConfirmCards_CardInfo.prototype, "code", 2);
|
|
3306
|
+
__decorateClass([
|
|
3307
|
+
BinaryField("u8", 4)
|
|
3308
|
+
], _YGOProMsgConfirmCards_CardInfo.prototype, "controller", 2);
|
|
3309
|
+
__decorateClass([
|
|
3310
|
+
BinaryField("u8", 5)
|
|
3311
|
+
], _YGOProMsgConfirmCards_CardInfo.prototype, "location", 2);
|
|
3312
|
+
__decorateClass([
|
|
3313
|
+
BinaryField("u8", 6)
|
|
3314
|
+
], _YGOProMsgConfirmCards_CardInfo.prototype, "sequence", 2);
|
|
3315
|
+
var YGOProMsgConfirmCards_CardInfo = _YGOProMsgConfirmCards_CardInfo;
|
|
3316
|
+
var _YGOProMsgConfirmCards = class _YGOProMsgConfirmCards extends YGOProMsgBase {
|
|
3317
|
+
// 对方视角可能需要隐藏卡片信息
|
|
3318
|
+
opponentView() {
|
|
3319
|
+
const view = this.copy();
|
|
3320
|
+
view.cards = view.cards.map((card) => {
|
|
3321
|
+
const c = { ...card };
|
|
3322
|
+
if (!(c.code & 2147483648)) {
|
|
3323
|
+
c.code = 0;
|
|
3324
|
+
}
|
|
3325
|
+
return c;
|
|
3326
|
+
});
|
|
3327
|
+
return view;
|
|
3328
|
+
}
|
|
3329
|
+
getSendTargets() {
|
|
3330
|
+
if (this.cards.length > 0 && this.cards[0].location === 1) {
|
|
3331
|
+
return [this.player];
|
|
3332
|
+
}
|
|
3333
|
+
return SEND_TO_ALL;
|
|
3334
|
+
}
|
|
3335
|
+
};
|
|
3336
|
+
__name(_YGOProMsgConfirmCards, "YGOProMsgConfirmCards");
|
|
3337
|
+
_YGOProMsgConfirmCards.identifier = OcgcoreCommonConstants.MSG_CONFIRM_CARDS;
|
|
3338
|
+
__decorateClass([
|
|
3339
|
+
BinaryField("u8", 0)
|
|
3340
|
+
], _YGOProMsgConfirmCards.prototype, "player", 2);
|
|
3341
|
+
__decorateClass([
|
|
3342
|
+
BinaryField("u8", 1)
|
|
3343
|
+
], _YGOProMsgConfirmCards.prototype, "skipPanel", 2);
|
|
3344
|
+
__decorateClass([
|
|
3345
|
+
BinaryField("u8", 2)
|
|
3346
|
+
], _YGOProMsgConfirmCards.prototype, "count", 2);
|
|
3347
|
+
__decorateClass([
|
|
3348
|
+
BinaryField(() => YGOProMsgConfirmCards_CardInfo, 3, (obj) => obj.count)
|
|
3349
|
+
], _YGOProMsgConfirmCards.prototype, "cards", 2);
|
|
3350
|
+
var YGOProMsgConfirmCards = _YGOProMsgConfirmCards;
|
|
3351
|
+
|
|
3352
|
+
// src/protos/msg/proto/confirm-decktop.ts
|
|
3353
|
+
var _YGOProMsgConfirmDeckTop_CardInfo = class _YGOProMsgConfirmDeckTop_CardInfo {
|
|
3354
|
+
};
|
|
3355
|
+
__name(_YGOProMsgConfirmDeckTop_CardInfo, "YGOProMsgConfirmDeckTop_CardInfo");
|
|
3356
|
+
__decorateClass([
|
|
3357
|
+
BinaryField("i32", 0)
|
|
3358
|
+
], _YGOProMsgConfirmDeckTop_CardInfo.prototype, "code", 2);
|
|
3359
|
+
__decorateClass([
|
|
3360
|
+
BinaryField("u8", 4)
|
|
3361
|
+
], _YGOProMsgConfirmDeckTop_CardInfo.prototype, "controller", 2);
|
|
3362
|
+
__decorateClass([
|
|
3363
|
+
BinaryField("u8", 5)
|
|
3364
|
+
], _YGOProMsgConfirmDeckTop_CardInfo.prototype, "location", 2);
|
|
3365
|
+
__decorateClass([
|
|
3366
|
+
BinaryField("u8", 6)
|
|
3367
|
+
], _YGOProMsgConfirmDeckTop_CardInfo.prototype, "sequence", 2);
|
|
3368
|
+
var YGOProMsgConfirmDeckTop_CardInfo = _YGOProMsgConfirmDeckTop_CardInfo;
|
|
3369
|
+
var _YGOProMsgConfirmDeckTop = class _YGOProMsgConfirmDeckTop extends YGOProMsgBase {
|
|
3370
|
+
// 对方视角可能需要隐藏卡片信息
|
|
3371
|
+
opponentView() {
|
|
3372
|
+
const view = this.copy();
|
|
3373
|
+
view.cards = view.cards.map((card) => {
|
|
3374
|
+
const c = { ...card };
|
|
3375
|
+
if (!(c.code & 2147483648)) {
|
|
3376
|
+
c.code = 0;
|
|
3377
|
+
}
|
|
3378
|
+
return c;
|
|
3379
|
+
});
|
|
3380
|
+
return view;
|
|
3381
|
+
}
|
|
3382
|
+
// confirm-decktop 使用基类的 playerView (基于 player 字段)
|
|
3383
|
+
};
|
|
3384
|
+
__name(_YGOProMsgConfirmDeckTop, "YGOProMsgConfirmDeckTop");
|
|
3385
|
+
_YGOProMsgConfirmDeckTop.identifier = OcgcoreCommonConstants.MSG_CONFIRM_DECKTOP;
|
|
3386
|
+
__decorateClass([
|
|
3387
|
+
BinaryField("u8", 0)
|
|
3388
|
+
], _YGOProMsgConfirmDeckTop.prototype, "player", 2);
|
|
3389
|
+
__decorateClass([
|
|
3390
|
+
BinaryField("u8", 1)
|
|
3391
|
+
], _YGOProMsgConfirmDeckTop.prototype, "count", 2);
|
|
3392
|
+
__decorateClass([
|
|
3393
|
+
BinaryField(() => YGOProMsgConfirmDeckTop_CardInfo, 2, (obj) => obj.count)
|
|
3394
|
+
], _YGOProMsgConfirmDeckTop.prototype, "cards", 2);
|
|
3395
|
+
var YGOProMsgConfirmDeckTop = _YGOProMsgConfirmDeckTop;
|
|
3396
|
+
|
|
3397
|
+
// src/protos/msg/proto/confirm-extratop.ts
|
|
3398
|
+
var _YGOProMsgConfirmExtraTop_CardInfo = class _YGOProMsgConfirmExtraTop_CardInfo {
|
|
3399
|
+
};
|
|
3400
|
+
__name(_YGOProMsgConfirmExtraTop_CardInfo, "YGOProMsgConfirmExtraTop_CardInfo");
|
|
3401
|
+
__decorateClass([
|
|
3402
|
+
BinaryField("i32", 0)
|
|
3403
|
+
], _YGOProMsgConfirmExtraTop_CardInfo.prototype, "code", 2);
|
|
3404
|
+
__decorateClass([
|
|
3405
|
+
BinaryField("u8", 4)
|
|
3406
|
+
], _YGOProMsgConfirmExtraTop_CardInfo.prototype, "controller", 2);
|
|
3407
|
+
__decorateClass([
|
|
3408
|
+
BinaryField("u8", 5)
|
|
3409
|
+
], _YGOProMsgConfirmExtraTop_CardInfo.prototype, "location", 2);
|
|
3410
|
+
__decorateClass([
|
|
3411
|
+
BinaryField("u8", 6)
|
|
3412
|
+
], _YGOProMsgConfirmExtraTop_CardInfo.prototype, "sequence", 2);
|
|
3413
|
+
var YGOProMsgConfirmExtraTop_CardInfo = _YGOProMsgConfirmExtraTop_CardInfo;
|
|
3414
|
+
var _YGOProMsgConfirmExtraTop = class _YGOProMsgConfirmExtraTop extends YGOProMsgBase {
|
|
3415
|
+
// 对方视角可能需要隐藏卡片信息
|
|
3416
|
+
opponentView() {
|
|
3417
|
+
const view = this.copy();
|
|
3418
|
+
view.cards = view.cards.map((card) => {
|
|
3419
|
+
const c = { ...card };
|
|
3420
|
+
if (!(c.code & 2147483648)) {
|
|
3421
|
+
c.code = 0;
|
|
3422
|
+
}
|
|
3423
|
+
return c;
|
|
3424
|
+
});
|
|
3425
|
+
return view;
|
|
3426
|
+
}
|
|
3427
|
+
// confirm-extratop 使用基类的 playerView (基于 player 字段)
|
|
3428
|
+
};
|
|
3429
|
+
__name(_YGOProMsgConfirmExtraTop, "YGOProMsgConfirmExtraTop");
|
|
3430
|
+
_YGOProMsgConfirmExtraTop.identifier = OcgcoreCommonConstants.MSG_CONFIRM_EXTRATOP;
|
|
3431
|
+
__decorateClass([
|
|
3432
|
+
BinaryField("u8", 0)
|
|
3433
|
+
], _YGOProMsgConfirmExtraTop.prototype, "player", 2);
|
|
3434
|
+
__decorateClass([
|
|
3435
|
+
BinaryField("u8", 1)
|
|
3436
|
+
], _YGOProMsgConfirmExtraTop.prototype, "count", 2);
|
|
3437
|
+
__decorateClass([
|
|
3438
|
+
BinaryField(() => YGOProMsgConfirmExtraTop_CardInfo, 2, (obj) => obj.count)
|
|
3439
|
+
], _YGOProMsgConfirmExtraTop.prototype, "cards", 2);
|
|
3440
|
+
var YGOProMsgConfirmExtraTop = _YGOProMsgConfirmExtraTop;
|
|
3441
|
+
|
|
3442
|
+
// src/protos/msg/proto/damage.ts
|
|
3443
|
+
var _YGOProMsgDamage = class _YGOProMsgDamage extends YGOProMsgBase {
|
|
3444
|
+
};
|
|
3445
|
+
__name(_YGOProMsgDamage, "YGOProMsgDamage");
|
|
3446
|
+
_YGOProMsgDamage.identifier = OcgcoreCommonConstants.MSG_DAMAGE;
|
|
3447
|
+
__decorateClass([
|
|
3448
|
+
BinaryField("u8", 0)
|
|
3449
|
+
], _YGOProMsgDamage.prototype, "player", 2);
|
|
3450
|
+
__decorateClass([
|
|
3451
|
+
BinaryField("i32", 1)
|
|
3452
|
+
], _YGOProMsgDamage.prototype, "value", 2);
|
|
3453
|
+
var YGOProMsgDamage = _YGOProMsgDamage;
|
|
3454
|
+
|
|
3455
|
+
// src/protos/msg/proto/damage-step-end.ts
|
|
3456
|
+
var _YGOProMsgDamageStepEnd = class _YGOProMsgDamageStepEnd extends YGOProMsgBase {
|
|
3457
|
+
getRequireRefreshZones() {
|
|
3458
|
+
return [
|
|
3459
|
+
{ player: 0, location: OcgcoreScriptConstants.LOCATION_MZONE },
|
|
3460
|
+
{ player: 1, location: OcgcoreScriptConstants.LOCATION_MZONE }
|
|
3461
|
+
];
|
|
3462
|
+
}
|
|
3463
|
+
};
|
|
3464
|
+
__name(_YGOProMsgDamageStepEnd, "YGOProMsgDamageStepEnd");
|
|
3465
|
+
_YGOProMsgDamageStepEnd.identifier = OcgcoreCommonConstants.MSG_DAMAGE_STEP_END;
|
|
3466
|
+
var YGOProMsgDamageStepEnd = _YGOProMsgDamageStepEnd;
|
|
3467
|
+
|
|
3468
|
+
// src/protos/msg/proto/damage-step-start.ts
|
|
3469
|
+
var _YGOProMsgDamageStepStart = class _YGOProMsgDamageStepStart extends YGOProMsgBase {
|
|
3470
|
+
getRequireRefreshZones() {
|
|
3471
|
+
return [
|
|
3472
|
+
{ player: 0, location: OcgcoreScriptConstants.LOCATION_MZONE },
|
|
3473
|
+
{ player: 1, location: OcgcoreScriptConstants.LOCATION_MZONE }
|
|
3474
|
+
];
|
|
3475
|
+
}
|
|
3476
|
+
};
|
|
3477
|
+
__name(_YGOProMsgDamageStepStart, "YGOProMsgDamageStepStart");
|
|
3478
|
+
_YGOProMsgDamageStepStart.identifier = OcgcoreCommonConstants.MSG_DAMAGE_STEP_START;
|
|
3479
|
+
var YGOProMsgDamageStepStart = _YGOProMsgDamageStepStart;
|
|
3480
|
+
|
|
3481
|
+
// src/protos/msg/proto/deck-top.ts
|
|
3482
|
+
var _YGOProMsgDeckTop = class _YGOProMsgDeckTop extends YGOProMsgBase {
|
|
3483
|
+
// 对方视角可能需要隐藏卡片信息
|
|
3484
|
+
opponentView() {
|
|
3485
|
+
const view = this.copy();
|
|
3486
|
+
if (!(view.code & 2147483648)) {
|
|
3487
|
+
view.code = 0;
|
|
3488
|
+
}
|
|
3489
|
+
return view;
|
|
3490
|
+
}
|
|
3491
|
+
// deck-top 使用基类的 playerView (基于 player 字段)
|
|
3492
|
+
};
|
|
3493
|
+
__name(_YGOProMsgDeckTop, "YGOProMsgDeckTop");
|
|
3494
|
+
_YGOProMsgDeckTop.identifier = OcgcoreCommonConstants.MSG_DECK_TOP;
|
|
3495
|
+
__decorateClass([
|
|
3496
|
+
BinaryField("u8", 0)
|
|
3497
|
+
], _YGOProMsgDeckTop.prototype, "player", 2);
|
|
3498
|
+
__decorateClass([
|
|
3499
|
+
BinaryField("u8", 1)
|
|
3500
|
+
], _YGOProMsgDeckTop.prototype, "sequence", 2);
|
|
3501
|
+
__decorateClass([
|
|
3502
|
+
BinaryField("i32", 2)
|
|
3503
|
+
], _YGOProMsgDeckTop.prototype, "code", 2);
|
|
3504
|
+
var YGOProMsgDeckTop = _YGOProMsgDeckTop;
|
|
3505
|
+
|
|
3506
|
+
// src/protos/msg/proto/draw.ts
|
|
3507
|
+
var _YGOProMsgDraw = class _YGOProMsgDraw extends YGOProMsgBase {
|
|
3508
|
+
// 对方视角需要隐藏抽到的卡(如果卡片标志位 0x80 未设置)
|
|
3509
|
+
opponentView() {
|
|
3510
|
+
const view = this.copy();
|
|
3511
|
+
view.cards = view.cards.map((card) => {
|
|
3512
|
+
if (!(card & 2147483648)) {
|
|
3513
|
+
return 0;
|
|
3514
|
+
}
|
|
3515
|
+
return card;
|
|
3516
|
+
});
|
|
3517
|
+
return view;
|
|
3518
|
+
}
|
|
3519
|
+
};
|
|
3520
|
+
__name(_YGOProMsgDraw, "YGOProMsgDraw");
|
|
3521
|
+
_YGOProMsgDraw.identifier = OcgcoreCommonConstants.MSG_DRAW;
|
|
3522
|
+
__decorateClass([
|
|
3523
|
+
BinaryField("u8", 0)
|
|
3524
|
+
], _YGOProMsgDraw.prototype, "player", 2);
|
|
3525
|
+
__decorateClass([
|
|
3526
|
+
BinaryField("u8", 1)
|
|
3527
|
+
], _YGOProMsgDraw.prototype, "count", 2);
|
|
3528
|
+
__decorateClass([
|
|
3529
|
+
BinaryField("i32", 2, (obj) => obj.count)
|
|
3530
|
+
], _YGOProMsgDraw.prototype, "cards", 2);
|
|
3531
|
+
var YGOProMsgDraw = _YGOProMsgDraw;
|
|
3532
|
+
|
|
3533
|
+
// src/protos/msg/proto/equip.ts
|
|
3534
|
+
var _YGOProMsgEquip_CardLocation = class _YGOProMsgEquip_CardLocation {
|
|
3535
|
+
};
|
|
3536
|
+
__name(_YGOProMsgEquip_CardLocation, "YGOProMsgEquip_CardLocation");
|
|
3537
|
+
__decorateClass([
|
|
3538
|
+
BinaryField("u8", 0)
|
|
3539
|
+
], _YGOProMsgEquip_CardLocation.prototype, "controller", 2);
|
|
3540
|
+
__decorateClass([
|
|
3541
|
+
BinaryField("u8", 1)
|
|
3542
|
+
], _YGOProMsgEquip_CardLocation.prototype, "location", 2);
|
|
3543
|
+
__decorateClass([
|
|
3544
|
+
BinaryField("u8", 2)
|
|
3545
|
+
], _YGOProMsgEquip_CardLocation.prototype, "sequence", 2);
|
|
3546
|
+
var YGOProMsgEquip_CardLocation = _YGOProMsgEquip_CardLocation;
|
|
3547
|
+
var _YGOProMsgEquip = class _YGOProMsgEquip extends YGOProMsgBase {
|
|
3548
|
+
};
|
|
3549
|
+
__name(_YGOProMsgEquip, "YGOProMsgEquip");
|
|
3550
|
+
_YGOProMsgEquip.identifier = OcgcoreCommonConstants.MSG_EQUIP;
|
|
3551
|
+
__decorateClass([
|
|
3552
|
+
BinaryField(() => YGOProMsgEquip_CardLocation, 0)
|
|
3553
|
+
], _YGOProMsgEquip.prototype, "equip", 2);
|
|
3554
|
+
__decorateClass([
|
|
3555
|
+
BinaryField(() => YGOProMsgEquip_CardLocation, 3)
|
|
3556
|
+
], _YGOProMsgEquip.prototype, "target", 2);
|
|
3557
|
+
__decorateClass([
|
|
3558
|
+
BinaryField("u8", 6)
|
|
3559
|
+
], _YGOProMsgEquip.prototype, "position", 2);
|
|
3560
|
+
var YGOProMsgEquip = _YGOProMsgEquip;
|
|
3561
|
+
|
|
3562
|
+
// src/protos/msg/proto/field-disabled.ts
|
|
3563
|
+
var _YGOProMsgFieldDisabled = class _YGOProMsgFieldDisabled extends YGOProMsgBase {
|
|
3564
|
+
};
|
|
3565
|
+
__name(_YGOProMsgFieldDisabled, "YGOProMsgFieldDisabled");
|
|
3566
|
+
_YGOProMsgFieldDisabled.identifier = OcgcoreCommonConstants.MSG_FIELD_DISABLED;
|
|
3567
|
+
__decorateClass([
|
|
3568
|
+
BinaryField("u32", 0)
|
|
3569
|
+
], _YGOProMsgFieldDisabled.prototype, "disabledField", 2);
|
|
3570
|
+
var YGOProMsgFieldDisabled = _YGOProMsgFieldDisabled;
|
|
3571
|
+
|
|
3572
|
+
// src/protos/msg/proto/flipsummoned.ts
|
|
3573
|
+
var _YGOProMsgFlipSummoned = class _YGOProMsgFlipSummoned extends YGOProMsgBase {
|
|
3574
|
+
getRequireRefreshZones() {
|
|
3575
|
+
const location = OcgcoreScriptConstants.LOCATION_MZONE | OcgcoreScriptConstants.LOCATION_SZONE;
|
|
3576
|
+
return [
|
|
3577
|
+
{ player: 0, location },
|
|
3578
|
+
{ player: 1, location }
|
|
3579
|
+
];
|
|
3580
|
+
}
|
|
3581
|
+
};
|
|
3582
|
+
__name(_YGOProMsgFlipSummoned, "YGOProMsgFlipSummoned");
|
|
3583
|
+
_YGOProMsgFlipSummoned.identifier = OcgcoreCommonConstants.MSG_FLIPSUMMONED;
|
|
3584
|
+
var YGOProMsgFlipSummoned = _YGOProMsgFlipSummoned;
|
|
3585
|
+
|
|
3586
|
+
// src/protos/msg/proto/flipsummoning.ts
|
|
3587
|
+
var _YGOProMsgFlipSummoning = class _YGOProMsgFlipSummoning extends YGOProMsgBase {
|
|
3588
|
+
getRequireRefreshCards() {
|
|
3589
|
+
return [
|
|
3590
|
+
{
|
|
3591
|
+
player: this.controller,
|
|
3592
|
+
location: this.location,
|
|
3593
|
+
sequence: this.sequence
|
|
3594
|
+
}
|
|
3595
|
+
];
|
|
3596
|
+
}
|
|
3597
|
+
};
|
|
3598
|
+
__name(_YGOProMsgFlipSummoning, "YGOProMsgFlipSummoning");
|
|
3599
|
+
_YGOProMsgFlipSummoning.identifier = OcgcoreCommonConstants.MSG_FLIPSUMMONING;
|
|
3600
|
+
__decorateClass([
|
|
3601
|
+
BinaryField("i32", 0)
|
|
3602
|
+
], _YGOProMsgFlipSummoning.prototype, "code", 2);
|
|
3603
|
+
__decorateClass([
|
|
3604
|
+
BinaryField("u8", 4)
|
|
3605
|
+
], _YGOProMsgFlipSummoning.prototype, "controller", 2);
|
|
3606
|
+
__decorateClass([
|
|
3607
|
+
BinaryField("u8", 5)
|
|
3608
|
+
], _YGOProMsgFlipSummoning.prototype, "location", 2);
|
|
3609
|
+
__decorateClass([
|
|
3610
|
+
BinaryField("u8", 6)
|
|
3611
|
+
], _YGOProMsgFlipSummoning.prototype, "sequence", 2);
|
|
3612
|
+
__decorateClass([
|
|
3613
|
+
BinaryField("u8", 7)
|
|
3614
|
+
], _YGOProMsgFlipSummoning.prototype, "position", 2);
|
|
3615
|
+
var YGOProMsgFlipSummoning = _YGOProMsgFlipSummoning;
|
|
3616
|
+
|
|
3617
|
+
// src/protos/msg/proto/hand-res.ts
|
|
3618
|
+
var _YGOProMsgHandRes = class _YGOProMsgHandRes extends YGOProMsgBase {
|
|
3619
|
+
};
|
|
3620
|
+
__name(_YGOProMsgHandRes, "YGOProMsgHandRes");
|
|
3621
|
+
_YGOProMsgHandRes.identifier = OcgcoreCommonConstants.MSG_HAND_RES;
|
|
3622
|
+
__decorateClass([
|
|
3623
|
+
BinaryField("u8", 0)
|
|
3624
|
+
], _YGOProMsgHandRes.prototype, "result", 2);
|
|
3625
|
+
var YGOProMsgHandRes = _YGOProMsgHandRes;
|
|
3626
|
+
|
|
3627
|
+
// src/protos/msg/proto/hint.ts
|
|
3628
|
+
var HINT_TYPES_SEND_TO_SELF = /* @__PURE__ */ new Set([1, 2, 3, 5]);
|
|
3629
|
+
var HINT_TYPES_SEND_TO_OPPONENT = /* @__PURE__ */ new Set([4, 6, 7, 8, 9, 11]);
|
|
3630
|
+
var _YGOProMsgHint = class _YGOProMsgHint extends YGOProMsgBase {
|
|
3631
|
+
getSendTargets() {
|
|
3632
|
+
if (HINT_TYPES_SEND_TO_SELF.has(this.type)) {
|
|
3633
|
+
return [this.player];
|
|
3634
|
+
}
|
|
3635
|
+
if (HINT_TYPES_SEND_TO_OPPONENT.has(this.type)) {
|
|
3636
|
+
return [1 - this.player, 7 /* OBSERVER */];
|
|
3637
|
+
}
|
|
3638
|
+
return SEND_TO_ALL;
|
|
3639
|
+
}
|
|
3640
|
+
};
|
|
3641
|
+
__name(_YGOProMsgHint, "YGOProMsgHint");
|
|
3642
|
+
_YGOProMsgHint.identifier = OcgcoreCommonConstants.MSG_HINT;
|
|
3643
|
+
__decorateClass([
|
|
3644
|
+
BinaryField("u8", 0)
|
|
3645
|
+
], _YGOProMsgHint.prototype, "type", 2);
|
|
3646
|
+
__decorateClass([
|
|
3647
|
+
BinaryField("u8", 1)
|
|
3648
|
+
], _YGOProMsgHint.prototype, "player", 2);
|
|
3649
|
+
__decorateClass([
|
|
3650
|
+
BinaryField("i32", 2)
|
|
3651
|
+
], _YGOProMsgHint.prototype, "desc", 2);
|
|
3652
|
+
var YGOProMsgHint = _YGOProMsgHint;
|
|
3653
|
+
|
|
3654
|
+
// src/protos/msg/proto/lpupdate.ts
|
|
3655
|
+
var _YGOProMsgLpUpdate = class _YGOProMsgLpUpdate extends YGOProMsgBase {
|
|
3656
|
+
};
|
|
3657
|
+
__name(_YGOProMsgLpUpdate, "YGOProMsgLpUpdate");
|
|
3658
|
+
_YGOProMsgLpUpdate.identifier = OcgcoreCommonConstants.MSG_LPUPDATE;
|
|
3659
|
+
__decorateClass([
|
|
3660
|
+
BinaryField("u8", 0)
|
|
3661
|
+
], _YGOProMsgLpUpdate.prototype, "player", 2);
|
|
3662
|
+
__decorateClass([
|
|
3663
|
+
BinaryField("i32", 1)
|
|
3664
|
+
], _YGOProMsgLpUpdate.prototype, "lp", 2);
|
|
3665
|
+
var YGOProMsgLpUpdate = _YGOProMsgLpUpdate;
|
|
3666
|
+
|
|
3667
|
+
// src/protos/msg/proto/match-kill.ts
|
|
3668
|
+
var _YGOProMsgMatchKill = class _YGOProMsgMatchKill extends YGOProMsgBase {
|
|
3669
|
+
};
|
|
3670
|
+
__name(_YGOProMsgMatchKill, "YGOProMsgMatchKill");
|
|
3671
|
+
_YGOProMsgMatchKill.identifier = OcgcoreCommonConstants.MSG_MATCH_KILL;
|
|
3672
|
+
__decorateClass([
|
|
3673
|
+
BinaryField("i32", 0)
|
|
3674
|
+
], _YGOProMsgMatchKill.prototype, "code", 2);
|
|
3675
|
+
var YGOProMsgMatchKill = _YGOProMsgMatchKill;
|
|
3676
|
+
|
|
3677
|
+
// src/protos/msg/proto/missed-effect.ts
|
|
3678
|
+
var _YGOProMsgMissedEffect = class _YGOProMsgMissedEffect extends YGOProMsgBase {
|
|
3679
|
+
getSendTargets() {
|
|
3680
|
+
return [this.controller];
|
|
3681
|
+
}
|
|
3682
|
+
};
|
|
3683
|
+
__name(_YGOProMsgMissedEffect, "YGOProMsgMissedEffect");
|
|
3684
|
+
_YGOProMsgMissedEffect.identifier = OcgcoreCommonConstants.MSG_MISSED_EFFECT;
|
|
3685
|
+
__decorateClass([
|
|
3686
|
+
BinaryField("u8", 0)
|
|
3687
|
+
], _YGOProMsgMissedEffect.prototype, "controller", 2);
|
|
3688
|
+
__decorateClass([
|
|
3689
|
+
BinaryField("u8", 1)
|
|
3690
|
+
], _YGOProMsgMissedEffect.prototype, "location", 2);
|
|
3691
|
+
__decorateClass([
|
|
3692
|
+
BinaryField("u8", 2)
|
|
3693
|
+
], _YGOProMsgMissedEffect.prototype, "sequence", 2);
|
|
3694
|
+
__decorateClass([
|
|
3695
|
+
BinaryField("u8", 3)
|
|
3696
|
+
], _YGOProMsgMissedEffect.prototype, "position", 2);
|
|
3697
|
+
__decorateClass([
|
|
3698
|
+
BinaryField("i32", 4)
|
|
3699
|
+
], _YGOProMsgMissedEffect.prototype, "code", 2);
|
|
3700
|
+
var YGOProMsgMissedEffect = _YGOProMsgMissedEffect;
|
|
3701
|
+
|
|
3647
3702
|
// src/protos/msg/proto/move.ts
|
|
3648
3703
|
var _YGOProMsgMove_CardLocation = class _YGOProMsgMove_CardLocation {
|
|
3649
3704
|
};
|
|
@@ -3695,6 +3750,21 @@ var _YGOProMsgMove = class _YGOProMsgMove extends YGOProMsgBase {
|
|
|
3695
3750
|
}
|
|
3696
3751
|
return this.opponentView();
|
|
3697
3752
|
}
|
|
3753
|
+
getRequireRefreshCards() {
|
|
3754
|
+
const current = this.current;
|
|
3755
|
+
const previous = this.previous;
|
|
3756
|
+
const shouldRefresh = current.location !== 0 && (current.location & OcgcoreScriptConstants.LOCATION_OVERLAY) === 0 && (current.location !== previous.location || current.controller !== previous.controller);
|
|
3757
|
+
if (!shouldRefresh) {
|
|
3758
|
+
return [];
|
|
3759
|
+
}
|
|
3760
|
+
return [
|
|
3761
|
+
{
|
|
3762
|
+
player: current.controller,
|
|
3763
|
+
location: current.location,
|
|
3764
|
+
sequence: current.sequence
|
|
3765
|
+
}
|
|
3766
|
+
];
|
|
3767
|
+
}
|
|
3698
3768
|
};
|
|
3699
3769
|
__name(_YGOProMsgMove, "YGOProMsgMove");
|
|
3700
3770
|
_YGOProMsgMove.identifier = OcgcoreCommonConstants.MSG_MOVE;
|
|
@@ -3714,6 +3784,13 @@ var YGOProMsgMove = _YGOProMsgMove;
|
|
|
3714
3784
|
|
|
3715
3785
|
// src/protos/msg/proto/new-phase.ts
|
|
3716
3786
|
var _YGOProMsgNewPhase = class _YGOProMsgNewPhase extends YGOProMsgBase {
|
|
3787
|
+
getRequireRefreshZones() {
|
|
3788
|
+
const location = OcgcoreScriptConstants.LOCATION_MZONE | OcgcoreScriptConstants.LOCATION_SZONE | OcgcoreScriptConstants.LOCATION_HAND;
|
|
3789
|
+
return [
|
|
3790
|
+
{ player: 0, location },
|
|
3791
|
+
{ player: 1, location }
|
|
3792
|
+
];
|
|
3793
|
+
}
|
|
3717
3794
|
};
|
|
3718
3795
|
__name(_YGOProMsgNewPhase, "YGOProMsgNewPhase");
|
|
3719
3796
|
_YGOProMsgNewPhase.identifier = OcgcoreCommonConstants.MSG_NEW_PHASE;
|
|
@@ -3724,6 +3801,13 @@ var YGOProMsgNewPhase = _YGOProMsgNewPhase;
|
|
|
3724
3801
|
|
|
3725
3802
|
// src/protos/msg/proto/new-turn.ts
|
|
3726
3803
|
var _YGOProMsgNewTurn = class _YGOProMsgNewTurn extends YGOProMsgBase {
|
|
3804
|
+
getRequireRefreshZones() {
|
|
3805
|
+
const location = OcgcoreScriptConstants.LOCATION_MZONE | OcgcoreScriptConstants.LOCATION_SZONE | OcgcoreScriptConstants.LOCATION_HAND;
|
|
3806
|
+
return [
|
|
3807
|
+
{ player: 0, location },
|
|
3808
|
+
{ player: 1, location }
|
|
3809
|
+
];
|
|
3810
|
+
}
|
|
3727
3811
|
};
|
|
3728
3812
|
__name(_YGOProMsgNewTurn, "YGOProMsgNewTurn");
|
|
3729
3813
|
_YGOProMsgNewTurn.identifier = OcgcoreCommonConstants.MSG_NEW_TURN;
|
|
@@ -3776,6 +3860,19 @@ __decorateClass([
|
|
|
3776
3860
|
], _YGOProMsgPosChange_CardLocation.prototype, "sequence", 2);
|
|
3777
3861
|
var YGOProMsgPosChange_CardLocation = _YGOProMsgPosChange_CardLocation;
|
|
3778
3862
|
var _YGOProMsgPosChange = class _YGOProMsgPosChange extends YGOProMsgBase {
|
|
3863
|
+
getRequireRefreshCards() {
|
|
3864
|
+
const shouldRefresh = (this.previousPosition & OcgcoreCommonConstants.POS_FACEDOWN) !== 0 && (this.currentPosition & OcgcoreCommonConstants.POS_FACEUP) !== 0;
|
|
3865
|
+
if (!shouldRefresh) {
|
|
3866
|
+
return [];
|
|
3867
|
+
}
|
|
3868
|
+
return [
|
|
3869
|
+
{
|
|
3870
|
+
player: this.card.controller,
|
|
3871
|
+
location: this.card.location,
|
|
3872
|
+
sequence: this.card.sequence
|
|
3873
|
+
}
|
|
3874
|
+
];
|
|
3875
|
+
}
|
|
3779
3876
|
};
|
|
3780
3877
|
__name(_YGOProMsgPosChange, "YGOProMsgPosChange");
|
|
3781
3878
|
_YGOProMsgPosChange.identifier = OcgcoreCommonConstants.MSG_POS_CHANGE;
|
|
@@ -4156,6 +4253,13 @@ var _YGOProMsgSelectBattleCmd = class _YGOProMsgSelectBattleCmd extends YGOProMs
|
|
|
4156
4253
|
view.setUint32(0, sequence << 16 | type, true);
|
|
4157
4254
|
return buffer;
|
|
4158
4255
|
}
|
|
4256
|
+
getRequireRefreshZones() {
|
|
4257
|
+
const location = OcgcoreScriptConstants.LOCATION_MZONE | OcgcoreScriptConstants.LOCATION_SZONE | OcgcoreScriptConstants.LOCATION_HAND;
|
|
4258
|
+
return [
|
|
4259
|
+
{ player: 0, location },
|
|
4260
|
+
{ player: 1, location }
|
|
4261
|
+
];
|
|
4262
|
+
}
|
|
4159
4263
|
};
|
|
4160
4264
|
__name(_YGOProMsgSelectBattleCmd, "YGOProMsgSelectBattleCmd");
|
|
4161
4265
|
_YGOProMsgSelectBattleCmd.identifier = OcgcoreCommonConstants.MSG_SELECT_BATTLECMD;
|
|
@@ -4660,6 +4764,13 @@ var _YGOProMsgSelectIdleCmd = class _YGOProMsgSelectIdleCmd extends YGOProMsgRes
|
|
|
4660
4764
|
view.setUint32(0, sequence << 16 | type, true);
|
|
4661
4765
|
return buffer;
|
|
4662
4766
|
}
|
|
4767
|
+
getRequireRefreshZones() {
|
|
4768
|
+
const location = OcgcoreScriptConstants.LOCATION_MZONE | OcgcoreScriptConstants.LOCATION_SZONE | OcgcoreScriptConstants.LOCATION_HAND;
|
|
4769
|
+
return [
|
|
4770
|
+
{ player: 0, location },
|
|
4771
|
+
{ player: 1, location }
|
|
4772
|
+
];
|
|
4773
|
+
}
|
|
4663
4774
|
};
|
|
4664
4775
|
__name(_YGOProMsgSelectIdleCmd, "YGOProMsgSelectIdleCmd");
|
|
4665
4776
|
_YGOProMsgSelectIdleCmd.identifier = OcgcoreCommonConstants.MSG_SELECT_IDLECMD;
|
|
@@ -5218,6 +5329,14 @@ var _YGOProMsgShuffleHand = class _YGOProMsgShuffleHand extends YGOProMsgBase {
|
|
|
5218
5329
|
view.cards = view.cards.map(() => 0);
|
|
5219
5330
|
return view;
|
|
5220
5331
|
}
|
|
5332
|
+
getRequireRefreshZones() {
|
|
5333
|
+
return [
|
|
5334
|
+
{
|
|
5335
|
+
player: this.player,
|
|
5336
|
+
location: OcgcoreScriptConstants.LOCATION_HAND
|
|
5337
|
+
}
|
|
5338
|
+
];
|
|
5339
|
+
}
|
|
5221
5340
|
};
|
|
5222
5341
|
__name(_YGOProMsgShuffleHand, "YGOProMsgShuffleHand");
|
|
5223
5342
|
_YGOProMsgShuffleHand.identifier = OcgcoreCommonConstants.MSG_SHUFFLE_HAND;
|
|
@@ -5260,6 +5379,22 @@ __decorateClass([
|
|
|
5260
5379
|
], _YGOProMsgShuffleSetCard_SetCardInfo.prototype, "newLocation", 2);
|
|
5261
5380
|
var YGOProMsgShuffleSetCard_SetCardInfo = _YGOProMsgShuffleSetCard_SetCardInfo;
|
|
5262
5381
|
var _YGOProMsgShuffleSetCard = class _YGOProMsgShuffleSetCard extends YGOProMsgBase {
|
|
5382
|
+
getRequireRefreshZones() {
|
|
5383
|
+
let location = 0;
|
|
5384
|
+
if (this.location === OcgcoreScriptConstants.LOCATION_MZONE) {
|
|
5385
|
+
location = OcgcoreScriptConstants.LOCATION_MZONE;
|
|
5386
|
+
}
|
|
5387
|
+
if (this.location === OcgcoreScriptConstants.LOCATION_SZONE) {
|
|
5388
|
+
location = OcgcoreScriptConstants.LOCATION_SZONE;
|
|
5389
|
+
}
|
|
5390
|
+
if (location === 0) {
|
|
5391
|
+
return [];
|
|
5392
|
+
}
|
|
5393
|
+
return [
|
|
5394
|
+
{ player: 0, location },
|
|
5395
|
+
{ player: 1, location }
|
|
5396
|
+
];
|
|
5397
|
+
}
|
|
5263
5398
|
};
|
|
5264
5399
|
__name(_YGOProMsgShuffleSetCard, "YGOProMsgShuffleSetCard");
|
|
5265
5400
|
_YGOProMsgShuffleSetCard.identifier = OcgcoreCommonConstants.MSG_SHUFFLE_SET_CARD;
|
|
@@ -5344,6 +5479,13 @@ var YGOProMsgSortCard = _YGOProMsgSortCard;
|
|
|
5344
5479
|
|
|
5345
5480
|
// src/protos/msg/proto/spsummoned.ts
|
|
5346
5481
|
var _YGOProMsgSpSummoned = class _YGOProMsgSpSummoned extends YGOProMsgBase {
|
|
5482
|
+
getRequireRefreshZones() {
|
|
5483
|
+
const location = OcgcoreScriptConstants.LOCATION_MZONE | OcgcoreScriptConstants.LOCATION_SZONE;
|
|
5484
|
+
return [
|
|
5485
|
+
{ player: 0, location },
|
|
5486
|
+
{ player: 1, location }
|
|
5487
|
+
];
|
|
5488
|
+
}
|
|
5347
5489
|
};
|
|
5348
5490
|
__name(_YGOProMsgSpSummoned, "YGOProMsgSpSummoned");
|
|
5349
5491
|
_YGOProMsgSpSummoned.identifier = OcgcoreCommonConstants.MSG_SPSUMMONED;
|
|
@@ -5445,6 +5587,13 @@ var YGOProMsgStart = _YGOProMsgStart;
|
|
|
5445
5587
|
|
|
5446
5588
|
// src/protos/msg/proto/summoned.ts
|
|
5447
5589
|
var _YGOProMsgSummoned = class _YGOProMsgSummoned extends YGOProMsgBase {
|
|
5590
|
+
getRequireRefreshZones() {
|
|
5591
|
+
const location = OcgcoreScriptConstants.LOCATION_MZONE | OcgcoreScriptConstants.LOCATION_SZONE;
|
|
5592
|
+
return [
|
|
5593
|
+
{ player: 0, location },
|
|
5594
|
+
{ player: 1, location }
|
|
5595
|
+
];
|
|
5596
|
+
}
|
|
5448
5597
|
};
|
|
5449
5598
|
__name(_YGOProMsgSummoned, "YGOProMsgSummoned");
|
|
5450
5599
|
_YGOProMsgSummoned.identifier = OcgcoreCommonConstants.MSG_SUMMONED;
|
|
@@ -5490,6 +5639,20 @@ __decorateClass([
|
|
|
5490
5639
|
], _YGOProMsgSwap_CardLocation.prototype, "position", 2);
|
|
5491
5640
|
var YGOProMsgSwap_CardLocation = _YGOProMsgSwap_CardLocation;
|
|
5492
5641
|
var _YGOProMsgSwap = class _YGOProMsgSwap extends YGOProMsgBase {
|
|
5642
|
+
getRequireRefreshCards() {
|
|
5643
|
+
return [
|
|
5644
|
+
{
|
|
5645
|
+
player: this.card1.controller,
|
|
5646
|
+
location: this.card1.location,
|
|
5647
|
+
sequence: this.card1.sequence
|
|
5648
|
+
},
|
|
5649
|
+
{
|
|
5650
|
+
player: this.card2.controller,
|
|
5651
|
+
location: this.card2.location,
|
|
5652
|
+
sequence: this.card2.sequence
|
|
5653
|
+
}
|
|
5654
|
+
];
|
|
5655
|
+
}
|
|
5493
5656
|
};
|
|
5494
5657
|
__name(_YGOProMsgSwap, "YGOProMsgSwap");
|
|
5495
5658
|
_YGOProMsgSwap.identifier = OcgcoreCommonConstants.MSG_SWAP;
|
|
@@ -5528,6 +5691,13 @@ var _YGOProMsgTagSwap = class _YGOProMsgTagSwap extends YGOProMsgBase {
|
|
|
5528
5691
|
teammateView() {
|
|
5529
5692
|
return this.opponentView();
|
|
5530
5693
|
}
|
|
5694
|
+
getRequireRefreshZones() {
|
|
5695
|
+
const location = OcgcoreScriptConstants.LOCATION_MZONE | OcgcoreScriptConstants.LOCATION_SZONE | OcgcoreScriptConstants.LOCATION_HAND;
|
|
5696
|
+
return [
|
|
5697
|
+
{ player: 0, location },
|
|
5698
|
+
{ player: 1, location }
|
|
5699
|
+
];
|
|
5700
|
+
}
|
|
5531
5701
|
};
|
|
5532
5702
|
__name(_YGOProMsgTagSwap, "YGOProMsgTagSwap");
|
|
5533
5703
|
_YGOProMsgTagSwap.identifier = OcgcoreCommonConstants.MSG_TAG_SWAP;
|
|
@@ -5665,6 +5835,15 @@ var _YGOProMsgUpdateCard = class _YGOProMsgUpdateCard extends YGOProMsgBase {
|
|
|
5665
5835
|
getSendTargets() {
|
|
5666
5836
|
return [];
|
|
5667
5837
|
}
|
|
5838
|
+
getRequireRefreshCards() {
|
|
5839
|
+
return [
|
|
5840
|
+
{
|
|
5841
|
+
player: this.controller,
|
|
5842
|
+
location: this.location,
|
|
5843
|
+
sequence: this.sequence
|
|
5844
|
+
}
|
|
5845
|
+
];
|
|
5846
|
+
}
|
|
5668
5847
|
};
|
|
5669
5848
|
__name(_YGOProMsgUpdateCard, "YGOProMsgUpdateCard");
|
|
5670
5849
|
_YGOProMsgUpdateCard.identifier = OcgcoreCommonConstants.MSG_UPDATE_CARD;
|