bwapi-sys 0.1.2

FFI bindings to the bwapi-c library
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
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
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
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
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
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
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
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
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
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
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
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
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
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
1045
1046
1047
1048
1049
1050
1051
1052
1053
1054
1055
1056
1057
1058
1059
1060
1061
1062
1063
1064
1065
1066
1067
1068
1069
1070
1071
1072
1073
1074
1075
1076
1077
1078
1079
1080
1081
1082
1083
1084
1085
1086
1087
1088
1089
1090
1091
1092
1093
1094
1095
1096
1097
1098
1099
1100
1101
1102
1103
1104
1105
1106
1107
1108
1109
1110
1111
1112
1113
1114
1115
1116
1117
1118
1119
1120
1121
1122
1123
1124
1125
1126
1127
1128
1129
1130
1131
1132
1133
1134
1135
1136
1137
1138
1139
1140
#include <Unit.h>

#include "IteratorImpl.hpp"
#include "Interface.hpp"

int Unit_getID(Unit* self) {
    return reinterpret_cast<BWAPI::Unit>(self)->getID();
}

bool Unit_exists(Unit* self) {
    return reinterpret_cast<BWAPI::Unit>(self)->exists();
}

int Unit_getReplayID(Unit* self) {
    return reinterpret_cast<BWAPI::Unit>(self)->getReplayID();
}

Player* Unit_getPlayer(Unit* self) {
    return reinterpret_cast<Player*>( reinterpret_cast<BWAPI::Unit>(self)->getPlayer() );
}

UnitType Unit_getType(Unit* self) {
    return cast_from_bw( reinterpret_cast<BWAPI::Unit>(self)->getType() );
}

Position Unit_getPosition(Unit* self) {
    return cast_from_bw( reinterpret_cast<BWAPI::Unit>(self)->getPosition() );
}

TilePosition Unit_getTilePosition(Unit* self) {
    return cast_from_bw( reinterpret_cast<BWAPI::Unit>(self)->getTilePosition() );
}

double Unit_getAngle(Unit* self) {
    return reinterpret_cast<BWAPI::Unit>(self)->getAngle();
}

double Unit_getVelocityX(Unit* self) {
    return reinterpret_cast<BWAPI::Unit>(self)->getVelocityX();
}

double Unit_getVelocityY(Unit* self) {
    return reinterpret_cast<BWAPI::Unit>(self)->getVelocityY();
}

Region* Unit_getRegion(Unit* self) {
    return reinterpret_cast<Region*>( reinterpret_cast<BWAPI::Unit>(self)->getRegion() );
}

int Unit_getLeft(Unit* self) {
    return reinterpret_cast<BWAPI::Unit>(self)->getLeft();
}

int Unit_getTop(Unit* self) {
    return reinterpret_cast<BWAPI::Unit>(self)->getTop();
}

int Unit_getRight(Unit* self) {
    return reinterpret_cast<BWAPI::Unit>(self)->getRight();
}

int Unit_getBottom(Unit* self) {
    return reinterpret_cast<BWAPI::Unit>(self)->getBottom();
}

int Unit_getHitPoints(Unit* self) {
    return reinterpret_cast<BWAPI::Unit>(self)->getHitPoints();
}

int Unit_getShields(Unit* self) {
    return reinterpret_cast<BWAPI::Unit>(self)->getShields();
}

int Unit_getEnergy(Unit* self) {
    return reinterpret_cast<BWAPI::Unit>(self)->getEnergy();
}

int Unit_getResources(Unit* self) {
    return reinterpret_cast<BWAPI::Unit>(self)->getResources();
}

int Unit_getResourceGroup(Unit* self) {
    return reinterpret_cast<BWAPI::Unit>(self)->getResourceGroup();
}

int Unit_getDistance_Position(Unit* self, Position target) {
    // call overloaded getDistance(BWAPI::Position)
    return reinterpret_cast<BWAPI::Unit>(self)->getDistance(cast_to_bw(target));
}

int Unit_getDistance_Unit(Unit* self, Unit* target) {
    return reinterpret_cast<BWAPI::Unit>(self)->getDistance(reinterpret_cast<BWAPI::Unit>(target));
}

bool Unit_hasPath_Position(Unit* self, Position target) {
    return reinterpret_cast<BWAPI::Unit>(self)->hasPath(cast_to_bw(target));
}

bool Unit_hasPath_Unit(Unit* self, Unit* target) {
    return reinterpret_cast<BWAPI::Unit>(self)->hasPath(reinterpret_cast<BWAPI::Unit>(target));
}

int Unit_getLastCommandFrame(Unit* self) {
    return reinterpret_cast<BWAPI::Unit>(self)->getLastCommandFrame();
}

UnitCommand Unit_getLastCommand(Unit* self) {
    return cast_from_bw( reinterpret_cast<BWAPI::Unit>(self)->getLastCommand() );
}

Player* Unit_getLastAttackingPlayer(Unit* self) {
    return reinterpret_cast<Player*>( reinterpret_cast<BWAPI::Unit>(self)->getLastAttackingPlayer() );
}

UnitType Unit_getInitialType(Unit* self) {
    return cast_from_bw( reinterpret_cast<BWAPI::Unit>(self)->getInitialType() );
}

Position Unit_getInitialPosition(Unit* self) {
    return cast_from_bw( reinterpret_cast<BWAPI::Unit>(self)->getInitialPosition() );
}

TilePosition Unit_getInitialTilePosition(Unit* self) {
    return cast_from_bw( reinterpret_cast<BWAPI::Unit>(self)->getInitialTilePosition() );
}

int Unit_getInitialHitPoints(Unit* self) {
    return reinterpret_cast<BWAPI::Unit>(self)->getInitialHitPoints();
}

int Unit_getInitialResources(Unit* self) {
    return reinterpret_cast<BWAPI::Unit>(self)->getInitialResources();
}

int Unit_getKillCount(Unit* self) {
    return reinterpret_cast<BWAPI::Unit>(self)->getKillCount();
}

int Unit_getAcidSporeCount(Unit* self) {
    return reinterpret_cast<BWAPI::Unit>(self)->getAcidSporeCount();
}

int Unit_getInterceptorCount(Unit* self) {
    return reinterpret_cast<BWAPI::Unit>(self)->getInterceptorCount();
}

int Unit_getScarabCount(Unit* self) {
    return reinterpret_cast<BWAPI::Unit>(self)->getScarabCount();
}

int Unit_getSpiderMineCount(Unit* self) {
    return reinterpret_cast<BWAPI::Unit>(self)->getSpiderMineCount();
}

int Unit_getGroundWeaponCooldown(Unit* self) {
    return reinterpret_cast<BWAPI::Unit>(self)->getGroundWeaponCooldown();
}

int Unit_getAirWeaponCooldown(Unit* self) {
    return reinterpret_cast<BWAPI::Unit>(self)->getAirWeaponCooldown();
}

int Unit_getSpellCooldown(Unit* self) {
    return reinterpret_cast<BWAPI::Unit>(self)->getSpellCooldown();
}

int Unit_getDefenseMatrixPoints(Unit* self) {
    return reinterpret_cast<BWAPI::Unit>(self)->getDefenseMatrixPoints();
}

int Unit_getDefenseMatrixTimer(Unit* self) {
    return reinterpret_cast<BWAPI::Unit>(self)->getDefenseMatrixTimer();
}

