Skip to content

Enums

SimpleKey

Bases: Enum

Represents keys used in static XOR ciphers.

Source code in gd/enums.py
93
94
95
96
class SimpleKey(Enum):
    """Represents keys used in static *XOR* ciphers."""

    SAVE = 11

Key

Bases: Enum

Represents keys used in cyclic XOR ciphers.

Source code in gd/enums.py
 99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
class Key(Enum):
    """Represents keys used in cyclic *XOR* ciphers."""

    MESSAGE = 14251
    QUESTS = 19847
    LEVEL_PASSWORD = 26364
    COMMENT = 29481
    USER_PASSWORD = 37526
    LEVEL_LEADERBOARD = 39673
    LEVEL = 41274
    LIKE_RATE = 58281
    CHESTS = 59182
    USER_LEADERBOARD = 85271

    def __init__(
        self, value: int, encoding: str = DEFAULT_ENCODING, errors: str = DEFAULT_ERRORS
    ) -> None:
        self.string = string = str(value)
        self.bytes = string.encode(encoding, errors)

Salt

Bases: Enum

Represents salts used in hashing.

Source code in gd/enums.py
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
class Salt(Enum):
    """Represents salts used in hashing."""

    LEVEL = "xI25fpAapCQg"
    COMMENT = "xPT6iUrtws0J"
    LIKE_RATE = "ysg6pUrtjn0J"
    USER_LEADERBOARD = "xI35fsAapCRg"
    LEVEL_LEADERBOARD = "yPg6pUrtWn0J"
    QUESTS = "oC36fpYaPtdg"
    CHESTS = "pC26fpYaQCtg"
    PASSWORD = "mI29fmAnxgTs"

    EMPTY = EMPTY

    def __init__(
        self,
        string: str,
        encoding: str = DEFAULT_ENCODING,
        errors: str = DEFAULT_ERRORS,
    ) -> None:
        self.string = string
        self.bytes = string.encode(encoding, errors)

Secret

Bases: Enum

Represents secrets.

Source code in gd/enums.py
144
145
146
147
148
149
150
class Secret(Enum):
    """Represents secrets."""

    MAIN = "Wmfd2893gb7"
    LEVEL = "Wmfv2898gc9"
    USER = "Wmfv3899gc9"
    MOD = "Wmfp3879gc3"

AccountURLType

Bases: Enum

Represents account URL types.

Source code in gd/enums.py
153
154
155
156
157
class AccountURLType(Enum):
    """Represents account URL types."""

    SAVE = 1
    LOAD = 2

IconType

Bases: Enum

Represents icon types.

Source code in gd/enums.py
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
class IconType(Enum):
    """Represents icon types."""

    CUBE = 0
    SHIP = 1
    BALL = 2
    UFO = 3
    WAVE = 4
    ROBOT = 5
    SPIDER = 6
    SWING = 7
    JETPACK = 8

    DEFAULT = CUBE

    def is_default(self) -> bool:
        return self is type(self).DEFAULT

    def is_cube(self) -> bool:
        return self is type(self).CUBE

    def is_ship(self) -> bool:
        return self is type(self).SHIP

    def is_ball(self) -> bool:
        return self is type(self).BALL

    def is_ufo(self) -> bool:
        return self is type(self).UFO

    def is_wave(self) -> bool:
        return self is type(self).WAVE

    def is_robot(self) -> bool:
        return self is type(self).ROBOT

    def is_spider(self) -> bool:
        return self is type(self).SPIDER

    def is_swing(self) -> bool:
        return self is type(self).SWING

    def is_jetpack(self) -> bool:
        return self is type(self).JETPACK

    @property
    def case_fold_name(self) -> str:
        return case_fold(self.name)

MessageState

Bases: Enum

Represents message states.

Source code in gd/enums.py
210
211
212
213
214
215
216
217
class MessageState(Enum):
    """Represents message states."""

    OPEN_TO_ALL = 0
    OPEN_TO_FRIENDS = 1
    CLOSED = 2

    DEFAULT = OPEN_TO_ALL

CommentState

Bases: Enum

Represents comment states.

Source code in gd/enums.py
220
221
222
223
224
225
226
227
class CommentState(Enum):
    """Represents comment states."""

    OPEN_TO_ALL = 0
    OPEN_TO_FRIENDS = 1
    CLOSED = 2

    DEFAULT = OPEN_TO_ALL

FriendState

Bases: Enum

Represents friend states.

Source code in gd/enums.py
230
231
232
233
234
235
236
237
238
239
class FriendState(Enum):
    """Represents friend states."""

    NOT_FRIEND = 0
    FRIEND = 1
    BLOCKED = 2
    OUTGOING_REQUEST = 3
    INCOMING_REQUEST = 4

    DEFAULT = NOT_FRIEND

FriendRequestState

Bases: Enum

Represents friend request states.

Source code in gd/enums.py
242
243
244
245
246
247
248
class FriendRequestState(Enum):
    """Represents friend request states."""

    OPEN = 0
    CLOSED = 1

    DEFAULT = OPEN

Role

Bases: Enum

Represents server roles.

Source code in gd/enums.py
251
252
253
254
255
256
257
258
class Role(Enum):
    """Represents server roles."""

    USER = 0
    MODERATOR = 1
    ELDER_MODERATOR = 2

    DEFAULT = USER

LevelLength

Bases: Enum

Represents level lengths.

Source code in gd/enums.py
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
class LevelLength(Enum):
    """Represents level lengths."""

    TINY = 0
    SHORT = 1
    MEDIUM = 2
    LONG = 3
    XL = 4
    PLATFORMER = 5

    DEFAULT = TINY

    @classmethod
    def _missing_(cls, value: Any) -> LevelLength:
        if value < 0:
            return cls.TINY

        return cls.XL

    def is_platformer(self) -> bool:
        return self is type(self).PLATFORMER

    def is_default(self) -> bool:
        return self is type(self).DEFAULT

LevelPrivacy

