dredless 1.2.1 → 1.2.2
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/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "dredless",
|
|
3
|
-
"version": "1.2.
|
|
3
|
+
"version": "1.2.2",
|
|
4
4
|
"description": "A fully-featured and from-scratch headless drednot.io client implementation written in pure js.",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"homepage": "https://github.com/certainhuman/dredless#readme",
|
|
@@ -123,7 +123,13 @@ export const MODEL_TABLE_SPECS = new Map([
|
|
|
123
123
|
[2, {name: "numeric_pair", ...TWO_FIELD_SPEC}],
|
|
124
124
|
[3, {name: "gate_width", fields: numericFields({1: 20, 2: 24, 4: 28, 8: 32, 16: 36, 32: 40})}],
|
|
125
125
|
[4, {name: "motion_aux", packedBits: [{bit: 8, offset: 33}], fields: numericFields({1: 20, 2: 24, 4: 28})}],
|
|
126
|
-
[5, {
|
|
126
|
+
[5, {
|
|
127
|
+
name: "entity_health",
|
|
128
|
+
// The official table starts both bar dimensions at 10 (one world unit).
|
|
129
|
+
// Field values on the wire are deltas relative to these defaults.
|
|
130
|
+
defaults: {q28: 10, q32: 10},
|
|
131
|
+
fields: numericFields({1: 20, 2: 24, 4: 28, 8: 32})
|
|
132
|
+
}],
|
|
127
133
|
[6, {name: "item_holder", ...TWO_FIELD_SPEC}],
|
|
128
134
|
[7, {
|
|
129
135
|
name: "entity_type",
|
|
@@ -228,6 +234,12 @@ export const MODEL_TABLE_SPECS = new Map([
|
|
|
228
234
|
}],
|
|
229
235
|
[26, {name: "numeric_single", fields: numericFields({1: 20})}],
|
|
230
236
|
[31, {name: "numeric_single", fields: numericFields({1: 20})}],
|
|
237
|
+
[32, {
|
|
238
|
+
// Wire 95 has values; treating it as a marker swallows following removals.
|
|
239
|
+
name: "numeric_triplet",
|
|
240
|
+
defaults: {q28: 10},
|
|
241
|
+
fields: numericFields({1: 20, 2: 24, 4: 28})
|
|
242
|
+
}],
|
|
231
243
|
[37, {name: "loose_item_marker", packedBits: [{bit: 2, offset: 29}], fields: numericFields({1: 20, 4: 24})}],
|
|
232
244
|
[38, {name: "flag_state", packedBits: [{bit: 1, offset: 21}], fields: []}],
|
|
233
245
|
[39, {name: "comms_transmit", ...TWO_FIELD_SPEC}],
|
|
@@ -254,6 +266,8 @@ export const MODEL_TABLE_SPECS = new Map([
|
|
|
254
266
|
}],
|
|
255
267
|
[54, {
|
|
256
268
|
name: "starter_cannon",
|
|
269
|
+
// Wire deltas start with both barrels fully extended and capacity 16.
|
|
270
|
+
defaults: {q36: 50, q44: 16, q48: 50},
|
|
257
271
|
fields: numericFields({1: 20, 2: 32, 4: 24, 8: 28, 16: 44, 32: 36, 64: 48, 128: 52, 256: 40, 512: 56, 1024: 60})
|
|
258
272
|
}],
|
|
259
273
|
[55, {
|
|
@@ -428,7 +442,7 @@ export const WIRE_TAG_TABLES = new Map([
|
|
|
428
442
|
[169, 77]
|
|
429
443
|
]);
|
|
430
444
|
|
|
431
|
-
export const MASK_ONLY_TABLES = new Set([13, 22, 23, 27, 28, 30,
|
|
445
|
+
export const MASK_ONLY_TABLES = new Set([13, 22, 23, 27, 28, 30, 36, 40, 46, 48, 52, 58, 64, 65, 66, 68, 73, 74]);
|
|
432
446
|
|
|
433
447
|
export const ENTITY_FOOTPRINTS = new Map([
|
|
434
448
|
[240, {width: 2, height: 2}],
|
|
@@ -936,7 +950,7 @@ export function botClassFromState({health, table2Record, smallRecord, combatReco
|
|
|
936
950
|
}
|
|
937
951
|
|
|
938
952
|
export function isCowardBossState({health}) {
|
|
939
|
-
return health?.state?.q28 ===
|
|
953
|
+
return health?.state?.q28 === 80 && health?.state?.q32 === 88;
|
|
940
954
|
}
|
|
941
955
|
|
|
942
956
|
export function isOrangeFoolBotState({combatRecord}) {
|
|
@@ -946,8 +960,8 @@ export function isOrangeFoolBotState({combatRecord}) {
|
|
|
946
960
|
export function isZombieBossBotState({health, table2Record, combatRecord}) {
|
|
947
961
|
return (
|
|
948
962
|
combatRecord?.q20 === -430233088 &&
|
|
949
|
-
health?.state?.q28 ===
|
|
950
|
-
health?.state?.q32 ===
|
|
963
|
+
health?.state?.q28 === 40 &&
|
|
964
|
+
health?.state?.q32 === 176 &&
|
|
951
965
|
table2Record?.q20 === 320 &&
|
|
952
966
|
table2Record?.q24 === -900
|
|
953
967
|
);
|
|
@@ -956,39 +970,39 @@ export function isZombieBossBotState({health, table2Record, combatRecord}) {
|
|
|
956
970
|
export function isRedSentryBotState({health, table2Record, combatRecord}) {
|
|
957
971
|
return (
|
|
958
972
|
combatRecord?.q20 === 508251904 && combatRecord?.q72 === 2 ||
|
|
959
|
-
health?.state?.q28 ===
|
|
973
|
+
health?.state?.q28 === 80 && health?.state?.q32 === 176 && table2Record?.q20 === 320 && table2Record?.q24 === -900
|
|
960
974
|
);
|
|
961
975
|
}
|
|
962
976
|
|
|
963
977
|
export function isBlueRusherBotState({health, table2Record, combatRecord}) {
|
|
964
978
|
return (
|
|
965
979
|
combatRecord?.q20 === 1113052928 && combatRecord?.q72 === 2 ||
|
|
966
|
-
health?.state?.q28 ===
|
|
980
|
+
health?.state?.q28 === 40 && health?.state?.q32 === 44 && table2Record?.q20 === 80 && table2Record?.q24 === -900
|
|
967
981
|
);
|
|
968
982
|
}
|
|
969
983
|
|
|
970
984
|
export function isRedSniperBotState({health, table2Record}) {
|
|
971
|
-
return health?.state?.q28 ===
|
|
985
|
+
return health?.state?.q28 === 45 && health?.state?.q32 === 99 && table2Record?.q20 === 180 && table2Record?.q24 === -900;
|
|
972
986
|
}
|
|
973
987
|
|
|
974
988
|
export function isYellowHunterBotState({health, table2Record, combatRecord}) {
|
|
975
989
|
return (
|
|
976
990
|
combatRecord?.q20 === -775665152 && combatRecord?.q72 === 4 && combatRecord?.q44 === -944515328 ||
|
|
977
|
-
health?.state?.q28 ===
|
|
991
|
+
health?.state?.q28 === 40 && health?.state?.q32 === 66 && table2Record?.q20 === 120 && table2Record?.q24 === -900
|
|
978
992
|
);
|
|
979
993
|
}
|
|
980
994
|
|
|
981
995
|
export function isAquaShielderBotState({health, table2Record, combatRecord}) {
|
|
982
996
|
return (
|
|
983
997
|
combatRecord?.q20 === 13697024 && combatRecord?.q24 === 1 ||
|
|
984
|
-
health?.state?.q28 ===
|
|
998
|
+
health?.state?.q28 === 60 && health?.state?.q32 === 132 && table2Record?.q20 === 240 && table2Record?.q24 === -900
|
|
985
999
|
);
|
|
986
1000
|
}
|
|
987
1001
|
|
|
988
1002
|
export function isLazerEnthusiastBotState({health, table2Record, table10Record, beamRecord}) {
|
|
989
1003
|
return (
|
|
990
|
-
health?.state?.q28 ===
|
|
991
|
-
health?.state?.q32 ===
|
|
1004
|
+
health?.state?.q28 === 150 &&
|
|
1005
|
+
health?.state?.q32 === 165 &&
|
|
992
1006
|
table2Record?.q20 === 300 &&
|
|
993
1007
|
table2Record?.q24 === -900 &&
|
|
994
1008
|
Boolean(table10Record) &&
|
|
@@ -998,8 +1012,8 @@ export function isLazerEnthusiastBotState({health, table2Record, table10Record,
|
|
|
998
1012
|
|
|
999
1013
|
export function isYellowMineGuardBotState({health, smallRecord, combatRecord, table2Record}) {
|
|
1000
1014
|
return (
|
|
1001
|
-
health?.state?.q28 ===
|
|
1002
|
-
health?.state?.q32 ===
|
|
1015
|
+
health?.state?.q28 === 40 &&
|
|
1016
|
+
health?.state?.q32 === 43 &&
|
|
1003
1017
|
smallRecord?.q20 === 78 &&
|
|
1004
1018
|
smallRecord?.q24 === 78 &&
|
|
1005
1019
|
combatRecord?.q24 === -995542016 &&
|
|
@@ -1008,11 +1022,11 @@ export function isYellowMineGuardBotState({health, smallRecord, combatRecord, ta
|
|
|
1008
1022
|
}
|
|
1009
1023
|
|
|
1010
1024
|
export function isShieldHelperBotState({health, table2Record}) {
|
|
1011
|
-
return health?.state?.q28 ===
|
|
1025
|
+
return health?.state?.q28 === 40 && health?.state?.q32 === 43 && health?.maxHp === 1000 && !table2Record;
|
|
1012
1026
|
}
|
|
1013
1027
|
|
|
1014
1028
|
export function isShieldMasterBotState({health, table2Record}) {
|
|
1015
|
-
return health?.state?.q28 ===
|
|
1029
|
+
return health?.state?.q28 === 200 && health?.state?.q32 === 220 && health?.maxHp === 15000 && Boolean(table2Record);
|
|
1016
1030
|
}
|
|
1017
1031
|
|
|
1018
1032
|
export function botIdentifierFromState({combatRecord, motionRecord, smallRecord}) {
|