int Unit_getEnsnareTimer(Unit* self) {
    return reinterpret_cast<BWAPI::Unit>(self)->getEnsnareTimer();
}

int Unit_getIrradiateTimer(Unit* self) {
    return reinterpret_cast<BWAPI::Unit>(self)->getIrradiateTimer();
}

int Unit_getLockdownTimer(Unit* self) {
    return reinterpret_cast<BWAPI::Unit>(self)->getLockdownTimer();
}

int Unit_getMaelstromTimer(Unit* self) {
    return reinterpret_cast<BWAPI::Unit>(self)->getMaelstromTimer();
}

int Unit_getOrderTimer(Unit* self) {
    return reinterpret_cast<BWAPI::Unit>(self)->getOrderTimer();
}

int Unit_getPlagueTimer(Unit* self) {
    return reinterpret_cast<BWAPI::Unit>(self)->getPlagueTimer();
}

int Unit_getRemoveTimer(Unit* self) {
    return reinterpret_cast<BWAPI::Unit>(self)->getRemoveTimer();
}

int Unit_getStasisTimer(Unit* self) {
    return reinterpret_cast<BWAPI::Unit>(self)->getStasisTimer();
}

int Unit_getStimTimer(Unit* self) {
    return reinterpret_cast<BWAPI::Unit>(self)->getStimTimer();
}

UnitType Unit_getBuildType(Unit* self) {
    return cast_from_bw( reinterpret_cast<BWAPI::Unit>(self)->getBuildType() );
}

UnitTypeIterator* Unit_getTrainingQueue(Unit* self) {
    auto&& uts = reinterpret_cast<BWAPI::Unit>(self)->getTrainingQueue();
    return into_value_iter<UnitTypeIterator>(std::move(uts));
}

TechType Unit_getTech(Unit* self) {
    return cast_from_bw( reinterpret_cast<BWAPI::Unit>(self)->getTech() );
}

UpgradeType Unit_getUpgrade(Unit* self) {
    return cast_from_bw( reinterpret_cast<BWAPI::Unit>(self)->getUpgrade() );
}

int Unit_getRemainingBuildTime(Unit* self) {
    return reinterpret_cast<BWAPI::Unit>(self)->getRemainingBuildTime();
}

int Unit_getRemainingTrainTime(Unit* self) {
    return reinterpret_cast<BWAPI::Unit>(self)->getRemainingTrainTime();
}

int Unit_getRemainingResearchTime(Unit* self) {
    return reinterpret_cast<BWAPI::Unit>(self)->getRemainingResearchTime();
}

int Unit_getRemainingUpgradeTime(Unit* self) {
    return reinterpret_cast<BWAPI::Unit>(self)->getRemainingUpgradeTime();
}

Unit* Unit_getBuildUnit(Unit* self) {
    return reinterpret_cast<Unit*>( reinterpret_cast<BWAPI::Unit>(self)->getBuildUnit() );
}

Unit* Unit_getTarget(Unit* self) {
    return reinterpret_cast<Unit*>( reinterpret_cast<BWAPI::Unit>(self)->getTarget() );
}

Position Unit_getTargetPosition(Unit* self) {
    return cast_from_bw( reinterpret_cast<BWAPI::Unit>(self)->getTargetPosition() );
}

Order Unit_getOrder(Unit* self) {
    return cast_from_bw( reinterpret_cast<BWAPI::Unit>(self)->getOrder() );
}

Order Unit_getSecondaryOrder(Unit* self) {
    return cast_from_bw( reinterpret_cast<BWAPI::Unit>(self)->getSecondaryOrder() );
}

Unit* Unit_getOrderTarget(Unit* self) {
    return reinterpret_cast<Unit*>( reinterpret_cast<BWAPI::Unit>(self)->getOrderTarget() );
}

Position Unit_getOrderTargetPosition(Unit* self) {
    return cast_from_bw( reinterpret_cast<BWAPI::Unit>(self)->getOrderTargetPosition() );
}

Position Unit_getRallyPosition(Unit* self) {
    return cast_from_bw( reinterpret_cast<BWAPI::Unit>(self)->getRallyPosition() );
}

Unit* Unit_getRallyUnit(Unit* self) {
    return reinterpret_cast<Unit*>( reinterpret_cast<BWAPI::Unit>(self)->getRallyUnit() );
}

Unit* Unit_getAddon(Unit* self) {
    return reinterpret_cast<Unit*>( reinterpret_cast<BWAPI::Unit>(self)->getAddon() );
}

Unit* Unit_getNydusExit(Unit* self) {
    return reinterpret_cast<Unit*>( reinterpret_cast<BWAPI::Unit>(self)->getNydusExit() );
}

Unit* Unit_getPowerUp(Unit* self) {
    return reinterpret_cast<Unit*>( reinterpret_cast<BWAPI::Unit>(self)->getPowerUp() );
}

Unit* Unit_getTransport(Unit* self) {
    return reinterpret_cast<Unit*>( reinterpret_cast<BWAPI::Unit>(self)->getTransport() );
}

UnitIterator* Unit_getLoadedUnits(Unit* self) {
    auto&& units = reinterpret_cast<BWAPI::Unit>(self)->getLoadedUnits();
    return into_iter<UnitIterator>(std::move(units));
}

int Unit_getSpaceRemaining(Unit* self) {
    return reinterpret_cast<BWAPI::Unit>(self)->getSpaceRemaining();
}

Unit* Unit_getCarrier(Unit* self) {
    return reinterpret_cast<Unit*>( reinterpret_cast<BWAPI::Unit>(self)->getCarrier() );
}

UnitIterator* Unit_getInterceptors(Unit* self) {
    auto&& interceptors = reinterpret_cast<BWAPI::Unit>(self)->getInterceptors();
    return into_iter<UnitIterator>(std::move(interceptors));
}

Unit* Unit_getHatchery(Unit* self) {
    return reinterpret_cast<Unit*>( reinterpret_cast<BWAPI::Unit>(self)->getHatchery() );
}

UnitIterator* Unit_getLarva(Unit* self) {
    auto&& larva = reinterpret_cast<BWAPI::Unit>(self)->getLarva();
    return into_iter<UnitIterator>(std::move(larva));
}

UnitIterator* Unit_getUnitsInRadius(Unit* self, int radius, UnaryUnitFilter pred) {
    auto pred_filter = reinterpret_cast<bool (*)(BWAPI::Unit)>(pred);
    auto&& units = reinterpret_cast<BWAPI::Unit>(self)->getUnitsInRadius(radius, pred_filter);
    return into_iter<UnitIterator>(std::move(units));
}

UnitIterator* Unit_getUnitsInWeaponRange(Unit* self, WeaponType weapon, UnaryUnitFilter pred) {
    auto pred_filter = reinterpret_cast<bool (*)(BWAPI::Unit)>(pred);
    auto&& units = reinterpret_cast<BWAPI::Unit>(self)->getUnitsInWeaponRange(cast_to_bw(weapon), pred_filter);
    return into_iter<UnitIterator>(std::move(units));
}

Unit* Unit_getClosestUnit(Unit* self, UnaryUnitFilter pred, int radius) {
    auto pred_filter = reinterpret_cast<bool (*)(BWAPI::Unit)>(pred);
    auto unit = reinterpret_cast<BWAPI::Unit>(self)->getClosestUnit(pred_filter, radius);
    return reinterpret_cast<Unit*>(unit);
}