Bases: Enum

Represents level privacy settings.

Source code in gd/enums.py
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
class LevelPrivacy(Enum):
    """Represents level privacy settings."""

    PUBLIC = 0
    FRIENDS = 1
    PRIVATE = 2

    DEFAULT = PUBLIC

    def is_private(self) -> bool:
        return self is type(self).PRIVATE

    def is_friends(self) -> bool:
        return self is type(self).FRIENDS

    def is_public(self) -> bool:
        return self is type(self).PUBLIC

Difficulty

Bases: Enum

Represents difficulties.

Source code in gd/enums.py
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
class Difficulty(Enum):
    """Represents difficulties."""

    UNKNOWN = 0

    AUTO = 1
    EASY = 2
    NORMAL = 3
    HARD = 4
    HARDER = 5
    INSANE = 6
    DEMON = 7
    EASY_DEMON = 8
    MEDIUM_DEMON = 9
    HARD_DEMON = 10
    INSANE_DEMON = 11
    EXTREME_DEMON = 12

    NA = UNKNOWN

    DEFAULT = UNKNOWN

    def into_level_difficulty(self) -> LevelDifficulty:
        return DIFFICULTY_TO_LEVEL_DIFFICULTY[self]

    def into_demon_difficulty(self) -> DemonDifficulty:
        return DIFFICULTY_TO_DEMON_DIFFICULTY[self]

    def is_unknown(self) -> bool:
        return self is type(self).UNKNOWN

    def is_auto(self) -> bool:
        return self is type(self).AUTO

    def is_unspecified_demon(self) -> bool:
        return self is type(self).DEMON

    def is_specified_demon(self) -> bool:
        return self in DEMON

    def is_demon(self) -> bool:
        return self.is_unspecified_demon() or self.is_specified_demon()

    def clamp_demon(self) -> Difficulty:
        if self.is_demon():
            return type(self).DEMON

        return self

LevelDifficulty

Bases: Enum

Represents level difficulties.

Source code in gd/enums.py
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
class LevelDifficulty(Enum):
    """Represents level difficulties."""

    UNKNOWN = -1
    DEMON = -2
    AUTO = -3
    EASY = 1
    NORMAL = 2
    HARD = 3
    HARDER = 4
    INSANE = 5
    EASY_DEMON = 6
    MEDIUM_DEMON = 7
    HARD_DEMON = 8
    INSANE_DEMON = 9
    EXTREME_DEMON = 10

    NA = UNKNOWN

    DEFAULT = UNKNOWN

    def into_difficulty(self) -> Difficulty:
        return LEVEL_DIFFICULTY_TO_DIFFICULTY[self]

DemonDifficulty

Bases: Enum

Represents demon difficulties.

Source code in gd/enums.py
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
class DemonDifficulty(Enum):
    """Represents demon difficulties."""

    DEMON = 0
    EASY_DEMON = 1
    MEDIUM_DEMON = 2
    HARD_DEMON = 3
    INSANE_DEMON = 4
    EXTREME_DEMON = 5

    DEFAULT = DEMON

    def into_difficulty(self) -> Difficulty:
        return DEMON_DIFFICULTY_TO_DIFFICULTY[self]

    def into_level_difficulty(self) -> LevelDifficulty:
        return DEMON_DIFFICULTY_TO_LEVEL_DIFFICULTY[self]

TimelyType

Bases: Enum

Represents timely level types.

Source code in gd/enums.py
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
class TimelyType(Enum):
    """Represents timely level types."""

    NOT_TIMELY = 0
    DAILY = 1
    WEEKLY = 2
    EVENT = 3

    DEFAULT = NOT_TIMELY

    def into_timely_id(self) -> TimelyID:
        return TIMELY_TYPE_TO_ID[self]

    def is_not_timely(self) -> bool:
        return self is type(self).NOT_TIMELY

    def is_timely(self) -> bool:
        return not self.is_not_timely()

    def is_daily(self) -> bool:
        return self is type(self).DAILY

    def is_weekly(self) -> bool:
        return self is type(self).WEEKLY

TimelyID

Bases: Enum

Represents timely level IDs.

Source code in gd/enums.py
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
class TimelyID(Enum):
    """Represents timely level IDs."""

    NOT_TIMELY = 0
    DAILY = -1
    WEEKLY = -2
    EVENT = -3

    DEFAULT = NOT_TIMELY

    def into_timely_type(self) -> TimelyType:
        return TIMELY_ID_TO_TYPE[self]

    def is_not_timely(self) -> bool:
        return self is type(self).NOT_TIMELY

    def is_daily(self) -> bool:
        return self is type(self).DAILY

    def is_weekly(self) -> bool:
        return self is type(self).WEEKLY

RateFilter

Bases: Enum

Represents rate filters.

Source code in gd/enums.py
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
class RateFilter(Enum):
    """Represents rate filters."""

    NOT_RATED = 0
    RATED = 1
    FEATURED = 2
    EPIC = 3
    LEGENDARY = 4
    MYTHIC = 5

    def is_not_rated(self) -> bool:
        return self is type(self).NOT_RATED

    def is_rated(self) -> bool:
        return self is type(self).RATED

    def is_featured(self) -> bool:
        return self is type(self).FEATURED

    def is_epic(self) -> bool:
        return self is type(self).EPIC

    def is_legendary(self) -> bool:
        return self is type(self).LEGENDARY

    def is_mythic(self) -> bool:
        return self is type(self).MYTHIC

SpecialRateType

Bases: Enum

Represents special rate types.

Source code in gd/enums.py
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
class SpecialRateType(Enum):
    """Represents special rate types."""

    NONE = 0
    EPIC = 1
    LEGENDARY = 2
    MYTHIC = 3

    DEFAULT = NONE

    def is_none(self) -> bool:
        return self is type(self).NONE

    def is_epic(self) -> bool:
        return self is type(self).EPIC

    def is_legendary(self) -> bool:
        return self is type(self).LEGENDARY

    def is_mythic(self) -> bool:
        return self is type(self).MYTHIC

    def is_default(self) -> bool:
        return self is type(self).DEFAULT