bool Unit_hasNuke(Unit* self) {
    return reinterpret_cast<BWAPI::Unit>(self)->hasNuke();
}

bool Unit_isAccelerating(Unit* self) {
    return reinterpret_cast<BWAPI::Unit>(self)->isAccelerating();
}

bool Unit_isAttacking(Unit* self) {
    return reinterpret_cast<BWAPI::Unit>(self)->isAttacking();
}

bool Unit_isAttackFrame(Unit* self) {
    return reinterpret_cast<BWAPI::Unit>(self)->isAttackFrame();
}

bool Unit_isBeingConstructed(Unit* self) {
    return reinterpret_cast<BWAPI::Unit>(self)->isBeingConstructed();
}

bool Unit_isBeingGathered(Unit* self) {
    return reinterpret_cast<BWAPI::Unit>(self)->isBeingGathered();
}

bool Unit_isBeingHealed(Unit* self) {
    return reinterpret_cast<BWAPI::Unit>(self)->isBeingHealed();
}

bool Unit_isBlind(Unit* self) {
    return reinterpret_cast<BWAPI::Unit>(self)->isBlind();
}

bool Unit_isBraking(Unit* self) {
    return reinterpret_cast<BWAPI::Unit>(self)->isBraking();
}

bool Unit_isBurrowed(Unit* self) {
    return reinterpret_cast<BWAPI::Unit>(self)->isBurrowed();
}

bool Unit_isCarryingGas(Unit* self) {
    return reinterpret_cast<BWAPI::Unit>(self)->isCarryingGas();
}

bool Unit_isCarryingMinerals(Unit* self) {
    return reinterpret_cast<BWAPI::Unit>(self)->isCarryingMinerals();
}

bool Unit_isCloaked(Unit* self) {
    return reinterpret_cast<BWAPI::Unit>(self)->isCloaked();
}

bool Unit_isCompleted(Unit* self) {
    return reinterpret_cast<BWAPI::Unit>(self)->isCompleted();
}

bool Unit_isConstructing(Unit* self) {
    return reinterpret_cast<BWAPI::Unit>(self)->isConstructing();
}

bool Unit_isDefenseMatrixed(Unit* self) {
    return reinterpret_cast<BWAPI::Unit>(self)->isDefenseMatrixed();
}

bool Unit_isDetected(Unit* self) {
    return reinterpret_cast<BWAPI::Unit>(self)->isDetected();
}

bool Unit_isEnsnared(Unit* self) {
    return reinterpret_cast<BWAPI::Unit>(self)->isEnsnared();
}

bool Unit_isFlying(Unit* self) {
    return reinterpret_cast<BWAPI::Unit>(self)->isFlying();
}

bool Unit_isFollowing(Unit* self) {
    return reinterpret_cast<BWAPI::Unit>(self)->isFollowing();
}

bool Unit_isGatheringGas(Unit* self) {
    return reinterpret_cast<BWAPI::Unit>(self)->isGatheringGas();
}

bool Unit_isGatheringMinerals(Unit* self) {
    return reinterpret_cast<BWAPI::Unit>(self)->isGatheringMinerals();
}

bool Unit_isHallucination(Unit* self) {
    return reinterpret_cast<BWAPI::Unit>(self)->isHallucination();
}

bool Unit_isHoldingPosition(Unit* self) {
    return reinterpret_cast<BWAPI::Unit>(self)->isHoldingPosition();
}

bool Unit_isIdle(Unit* self) {
    return reinterpret_cast<BWAPI::Unit>(self)->isIdle();
}

bool Unit_isInterruptible(Unit* self) {
    return reinterpret_cast<BWAPI::Unit>(self)->isInterruptible();
}

bool Unit_isInvincible(Unit* self) {
    return reinterpret_cast<BWAPI::Unit>(self)->isInvincible();
}

bool Unit_isInWeaponRange(Unit* self, Unit* target) {
    return reinterpret_cast<BWAPI::Unit>(self)->isInWeaponRange(reinterpret_cast<BWAPI::Unit>(target));
}

bool Unit_isIrradiated(Unit* self) {
    return reinterpret_cast<BWAPI::Unit>(self)->isIrradiated();
}

bool Unit_isLifted(Unit* self) {
    return reinterpret_cast<BWAPI::Unit>(self)->isLifted();
}

bool Unit_isLoaded(Unit* self) {
    return reinterpret_cast<BWAPI::Unit>(self)->isLoaded();
}

bool Unit_isLockedDown(Unit* self) {
    return reinterpret_cast<BWAPI::Unit>(self)->isLockedDown();
}

bool Unit_isMaelstrommed(Unit* self) {
    return reinterpret_cast<BWAPI::Unit>(self)->isMaelstrommed();
}

bool Unit_isMorphing(Unit* self) {
    return reinterpret_cast<BWAPI::Unit>(self)->isMorphing();
}

bool Unit_isMoving(Unit* self) {
    return reinterpret_cast<BWAPI::Unit>(self)->isMoving();
}

bool Unit_isParasited(Unit* self) {
    return reinterpret_cast<BWAPI::Unit>(self)->isParasited();
}

bool Unit_isPatrolling(Unit* self) {
    return reinterpret_cast<BWAPI::Unit>(self)->isPatrolling();
}

bool Unit_isPlagued(Unit* self) {
    return reinterpret_cast<BWAPI::Unit>(self)->isPlagued();
}

bool Unit_isRepairing(Unit* self) {
    return reinterpret_cast<BWAPI::Unit>(self)->isRepairing();
}

bool Unit_isResearching(Unit* self) {
    return reinterpret_cast<BWAPI::Unit>(self)->isResearching();
}

bool Unit_isSelected(Unit* self) {
    return reinterpret_cast<BWAPI::Unit>(self)->isSelected();
}

bool Unit_isSieged(Unit* self) {
    return reinterpret_cast<BWAPI::Unit>(self)->isSieged();
}

bool Unit_isStartingAttack(Unit* self) {
    return reinterpret_cast<BWAPI::Unit>(self)->isStartingAttack();
}

bool Unit_isStasised(Unit* self) {
    return reinterpret_cast<BWAPI::Unit>(self)->isStasised();
}

bool Unit_isStimmed(Unit* self) {
    return reinterpret_cast<BWAPI::Unit>(self)->isStimmed();
}

bool Unit_isStuck(Unit* self) {
    return reinterpret_cast<BWAPI::Unit>(self)->isStuck();
}

bool Unit_isTraining(Unit* self) {
    return reinterpret_cast<BWAPI::Unit>(self)->isTraining();
}

bool Unit_isUnderAttack(Unit* self) {
    return reinterpret_cast<BWAPI::Unit>(self)->isUnderAttack();
}

bool Unit_isUnderDarkSwarm(Unit* self) {
    return reinterpret_cast<BWAPI::Unit>(self)->isUnderDarkSwarm();
}

bool Unit_isUnderDisruptionWeb(Unit* self) {
    return reinterpret_cast<BWAPI::Unit>(self)->isUnderDisruptionWeb();
}

bool Unit_isUnderStorm(Unit* self) {
    return reinterpret_cast<BWAPI::Unit>(self)->isUnderStorm();
}

bool Unit_isPowered(Unit* self) {
    return reinterpret_cast<BWAPI::Unit>(self)->isPowered();
}