RateType

Bases: Flag

Represents rate types.

Source code in gd/enums.py
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
class RateType(Flag):
    """Represents rate types."""

    NONE = 0

    NOT_RATED_ONLY = 1 << 0
    RATED_ONLY = 1 << 1
    FEATURED_ONLY = 1 << 2
    EPIC_ONLY = 1 << 3
    LEGENDARY_ONLY = 1 << 4
    MYTHIC_ONLY = 1 << 5

    NOT_RATED = NONE | NOT_RATED_ONLY
    RATED = NOT_RATED | RATED_ONLY
    FEATURED = RATED | FEATURED_ONLY
    EPIC = FEATURED | EPIC_ONLY
    LEGENDARY = EPIC | LEGENDARY_ONLY
    MYTHIC = LEGENDARY | MYTHIC_ONLY

    DEFAULT = NONE

    def is_not_rated(self) -> bool:
        return type(self).NOT_RATED_ONLY in self

    def is_rated(self) -> bool:
        return type(self).RATED_ONLY in self

    def is_featured(self) -> bool:
        return type(self).FEATURED_ONLY in self

    def is_epic(self) -> bool:
        return type(self).EPIC_ONLY in self

    def is_legendary(self) -> bool:
        return type(self).LEGENDARY_ONLY in self

    def is_mythic(self) -> bool:
        return type(self).MYTHIC_ONLY in self

CommentType

Bases: Enum

Represents comment types.

Source code in gd/enums.py
610
611
612
613
614
class CommentType(Enum):
    """Represents comment types."""

    LEVEL = 0
    USER = 1

RelationshipType

Bases: Enum

Represents relationship types.

Source code in gd/enums.py
617
618
619
620
621
622
623
624
625
626
627
class RelationshipType(Enum):
    """Represents relationship types."""

    FRIEND = 0
    BLOCKED = 1

    def is_friend(self) -> bool:
        return self is type(self).FRIEND

    def is_outgoing(self) -> bool:
        return self is type(self).BLOCKED

FriendRequestType

Bases: Enum

Represents friend request types.

Source code in gd/enums.py
630
631
632
633
634
635
636
637
638
639
640
641
642
class FriendRequestType(Enum):
    """Represents friend request types."""

    INCOMING = 0
    OUTGOING = 1

    DEFAULT = INCOMING

    def is_incoming(self) -> bool:
        return self is type(self).INCOMING

    def is_outgoing(self) -> bool:
        return self is type(self).OUTGOING

MessageType

Bases: Enum

Represents message types.

Source code in gd/enums.py
645
646
647
648
649
650
651
652
653
654
655
656
657
class MessageType(Enum):
    """Represents message types."""

    INCOMING = 0
    OUTGOING = 1

    DEFAULT = INCOMING

    def is_incoming(self) -> bool:
        return self is type(self).INCOMING

    def is_outgoing(self) -> bool:
        return self is type(self).OUTGOING

CommentStrategy

Bases: Enum

Represents comment strategies.

Source code in gd/enums.py
660
661
662
663
664
665
666
class CommentStrategy(Enum):
    """Represents comment strategies."""

    RECENT = 0
    MOST_LIKED = 1

    DEFAULT = RECENT

LeaderboardStrategy

Bases: Enum

Represents leaderboard strategies.

Source code in gd/enums.py
669
670
671
672
673
674
675
676
677
678
679
680
class LeaderboardStrategy(Enum):
    """Represents leaderboard strategies."""

    PLAYERS = 0
    FRIENDS = 1
    RELATIVE = 2
    CREATORS = 3

    DEFAULT = PLAYERS

    def requires_login(self) -> bool:
        return self in REQUIRES_LOGIN

LevelLeaderboardStrategy

Bases: Enum

Represents level leaderboard strategies.

Source code in gd/enums.py
686
687
688
689
690
691
692
693
class LevelLeaderboardStrategy(Enum):
    """Represents level leaderboard strategies."""

    FRIENDS = 0
    ALL = 1
    WEEKLY = 2

    DEFAULT = ALL

LikeType

Bases: Enum

Represents like types.

Source code in gd/enums.py
696
697
698
699
700
701
class LikeType(Enum):
    """Represents like types."""

    LEVEL = 1
    LEVEL_COMMENT = 2
    USER_COMMENT = 3

GauntletID

Bases: Enum

Represents gauntlet IDs.

Source code in gd/enums.py
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
class GauntletID(Enum):
    """Represents gauntlet IDs."""

    UNKNOWN = 0
    FIRE = 1
    ICE = 2
    POISON = 3
    SHADOW = 4
    LAVA = 5
    BONUS = 6
    CHAOS = 7
    DEMON = 8
    TIME = 9
    CRYSTAL = 10
    MAGIC = 11
    SPIKE = 12
    MONSTER = 13
    DOOM = 14
    DEATH = 15

    @classmethod
    def _missing_(cls, value: Any) -> GauntletID:
        return cls.UNKNOWN

SearchStrategy

Bases: Enum

Represents search strategies.