bool Unit_isUpgrading(Unit* self) {
    return reinterpret_cast<BWAPI::Unit>(self)->isUpgrading();
}

bool Unit_isVisible(Unit* self, Player* player) {
    return reinterpret_cast<BWAPI::Unit>(self)->isVisible(reinterpret_cast<BWAPI::Player>(player));
}

bool Unit_isTargetable(Unit* self) {
    return reinterpret_cast<BWAPI::Unit>(self)->isTargetable();
}

bool Unit_issueCommand(Unit* self, UnitCommand command) {
    return reinterpret_cast<BWAPI::Unit>(self)->issueCommand(cast_to_bw(command));
}

bool Unit_attack_Position(Unit* self, Position target, bool shiftQueueCommand) {
    return reinterpret_cast<BWAPI::Unit>(self)->attack(cast_to_bw(target), shiftQueueCommand);
}

bool Unit_attack_Unit(Unit* self, Unit* target, bool shiftQueueCommand) {
    return reinterpret_cast<BWAPI::Unit>(self)->attack(reinterpret_cast<BWAPI::Unit>(target), shiftQueueCommand);
}

bool Unit_build(Unit* self, UnitType type, TilePosition target) {
    return reinterpret_cast<BWAPI::Unit>(self)->build(cast_to_bw(type), cast_to_bw(target));
}

bool Unit_buildAddon(Unit* self, UnitType type) {
    return reinterpret_cast<BWAPI::Unit>(self)->buildAddon(cast_to_bw(type));
}

bool Unit_train(Unit* self, UnitType type) {
    return reinterpret_cast<BWAPI::Unit>(self)->train(cast_to_bw(type));
}

bool Unit_morph(Unit* self, UnitType type) {
    return reinterpret_cast<BWAPI::Unit>(self)->morph(cast_to_bw(type));
}

bool Unit_research(Unit* self, TechType tech) {
    return reinterpret_cast<BWAPI::Unit>(self)->research(cast_to_bw(tech));
}

bool Unit_upgrade(Unit* self, UpgradeType upgrade) {
    return reinterpret_cast<BWAPI::Unit>(self)->upgrade(cast_to_bw(upgrade));
}

bool Unit_setRallyPoint_Position(Unit* self, Position target) {
    return reinterpret_cast<BWAPI::Unit>(self)->setRallyPoint(cast_to_bw(target));
}

bool Unit_setRallyPoint_Target(Unit* self, Unit* target) {
    return reinterpret_cast<BWAPI::Unit>(self)->setRallyPoint(reinterpret_cast<BWAPI::Unit>(target));
}

bool Unit_move(Unit* self, Position target, bool shiftQueueCommand) {
    return reinterpret_cast<BWAPI::Unit>(self)->move(cast_to_bw(target), shiftQueueCommand);
}

bool Unit_patrol(Unit* self, Position target, bool shiftQueueCommand) {
    return reinterpret_cast<BWAPI::Unit>(self)->patrol(cast_to_bw(target), shiftQueueCommand);
}

bool Unit_holdPosition(Unit* self, bool shiftQueueCommand) {
    return reinterpret_cast<BWAPI::Unit>(self)->holdPosition(shiftQueueCommand);
}

bool Unit_stop(Unit* self, bool shiftQueueCommand) {
    return reinterpret_cast<BWAPI::Unit>(self)->stop(shiftQueueCommand);
}

bool Unit_follow(Unit* self, Unit* target, bool shiftQueueCommand) {
    return reinterpret_cast<BWAPI::Unit>(self)->follow(reinterpret_cast<BWAPI::Unit>(target), shiftQueueCommand);
}

bool Unit_gather(Unit* self, Unit* target, bool shiftQueueCommand) {
    return reinterpret_cast<BWAPI::Unit>(self)->gather(reinterpret_cast<BWAPI::Unit>(target), shiftQueueCommand);
}

bool Unit_returnCargo(Unit* self, bool shiftQueueCommand) {
    return reinterpret_cast<BWAPI::Unit>(self)->returnCargo(shiftQueueCommand);
}

bool Unit_repair(Unit* self, Unit* target, bool shiftQueueCommand) {
    return reinterpret_cast<BWAPI::Unit>(self)->repair(reinterpret_cast<BWAPI::Unit>(target), shiftQueueCommand);
}

bool Unit_burrow(Unit* self) {
    return reinterpret_cast<BWAPI::Unit>(self)->burrow();
}

bool Unit_unburrow(Unit* self) {
    return reinterpret_cast<BWAPI::Unit>(self)->unburrow();
}

bool Unit_cloak(Unit* self) {
    return reinterpret_cast<BWAPI::Unit>(self)->cloak();
}

bool Unit_decloak(Unit* self) {
    return reinterpret_cast<BWAPI::Unit>(self)->decloak();
}

bool Unit_siege(Unit* self) {
    return reinterpret_cast<BWAPI::Unit>(self)->siege();
}

bool Unit_unsiege(Unit* self) {
    return reinterpret_cast<BWAPI::Unit>(self)->unsiege();
}

bool Unit_lift(Unit* self) {
    return reinterpret_cast<BWAPI::Unit>(self)->lift();
}

bool Unit_land(Unit* self, TilePosition target) {
    return reinterpret_cast<BWAPI::Unit>(self)->land(cast_to_bw(target));
}

bool Unit_load(Unit* self, Unit* target, bool shiftQueueCommand) {
    return reinterpret_cast<BWAPI::Unit>(self)->load(reinterpret_cast<BWAPI::Unit>(target), shiftQueueCommand);
}

bool Unit_unload(Unit* self, Unit* target) {
    return reinterpret_cast<BWAPI::Unit>(self)->unload(reinterpret_cast<BWAPI::Unit>(target));
}

bool Unit_unloadAll(Unit* self, bool shiftQueueCommand) {
    return reinterpret_cast<BWAPI::Unit>(self)->unloadAll(shiftQueueCommand);
}

bool Unit_unloadAll_Position(Unit* self, Position target, bool shiftQueueCommand) {
    return reinterpret_cast<BWAPI::Unit>(self)->unloadAll(cast_to_bw(target), shiftQueueCommand);
}

bool Unit_rightClick_Position(Unit* self, Position target, bool shiftQueueCommand) {
    return reinterpret_cast<BWAPI::Unit>(self)->rightClick(cast_to_bw(target), shiftQueueCommand);
}

bool Unit_rightClick_Unit(Unit* self, Unit* target, bool shiftQueueCommand) {
    return reinterpret_cast<BWAPI::Unit>(self)->rightClick(reinterpret_cast<BWAPI::Unit>(target), shiftQueueCommand);
}

bool Unit_haltConstruction(Unit* self) {
    return reinterpret_cast<BWAPI::Unit>(self)->haltConstruction();
}

bool Unit_cancelConstruction(Unit* self) {
    return reinterpret_cast<BWAPI::Unit>(self)->cancelConstruction();
}

bool Unit_cancelAddon(Unit* self) {
    return reinterpret_cast<BWAPI::Unit>(self)->cancelAddon();
}

bool Unit_cancelTrain(Unit* self, int slot) {
    return reinterpret_cast<BWAPI::Unit>(self)->cancelTrain(slot);
}

bool Unit_cancelMorph(Unit* self) {
    return reinterpret_cast<BWAPI::Unit>(self)->cancelMorph();
}