Source code in gd/enums.py
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
class SearchStrategy(Enum):
    """Represents search strategies."""

    DEFAULT = 0
    MOST_DOWNLOADED = 1
    MOST_LIKED = 2
    TRENDING = 3
    RECENT = 4
    BY_USER = 5
    FEATURED = 6
    MAGIC = 7
    SENT = 8
    SEARCH_MANY = 10
    RATED = 11
    FOLLOWED = 12
    FRIENDS = 13
    MOST_LIKED_WORLD = 15
    HALL_OF_FAME = 16
    FEATURED_WORLD = 17
    UNKNOWN = 18
    DAILY_HISTORY = 21
    WEEKLY_HISTORY = 22

    def is_default(self) -> bool:
        return self is type(self).DEFAULT

    def is_most_downloaded(self) -> bool:
        return self is type(self).MOST_DOWNLOADED

    def is_most_liked(self) -> bool:
        return self is type(self).MOST_LIKED

    def is_trending(self) -> bool:
        return self is type(self).TRENDING

    def is_recent(self) -> bool:
        return self is type(self).RECENT

    def is_by_user(self) -> bool:
        return self is type(self).BY_USER

    def is_featured(self) -> bool:
        return self is type(self).FEATURED

    def is_magic(self) -> bool:
        return self is type(self).MAGIC

    def is_sent(self) -> bool:
        return self is type(self).SENT

    def is_search_many(self) -> bool:
        return self is type(self).SEARCH_MANY

    def is_rated(self) -> bool:
        return self is type(self).RATED

    def is_followed(self) -> bool:
        return self is type(self).FOLLOWED

    def is_friends(self) -> bool:
        return self is type(self).FRIENDS

    def is_most_liked_world(self) -> bool:
        return self is type(self).MOST_LIKED_WORLD

    def is_hall_of_fame(self) -> bool:
        return self is type(self).HALL_OF_FAME

    def is_featured_world(self) -> bool:
        return self is type(self).FEATURED_WORLD

    def is_unknown(self) -> bool:
        return self is type(self).UNKNOWN

    def is_daily_history(self) -> bool:
        return self is type(self).DAILY_HISTORY

    def is_weekly_history(self) -> bool:
        return self is type(self).WEEKLY_HISTORY

RewardType

Bases: Enum

Represents reward types.

Source code in gd/enums.py
810
811
812
813
814
815
816
817
class RewardType(Enum):
    """Represents reward types."""

    GET_INFO = 0
    CLAIM_SMALL = 1
    CLAIM_LARGE = 2

    DEFAULT = GET_INFO

ChestType

Bases: Enum

Represents chest types.

Source code in gd/enums.py
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
class ChestType(Enum):
    """Represents chest types."""

    UNKNOWN = 0

    SMALL = 1
    LARGE = 2

    DEFAULT = UNKNOWN

    def is_small(self) -> bool:
        return self is type(self).SMALL

    def is_large(self) -> bool:
        return self is type(self).LARGE

ShardType

Bases: Enum

Represents shard types.

Source code in gd/enums.py
837
838
839
840
841
842
843
844
845
846
847
848
class ShardType(Enum):
    """Represents shard types."""

    UNKNOWN = 0
    FIRE = 1
    ICE = 2
    POISON = 3
    SHADOW = 4
    LAVA = 5
    NULL = 6

    DEFAULT = UNKNOWN

RewardItemType

Bases: Enum

Represents item types.

Source code in gd/enums.py
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
class RewardItemType(Enum):
    """Represents item types."""

    UNKNOWN = 0

    FIRE_SHARD = 1
    ICE_SHARD = 2
    POISON_SHARD = 3
    SHADOW_SHARD = 4
    LAVA_SHARD = 5
    KEY = 6
    ORB = 7
    DIAMOND = 8
    CUSTOM = 9

    DEFAULT = UNKNOWN

    def is_custom(self) -> bool:
        return self is type(self).CUSTOM

QuestType

Bases: Enum

Represents quest types.

Source code in gd/enums.py
872
873
874
875
876
877
878
879
880
881
882
883
class QuestType(Enum):
    """Represents quest types."""

    UNKNOWN = 0
    ORBS = 1
    COINS = 2
    STARS = 3

    DEFAULT = UNKNOWN

    def is_unknown(self) -> bool:
        return self is type(self).UNKNOWN

Scene

Bases: Enum

Represents various scene IDs.

Source code in gd/enums.py
886
887
888
889
890
891
892
893
894
895
896
897
898
899
class Scene(Enum):
    """Represents various scene IDs."""

    MAIN = 0
    SELECT = 1
    OLD = 2
    EDITOR_OR_LEVEL = 3
    SEARCH = 4
    UNUSED = 5
    LEADERBOARD = 6
    ONLINE = 7
    OFFICIAL_SELECT = 8
    OFFICIAL_LEVEL = 9
    THE_CHALLENGE = 12

PlayerColor

Bases: Enum

Represents player color settings.

Source code in gd/enums.py
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
class PlayerColor(Enum):
    """Represents player color settings."""

    NOT_USED = 0

    COLOR_1 = 1
    COLOR_2 = 2

    P1 = COLOR_1
    P2 = COLOR_2

    DEFAULT = NOT_USED

    @classmethod
    def _missing_(cls, value: Any) -> PlayerColor:
        return cls.NOT_USED

    def is_not_used(self) -> bool:
        return self is type(self).NOT_USED

    def is_used(self) -> bool:
        return not self.is_not_used()

    def is_default(self) -> bool:
        return self is type(self).DEFAULT

    def is_color_1(self) -> bool:
        return self is type(self).COLOR_1

    def is_color_2(self) -> bool:
        return self is type(self).COLOR_2

Easing

Bases: Enum

Represents easing types.

Source code in gd/enums.py
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
class Easing(Enum):
    """Represents easing types."""

    NONE = 0
    EASE_IN_OUT = 1
    EASE_IN = 2
    EASE_OUT = 3
    ELASTIC_IN_OUT = 4
    ELASTIC_IN = 5
    ELASTIC_OUT = 6
    BOUNCE_IN_OUT = 7
    BOUNCE_IN = 8
    BOUNCE_OUT = 9
    EXPONENTIAL_IN_OUT = 10
    EXPONENTIAL_IN = 11
    EXPONENTIAL_OUT = 12
    SINE_IN_OUT = 13
    SINE_IN = 14
    SINE_OUT = 15
    BACK_IN_OUT = 16
    BACK_IN = 17
    BACK_OUT = 18

    DEFAULT = NONE

EasingMethod

Bases: Flag

Represents easing methods.

Source code in gd/enums.py
 982
 983
 984
 985
 986
 987
 988
 989
 990
 991
 992
 993
 994
 995
 996
 997
 998
 999