bool Unit_cancelResearch(Unit* self) {
    return reinterpret_cast<BWAPI::Unit>(self)->cancelResearch();
}

bool Unit_cancelUpgrade(Unit* self) {
    return reinterpret_cast<BWAPI::Unit>(self)->cancelUpgrade();
}

bool Unit_useTech_Position(Unit* self, TechType tech, Position target) {
    return reinterpret_cast<BWAPI::Unit>(self)->useTech(cast_to_bw(tech), cast_to_bw(target));
}

bool Unit_useTech_Unit(Unit* self, TechType tech, Unit* target) {
    return reinterpret_cast<BWAPI::Unit>(self)->useTech(cast_to_bw(tech), reinterpret_cast<BWAPI::Unit>(target));
}

bool Unit_placeCOP(Unit* self, TilePosition target) {
    return reinterpret_cast<BWAPI::Unit>(self)->placeCOP(cast_to_bw(target));
}

bool Unit_canIssueCommand(Unit* self, UnitCommand command, bool checkCanUseTechPositionOnPositions, bool checkCanUseTechUnitOnUnits, bool checkCanBuildUnitType, bool checkCanTargetUnit, bool checkCanIssueCommandType, bool checkCommandibility) {
    return reinterpret_cast<BWAPI::Unit>(self)->canIssueCommand(cast_to_bw(command), checkCanUseTechPositionOnPositions, checkCanUseTechUnitOnUnits, checkCanBuildUnitType, checkCanTargetUnit, checkCanIssueCommandType, checkCommandibility);
}

bool Unit_canIssueCommandGrouped(Unit* self, UnitCommand command, bool checkCanUseTechPositionOnPositions, bool checkCanUseTechUnitOnUnits, bool checkCanTargetUnit, bool checkCanIssueCommandType, bool checkCommandibilityGrouped, bool checkCommandibility) {
    return reinterpret_cast<BWAPI::Unit>(self)->canIssueCommandGrouped(cast_to_bw(command), checkCanUseTechPositionOnPositions, checkCanUseTechUnitOnUnits, checkCanTargetUnit, checkCanIssueCommandType, checkCommandibilityGrouped, checkCommandibility);
}

bool Unit_canCommand(Unit* self) {
    return reinterpret_cast<BWAPI::Unit>(self)->canCommand();
}

bool Unit_canCommandGrouped(Unit* self, bool checkCommandibility) {
    return reinterpret_cast<BWAPI::Unit>(self)->canCommandGrouped(checkCommandibility);
}

bool Unit_canIssueCommandType(Unit* self, UnitCommandType ct, bool checkCommandibility) {
    return reinterpret_cast<BWAPI::Unit>(self)->canIssueCommandType(cast_to_bw(ct), checkCommandibility);
}

bool Unit_canIssueCommandTypeGrouped(Unit* self, UnitCommandType ct, bool checkCommandibilityGrouped, bool checkCommandibility) {
    return reinterpret_cast<BWAPI::Unit>(self)->canIssueCommandTypeGrouped(cast_to_bw(ct), checkCommandibilityGrouped, checkCommandibility);
}

bool Unit_canTargetUnit(Unit* self, Unit* targetUnit, bool checkCommandibility) {
    return reinterpret_cast<BWAPI::Unit>(self)->canTargetUnit(reinterpret_cast<BWAPI::Unit>(targetUnit), checkCommandibility);
}

bool Unit_canAttack(Unit* self, bool checkCommandibility) {
    return reinterpret_cast<BWAPI::Unit>(self)->canAttack(checkCommandibility);
}

bool Unit_canAttack_Position(Unit* self, Position target, bool checkCanTargetUnit, bool checkCanIssueCommandType, bool checkCommandibility) {
    return reinterpret_cast<BWAPI::Unit>(self)->canAttack(cast_to_bw(target), checkCanTargetUnit, checkCanIssueCommandType, checkCommandibility);
}

bool Unit_canAttack_Unit(Unit* self, Unit* target, bool checkCanTargetUnit, bool checkCanIssueCommandType, bool checkCommandibility) {
    return reinterpret_cast<BWAPI::Unit>(self)->canAttack(reinterpret_cast<BWAPI::Unit>(target), checkCanTargetUnit, checkCanIssueCommandType, checkCommandibility);
}

bool Unit_canAttackGrouped(Unit* self, bool checkCommandibilityGrouped, bool checkCommandibility) {
    return reinterpret_cast<BWAPI::Unit>(self)->canAttackGrouped(checkCommandibilityGrouped, checkCommandibility);
}

bool Unit_canAttackGrouped_Position(Unit* self, Position target, bool checkCanTargetUnit, bool checkCanIssueCommandType, bool checkCommandibilityGrouped, bool checkCommandibility) {
    return reinterpret_cast<BWAPI::Unit>(self)->canAttackGrouped(cast_to_bw(target), checkCanTargetUnit, checkCanIssueCommandType, checkCommandibilityGrouped, checkCommandibility);
}

bool Unit_canAttackGrouped_Unit(Unit* self, Unit* target, bool checkCanTargetUnit, bool checkCanIssueCommandType, bool checkCommandibilityGrouped, bool checkCommandibility) {
    return reinterpret_cast<BWAPI::Unit>(self)->canAttackGrouped(reinterpret_cast<BWAPI::Unit>(target), checkCanTargetUnit, checkCanIssueCommandType, checkCommandibilityGrouped, checkCommandibility);
}

bool Unit_canAttackMove(Unit* self, bool checkCommandibility) {
    return reinterpret_cast<BWAPI::Unit>(self)->canAttackMove(checkCommandibility);
}

bool Unit_canAttackMoveGrouped(Unit* self, bool checkCommandibilityGrouped, bool checkCommandibility) {
    return reinterpret_cast<BWAPI::Unit>(self)->canAttackMoveGrouped(checkCommandibilityGrouped, checkCommandibility);
}

bool Unit_canAttackUnit(Unit* self, bool checkCommandibility) {
    return reinterpret_cast<BWAPI::Unit>(self)->canAttackUnit(checkCommandibility);
}

bool Unit_canAttackUnit_Unit(Unit* self, Unit* targetUnit, bool checkCanTargetUnit, bool checkCanIssueCommandType, bool checkCommandibility) {
    return reinterpret_cast<BWAPI::Unit>(self)->canAttackUnit(reinterpret_cast<BWAPI::Unit>(targetUnit), checkCanTargetUnit, checkCanIssueCommandType, checkCommandibility);
}

bool Unit_canAttackUnitGrouped(Unit* self, bool checkCommandibilityGrouped, bool checkCommandibility) {
    return reinterpret_cast<BWAPI::Unit>(self)->canAttackUnitGrouped(checkCommandibilityGrouped, checkCommandibility);
}

bool Unit_canAttackUnitGrouped_Unit(Unit* self, Unit* targetUnit, bool checkCanTargetUnit, bool checkCanIssueCommandType, bool checkCommandibilityGrouped, bool checkCommandibility) {
    return reinterpret_cast<BWAPI::Unit>(self)->canAttackUnitGrouped(reinterpret_cast<BWAPI::Unit>(targetUnit), checkCanTargetUnit, checkCanIssueCommandType, checkCommandibilityGrouped, checkCommandibility);
}

bool Unit_canBuild(Unit* self, bool checkCommandibility) {
    return reinterpret_cast<BWAPI::Unit>(self)->canBuild(checkCommandibility);
}

bool Unit_canBuild_UnitType(Unit* self, UnitType uType, bool checkCanIssueCommandType, bool checkCommandibility) {
    return reinterpret_cast<BWAPI::Unit>(self)->canBuild(cast_to_bw(uType), checkCanIssueCommandType, checkCommandibility);
}

bool Unit_canBuild_UnitType_TilePosition(Unit* self, UnitType uType, TilePosition tilePos, bool checkTargetUnitType, bool checkCanIssueCommandType, bool checkCommandibility) {
    return reinterpret_cast<BWAPI::Unit>(self)->canBuild(cast_to_bw(uType), cast_to_bw(tilePos), checkTargetUnitType, checkCanIssueCommandType, checkCommandibility);
}

bool Unit_canBuildAddon(Unit* self, bool checkCommandibility) {
    return reinterpret_cast<BWAPI::Unit>(self)->canBuildAddon(checkCommandibility);
}

bool Unit_canBuildAddon_UnitType(Unit* self, UnitType uType, bool checkCanIssueCommandType, bool checkCommandibility) {
    return reinterpret_cast<BWAPI::Unit>(self)->canBuildAddon(cast_to_bw(uType), checkCanIssueCommandType, checkCommandibility);
}

bool Unit_canTrain(Unit* self, bool checkCommandibility) {
    return reinterpret_cast<BWAPI::Unit>(self)->canTrain(checkCommandibility);
}

bool Unit_canTrain_UnitType(Unit* self, UnitType uType, bool checkCanIssueCommandType, bool checkCommandibility) {
    return reinterpret_cast<BWAPI::Unit>(self)->canTrain(cast_to_bw(uType), checkCanIssueCommandType, checkCommandibility);
}

bool Unit_canMorph(Unit* self, bool checkCommandibility) {
    return reinterpret_cast<BWAPI::Unit>(self)->canMorph(checkCommandibility);
}

bool Unit_canMorph_UnitType(Unit* self, UnitType uType, bool checkCanIssueCommandType, bool checkCommandibility) {
    return reinterpret_cast<BWAPI::Unit>(self)->canMorph(cast_to_bw(uType), checkCanIssueCommandType, checkCommandibility);
}

bool Unit_canResearch(Unit* self, bool checkCommandibility) {
    return reinterpret_cast<BWAPI::Unit>(self)->canResearch(checkCommandibility);
}

bool Unit_canResearch_TechType(Unit* self, TechType type, bool checkCanIssueCommandType) {
    return reinterpret_cast<BWAPI::Unit>(self)->canResearch(cast_to_bw(type), checkCanIssueCommandType);
}

bool Unit_canUpgrade(Unit* self, bool checkCommandibility) {
    return reinterpret_cast<BWAPI::Unit>(self)->canUpgrade(checkCommandibility);
}

bool Unit_canUpgrade_UpgradeType(Unit* self, UpgradeType type, bool checkCanIssueCommandType) {
    return reinterpret_cast<BWAPI::Unit>(self)->canUpgrade(cast_to_bw(type), checkCanIssueCommandType);
}

bool Unit_canSetRallyPoint(Unit* self, bool checkCommandibility) {
    return reinterpret_cast<BWAPI::Unit>(self)->canSetRallyPoint(checkCommandibility);
}

bool Unit_canSetRallyPoint_Position(Unit* self, Position target, bool checkCanTargetUnit, bool checkCanIssueCommandType, bool checkCommandibility) {
    return reinterpret_cast<BWAPI::Unit>(self)->canSetRallyPoint(cast_to_bw(target), checkCanTargetUnit, checkCanIssueCommandType, checkCommandibility);
}

bool Unit_canSetRallyPoint_Unit(Unit* self, Unit* target, bool checkCanTargetUnit, bool checkCanIssueCommandType, bool checkCommandibility) {
    return reinterpret_cast<BWAPI::Unit>(self)->canSetRallyPoint(reinterpret_cast<BWAPI::Unit>(target), checkCanTargetUnit, checkCanIssueCommandType, checkCommandibility);
}

bool Unit_canSetRallyPosition(Unit* self, bool checkCommandibility) {
    return reinterpret_cast<BWAPI::Unit>(self)->canSetRallyPosition(checkCommandibility);
}

bool Unit_canSetRallyUnit(Unit* self, bool checkCommandibility) {
    return reinterpret_cast<BWAPI::Unit>(self)->canSetRallyUnit(checkCommandibility);
}

bool Unit_canSetRallyUnit_Unit(Unit* self, Unit* targetUnit, bool checkCanTargetUnit, bool checkCanIssueCommandType, bool checkCommandibility) {
    return reinterpret_cast<BWAPI::Unit>(self)->canSetRallyUnit(reinterpret_cast<BWAPI::Unit>(targetUnit), checkCanTargetUnit, checkCanIssueCommandType, checkCommandibility);
}

bool Unit_canMove(Unit* self, bool checkCommandibility) {
    return reinterpret_cast<BWAPI::Unit>(self)->canMove(checkCommandibility);
}

bool Unit_canMoveGrouped(Unit* self, bool checkCommandibilityGrouped, bool checkCommandibility) {
    return reinterpret_cast<BWAPI::Unit>(self)->canMoveGrouped(checkCommandibilityGrouped, checkCommandibility);
}

bool Unit_canPatrol(Unit* self, bool checkCommandibility) {
    return reinterpret_cast<BWAPI::Unit>(self)->canPatrol(checkCommandibility);
}

bool Unit_canPatrolGrouped(Unit* self, bool checkCommandibilityGrouped, bool checkCommandibility) {
    return reinterpret_cast<BWAPI::Unit>(self)->canPatrolGrouped(checkCommandibilityGrouped, checkCommandibility);
}

bool Unit_canFollow(Unit* self, bool checkCommandibility) {
    return reinterpret_cast<BWAPI::Unit>(self)->canFollow(checkCommandibility);
}

bool Unit_canFollow_Unit(Unit* self, Unit* targetUnit, bool checkCanTargetUnit, bool checkCanIssueCommandType, bool checkCommandibility) {
    return reinterpret_cast<BWAPI::Unit>(self)->canFollow(reinterpret_cast<BWAPI::Unit>(targetUnit), checkCanTargetUnit, checkCanIssueCommandType, checkCommandibility);
}

bool Unit_canGather(Unit* self, bool checkCommandibility) {
    return reinterpret_cast<BWAPI::Unit>(self)->canGather(checkCommandibility);
}

bool Unit_canGather_Unit(Unit* self, Unit* targetUnit, bool checkCanTargetUnit, bool checkCanIssueCommandType, bool checkCommandibility) {
    return reinterpret_cast<BWAPI::Unit>(self)->canGather(reinterpret_cast<BWAPI::Unit>(targetUnit), checkCanTargetUnit, checkCanIssueCommandType, checkCommandibility);
}

bool Unit_canReturnCargo(Unit* self, bool checkCommandibility) {
    return reinterpret_cast<BWAPI::Unit>(self)->canReturnCargo(checkCommandibility);
}

bool Unit_canHoldPosition(Unit* self, bool checkCommandibility) {
    return reinterpret_cast<BWAPI::Unit>(self)->canHoldPosition(checkCommandibility);
}

bool Unit_canStop(Unit* self, bool checkCommandibility) {
    return reinterpret_cast<BWAPI::Unit>(self)->canStop(checkCommandibility);
}