1000
1001
1002
1003
1004
1005
1006
1007
1008
1009
1010
1011
1012
1013
1014
1015
1016
1017
1018
1019
1020
1021
1022
1023
1024
1025
1026
1027
1028
1029
1030
1031
1032
1033
1034
1035
1036
1037
1038
1039
1040
1041
1042
1043
1044
class EasingMethod(Flag):
    """Represents easing methods."""

    NONE = 0
    IN = 1
    OUT = 2
    EASE = 4
    ELASTIC = 8
    BOUNCE = 16
    EXPONENTIAL = 32
    SINE = 64
    BACK = 128

    DEFAULT = NONE

    def into_easing(self) -> Easing:
        cls = type(self)
        value = self.value

        if not value:
            return Easing.NONE

        has_easing_in = cls.IN in self
        has_easing_out = cls.OUT in self

        if not has_easing_in and not has_easing_out:
            raise ValueError(EXPECTED_MODIFIERS)

        value = (value.bit_length() - IN_OUT_SHIFT) * MULTIPLIER

        if has_easing_in:
            value -= 1

        if has_easing_out:
            value -= 1

        return Easing(value)

    @classmethod
    def from_easing(cls, easing: Easing) -> EasingMethod:
        value = easing.value

        if not value:
            return cls.DEFAULT

        IN = cls.IN
        OUT = cls.OUT

        shift, remainder = divmod((value - 1), MULTIPLIER)
        shift += IN_OUT_SHIFT

        has_easing_in = remainder != OUT.value
        has_easing_out = remainder != IN.value

        result = cls(1 << shift)

        if has_easing_in:
            result |= IN

        if has_easing_out:
            result |= OUT

        return result

PulseMode

Bases: Enum

Represents pulse modes.

Source code in gd/enums.py
1047
1048
1049
1050
1051
1052
1053
1054
1055
1056
1057
1058
1059
class PulseMode(Enum):
    """Represents pulse modes."""

    COLOR = 0
    HSV = 1

    DEFAULT = COLOR

    def is_color(self) -> bool:
        return self is type(self).COLOR

    def is_hsv(self) -> bool:
        return self is type(self).HSV

ToggleType

Bases: Enum

Represents toggle types.

Source code in gd/enums.py
1062
1063
1064
1065
1066
1067
1068
1069
class ToggleType(Enum):
    """Represents toggle types."""

    SPAWN = 0
    TOGGLE_ON = 1
    TOGGLE_OFF = 2

    DEFAULT = SPAWN

InstantCountComparison

Bases: Enum

Represents instant count comparison types.

Source code in gd/enums.py
1072
1073
1074
1075
1076
1077
1078
1079
class InstantCountComparison(Enum):
    """Represents instant count comparison types."""

    EQUALS = 0
    LARGER = 1
    SMALLER = 2

    DEFAULT = EQUALS

OrbType

Bases: Enum

Represents orb object IDs.

Source code in gd/enums.py
1082
1083
1084
1085
1086
1087
1088
1089
1090
1091
1092
1093
1094
1095
1096
1097
1098
1099
1100
class OrbType(Enum):
    """Represents orb object IDs."""

    YELLOW = 36
    BLUE = 84
    PINK = 141
    GREEN = 1022
    RED = 1333
    BLACK = 1330
    DASH = 1704
    REVERSE_DASH = 1751
    TRIGGER = 1594

    @property
    def id(self) -> int:
        return self.value

    def is_trigger(self) -> int:
        return self is type(self).TRIGGER

PadType

Bases: Enum

Represents pad object IDs.

Source code in gd/enums.py
1103
1104
1105
1106
1107
1108
1109
1110
1111
1112
1113
class PadType(Enum):
    """Represents pad object IDs."""

    YELLOW = 35
    BLUE = 67
    PINK = 140
    RED = 1332

    @property
    def id(self) -> int:
        return self.value

MiscType

Bases: Enum

Represents miscellaneous object IDs.

Source code in gd/enums.py
1116
1117
1118
1119
1120
1121
1122
1123
1124
1125
1126
class MiscType(Enum):
    """Represents miscellaneous object IDs."""

    TEXT = 914
    START_POSITION = 31
    ITEM_COUNTER = 1615
    COLLISION_BLOCK = 1816

    @property
    def id(self) -> int:
        return self.value

ItemMode

Bases: Enum

Represents item modes.

Source code in gd/enums.py
1129
1130
1131
1132
1133
1134
1135
1136
1137
1138
1139
1140
class ItemMode(Enum):
    """Represents item modes."""

    DEFAULT = 0
    PICKUP = 1
    TOGGLE = 2

    def is_pickup(self) -> bool:
        return self is type(self).PICKUP

    def is_toggle(self) -> bool:
        return self is type(self).TOGGLE

GameMode

Bases: Enum

Represents game modes.

Source code in gd/enums.py
1143
1144
1145
1146
1147
1148
1149
1150
1151
1152
1153
1154
1155
class GameMode(Enum):
    """Represents game modes."""

    CUBE = 0
    SHIP = 1
    BALL = 2
    UFO = 3
    WAVE = 4
    ROBOT = 5
    SPIDER = 6
    # SWING = 7

    DEFAULT = CUBE

LevelType

Bases: Enum

Represents level types.

Source code in gd/enums.py
1158
1159
1160
1161
1162
1163
1164
1165
1166
1167
1168
1169
1170
1171
1172
1173
1174
1175
1176
1177
1178
1179
1180
1181
1182
class LevelType(Enum):
    """Represents level types."""

    NULL = 0
    OFFICIAL = 1
    CREATED = 2
    SAVED = 3
    ONLINE = 4

    def is_null(self) -> bool:
        return self is type(self).NULL

    def is_official(self) -> bool:
        return self is type(self).OFFICIAL

    def is_created(self) -> bool:
        return self is type(self).CREATED

    def is_saved(self) -> bool:
        return self is type(self).SAVED

    def is_online(self) -> bool:
        return self is type(self).ONLINE

    DEFAULT = NULL