bool Unit_canRepair(Unit* self, bool checkCommandibility) {
    return reinterpret_cast<BWAPI::Unit>(self)->canRepair(checkCommandibility);
}

bool Unit_canRepair_Unit(Unit* self, Unit* targetUnit, bool checkCanTargetUnit, bool checkCanIssueCommandType, bool checkCommandibility) {
    return reinterpret_cast<BWAPI::Unit>(self)->canRepair(reinterpret_cast<BWAPI::Unit>(targetUnit), checkCanTargetUnit, checkCanIssueCommandType, checkCommandibility);
}

bool Unit_canBurrow(Unit* self, bool checkCommandibility) {
    return reinterpret_cast<BWAPI::Unit>(self)->canBurrow(checkCommandibility);
}

bool Unit_canUnburrow(Unit* self, bool checkCommandibility) {
    return reinterpret_cast<BWAPI::Unit>(self)->canUnburrow(checkCommandibility);
}

bool Unit_canCloak(Unit* self, bool checkCommandibility) {
    return reinterpret_cast<BWAPI::Unit>(self)->canCloak(checkCommandibility);
}

bool Unit_canDecloak(Unit* self, bool checkCommandibility) {
    return reinterpret_cast<BWAPI::Unit>(self)->canDecloak(checkCommandibility);
}

bool Unit_canSiege(Unit* self, bool checkCommandibility) {
    return reinterpret_cast<BWAPI::Unit>(self)->canSiege(checkCommandibility);
}

bool Unit_canUnsiege(Unit* self, bool checkCommandibility) {
    return reinterpret_cast<BWAPI::Unit>(self)->canUnsiege(checkCommandibility);
}

bool Unit_canLift(Unit* self, bool checkCommandibility) {
    return reinterpret_cast<BWAPI::Unit>(self)->canLift(checkCommandibility);
}

bool Unit_canLand(Unit* self, bool checkCommandibility) {
    return reinterpret_cast<BWAPI::Unit>(self)->canLand(checkCommandibility);
}

bool Unit_canLand_TilePosition(Unit* self, TilePosition target, bool checkCanIssueCommandType, bool checkCommandibility) {
    return reinterpret_cast<BWAPI::Unit>(self)->canLand(cast_to_bw(target), checkCanIssueCommandType, checkCommandibility);
}

bool Unit_canLoad(Unit* self, bool checkCommandibility) {
    return reinterpret_cast<BWAPI::Unit>(self)->canLoad(checkCommandibility);
}

bool Unit_canLoad_Unit(Unit* self, Unit* targetUnit, bool checkCanTargetUnit, bool checkCanIssueCommandType, bool checkCommandibility) {
    return reinterpret_cast<BWAPI::Unit>(self)->canLoad(reinterpret_cast<BWAPI::Unit>(targetUnit), checkCanTargetUnit, checkCanIssueCommandType, checkCommandibility);
}

bool Unit_canUnloadWithOrWithoutTarget(Unit* self, bool checkCommandibility) {
    return reinterpret_cast<BWAPI::Unit>(self)->canUnloadWithOrWithoutTarget(checkCommandibility);
}

bool Unit_canUnloadAtPosition(Unit* self, Position targDropPos, bool checkCanIssueCommandType, bool checkCommandibility) {
    return reinterpret_cast<BWAPI::Unit>(self)->canUnloadAtPosition(cast_to_bw(targDropPos), checkCanIssueCommandType, checkCommandibility);
}

bool Unit_canUnload(Unit* self, bool checkCommandibility) {
    return reinterpret_cast<BWAPI::Unit>(self)->canUnload(checkCommandibility);
}

bool Unit_canUnload_Unit(Unit* self, Unit* targetUnit, bool checkCanTargetUnit, bool checkPosition, bool checkCanIssueCommandType, bool checkCommandibility) {
    return reinterpret_cast<BWAPI::Unit>(self)->canUnload(reinterpret_cast<BWAPI::Unit>(targetUnit), checkCanTargetUnit, checkPosition, checkCanIssueCommandType, checkCommandibility);
}

bool Unit_canUnloadAll(Unit* self, bool checkCommandibility) {
    return reinterpret_cast<BWAPI::Unit>(self)->canUnloadAll(checkCommandibility);
}

bool Unit_canUnloadAllPosition(Unit* self, bool checkCommandibility) {
    return reinterpret_cast<BWAPI::Unit>(self)->canUnloadAllPosition(checkCommandibility);
}

bool Unit_canUnloadAllPosition_Position(Unit* self, Position targDropPos, bool checkCanIssueCommandType, bool checkCommandibility) {
    return reinterpret_cast<BWAPI::Unit>(self)->canUnloadAllPosition(cast_to_bw(targDropPos), checkCanIssueCommandType, checkCommandibility);
}

bool Unit_canRightClick(Unit* self, bool checkCommandibility) {
    return reinterpret_cast<BWAPI::Unit>(self)->canRightClick(checkCommandibility);
}

bool Unit_canRightClick_Position(Unit* self, Position target, bool checkCanTargetUnit, bool checkCanIssueCommandType, bool checkCommandibility) {
    return reinterpret_cast<BWAPI::Unit>(self)->canRightClick(cast_to_bw(target), checkCanTargetUnit, checkCanIssueCommandType, checkCommandibility);
}

bool Unit_canRightClick_Unit(Unit* self, Unit* target, bool checkCanTargetUnit, bool checkCanIssueCommandType, bool checkCommandibility) {
    return reinterpret_cast<BWAPI::Unit>(self)->canRightClick(reinterpret_cast<BWAPI::Unit>(target), checkCanTargetUnit, checkCanIssueCommandType, checkCommandibility);
}

bool Unit_canRightClickGrouped(Unit* self, bool checkCommandibilityGrouped, bool checkCommandibility) {
    return reinterpret_cast<BWAPI::Unit>(self)->canRightClickGrouped(checkCommandibilityGrouped, checkCommandibility);
}

bool Unit_canRightClickGrouped_Position(Unit* self, Position target, bool checkCanTargetUnit, bool checkCanIssueCommandType, bool checkCommandibilityGrouped, bool checkCommandibility) {
    return reinterpret_cast<BWAPI::Unit>(self)->canRightClickGrouped(cast_to_bw(target), checkCanTargetUnit, checkCanIssueCommandType, checkCommandibilityGrouped, checkCommandibility);
}

bool Unit_canRightClickGrouped_Unit(Unit* self, Unit* target, bool checkCanTargetUnit, bool checkCanIssueCommandType, bool checkCommandibilityGrouped, bool checkCommandibility) {
    return reinterpret_cast<BWAPI::Unit>(self)->canRightClickGrouped(reinterpret_cast<BWAPI::Unit>(target), checkCanTargetUnit, checkCanIssueCommandType, checkCommandibilityGrouped, checkCommandibility);
}

bool Unit_canRightClickPosition(Unit* self, bool checkCommandibility) {
    return reinterpret_cast<BWAPI::Unit>(self)->canRightClickPosition(checkCommandibility);
}

bool Unit_canRightClickPositionGrouped(Unit* self, bool checkCommandibilityGrouped, bool checkCommandibility) {
    return reinterpret_cast<BWAPI::Unit>(self)->canRightClickPositionGrouped(checkCommandibilityGrouped, checkCommandibility);
}