PortalType

Bases: Enum

Represents portal object IDs.

Source code in gd/enums.py
1185
1186
1187
1188
1189
1190
1191
1192
1193
1194
1195
1196
1197
1198
1199
1200
1201
1202
1203
1204
1205
1206
1207
1208
1209
class PortalType(Enum):
    """Represents portal object IDs."""

    CUBE = 12
    SHIP = 13
    BALL = 47
    UFO = 111
    WAVE = 660
    ROBOT = 745
    SPIDER = 1331

    YELLOW_GRAVITY = 11
    BLUE_GRAVITY = 10
    YELLOW_MIRROR = 45
    BLUE_MIRROR = 46
    PINK_SIZE = 101
    GREEN_SIZE = 99
    YELLOW_DUAL = 286
    BLUE_DUAL = 287
    BLUE_TELEPORT = 747
    YELLOW_TELEPORT = 749

    @property
    def id(self) -> int:
        return self.value

SpeedChangeType

Bases: Enum

Represents speed change object IDs.

Source code in gd/enums.py
1212
1213
1214
1215
1216
1217
1218
1219
1220
1221
1222
1223
class SpeedChangeType(Enum):
    """Represents speed change object IDs."""

    SLOW = 200
    NORMAL = 201
    FAST = 202
    FASTER = 203
    FASTEST = 1334

    @property
    def id(self) -> int:
        return self.value

CoinType

Bases: Enum

Represents coin object IDs.

Source code in gd/enums.py
1226
1227
1228
1229
1230
1231
1232
1233
1234
class CoinType(Enum):
    """Represents coin object IDs."""

    SECRET = 142
    USER = 1329

    @property
    def id(self) -> int:
        return self.value

ItemType

Bases: Enum

Represents pickup item object IDs.

Source code in gd/enums.py
1237
1238
1239
1240
1241
1242
1243
1244
1245
1246
1247
1248
class ItemType(Enum):
    """Represents pickup item object IDs."""

    KEY = 1275
    HEART = 1587
    BOTTLE = 1589
    SKULL = 1598
    COIN = 1614

    @property
    def id(self) -> int:
        return self.value

RotatingObjectType

Bases: Enum

Represents rotating object IDs.

Source code in gd/enums.py
1251
1252
1253
1254
1255
1256
1257
1258
1259
1260
1261
1262
1263
1264
1265
1266
1267
1268
1269
1270
1271
1272
1273
1274
1275
1276
1277
1278
1279
1280
1281
1282
1283
1284
1285
1286
1287
1288
1289
1290
1291
1292
1293
1294
1295
1296
1297
1298
1299
1300
1301
1302
1303
1304
1305
1306
1307
1308
1309
1310
1311
1312
1313
1314
1315
1316
1317
1318
1319
1320
1321
1322
1323
1324
1325
1326
1327
1328
1329
1330
1331
1332
1333
1334
1335
1336
1337
1338
1339
1340
1341
1342
1343
1344
1345
1346
1347
1348
1349
1350
1351
1352
1353
1354
1355
class RotatingObjectType(Enum):
    """Represents rotating object IDs."""

    ID_85 = 85
    ID_86 = 86
    ID_87 = 87
    ID_97 = 97

    ID_137 = 137
    ID_138 = 138
    ID_139 = 139

    ID_154 = 154
    ID_155 = 155
    ID_156 = 156

    ID_180 = 180
    ID_181 = 181
    ID_182 = 182

    ID_183 = 183
    ID_184 = 184
    ID_185 = 185

    ID_186 = 186
    ID_187 = 187
    ID_188 = 188

    ID_222 = 222
    ID_223 = 223
    ID_224 = 224

    ID_375 = 375
    ID_376 = 376
    ID_377 = 377
    ID_378 = 378

    ID_394 = 394
    ID_395 = 395
    ID_396 = 396

    ID_678 = 678
    ID_679 = 679
    ID_680 = 680

    ID_740 = 740
    ID_741 = 741
    ID_742 = 742

    ID_997 = 997
    ID_998 = 998
    ID_999 = 999
    ID_1000 = 1000

    ID_1019 = 1019
    ID_1020 = 1020
    ID_1021 = 1021

    ID_1055 = 1055
    ID_1056 = 1056
    ID_1057 = 1057

    ID_1058 = 1058
    ID_1059 = 1059
    ID_1060 = 1060
    ID_1061 = 1061

    ID_1521 = 1521
    ID_1522 = 1522
    ID_1523 = 1523
    ID_1524 = 1524

    ID_1525 = 1525
    ID_1526 = 1526
    ID_1527 = 1527
    ID_1528 = 1528

    ID_1582 = 1582

    ID_1619 = 1619
    ID_1620 = 1620

    ID_1705 = 1705
    ID_1706 = 1706
    ID_1707 = 1707

    ID_1708 = 1708
    ID_1709 = 1709
    ID_1710 = 1710

    ID_1734 = 1734
    ID_1735 = 1735
    ID_1736 = 1736

    ID_1752 = 1752

    ID_1831 = 1831
    ID_1832 = 1832

    ID_1833 = 1833
    ID_1834 = 1834

    @property
    def id(self) -> int:
        return self.value

PulseTargetType

Bases: Enum

Represents pulse target types.

Source code in gd/enums.py
1358
1359
1360
1361
1362
1363
1364
1365
1366
1367
1368
1369
1370
class PulseTargetType(Enum):
    """Represents pulse target types."""

    COLOR_CHANNEL = 0
    GROUP = 1

    DEFAULT = COLOR_CHANNEL

    def is_color_channel(self) -> bool:
        return self is type(self).COLOR_CHANNEL

    def is_group(self) -> bool:
        return self is type(self).GROUP

PulsatingObjectType

Bases: Enum

Represents pulsating object IDs.

Source code in gd/enums.py
1373
1374
1375
1376
1377
1378
1379
1380
1381
1382
1383
class PulsatingObjectType(Enum):
    """Represents pulsating object IDs."""

    OUTER_LARGE = 1839
    OUTER_SMALL = 1840
    INNER_LARGE = 1841
    INNER_SMALL = 1842

    @property
    def id(self) -> int:
        return self.value

PulseType

Bases: Flag

Represents pulse types.

Source code in gd/enums.py
1386
1387
1388
1389
1390
1391
1392
1393
1394
1395
1396
1397
1398
1399
1400
class PulseType(Flag):
    """Represents pulse types."""

    MAIN = 1
    DETAIL = 2

    BOTH = MAIN | DETAIL

    DEFAULT = BOTH

    def is_main_only(self) -> bool:
        return self is type(self).MAIN

    def is_detail_only(self) -> bool:
        return self is type(self).DETAIL

SpecialBlockType

Bases: Enum

Represents special block (D, J, S, H) object IDs.

Source code in gd/enums.py
1403
1404
1405
1406
1407
1408
1409
class SpecialBlockType(Enum):
    """Represents special block (`D`, `J`, `S`, `H`) object IDs."""

    D = 1755
    J = 1813
    S = 1829
    H = 1859

SpecialColorChannelID

Bases: Enum

Represents special color IDs.

Source code in gd/enums.py
1412
1413
1414
1415
1416
1417
1418
1419
1420
1421
1422
1423
1424
1425
1426
1427
1428
1429
1430
1431
1432
class SpecialColorChannelID(Enum):
    """Represents special color IDs."""

    BACKGROUND = BG = 1000
    GROUND = G = 1001
    LINE = L = 1002
    LINE_3D = L3D = 1003
    OBJECT = OBJ = 1004
    PLAYER_1 = P1 = 1005
    PLAYER_2 = P2 = 1006
    LIGHT_BACKGROUND = LBG = 1007
    SECONDARY_GROUND = GROUND_2 = G2 = 1009
    BLACK = 1010
    WHITE = 1011
    LIGHTER = 1012
    MIDDLEGROUND = MG = 1013
    SECONDARY_MIDDLEGROUND = MIDDLEGROUND_2 = MG2 = 1014

    @property
    def id(self) -> int:
        return self.value

TargetType

Bases: Flag

Represents move target types.

Source code in gd/enums.py
1480
1481
1482
1483
1484
1485
1486
1487
1488
1489
1490
1491
1492
1493
1494
1495
1496
class TargetType(Flag):
    """Represents move target types."""

    NONE = 0

    X = 1
    Y = 2

    BOTH = X | Y

    DEFAULT = NONE

    def is_none(self) -> bool:
        return self is type(self).NONE

    def into_simple_target_type(self) -> SimpleTargetType:
        return TARGET_TYPE_TO_SIMPLE_TARGET_TYPE[self]

SimpleTargetType

Bases: Enum

Represents simple move target types.

Source code in gd/enums.py
1499
1500
1501
1502
1503
1504
1505
1506
1507
1508
1509
1510
class SimpleTargetType(Enum):
    """Represents simple move target types."""

    BOTH = 0

    X_ONLY = 1
    Y_ONLY = 2

    DEFAULT = BOTH

    def into_target_type(self) -> TargetType:
        return SIMPLE_TARGET_TYPE_TO_TARGET_TYPE[self]

TouchToggleMode

Bases: Enum

Represents touch toggle modes.

Source code in gd/enums.py
1525
1526
1527
1528
1529
1530
class TouchToggleMode(Enum):
    """Represents touch toggle modes."""

    DEFAULT = 0
    ON = 1
    OFF = 2

TriggerType

Bases: Enum

Represents trigger object IDs.

Source code in gd/enums.py
1533
1534
1535
1536
1537
1538
1539
1540
1541
1542
1543
1544
1545
1546
1547
1548
1549
1550
1551
1552
1553
1554
1555
1556
1557
1558
1559
1560
1561
1562
1563
1564
1565
1566
1567
1568
class TriggerType(Enum):
    """Represents trigger object IDs."""

    BACKGROUND = BG = 29
    GROUND = G = 30
    LINE = L = 104
    OBJECT = OBJ = 105
    COLOR_1 = C1 = 221
    COLOR_2 = C2 = 717
    COLOR_3 = C3 = 718
    COLOR_4 = C4 = 743
    LINE_3D = L3D = 744
    COLOR = 899
    SECONDARY_GROUND = GROUND_2 = G2 = 900
    MOVE = 901
    # LINE_2 = L2 = 915
    PULSE = 1006
    ALPHA = 1007
    TOGGLE = 1049
    SPAWN = 1268
    ROTATE = 1346
    FOLLOW = 1347
    SHAKE = 1520
    ANIMATE = 1585
    TOUCH = 1595
    COUNT = 1611
    STOP = 1616
    INSTANT_COUNT = 1811
    ON_DEATH = 1812
    FOLLOW_PLAYER_Y = 1814
    COLLISION = 1815
    PICKUP = 1817

    @property
    def id(self) -> int:
        return self.value

Speed

Bases: Enum

Represents speed modifiers.

Source code in gd/enums.py
1571
1572
1573
1574
1575
1576
1577
1578
1579
1580
class Speed(Enum):
    """Represents speed modifiers."""

    NORMAL = 0
    SLOW = 1
    FAST = 2
    FASTER = 3
    FASTEST = 4

    DEFAULT = NORMAL

SpeedConstant

Bases: float, Enum

Represents actuall speed modifiers.

Source code in gd/enums.py
1583
1584
1585
1586
1587
1588
1589
1590
1591
class SpeedConstant(float, Enum):
    """Represents actuall speed modifiers."""

    NULL = 0.0
    SLOW = 0.7
    NORMAL = 0.9
    FAST = 1.1
    FASTER = 1.3
    FASTEST = 1.6

SpeedMagic

Bases: float, Enum

Represents magic speed constants.