bool Unit_canRightClickUnit(Unit* self, bool checkCommandibility) {
    return reinterpret_cast<BWAPI::Unit>(self)->canRightClickUnit(checkCommandibility);
}

bool Unit_canRightClickUnit_Unit(Unit* self, Unit* targetUnit, bool checkCanTargetUnit, bool checkCanIssueCommandType, bool checkCommandibility) {
    return reinterpret_cast<BWAPI::Unit>(self)->canRightClickUnit(reinterpret_cast<BWAPI::Unit>(targetUnit), checkCanTargetUnit, checkCanIssueCommandType, checkCommandibility);
}

bool Unit_canRightClickUnitGrouped(Unit* self, bool checkCommandibilityGrouped, bool checkCommandibility) {
    return reinterpret_cast<BWAPI::Unit>(self)->canRightClickUnitGrouped(checkCommandibilityGrouped, checkCommandibility);
}

bool Unit_canRightClickUnitGrouped_Unit(Unit* self, Unit* targetUnit, bool checkCanTargetUnit, bool checkCanIssueCommandType, bool checkCommandibilityGrouped, bool checkCommandibility) {
    return reinterpret_cast<BWAPI::Unit>(self)->canRightClickUnitGrouped(reinterpret_cast<BWAPI::Unit>(targetUnit), checkCanTargetUnit, checkCanIssueCommandType, checkCommandibilityGrouped, checkCommandibility);
}

bool Unit_canHaltConstruction(Unit* self, bool checkCommandibility) {
    return reinterpret_cast<BWAPI::Unit>(self)->canHaltConstruction(checkCommandibility);
}

bool Unit_canCancelConstruction(Unit* self, bool checkCommandibility) {
    return reinterpret_cast<BWAPI::Unit>(self)->canCancelConstruction(checkCommandibility);
}

bool Unit_canCancelAddon(Unit* self, bool checkCommandibility) {
    return reinterpret_cast<BWAPI::Unit>(self)->canCancelAddon(checkCommandibility);
}

bool Unit_canCancelTrain(Unit* self, bool checkCommandibility) {
    return reinterpret_cast<BWAPI::Unit>(self)->canCancelTrain(checkCommandibility);
}

bool Unit_canCancelTrainSlot(Unit* self, bool checkCommandibility) {
    return reinterpret_cast<BWAPI::Unit>(self)->canCancelTrainSlot(checkCommandibility);
}

bool Unit_canCancelTrainSlot_Check(Unit* self, int slot, bool checkCanIssueCommandType, bool checkCommandibility) {
    return reinterpret_cast<BWAPI::Unit>(self)->canCancelTrainSlot(slot, checkCanIssueCommandType, checkCommandibility);
}

bool Unit_canCancelMorph(Unit* self, bool checkCommandibility) {
    return reinterpret_cast<BWAPI::Unit>(self)->canCancelMorph(checkCommandibility);
}

bool Unit_canCancelResearch(Unit* self, bool checkCommandibility) {
    return reinterpret_cast<BWAPI::Unit>(self)->canCancelResearch(checkCommandibility);
}

bool Unit_canCancelUpgrade(Unit* self, bool checkCommandibility) {
    return reinterpret_cast<BWAPI::Unit>(self)->canCancelUpgrade(checkCommandibility);
}

bool Unit_canUseTechWithOrWithoutTarget(Unit* self, bool checkCommandibility) {
    return reinterpret_cast<BWAPI::Unit>(self)->canUseTechWithOrWithoutTarget(checkCommandibility);
}

bool Unit_canUseTechWithOrWithoutTarget_TechType(Unit* self, TechType tech, bool checkCanIssueCommandType, bool checkCommandibility) {
    return reinterpret_cast<BWAPI::Unit>(self)->canUseTechWithOrWithoutTarget(cast_to_bw(tech), checkCanIssueCommandType, checkCommandibility);
}

bool Unit_canUseTech_Position(Unit* self, TechType tech, Position target, bool checkCanTargetUnit, bool checkTargetsType, bool checkCanIssueCommandType, bool checkCommandibility) {
    return reinterpret_cast<BWAPI::Unit>(self)->canUseTech(cast_to_bw(tech), cast_to_bw(target), checkCanTargetUnit, checkTargetsType, checkCanIssueCommandType, checkCommandibility);
}

bool Unit_canUseTech_Unit(Unit* self, TechType tech, Unit* target, bool checkCanTargetUnit, bool checkTargetsType, bool checkCanIssueCommandType, bool checkCommandibility) {
    return reinterpret_cast<BWAPI::Unit>(self)->canUseTech(cast_to_bw(tech), reinterpret_cast<BWAPI::Unit>(target), checkCanTargetUnit, checkTargetsType, checkCanIssueCommandType, checkCommandibility);
}

bool Unit_canUseTechWithoutTarget(Unit* self, TechType tech, bool checkCanIssueCommandType, bool checkCommandibility) {
    return reinterpret_cast<BWAPI::Unit>(self)->canUseTechWithoutTarget(cast_to_bw(tech), checkCanIssueCommandType, checkCommandibility);
}

bool Unit_canUseTechUnit(Unit* self, TechType tech, bool checkCanIssueCommandType, bool checkCommandibility) {
    return reinterpret_cast<BWAPI::Unit>(self)->canUseTechUnit(cast_to_bw(tech), checkCanIssueCommandType, checkCommandibility);
}

bool Unit_canUseTechUnit_Unit(Unit* self, TechType tech, Unit* targetUnit, bool checkCanTargetUnit, bool checkTargetsUnits, bool checkCanIssueCommandType, bool checkCommandibility) {
    return reinterpret_cast<BWAPI::Unit>(self)->canUseTechUnit(cast_to_bw(tech), reinterpret_cast<BWAPI::Unit>(targetUnit), checkCanTargetUnit, checkTargetsUnits, checkCanIssueCommandType, checkCommandibility);
}

bool Unit_canUseTechPosition(Unit* self, TechType tech, bool checkCanIssueCommandType, bool checkCommandibility) {
    return reinterpret_cast<BWAPI::Unit>(self)->canUseTechPosition(cast_to_bw(tech), checkCanIssueCommandType, checkCommandibility);
}

bool Unit_canUseTechPosition_Position(Unit* self, TechType tech, Position target, bool checkTargetsPositions, bool checkCanIssueCommandType, bool checkCommandibility) {
    return reinterpret_cast<BWAPI::Unit>(self)->canUseTechPosition(cast_to_bw(tech), cast_to_bw(target), checkTargetsPositions, checkCanIssueCommandType, checkCommandibility);
}

bool Unit_canPlaceCOP(Unit* self, bool checkCommandibility) {
    return reinterpret_cast<BWAPI::Unit>(self)->canPlaceCOP(checkCommandibility);
}

bool Unit_canPlaceCOP_TilePosition(Unit* self, TilePosition target, bool checkCanIssueCommandType, bool checkCommandibility) {
    return reinterpret_cast<BWAPI::Unit>(self)->canPlaceCOP(cast_to_bw(target), checkCanIssueCommandType, checkCommandibility);
}

void Unit_registerEvent(Unit* self, void (* const action)(Unit*), bool (* const condition)(Unit*),
                        int timesToRun, int framesToCheck) {
    Interface_registerEvent<Unit>(self, action, condition, timesToRun, framesToCheck);
}