Source code in gd/enums.py
1594
1595
1596
1597
1598
1599
1600
1601
1602
class SpeedMagic(float, Enum):
    """Represents *magic* speed constants."""

    SLOW = 251.16
    NORMAL = 311.58
    FAST = 387.42
    FASTER = 468.0
    FASTEST = 576.0
    DEFAULT = NORMAL

GuidelineColor

Bases: float, Enum

Represents guideline colors.

Source code in gd/enums.py
1605
1606
1607
1608
1609
1610
1611
1612
1613
1614
1615
1616
1617
1618
1619
class GuidelineColor(float, Enum):
    """Represents guideline colors."""

    DEFAULT = 0.0
    TRANSPARENT = 0.7
    ORANGE = 0.8
    YELLOW = 0.9
    GREEN = 1.0

    @classmethod
    def _missing_(cls, value: Any) -> GuidelineColor:
        if cls.ORANGE < value < cls.GREEN:
            return cls.ORANGE

        return cls.TRANSPARENT

InternalType

Bases: Enum

Represents internal types.

Source code in gd/enums.py
1622
1623
1624
1625
1626
1627
1628
1629
class InternalType(Enum):
    """Represents internal types."""

    LEVEL = 4
    SONG = 6
    QUEST = 7
    REWARD_ITEM = 8
    REWARD = 9

Filter

Bases: Enum

Represents filter types.

Source code in gd/enums.py
1632
1633
1634
1635
1636
1637
1638
1639
1640
1641
1642
1643
1644
1645
1646
1647
1648
1649
1650
1651
1652
1653
1654
1655
class Filter(Enum):
    """Represents filter types."""

    NONE = 0
    DETAIL = 1
    STATIC = 2
    CUSTOM = 3

    DEFAULT = NONE

    def is_none(self) -> bool:
        return self is type(self).NONE

    def is_detail(self) -> bool:
        return self is type(self).DETAIL

    def is_static(self) -> bool:
        return self is type(self).STATIC

    def is_custom(self) -> bool:
        return self is type(self).CUSTOM

    def is_default(self) -> bool:
        return self is type(self).DEFAULT

ByteOrder

Bases: Enum

Represents byte orders (used in memory library).

Source code in gd/enums.py
1658
1659
1660
1661
1662
1663
1664
1665
1666
1667
1668
1669
1670
1671
1672
1673
1674
1675
1676
1677
class ByteOrder(Enum):
    """Represents byte orders (used in memory library)."""

    NATIVE = "="
    LITTLE = "<"
    BIG = ">"

    DEFAULT = NATIVE

    def is_native(self) -> bool:
        return self is type(self).NATIVE

    def is_little(self) -> bool:
        return self is type(self).LITTLE

    def is_big(self) -> bool:
        return self is type(self).BIG

    def is_default(self) -> bool:
        return self is type(self).DEFAULT

Platform

Bases: Enum

Represents system platforms.

Source code in gd/enums.py
1680
1681
1682
1683
1684
1685
1686
1687
1688
1689
1690
1691
1692
1693
1694
1695
1696
1697
1698
1699
1700
1701
1702
1703
1704
1705
class Platform(Enum):
    """Represents system platforms."""

    UNKNOWN = 0

    ANDROID = 1
    DARWIN = 2
    LINUX = 3
    WINDOWS = 4

    DEFAULT = UNKNOWN

    def is_unknown(self) -> bool:
        return self is type(self).UNKNOWN

    def is_android(self) -> bool:
        return self is type(self).ANDROID

    def is_darwin(self) -> bool:
        return self is type(self).DARWIN

    def is_linux(self) -> bool:
        return self is type(self).LINUX

    def is_windows(self) -> bool:
        return self is type(self).WINDOWS

Orientation

Bases: Enum

Represents orientations.

Source code in gd/enums.py
1708
1709
1710
1711
1712
1713
1714
1715
1716
1717
1718
1719
1720
class Orientation(Enum):
    """Represents orientations."""

    HORIZONTAL = 0
    VERTICAL = 1

    DEFAULT = HORIZONTAL

    def is_horizontal(self) -> bool:
        return self is type(self).HORIZONTAL

    def is_vertical(self) -> bool:
        return self is type(self).VERTICAL

ResponseType

Bases: Enum

Represents response types.

Source code in gd/enums.py
1723
1724
1725
1726
1727
1728
1729
1730
class ResponseType(Enum):
    """Represents response types."""

    BYTES = 0
    TEXT = 1
    JSON = 2

    DEFAULT = TEXT

CollectedCoins

Bases: Flag

Represents collected coins.

Source code in gd/enums.py
1733
1734
1735
1736
1737
1738
1739
1740
1741
1742
1743
1744
1745
1746
1747
1748
1749
1750
1751
1752
1753
1754
1755
1756
class CollectedCoins(Flag):
    """Represents collected coins."""

    NONE = 0

    FIRST = 1
    SECOND = 2
    THIRD = 4

    ALL = FIRST | SECOND | THIRD

    DEFAULT = NONE

    def first(self) -> bool:
        return type(self).FIRST in self

    def second(self) -> bool:
        return type(self).SECOND in self

    def third(self) -> bool:
        return type(self).THIRD in self

    def all(self) -> bool:
        return type(self).ALL in self

Quality

Bases: Enum

Represents quality settings.

Source code in gd/enums.py
1759
1760
1761
1762
1763
1764
1765
1766
1767
class Quality(Enum):
    """Represents quality settings."""

    AUTO = 0
    LOW = 1
    MEDIUM = 2
    HIGH = 3

    DEFAULT = AUTO

Permissions

Bases: Flag

Represents permissions.

Source code in gd/enums.py
1770
1771
1772
1773
1774
1775
1776
1777
1778
1779
1780
1781
class Permissions(Flag):
    """Represents permissions."""

    NONE = 0

    EXECUTE = 1
    WRITE = 2
    READ = 4

    ALL = EXECUTE | WRITE | READ

    DEFAULT = ALL