sc2ai 0.0.6 → 0.0.8

Sign up to get free protection for your applications and to get access to all the features.
data/sig/sc2ai.rbs CHANGED
@@ -23,6 +23,82 @@ module Sc2
23
23
  class Error < StandardError
24
24
  end
25
25
 
26
+ # Holds game data from tech tree and Api::ResponseData
27
+ # Called once on game start
28
+ class Data
29
+ # sord warn - Api::ResponseData wasn't able to be resolved to a constant in this project
30
+ # _@param_ `data`
31
+ def initialize: (Api::ResponseData data) -> void
32
+
33
+ # sord warn - Api::AbilityData wasn't able to be resolved to a constant in this project
34
+ # sord warn - "Hash<Integer, Api::AbilityData] indexed data" does not appear to be a type
35
+ # Indexes ability data by ability id
36
+ #
37
+ # _@param_ `abilities`
38
+ #
39
+ # _@return_ — Hash<Integer, Api::AbilityData] indexed data
40
+ def abilities_from_proto: (::Array[Api::AbilityData] abilities) -> SORD_ERROR_HashIntegerApiAbilityDataindexeddata
41
+
42
+ # Indexes unit data by id
43
+ #
44
+ # _@param_ `units`
45
+ #
46
+ # _@return_ — indexed data
47
+ def units_from_proto: (::Array[Api::UnitTypeData] units) -> ::Hash[Integer, Api::UnitTypeData]
48
+
49
+ # sord warn - Api::UpgradeData wasn't able to be resolved to a constant in this project
50
+ # sord warn - "Hash<Integer, Api::UpgradeData] indexed data" does not appear to be a type
51
+ # Indexes upgrades data by id
52
+ #
53
+ # _@param_ `upgrades`
54
+ #
55
+ # _@return_ — Hash<Integer, Api::UpgradeData] indexed data
56
+ def upgrades_from_proto: (::Array[Api::UpgradeData] upgrades) -> SORD_ERROR_HashIntegerApiUpgradeDataindexeddata
57
+
58
+ # sord omit - no YARD type given for "effects", using untyped
59
+ # sord omit - no YARD return type given, using untyped
60
+ def effects_from_proto: (untyped effects) -> untyped
61
+
62
+ # sord omit - no YARD type given for "buffs", using untyped
63
+ # sord omit - no YARD return type given, using untyped
64
+ def buffs_from_proto: (untyped buffs) -> untyped
65
+
66
+ # sord omit - no YARD return type given, using untyped
67
+ # Overrides unit data from api to implement fixes or change context
68
+ # i.e. Api::UnitTypeId::ORBITALCOMMAND cost is cost-to-upgrade instead of CC + Orbital combined cost.
69
+ # Run once. Depends on all data already being set.
70
+ def override_unit_data: () -> untyped
71
+
72
+ # sord omit - no YARD return type given, using untyped
73
+ # Fixes mineral_cost, vespene_cost and food_required values
74
+ def correct_unit_type_costs: () -> untyped
75
+
76
+ # sord omit - no YARD return type given, using untyped
77
+ # Fixes mineral_cost_sum, vespene_cost_sum
78
+ def correct_unit_type_sum: () -> untyped
79
+
80
+ # sord warn - Api::AbilityData wasn't able to be resolved to a constant in this project
81
+ # _@return_ — AbilityId => AbilityData
82
+ attr_accessor abilities: (::Hash[Integer, Api::AbilityData] | untyped)
83
+
84
+ # _@return_ — UnitId => UnitTypeData
85
+ attr_accessor units: (::Hash[Integer, Api::UnitTypeData] | untyped)
86
+
87
+ # sord warn - Api::UpgradeData wasn't able to be resolved to a constant in this project
88
+ # _@return_ — UpgradeId => UpgradeData
89
+ attr_accessor upgrades: (::Hash[Integer, Api::UpgradeData] | untyped)
90
+
91
+ # sord omit - no YARD type given for :buffs, using untyped
92
+ # Not particularly useful data. Just use BuffId directly
93
+ # @return [Hash<Integer, Api::BuffData>] BuffId => BuffData
94
+ attr_accessor buffs: untyped
95
+
96
+ # sord omit - no YARD type given for :effects, using untyped
97
+ # Not particularly useful data. Just use EffectId directly
98
+ # @return [Hash<Integer, Api::EffectData>] EffectId => EffectData
99
+ attr_accessor effects: untyped
100
+ end
101
+
26
102
  # Helps determine common paths to sc2 install dir, executable and maps.
27
103
  # It maintains some semblance of compatibility with python-sc2 config
28
104
  #
@@ -342,6 +418,12 @@ module Sc2
342
418
  # In general game_info is only refreshed Player::Bot reads from pathing_grid or placement_grid
343
419
  def game_info_stale?: () -> bool
344
420
 
421
+ # A Hash by unit tag, holding an array of available ability ids
422
+ # Synchronously calls RequestQueryAvailableAbilities and caches for this game loop.
423
+ #
424
+ # _@return_ — { unit_tag => [ability_id, ...], ... }
425
+ def available_abilities: () -> ::Hash[Integer, ::Array[Integer]]
426
+
345
427
  # sord warn - Api::PlayerCommon wasn't able to be resolved to a constant in this project
346
428
  # An alias for observation.player_common to allow easier access to i.e. common.minerals
347
429
  #
@@ -494,7 +576,6 @@ module Sc2
494
576
  # _@param_ `race` — Api::Race::* excl *::Random
495
577
  def on_random_race_detected: (Integer race) -> untyped
496
578
 
497
- # sord warn - Api::ActionError wasn't able to be resolved to a constant in this project
498
579
  # sord omit - no YARD return type given, using untyped
499
580
  # Called on step if errors are present. Equivalent of UI red text errors.
500
581
  # Override to read action errors.
@@ -546,7 +627,7 @@ module Sc2
546
627
  # sord omit - no YARD return type given, using untyped
547
628
  # Callback for unit destroyed. Tags might be found in `previous.all_units`
548
629
  # This excludes unknown objects, like projectiles and only shows things the API has "seen" as a unit
549
- # Override to use in your bot class or use Player.event_units_destroyed
630
+ # Override to use in your bot class or use Player.
550
631
  #
551
632
  # _@param_ `unit`
552
633
  #
@@ -563,7 +644,7 @@ module Sc2
563
644
  # sord omit - no YARD return type given, using untyped
564
645
  # Callback for unit type changing.
565
646
  # To detect certain unit creations, you should use this method to watch morphs.
566
- # Override to use in your bot class or use Player.event_structures_started
647
+ # Override to use in your bot class or use Player.
567
648
  #
568
649
  # _@param_ `unit`
569
650
  #
@@ -579,14 +660,14 @@ module Sc2
579
660
 
580
661
  # sord omit - no YARD return type given, using untyped
581
662
  # Callback for structure building is completed
582
- # Override to use in your bot class or use Player.event_structures_completed
663
+ # Override to use in your bot class or use Player.
583
664
  #
584
665
  # _@param_ `unit`
585
666
  def on_structure_completed: (Api::Unit unit) -> untyped
586
667
 
587
668
  # sord omit - no YARD return type given, using untyped
588
669
  # Callback for unit (Unit/Structure) taking damage
589
- # Override to use in your bot class or use Player.event_units_damaged
670
+ # Override to use in your bot class or use Player.
590
671
  #
591
672
  # _@param_ `unit`
592
673
  #
@@ -682,16 +763,15 @@ module Sc2
682
763
  #
683
764
  # _@param_ `radius` — default one tile wide, 1.0
684
765
  #
685
- # _@param_ `color` — default white. min(r,b) is used for both r&b
766
+ # _@param_ `color` — default white
686
767
  def debug_draw_sphere: (point: Api::Point, ?radius: Float, ?color: Api::Color?) -> void
687
768
 
688
- # Toggles cheat commands on/off (send only once to enable)
689
769
  # Possible values:
690
770
  # Api::DebugGameState::Show_map
691
771
  # Api::DebugGameState::Control_enemy
692
772
  # Api::DebugGameState::Food
693
773
  # Api::DebugGameState::Free
694
- # Api::DebugGameState::all_resources
774
+ # Api::DebugGameState::All_resources
695
775
  # Api::DebugGameState::God
696
776
  # Api::DebugGameState::Minerals
697
777
  # Api::DebugGameState::Gas
@@ -807,7 +887,7 @@ module Sc2
807
887
  #
808
888
  # _@param_ `units` — can be an Api::Unit, array of Api::Unit#tag or single tag
809
889
  #
810
- # _@param_ `unit_type_id` — Api::UnitTypeId the unit type which will do the creation
890
+ # _@param_ `unit_type_id` — Api::UnitTypeId the unit type you wish to build
811
891
  #
812
892
  # _@param_ `target` — is a unit tag or a Api::Point2D. Nil for addons/orbital
813
893
  #
@@ -819,21 +899,22 @@ module Sc2
819
899
  ?queue_command: bool
820
900
  ) -> untyped
821
901
 
822
- # sord omit - no YARD type given for "units:", using untyped
823
902
  # sord omit - no YARD return type given, using untyped
824
903
  # Warps in unit type at target (location or pylon) with optional source units (warp gates)
825
904
  # When not specifying the specific warp gate(s), all warpgates will be used
826
905
  #
827
- # _@param_ `unit_type_id` — Api::UnitTypeId the unit type which will do the creation
906
+ # _@param_ `unit_type_id` — Api::UnitTypeId the unit type you wish to build
828
907
  #
829
908
  # _@param_ `queue_command` — shift+command
830
909
  #
831
910
  # _@param_ `target` — is a unit tag or a Api::Point2D
911
+ #
912
+ # _@param_ `units`
832
913
  def warp: (
833
914
  unit_type_id: Integer,
834
915
  target: (Api::Point2D | Integer),
835
916
  queue_command: bool,
836
- ?units: untyped
917
+ ?units: (::Array[Integer] | Integer | Api::Unit)?
837
918
  ) -> untyped
838
919
 
839
920
  # sord omit - no YARD return type given, using untyped
@@ -1040,6 +1121,14 @@ module Sc2
1040
1121
  # Checks whether you have the resources to
1041
1122
  def can_afford_upgrade?: (untyped upgrade_id) -> bool
1042
1123
 
1124
+ # Returns whether Query Available Ability is true for unit and tag
1125
+ # Queries API if necessary. Uses batching in the background.
1126
+ #
1127
+ # _@param_ `unit_tag`
1128
+ #
1129
+ # _@param_ `ability_id`
1130
+ def unit_ability_available?: (unit_tag: Integer, ability_id: Integer) -> bool
1131
+
1043
1132
  # sord warn - Api::Observation wasn't able to be resolved to a constant in this project
1044
1133
  # sord omit - no YARD return type given, using untyped
1045
1134
  # Divides raw data units into various attributes on every step
@@ -1161,6 +1250,14 @@ module Sc2
1161
1250
  # Checks whether you have the resources to
1162
1251
  def can_afford_upgrade?: (untyped upgrade_id) -> bool
1163
1252
 
1253
+ # Returns whether Query Available Ability is true for unit and tag
1254
+ # Queries API if necessary. Uses batching in the background.
1255
+ #
1256
+ # _@param_ `unit_tag`
1257
+ #
1258
+ # _@param_ `ability_id`
1259
+ def unit_ability_available?: (unit_tag: Integer, ability_id: Integer) -> bool
1260
+
1164
1261
  # sord warn - Api::Observation wasn't able to be resolved to a constant in this project
1165
1262
  # sord omit - no YARD return type given, using untyped
1166
1263
  # Divides raw data units into various attributes on every step
@@ -1328,16 +1425,15 @@ module Sc2
1328
1425
  #
1329
1426
  # _@param_ `radius` — default one tile wide, 1.0
1330
1427
  #
1331
- # _@param_ `color` — default white. min(r,b) is used for both r&b
1428
+ # _@param_ `color` — default white
1332
1429
  def debug_draw_sphere: (point: Api::Point, ?radius: Float, ?color: Api::Color?) -> void
1333
1430
 
1334
- # Toggles cheat commands on/off (send only once to enable)
1335
1431
  # Possible values:
1336
1432
  # Api::DebugGameState::Show_map
1337
1433
  # Api::DebugGameState::Control_enemy
1338
1434
  # Api::DebugGameState::Food
1339
1435
  # Api::DebugGameState::Free
1340
- # Api::DebugGameState::all_resources
1436
+ # Api::DebugGameState::All_resources
1341
1437
  # Api::DebugGameState::God
1342
1438
  # Api::DebugGameState::Minerals
1343
1439
  # Api::DebugGameState::Gas
@@ -1478,6 +1574,14 @@ module Sc2
1478
1574
  # Checks whether you have the resources to
1479
1575
  def can_afford_upgrade?: (untyped upgrade_id) -> bool
1480
1576
 
1577
+ # Returns whether Query Available Ability is true for unit and tag
1578
+ # Queries API if necessary. Uses batching in the background.
1579
+ #
1580
+ # _@param_ `unit_tag`
1581
+ #
1582
+ # _@param_ `ability_id`
1583
+ def unit_ability_available?: (unit_tag: Integer, ability_id: Integer) -> bool
1584
+
1481
1585
  # sord warn - Api::Observation wasn't able to be resolved to a constant in this project
1482
1586
  # sord omit - no YARD return type given, using untyped
1483
1587
  # Divides raw data units into various attributes on every step
@@ -1509,13 +1613,17 @@ module Sc2
1509
1613
 
1510
1614
  attr_accessor all_units: (Sc2::UnitGroup | untyped)
1511
1615
 
1512
- # _@return_ — a group of units
1616
+ # _@return_ — a group of placeholder structures
1513
1617
  attr_accessor units: Sc2::UnitGroup
1514
1618
 
1515
1619
  # sord omit - no YARD type given for :structures, using untyped
1516
1620
  # A full list of all your structures (non-units)
1517
1621
  attr_accessor structures: untyped
1518
1622
 
1623
+ # sord omit - no YARD type given for :placeholders, using untyped
1624
+ # A list of structures which haven't started
1625
+ attr_accessor placeholders: untyped
1626
+
1519
1627
  # _@return_ — a group of neutral units
1520
1628
  attr_accessor neutral: Sc2::UnitGroup
1521
1629
 
@@ -1529,7 +1637,7 @@ module Sc2
1529
1637
 
1530
1638
  # sord warn - Api::RadarRing wasn't able to be resolved to a constant in this project
1531
1639
  # sord warn - Api::RadarRing wasn't able to be resolved to a constant in this project
1532
- # _@return_ — an array of power sources
1640
+ # _@return_ — an array of radar rings sources
1533
1641
  attr_accessor power_sources: ::Array[Api::RadarRing]
1534
1642
 
1535
1643
  # sord omit - no YARD type given for :radar_rings, using untyped
@@ -1544,23 +1652,6 @@ module Sc2
1544
1652
  # Privately keep track of all seen Unit tags (excl structures) in order to detect new created units
1545
1653
  attr_accessor all_seen_unit_tags: untyped
1546
1654
 
1547
- # sord omit - no YARD type given for :event_units_created, using untyped
1548
- # Units created since last frame (visible only, units not structures)
1549
- # Read this on_step. Alternative to callback on_unit_created
1550
- #
1551
- # _@note_ — Morphed units should watch #event_units_type_changed
1552
- # @return [Sc2::UnitGroup] group of created units
1553
- attr_accessor event_units_created: untyped
1554
-
1555
- # _@return_ — group effected
1556
- attr_accessor event_units_type_changed: Sc2::UnitGroup
1557
-
1558
- # _@return_ — a group of structures started
1559
- attr_accessor event_structures_started: Sc2::UnitGroup
1560
-
1561
- # _@return_ — a group of structures started
1562
- attr_accessor event_structures_completed: Sc2::UnitGroup
1563
-
1564
1655
  # _@return_ — group of Units and Structures effected
1565
1656
  attr_accessor event_units_damaged: Sc2::UnitGroup
1566
1657
 
@@ -1624,7 +1715,7 @@ module Sc2
1624
1715
  #
1625
1716
  # _@param_ `units` — can be an Api::Unit, array of Api::Unit#tag or single tag
1626
1717
  #
1627
- # _@param_ `unit_type_id` — Api::UnitTypeId the unit type which will do the creation
1718
+ # _@param_ `unit_type_id` — Api::UnitTypeId the unit type you wish to build
1628
1719
  #
1629
1720
  # _@param_ `target` — is a unit tag or a Api::Point2D. Nil for addons/orbital
1630
1721
  #
@@ -1636,21 +1727,22 @@ module Sc2
1636
1727
  ?queue_command: bool
1637
1728
  ) -> untyped
1638
1729
 
1639
- # sord omit - no YARD type given for "units:", using untyped
1640
1730
  # sord omit - no YARD return type given, using untyped
1641
1731
  # Warps in unit type at target (location or pylon) with optional source units (warp gates)
1642
1732
  # When not specifying the specific warp gate(s), all warpgates will be used
1643
1733
  #
1644
- # _@param_ `unit_type_id` — Api::UnitTypeId the unit type which will do the creation
1734
+ # _@param_ `unit_type_id` — Api::UnitTypeId the unit type you wish to build
1645
1735
  #
1646
1736
  # _@param_ `queue_command` — shift+command
1647
1737
  #
1648
1738
  # _@param_ `target` — is a unit tag or a Api::Point2D
1739
+ #
1740
+ # _@param_ `units`
1649
1741
  def warp: (
1650
1742
  unit_type_id: Integer,
1651
1743
  target: (Api::Point2D | Integer),
1652
1744
  queue_command: bool,
1653
- ?units: untyped
1745
+ ?units: (::Array[Integer] | Integer | Api::Unit)?
1654
1746
  ) -> untyped
1655
1747
 
1656
1748
  # sord omit - no YARD return type given, using untyped
@@ -1811,6 +1903,9 @@ module Sc2
1811
1903
  # Effected by crop_to_playable_area
1812
1904
  def map_height: () -> Integer
1813
1905
 
1906
+ # Center of the map
1907
+ def map_center: () -> Api::Point2D
1908
+
1814
1909
  # Returns zero to map_width as range
1815
1910
  #
1816
1911
  # _@return_ — 0 to map_width
@@ -2177,6 +2272,12 @@ module Sc2
2177
2272
  # In general game_info is only refreshed Player::Bot reads from pathing_grid or placement_grid
2178
2273
  def game_info_stale?: () -> bool
2179
2274
 
2275
+ # A Hash by unit tag, holding an array of available ability ids
2276
+ # Synchronously calls RequestQueryAvailableAbilities and caches for this game loop.
2277
+ #
2278
+ # _@return_ — { unit_tag => [ability_id, ...], ... }
2279
+ def available_abilities: () -> ::Hash[Integer, ::Array[Integer]]
2280
+
2180
2281
  # sord warn - Api::PlayerCommon wasn't able to be resolved to a constant in this project
2181
2282
  # An alias for observation.player_common to allow easier access to i.e. common.minerals
2182
2283
  #
@@ -2228,6 +2329,10 @@ module Sc2
2228
2329
  #
2229
2330
  # _@see_ `Unit#build` — and #morph
2230
2331
  attr_accessor spent_supply: (Integer | untyped)
2332
+
2333
+ # This is the last loop at which available_abilities was queried.
2334
+ # Used to determine staleness.
2335
+ attr_accessor available_abilities_loop: Integer
2231
2336
  end
2232
2337
 
2233
2338
  # Container for the previous game state, based on current bot state
@@ -2318,6 +2423,14 @@ module Sc2
2318
2423
  # Checks whether you have the resources to
2319
2424
  def can_afford_upgrade?: (untyped upgrade_id) -> bool
2320
2425
 
2426
+ # Returns whether Query Available Ability is true for unit and tag
2427
+ # Queries API if necessary. Uses batching in the background.
2428
+ #
2429
+ # _@param_ `unit_tag`
2430
+ #
2431
+ # _@param_ `ability_id`
2432
+ def unit_ability_available?: (unit_tag: Integer, ability_id: Integer) -> bool
2433
+
2321
2434
  # sord warn - Api::Observation wasn't able to be resolved to a constant in this project
2322
2435
  # sord omit - no YARD return type given, using untyped
2323
2436
  # Divides raw data units into various attributes on every step
@@ -2356,6 +2469,12 @@ module Sc2
2356
2469
  # In general game_info is only refreshed Player::Bot reads from pathing_grid or placement_grid
2357
2470
  def game_info_stale?: () -> bool
2358
2471
 
2472
+ # A Hash by unit tag, holding an array of available ability ids
2473
+ # Synchronously calls RequestQueryAvailableAbilities and caches for this game loop.
2474
+ #
2475
+ # _@return_ — { unit_tag => [ability_id, ...], ... }
2476
+ def available_abilities: () -> ::Hash[Integer, ::Array[Integer]]
2477
+
2359
2478
  # sord warn - Api::PlayerCommon wasn't able to be resolved to a constant in this project
2360
2479
  # An alias for observation.player_common to allow easier access to i.e. common.minerals
2361
2480
  #
@@ -2477,83 +2596,6 @@ module Sc2
2477
2596
  end
2478
2597
  end
2479
2598
 
2480
- # Holds game data from tech tree and Api::ResponseData
2481
- # Called once on game start
2482
- class Data
2483
- # sord warn - Api::ResponseData wasn't able to be resolved to a constant in this project
2484
- # _@param_ `data`
2485
- def initialize: (Api::ResponseData data) -> void
2486
-
2487
- # sord warn - Api::AbilityData wasn't able to be resolved to a constant in this project
2488
- # sord warn - "Hash<Integer, Api::AbilityData] indexed data" does not appear to be a type
2489
- # Indexes ability data by ability id
2490
- #
2491
- # _@param_ `abilities`
2492
- #
2493
- # _@return_ — Hash<Integer, Api::AbilityData] indexed data
2494
- def abilities_from_proto: (::Array[Api::AbilityData] abilities) -> SORD_ERROR_HashIntegerApiAbilityDataindexeddata
2495
-
2496
- # sord warn - "Hash<Integer, Api::UnitTypeData] indexed data" does not appear to be a type
2497
- # Indexes unit data by id
2498
- #
2499
- # _@param_ `units`
2500
- #
2501
- # _@return_ — Hash<Integer, Api::UnitTypeData] indexed data
2502
- def units_from_proto: (::Array[Api::UnitTypeData] units) -> SORD_ERROR_HashIntegerApiUnitTypeDataindexeddata
2503
-
2504
- # sord warn - Api::UpgradeData wasn't able to be resolved to a constant in this project
2505
- # sord warn - "Hash<Integer, Api::UpgradeData] indexed data" does not appear to be a type
2506
- # Indexes upgrades data by id
2507
- #
2508
- # _@param_ `upgrades`
2509
- #
2510
- # _@return_ — Hash<Integer, Api::UpgradeData] indexed data
2511
- def upgrades_from_proto: (::Array[Api::UpgradeData] upgrades) -> SORD_ERROR_HashIntegerApiUpgradeDataindexeddata
2512
-
2513
- # sord omit - no YARD type given for "effects", using untyped
2514
- # sord omit - no YARD return type given, using untyped
2515
- def effects_from_proto: (untyped effects) -> untyped
2516
-
2517
- # sord omit - no YARD type given for "buffs", using untyped
2518
- # sord omit - no YARD return type given, using untyped
2519
- def buffs_from_proto: (untyped buffs) -> untyped
2520
-
2521
- # sord omit - no YARD return type given, using untyped
2522
- # Overrides unit data from api to implement fixes or change context
2523
- # i.e. Api::UnitTypeId::ORBITALCOMMAND cost is cost-to-upgrade instead of CC + Orbital combined cost.
2524
- # Run once. Depends on all data already being set.
2525
- def override_unit_data: () -> untyped
2526
-
2527
- # sord omit - no YARD return type given, using untyped
2528
- # Fixes mineral_cost, vespene_cost and food_required values
2529
- def correct_unit_type_costs: () -> untyped
2530
-
2531
- # sord omit - no YARD return type given, using untyped
2532
- # Fixes mineral_cost_sum, vespene_cost_sum
2533
- def correct_unit_type_sum: () -> untyped
2534
-
2535
- # sord warn - Api::AbilityData wasn't able to be resolved to a constant in this project
2536
- # _@return_ — AbilityId => AbilityData
2537
- attr_accessor abilities: (::Hash[Integer, Api::AbilityData] | untyped)
2538
-
2539
- # _@return_ — UnitId => UnitTypeData
2540
- attr_accessor units: (::Hash[Integer, Api::UnitTypeData] | untyped)
2541
-
2542
- # sord warn - Api::UpgradeData wasn't able to be resolved to a constant in this project
2543
- # _@return_ — UpgradeId => UpgradeData
2544
- attr_accessor upgrades: (::Hash[Integer, Api::UpgradeData] | untyped)
2545
-
2546
- # sord omit - no YARD type given for :buffs, using untyped
2547
- # Not particularly useful data. Just use BuffId directly
2548
- # @return [Hash<Integer, Api::BuffData>] BuffId => BuffData
2549
- attr_accessor buffs: untyped
2550
-
2551
- # sord omit - no YARD type given for :effects, using untyped
2552
- # Not particularly useful data. Just use EffectId directly
2553
- # @return [Hash<Integer, Api::EffectData>] EffectId => EffectData
2554
- attr_accessor effects: untyped
2555
- end
2556
-
2557
2599
  # Manages client connection to the Api
2558
2600
  class Connection
2559
2601
  include Sc2::Connection::Requests
@@ -2821,14 +2863,15 @@ module Sc2
2821
2863
  def query_abilities_for_unit_tags: (::Array[Integer] unit_tags, ?ignore_resource_requirements: bool) -> ::Array[Api::ResponseQueryAvailableAbilities]
2822
2864
 
2823
2865
  # sord omit - no YARD type given for "ignore_resource_requirements:", using untyped
2824
- # sord omit - no YARD return type given, using untyped
2825
2866
  # Queries available ability ids for one unit
2826
2867
  # Shortened response over #query_abilities_for_unit_tags, since we know the tag already
2827
2868
  # and can just return an array of ability ids.
2828
2869
  # Note: Querying single units are expensive and should be batched with #query_abilities_for_unit_tags
2829
2870
  #
2830
2871
  # _@param_ `unit` — a unit or a tag.
2831
- def query_ability_ids_for_unit: ((Api::Unit | Integer) unit, ?ignore_resource_requirements: untyped) -> untyped
2872
+ #
2873
+ # _@return_ — array of ability ids
2874
+ def query_ability_ids_for_unit: ((Api::Unit | Integer) unit, ?ignore_resource_requirements: untyped) -> ::Array[Integer]
2832
2875
 
2833
2876
  # sord warn - Api::RequestQueryBuildingPlacement wasn't able to be resolved to a constant in this project
2834
2877
  # sord warn - Api::ResponseQueryBuildingPlacement wasn't able to be resolved to a constant in this project
@@ -3124,14 +3167,15 @@ module Sc2
3124
3167
  def query_abilities_for_unit_tags: (::Array[Integer] unit_tags, ?ignore_resource_requirements: bool) -> ::Array[Api::ResponseQueryAvailableAbilities]
3125
3168
 
3126
3169
  # sord omit - no YARD type given for "ignore_resource_requirements:", using untyped
3127
- # sord omit - no YARD return type given, using untyped
3128
3170
  # Queries available ability ids for one unit
3129
3171
  # Shortened response over #query_abilities_for_unit_tags, since we know the tag already
3130
3172
  # and can just return an array of ability ids.
3131
3173
  # Note: Querying single units are expensive and should be batched with #query_abilities_for_unit_tags
3132
3174
  #
3133
3175
  # _@param_ `unit` — a unit or a tag.
3134
- def query_ability_ids_for_unit: ((Api::Unit | Integer) unit, ?ignore_resource_requirements: untyped) -> untyped
3176
+ #
3177
+ # _@return_ — array of ability ids
3178
+ def query_ability_ids_for_unit: ((Api::Unit | Integer) unit, ?ignore_resource_requirements: untyped) -> ::Array[Integer]
3135
3179
 
3136
3180
  # sord warn - Api::RequestQueryBuildingPlacement wasn't able to be resolved to a constant in this project
3137
3181
  # sord warn - Api::ResponseQueryBuildingPlacement wasn't able to be resolved to a constant in this project
@@ -3508,7 +3552,7 @@ module Sc2
3508
3552
  # sord omit - no YARD return type given, using untyped
3509
3553
  # Builds target unit type, i.e. issuing a build command to worker.build(...Api::UnitTypeId::BARRACKS)
3510
3554
  #
3511
- # _@param_ `unit_type_id` — Api::UnitTypeId the unit type which will do the creation
3555
+ # _@param_ `unit_type_id` — Api::UnitTypeId the unit type you wish to build
3512
3556
  #
3513
3557
  # _@param_ `target` — is a unit tag or a Api::Point2D. Nil for addons/orbital
3514
3558
  #
@@ -3519,12 +3563,12 @@ module Sc2
3519
3563
  # Warps in unit type at target (location or pylon)
3520
3564
  # Will only have affect is this group consists of warp gates, i.e. bot.structures.warpgates
3521
3565
  #
3522
- # _@param_ `unit_type_id` — Api::UnitTypeId the unit type which will do the creation
3566
+ # _@param_ `unit_type_id` — Api::UnitTypeId the unit type you wish to build
3523
3567
  #
3524
3568
  # _@param_ `target` — a point, which should be inside an energy source
3525
3569
  #
3526
3570
  # _@param_ `queue_command` — shift+command
3527
- def warp: (unit_type_id: Integer, ?target: Api::Point2D?, ?queue_command: bool) -> untyped
3571
+ def warp: (unit_type_id: Integer, target: Api::Point2D, ?queue_command: bool) -> untyped
3528
3572
 
3529
3573
  # sord omit - no YARD return type given, using untyped
3530
3574
  # Research a specific upgrade at one of these structures
@@ -3690,13 +3734,26 @@ module Sc2
3690
3734
 
3691
3735
  # Selects only units which have finished constructing, i.o.w. build_progress == 1.0
3692
3736
  #
3693
- # _@return_ — gas structures
3737
+ # _@return_ — complete unit group
3694
3738
  def completed: () -> UnitGroup
3695
3739
 
3740
+ # Selects only units which have finished constructing, i.o.w. build_progress != 1.0
3741
+ #
3742
+ # _@return_ — incomplete unit group
3743
+ def incomplete: () -> UnitGroup
3744
+
3696
3745
  # sord omit - no YARD return type given, using untyped
3697
3746
  # Selects only units which do not have orders
3698
3747
  def idle: () -> untyped
3699
3748
 
3749
+ # Selects units which have this ability available\
3750
+ # Queries API if necessary
3751
+ #
3752
+ # _@param_ `ability_id`
3753
+ #
3754
+ # _@return_ — units which have the ability available
3755
+ def ability_available?: (Integer ability_id) -> UnitGroup
3756
+
3700
3757
  # Selects mineral fields
3701
3758
  #
3702
3759
  # _@return_ — mineral fields
@@ -3841,10 +3898,10 @@ module Sc2
3841
3898
  def initialize: ((Api::Unit | ::Hash[Integer, Api::Unit] | ::Array[Api::Unit] | Sc2::UnitGroup)? unit_group) -> void
3842
3899
 
3843
3900
  # Does the opposite of selector and returns those values for parent
3844
- def select_type: () -> UnitGroup
3901
+ def select: () -> Sc2::UnitGroup
3845
3902
 
3846
3903
  # Does the opposite of selector and returns those values for parent
3847
- def reject_type: () -> UnitGroup
3904
+ def reject: () -> Sc2::UnitGroup
3848
3905
 
3849
3906
  # Returns the value of attribute parent.
3850
3907
  attr_accessor parent: untyped
@@ -4236,7 +4293,9 @@ module Sc2
4236
4293
  # Randomly adjusts both x and y by a range of: -offset..offset
4237
4294
  #
4238
4295
  # _@param_ `offset`
4239
- def random_offset: (Float offset) -> Api::Point2D
4296
+ #
4297
+ # _@return_ — new Position
4298
+ def random_offset: (Float offset) -> Sc2::Position
4240
4299
 
4241
4300
  # sord omit - no YARD type given for "offset", using untyped
4242
4301
  # Changes this point's x and y by the supplied offset
@@ -4248,15 +4307,15 @@ module Sc2
4248
4307
  # sord omit - no YARD type given for "y", using untyped
4249
4308
  # Creates a new point with x and y which is offset
4250
4309
  #
4251
- # _@return_ — self
4252
- def offset: (untyped x, untyped y) -> Api::Point2D
4310
+ # _@return_ — new Position
4311
+ def offset: (?untyped x, ?untyped y) -> Sc2::Position
4253
4312
 
4254
4313
  # sord omit - no YARD type given for "x", using untyped
4255
4314
  # sord omit - no YARD type given for "y", using untyped
4256
4315
  # Changes this point's x and y by the supplied offset
4257
4316
  #
4258
4317
  # _@return_ — self
4259
- def offset!: (untyped x, untyped y) -> Sc2::Position
4318
+ def offset!: (?untyped x, ?untyped y) -> Sc2::Position
4260
4319
 
4261
4320
  # For vector returns the magnitude, synonymous with Math.hypot
4262
4321
  def magnitude: () -> Float
@@ -4326,7 +4385,7 @@ module Sc2
4326
4385
  end
4327
4386
  end
4328
4387
 
4329
- # Generated from stableid.json, do not edit.
4388
+ # This class was partially generated with the help of AI.
4330
4389
  module Api
4331
4390
  # Constant reference of Buff ids
4332
4391
  module BuffId
@@ -4620,23 +4679,16 @@ module Api
4620
4679
  ACCELERATIONZONETEMPORALFIELD: untyped
4621
4680
  ACCELERATIONZONEFLYINGTEMPORALFIELD: untyped
4622
4681
  INHIBITORZONEFLYINGTEMPORALFIELD: untyped
4623
- DUMMYBUFF000: untyped
4682
+ LOADOUTSPRAYTRACKER: untyped
4624
4683
  INHIBITORZONETEMPORALFIELD: untyped
4684
+ CLOAKFIELD: untyped
4625
4685
  RESONATINGGLAIVESPHASESHIFT: untyped
4626
4686
  NEURALPARASITECHILDREN: untyped
4627
4687
  AMORPHOUSARMORCLOUD: untyped
4628
4688
  RAVENSHREDDERMISSILEARMORREDUCTIONUISUBTRUCT: untyped
4629
- BATTERYOVERCHARGE: untyped
4630
- DUMMYBUFF001: untyped
4631
- DUMMYBUFF002: untyped
4632
- DUMMYBUFF003: untyped
4633
- DUMMYBUFF004: untyped
4634
- DUMMYBUFF005: untyped
4635
- ONCREEPQUEEN: untyped
4636
- LOADOUTSPRAYTRACKER: untyped
4637
- CLOAKFIELD: untyped
4638
4689
  TAKENDAMAGE: untyped
4639
4690
  RAVENSCRAMBLERMISSILECARRIER: untyped
4691
+ BATTERYOVERCHARGE: untyped
4640
4692
 
4641
4693
  # sord omit - no YARD return type given, using untyped
4642
4694
  def self._250MMSTRIKECANNONS: () -> untyped
@@ -4757,6 +4809,21 @@ module Api
4757
4809
  # _@return_ — ability_id
4758
4810
  def self.upgrade_ability_data: (Integer source_unit_type_id) -> ::Hash[Integer, ::Hash[untyped, untyped]]
4759
4811
 
4812
+ # sord omit - no YARD type given for "unit_type_id", using untyped
4813
+ # Returns known abilities fo unit type
4814
+ #
4815
+ # _@return_ — array of ability_ids
4816
+ def self.unit_abilities: (untyped unit_type_id) -> ::Array[Integer]
4817
+
4818
+ # sord omit - no YARD return type given, using untyped
4819
+ def standard_abilities: () -> untyped
4820
+
4821
+ # sord omit - no YARD type given for "unit_type_id", using untyped
4822
+ # Returns special abilities, excluding basic start/stop/attack commands
4823
+ #
4824
+ # _@return_ — array of ability_ids
4825
+ def self.unit_special_abilities: (untyped unit_type_id) -> ::Array[Integer]
4826
+
4760
4827
  # sord omit - no YARD return type given, using untyped
4761
4828
  def self.unit_type_creation_abilities_data: () -> untyped
4762
4829
 
@@ -6047,7 +6114,6 @@ module Api
6047
6114
  NEXUSSHIELDRECHARGEONPYLON_NEXUSSHIELDRECHARGEONPYLON: untyped
6048
6115
  INFESTORENSNARE_INFESTORENSNARE: untyped
6049
6116
  EFFECT_RESTORE: untyped
6050
- SHIELDBATTERYRECHARGECHANNELED_STOP: untyped
6051
6117
  NEXUSSHIELDOVERCHARGE_NEXUSSHIELDOVERCHARGE: untyped
6052
6118
  NEXUSSHIELDOVERCHARGEOFF_NEXUSSHIELDOVERCHARGEOFF: untyped
6053
6119
  ATTACK_BATTLECRUISER: untyped
@@ -6083,317 +6149,14 @@ module Api
6083
6149
  LOADOUTSPRAY_LOADOUTSPRAY12: untyped
6084
6150
  LOADOUTSPRAY_LOADOUTSPRAY13: untyped
6085
6151
  LOADOUTSPRAY_LOADOUTSPRAY14: untyped
6086
- DUMMYABIL0_DUMMYABIL0: untyped
6087
- DUMMYABIL1_DUMMYABIL1: untyped
6088
- DUMMYABIL2_DUMMYABIL2: untyped
6089
- DUMMYABIL3_DUMMYABIL3: untyped
6090
- DUMMYABIL4_DUMMYABIL4: untyped
6091
- DUMMYABIL5_DUMMYABIL5: untyped
6092
- DUMMYABIL6_DUMMYABIL6: untyped
6093
- DUMMYABIL7_DUMMYABIL7: untyped
6094
- DUMMYABIL8_DUMMYABIL8: untyped
6095
- DUMMYABIL9_DUMMYABIL9: untyped
6096
- DUMMYABIL10_DUMMYABIL10: untyped
6097
- DUMMYABIL11_DUMMYABIL11: untyped
6098
- DUMMYABIL12_DUMMYABIL12: untyped
6099
- DUMMYABIL13_DUMMYABIL13: untyped
6100
- DUMMYABIL14_DUMMYABIL14: untyped
6101
- DUMMYABIL15_DUMMYABIL15: untyped
6102
- DUMMYABIL16_DUMMYABIL16: untyped
6103
- DUMMYABIL17_DUMMYABIL17: untyped
6104
- DUMMYABIL18_DUMMYABIL18: untyped
6105
- DUMMYABIL19_DUMMYABIL19: untyped
6106
- DUMMYABIL20_DUMMYABIL20: untyped
6107
- DUMMYABIL21_DUMMYABIL21: untyped
6108
- DUMMYABIL22_DUMMYABIL22: untyped
6109
- DUMMYABIL23_DUMMYABIL23: untyped
6110
- DUMMYABIL24_DUMMYABIL24: untyped
6111
- DUMMYABIL25_DUMMYABIL25: untyped
6112
- DUMMYABIL26_DUMMYABIL26: untyped
6113
- DUMMYABIL27_DUMMYABIL27: untyped
6114
- DUMMYABIL28_DUMMYABIL28: untyped
6115
- DUMMYABIL29_DUMMYABIL29: untyped
6116
- DUMMYABIL30_DUMMYABIL30: untyped
6117
- DUMMYABIL31_DUMMYABIL31: untyped
6118
- DUMMYABIL32_DUMMYABIL32: untyped
6119
- DUMMYABIL33_DUMMYABIL33: untyped
6120
- DUMMYABIL34_DUMMYABIL34: untyped
6121
- DUMMYABIL35_DUMMYABIL35: untyped
6122
- DUMMYABIL36_DUMMYABIL36: untyped
6123
- DUMMYABIL37_DUMMYABIL37: untyped
6124
- DUMMYABIL38_DUMMYABIL38: untyped
6125
- DUMMYABIL39_DUMMYABIL39: untyped
6126
- DUMMYABIL40_DUMMYABIL40: untyped
6127
- DUMMYABIL41_DUMMYABIL41: untyped
6128
- DUMMYABIL42_DUMMYABIL42: untyped
6129
- DUMMYABIL43_DUMMYABIL43: untyped
6130
- DUMMYABIL44_DUMMYABIL44: untyped
6131
- DUMMYABIL45_DUMMYABIL45: untyped
6132
- DUMMYABIL46_DUMMYABIL46: untyped
6133
- DUMMYABIL47_DUMMYABIL47: untyped
6134
- DUMMYABIL48_DUMMYABIL48: untyped
6135
- DUMMYABIL49_DUMMYABIL49: untyped
6136
- DUMMYABIL50_DUMMYABIL50: untyped
6137
- DUMMYABIL51_DUMMYABIL51: untyped
6138
- DUMMYABIL52_DUMMYABIL52: untyped
6139
- DUMMYABIL53_DUMMYABIL53: untyped
6140
- DUMMYABIL54_DUMMYABIL54: untyped
6141
- DUMMYABIL55_DUMMYABIL55: untyped
6142
- DUMMYABIL56_DUMMYABIL56: untyped
6143
- DUMMYABIL57_DUMMYABIL57: untyped
6144
- DUMMYABIL58_DUMMYABIL58: untyped
6145
- DUMMYABIL59_DUMMYABIL59: untyped
6146
- DUMMYABIL60_DUMMYABIL60: untyped
6147
- DUMMYABIL61_DUMMYABIL61: untyped
6148
- DUMMYABIL62_DUMMYABIL62: untyped
6149
- DUMMYABIL63_DUMMYABIL63: untyped
6150
- DUMMYABIL64_DUMMYABIL64: untyped
6151
- DUMMYABIL65_DUMMYABIL65: untyped
6152
- DUMMYABIL66_DUMMYABIL66: untyped
6153
- DUMMYABIL67_DUMMYABIL67: untyped
6154
- DUMMYABIL68_DUMMYABIL68: untyped
6155
- DUMMYABIL69_DUMMYABIL69: untyped
6156
- DUMMYABIL70_DUMMYABIL70: untyped
6157
- DUMMYABIL71_DUMMYABIL71: untyped
6158
- DUMMYABIL72_DUMMYABIL72: untyped
6159
- DUMMYABIL73_DUMMYABIL73: untyped
6160
- DUMMYABIL74_DUMMYABIL74: untyped
6161
- DUMMYABIL75_DUMMYABIL75: untyped
6162
- DUMMYABIL76_DUMMYABIL76: untyped
6163
- DUMMYABIL77_DUMMYABIL77: untyped
6164
- DUMMYABIL78_DUMMYABIL78: untyped
6165
- DUMMYABIL79_DUMMYABIL79: untyped
6166
- DUMMYABIL80_DUMMYABIL80: untyped
6167
- DUMMYABIL81_DUMMYABIL81: untyped
6168
- DUMMYABIL82_DUMMYABIL82: untyped
6169
- DUMMYABIL83_DUMMYABIL83: untyped
6170
- DUMMYABIL84_DUMMYABIL84: untyped
6171
- DUMMYABIL85_DUMMYABIL85: untyped
6172
- DUMMYABIL86_DUMMYABIL86: untyped
6173
- DUMMYABIL87_DUMMYABIL87: untyped
6174
- DUMMYABIL88_DUMMYABIL88: untyped
6175
- DUMMYABIL89_DUMMYABIL89: untyped
6176
- DUMMYABIL90_DUMMYABIL90: untyped
6177
- DUMMYABIL91_DUMMYABIL91: untyped
6178
- DUMMYABIL92_DUMMYABIL92: untyped
6179
- DUMMYABIL93_DUMMYABIL93: untyped
6180
- DUMMYABIL94_DUMMYABIL94: untyped
6181
- DUMMYABIL95_DUMMYABIL95: untyped
6182
- DUMMYABIL96_DUMMYABIL96: untyped
6183
- DUMMYABIL97_DUMMYABIL97: untyped
6184
- DUMMYABIL98_DUMMYABIL98: untyped
6185
- DUMMYABIL99_DUMMYABIL99: untyped
6186
- DUMMYABIL100_DUMMYABIL100: untyped
6187
- DUMMYABIL101_DUMMYABIL101: untyped
6188
- DUMMYABIL102_DUMMYABIL102: untyped
6189
- DUMMYABIL103_DUMMYABIL103: untyped
6190
- DUMMYABIL104_DUMMYABIL104: untyped
6191
- DUMMYABIL105_DUMMYABIL105: untyped
6192
- DUMMYABIL106_DUMMYABIL106: untyped
6193
- DUMMYABIL107_DUMMYABIL107: untyped
6194
- DUMMYABIL108_DUMMYABIL108: untyped
6195
- DUMMYABIL109_DUMMYABIL109: untyped
6196
- DUMMYABIL110_DUMMYABIL110: untyped
6197
- DUMMYABIL111_DUMMYABIL111: untyped
6198
- DUMMYABIL112_DUMMYABIL112: untyped
6199
- DUMMYABIL113_DUMMYABIL113: untyped
6200
- DUMMYABIL114_DUMMYABIL114: untyped
6201
- DUMMYABIL115_DUMMYABIL115: untyped
6202
- DUMMYABIL116_DUMMYABIL116: untyped
6203
- DUMMYABIL117_DUMMYABIL117: untyped
6204
- DUMMYABIL118_DUMMYABIL118: untyped
6205
- DUMMYABIL119_DUMMYABIL119: untyped
6206
- DUMMYABIL120_DUMMYABIL120: untyped
6207
- DUMMYABIL121_DUMMYABIL121: untyped
6208
- DUMMYABIL122_DUMMYABIL122: untyped
6209
- DUMMYABIL123_DUMMYABIL123: untyped
6210
- DUMMYABIL124_DUMMYABIL124: untyped
6211
- DUMMYABIL125_DUMMYABIL125: untyped
6212
- DUMMYABIL126_DUMMYABIL126: untyped
6213
- DUMMYABIL127_DUMMYABIL127: untyped
6214
- DUMMYABIL128_DUMMYABIL128: untyped
6215
- DUMMYABIL129_DUMMYABIL129: untyped
6216
- DUMMYABIL130_DUMMYABIL130: untyped
6217
- DUMMYABIL131_DUMMYABIL131: untyped
6218
- DUMMYABIL132_DUMMYABIL132: untyped
6219
- DUMMYABIL133_DUMMYABIL133: untyped
6220
- DUMMYABIL134_DUMMYABIL134: untyped
6221
- DUMMYABIL135_DUMMYABIL135: untyped
6222
- DUMMYABIL136_DUMMYABIL136: untyped
6223
- DUMMYABIL137_DUMMYABIL137: untyped
6224
- DUMMYABIL138_DUMMYABIL138: untyped
6225
- DUMMYABIL139_DUMMYABIL139: untyped
6226
- DUMMYABIL140_DUMMYABIL140: untyped
6227
- DUMMYABIL141_DUMMYABIL141: untyped
6228
- DUMMYABIL142_DUMMYABIL142: untyped
6229
- DUMMYABIL143_DUMMYABIL143: untyped
6230
- DUMMYABIL144_DUMMYABIL144: untyped
6231
- DUMMYABIL145_DUMMYABIL145: untyped
6232
- DUMMYABIL146_DUMMYABIL146: untyped
6233
- DUMMYABIL147_DUMMYABIL147: untyped
6234
- DUMMYABIL148_DUMMYABIL148: untyped
6235
- DUMMYABIL149_DUMMYABIL149: untyped
6236
- DUMMYABIL150_DUMMYABIL150: untyped
6237
- DUMMYABIL151_DUMMYABIL151: untyped
6238
- DUMMYABIL152_DUMMYABIL152: untyped
6239
- DUMMYABIL153_DUMMYABIL153: untyped
6240
- DUMMYABIL154_DUMMYABIL154: untyped
6241
- DUMMYABIL155_DUMMYABIL155: untyped
6242
- DUMMYABIL156_DUMMYABIL156: untyped
6243
- DUMMYABIL157_DUMMYABIL157: untyped
6244
- DUMMYABIL158_DUMMYABIL158: untyped
6245
- DUMMYABIL159_DUMMYABIL159: untyped
6246
- DUMMYABIL160_DUMMYABIL160: untyped
6247
- DUMMYABIL161_DUMMYABIL161: untyped
6248
- DUMMYABIL162_DUMMYABIL162: untyped
6249
- DUMMYABIL163_DUMMYABIL163: untyped
6250
- DUMMYABIL164_DUMMYABIL164: untyped
6251
- DUMMYABIL165_DUMMYABIL165: untyped
6252
- DUMMYABIL166_DUMMYABIL166: untyped
6253
- DUMMYABIL167_DUMMYABIL167: untyped
6254
- DUMMYABIL168_DUMMYABIL168: untyped
6255
- DUMMYABIL169_DUMMYABIL169: untyped
6256
- DUMMYABIL170_DUMMYABIL170: untyped
6257
- DUMMYABIL171_DUMMYABIL171: untyped
6258
- DUMMYABIL172_DUMMYABIL172: untyped
6259
- DUMMYABIL173_DUMMYABIL173: untyped
6260
- DUMMYABIL174_DUMMYABIL174: untyped
6261
- DUMMYABIL175_DUMMYABIL175: untyped
6262
- DUMMYABIL176_DUMMYABIL176: untyped
6263
- DUMMYABIL177_DUMMYABIL177: untyped
6264
- DUMMYABIL178_DUMMYABIL178: untyped
6265
- DUMMYABIL179_DUMMYABIL179: untyped
6266
- DUMMYABIL180_DUMMYABIL180: untyped
6267
- DUMMYABIL181_DUMMYABIL181: untyped
6268
- DUMMYABIL182_DUMMYABIL182: untyped
6269
- DUMMYABIL183_DUMMYABIL183: untyped
6270
- DUMMYABIL184_DUMMYABIL184: untyped
6271
- DUMMYABIL185_DUMMYABIL185: untyped
6272
- DUMMYABIL186_DUMMYABIL186: untyped
6273
- DUMMYABIL187_DUMMYABIL187: untyped
6274
- DUMMYABIL188_DUMMYABIL188: untyped
6275
- DUMMYABIL189_DUMMYABIL189: untyped
6276
- DUMMYABIL190_DUMMYABIL190: untyped
6277
- DUMMYABIL191_DUMMYABIL191: untyped
6278
- DUMMYABIL192_DUMMYABIL192: untyped
6279
- DUMMYABIL193_DUMMYABIL193: untyped
6280
- DUMMYABIL194_DUMMYABIL194: untyped
6281
- DUMMYABIL195_DUMMYABIL195: untyped
6282
- DUMMYABIL196_DUMMYABIL196: untyped
6283
- DUMMYABIL197_DUMMYABIL197: untyped
6284
- DUMMYABIL198_DUMMYABIL198: untyped
6285
- DUMMYABIL199_DUMMYABIL199: untyped
6286
- DUMMYABIL200_DUMMYABIL200: untyped
6287
- DUMMYABIL201_DUMMYABIL201: untyped
6288
- DUMMYABIL202_DUMMYABIL202: untyped
6289
- DUMMYABIL203_DUMMYABIL203: untyped
6290
- DUMMYABIL204_DUMMYABIL204: untyped
6291
- DUMMYABIL205_DUMMYABIL205: untyped
6292
- DUMMYABIL206_DUMMYABIL206: untyped
6293
- DUMMYABIL207_DUMMYABIL207: untyped
6294
- DUMMYABIL208_DUMMYABIL208: untyped
6295
- DUMMYABIL209_DUMMYABIL209: untyped
6296
- DUMMYABIL210_DUMMYABIL210: untyped
6297
- DUMMYABIL211_DUMMYABIL211: untyped
6298
- DUMMYABIL212_DUMMYABIL212: untyped
6299
- DUMMYABIL213_DUMMYABIL213: untyped
6300
- DUMMYABIL214_DUMMYABIL214: untyped
6301
- DUMMYABIL215_DUMMYABIL215: untyped
6302
- DUMMYABIL216_DUMMYABIL216: untyped
6303
- DUMMYABIL217_DUMMYABIL217: untyped
6304
- DUMMYABIL218_DUMMYABIL218: untyped
6305
- DUMMYABIL219_DUMMYABIL219: untyped
6306
- DUMMYABIL220_DUMMYABIL220: untyped
6307
- DUMMYABIL221_DUMMYABIL221: untyped
6308
- DUMMYABIL222_DUMMYABIL222: untyped
6309
- DUMMYABIL223_DUMMYABIL223: untyped
6310
- DUMMYABIL224_DUMMYABIL224: untyped
6311
- DUMMYABIL225_DUMMYABIL225: untyped
6312
- DUMMYABIL226_DUMMYABIL226: untyped
6313
- DUMMYABIL227_DUMMYABIL227: untyped
6314
- DUMMYABIL228_DUMMYABIL228: untyped
6315
- DUMMYABIL229_DUMMYABIL229: untyped
6316
- DUMMYABIL230_DUMMYABIL230: untyped
6317
- DUMMYABIL231_DUMMYABIL231: untyped
6318
- DUMMYABIL232_DUMMYABIL232: untyped
6319
- DUMMYABIL233_DUMMYABIL233: untyped
6320
- DUMMYABIL234_DUMMYABIL234: untyped
6321
- DUMMYABIL235_DUMMYABIL235: untyped
6322
- DUMMYABIL236_DUMMYABIL236: untyped
6323
- DUMMYABIL237_DUMMYABIL237: untyped
6324
- DUMMYABIL238_DUMMYABIL238: untyped
6325
- DUMMYABIL239_DUMMYABIL239: untyped
6326
- DUMMYABIL240_DUMMYABIL240: untyped
6327
- DUMMYABIL241_DUMMYABIL241: untyped
6328
- DUMMYABIL242_DUMMYABIL242: untyped
6329
- DUMMYABIL243_DUMMYABIL243: untyped
6330
- DUMMYABIL244_DUMMYABIL244: untyped
6331
- DUMMYABIL245_DUMMYABIL245: untyped
6332
- DUMMYABIL246_DUMMYABIL246: untyped
6333
- DUMMYABIL247_DUMMYABIL247: untyped
6334
- DUMMYABIL248_DUMMYABIL248: untyped
6335
- DUMMYABIL249_DUMMYABIL249: untyped
6336
- DUMMYABIL250_DUMMYABIL250: untyped
6337
- DUMMYABIL251_DUMMYABIL251: untyped
6338
- DUMMYABIL252_DUMMYABIL252: untyped
6339
- DUMMYABIL253_DUMMYABIL253: untyped
6340
- DUMMYABIL254_DUMMYABIL254: untyped
6341
- DUMMYABIL255_DUMMYABIL255: untyped
6342
- DUMMYABIL256_DUMMYABIL256: untyped
6343
- DUMMYABIL257_DUMMYABIL257: untyped
6344
- DUMMYABIL258_DUMMYABIL258: untyped
6345
- DUMMYABIL259_DUMMYABIL259: untyped
6346
- DUMMYABIL260_DUMMYABIL260: untyped
6347
- DUMMYABIL261_DUMMYABIL261: untyped
6348
- DUMMYABIL262_DUMMYABIL262: untyped
6349
- DUMMYABIL263_DUMMYABIL263: untyped
6350
- DUMMYABIL264_DUMMYABIL264: untyped
6351
- DUMMYABIL265_DUMMYABIL265: untyped
6352
- DUMMYABIL266_DUMMYABIL266: untyped
6353
- DUMMYABIL267_DUMMYABIL267: untyped
6354
- DUMMYABIL268_DUMMYABIL268: untyped
6355
- DUMMYABIL269_DUMMYABIL269: untyped
6356
- DUMMYABIL270_DUMMYABIL270: untyped
6357
- DUMMYABIL271_DUMMYABIL271: untyped
6358
- DUMMYABIL272_DUMMYABIL272: untyped
6359
- DUMMYABIL273_DUMMYABIL273: untyped
6360
- DUMMYABIL274_DUMMYABIL274: untyped
6361
- DUMMYABIL275_DUMMYABIL275: untyped
6362
- DUMMYABIL276_DUMMYABIL276: untyped
6363
- DUMMYABIL277_DUMMYABIL277: untyped
6364
- DUMMYABIL278_DUMMYABIL278: untyped
6365
- DUMMYABIL279_DUMMYABIL279: untyped
6366
- DUMMYABIL280_DUMMYABIL280: untyped
6367
- DUMMYABIL281_DUMMYABIL281: untyped
6368
- DUMMYABIL282_DUMMYABIL282: untyped
6369
- DUMMYABIL283_DUMMYABIL283: untyped
6370
- DUMMYABIL284_DUMMYABIL284: untyped
6371
- DUMMYABIL285_DUMMYABIL285: untyped
6372
- DUMMYABIL286_DUMMYABIL286: untyped
6373
- DUMMYABIL287_DUMMYABIL287: untyped
6374
- DUMMYABIL288_DUMMYABIL288: untyped
6375
- DUMMYABIL289_DUMMYABIL289: untyped
6376
- DUMMYABIL290_DUMMYABIL290: untyped
6377
- DUMMYABIL291_DUMMYABIL291: untyped
6378
- DUMMYABIL292_DUMMYABIL292: untyped
6379
- DUMMYABIL293_DUMMYABIL293: untyped
6380
- DUMMYABIL294_DUMMYABIL294: untyped
6381
- DUMMYABIL295_DUMMYABIL295: untyped
6152
+ MORPHTOCOLLAPSIBLEROCKTOWERDEBRISRAMPLEFTGREEN_CANCEL: untyped
6153
+ MORPHTOCOLLAPSIBLEROCKTOWERDEBRISRAMPRIGHTGREEN_CANCEL: untyped
6382
6154
  BATTERYOVERCHARGE_BATTERYOVERCHARGE: untyped
6383
- DUMMYABIL296_DUMMYABIL296: untyped
6384
6155
  AMORPHOUSARMORCLOUD_AMORPHOUSARMORCLOUD: untyped
6385
- DUMMYABIL297_DUMMYABIL297: untyped
6386
6156
  SHIELDBATTERYRECHARGEEX5_SHIELDBATTERYRECHARGE: untyped
6387
6157
  SHIELDBATTERYRECHARGEEX5_STOP: untyped
6388
- DUMMYABIL298_DUMMYABIL298: untyped
6389
- DUMMYABIL299_DUMMYABIL299: untyped
6390
- DUMMYABIL300_DUMMYABIL300: untyped
6391
- DUMMYABIL301_DUMMYABIL301: untyped
6392
- DUMMYABIL302_DUMMYABIL302: untyped
6393
6158
  MORPHTOBANELING_BANELING: untyped
6394
6159
  MORPHTOBANELING_CANCEL: untyped
6395
- MORPHTOCOLLAPSIBLEROCKTOWERDEBRISRAMPLEFTGREEN_CANCEL: untyped
6396
- MORPHTOCOLLAPSIBLEROCKTOWERDEBRISRAMPRIGHTGREEN_CANCEL: untyped
6397
6160
  MOTHERSHIPCLOAK_ORACLECLOAKFIELD: untyped
6398
6161
 
6399
6162
  # sord omit - no YARD return type given, using untyped
@@ -6719,15 +6482,15 @@ module Api
6719
6482
  DIGGINGCLAWS: untyped
6720
6483
  CARRIERCARRIERCAPACITY: untyped
6721
6484
  CARRIERLEASHRANGEUPGRADE: untyped
6485
+ HURRICANETHRUSTERS: untyped
6722
6486
  TEMPESTGROUNDATTACKUPGRADE: untyped
6723
6487
  MICROBIALSHROUD: untyped
6488
+ INTERFERENCEMATRIX: untyped
6724
6489
  SUNDERINGIMPACT: untyped
6725
6490
  AMPLIFIEDSHIELDING: untyped
6726
6491
  PSIONICAMPLIFIERS: untyped
6727
6492
  SECRETEDCOATING: untyped
6728
6493
  ENHANCEDSHOCKWAVES: untyped
6729
- HURRICANETHRUSTERS: untyped
6730
- INTERFERENCEMATRIX: untyped
6731
6494
 
6732
6495
  # sord omit - no YARD return type given, using untyped
6733
6496
  def self._330MMBARRAGECANNONS: () -> untyped
@@ -8723,64 +8486,12 @@ module Api
8723
8486
  MINERALFIELD450: untyped
8724
8487
  MINERALFIELDOPAQUE: untyped
8725
8488
  MINERALFIELDOPAQUE900: untyped
8726
- MECHAZERGLINGACGLUESCREENDUMMY_2: untyped
8727
- MECHABANELINGACGLUESCREENDUMMY_2: untyped
8728
- MECHAHYDRALISKACGLUESCREENDUMMY_2: untyped
8729
- MECHAINFESTORACGLUESCREENDUMMY_2: untyped
8730
- MECHACORRUPTORACGLUESCREENDUMMY_2: untyped
8731
- MECHAULTRALISKACGLUESCREENDUMMY_2: untyped
8732
- MECHAOVERSEERACGLUESCREENDUMMY_2: untyped
8733
- MECHALURKERACGLUESCREENDUMMY_2: untyped
8734
- MECHABATTLECARRIERLORDACGLUESCREENDUMMY_2: untyped
8735
- MECHASPINECRAWLERACGLUESCREENDUMMY_2: untyped
8736
- MECHASPORECRAWLERACGLUESCREENDUMMY_2: untyped
8737
- TROOPERMENGSKACGLUESCREENDUMMY_2: untyped
8738
- MEDIVACMENGSKACGLUESCREENDUMMY_2: untyped
8739
- BLIMPMENGSKACGLUESCREENDUMMY_2: untyped
8740
- MARAUDERMENGSKACGLUESCREENDUMMY_2: untyped
8741
- GHOSTMENGSKACGLUESCREENDUMMY_2: untyped
8742
- SIEGETANKMENGSKACGLUESCREENDUMMY_2: untyped
8743
- THORMENGSKACGLUESCREENDUMMY_2: untyped
8744
- VIKINGMENGSKACGLUESCREENDUMMY_2: untyped
8745
- BATTLECRUISERMENGSKACGLUESCREENDUMMY_2: untyped
8746
- BUNKERDEPOTMENGSKACGLUESCREENDUMMY_2: untyped
8747
- MISSILETURRETMENGSKACGLUESCREENDUMMY_2: untyped
8748
- ARTILLERYMENGSKACGLUESCREENDUMMY_2: untyped
8749
- LOADOUTSPRAY1_2: untyped
8750
- LOADOUTSPRAY2_2: untyped
8751
- LOADOUTSPRAY3_2: untyped
8752
- LOADOUTSPRAY4_2: untyped
8753
- LOADOUTSPRAY5_2: untyped
8754
- LOADOUTSPRAY6_2: untyped
8755
- LOADOUTSPRAY7_2: untyped
8756
- LOADOUTSPRAY8_2: untyped
8757
- LOADOUTSPRAY9_2: untyped
8758
- LOADOUTSPRAY10_2: untyped
8759
- LOADOUTSPRAY11_2: untyped
8760
- LOADOUTSPRAY12_2: untyped
8761
- LOADOUTSPRAY13_2: untyped
8762
- LOADOUTSPRAY14_2: untyped
8763
8489
  COLLAPSIBLEROCKTOWERDEBRISRAMPLEFTGREEN: untyped
8764
8490
  COLLAPSIBLEROCKTOWERDEBRISRAMPRIGHTGREEN: untyped
8765
8491
  COLLAPSIBLEROCKTOWERPUSHUNITRAMPLEFTGREEN: untyped
8766
8492
  COLLAPSIBLEROCKTOWERPUSHUNITRAMPRIGHTGREEN: untyped
8767
8493
  COLLAPSIBLEROCKTOWERRAMPLEFTGREEN: untyped
8768
8494
  COLLAPSIBLEROCKTOWERRAMPRIGHTGREEN: untyped
8769
- DUMMYUNIT000: untyped
8770
- DUMMYUNIT001: untyped
8771
- DUMMYUNIT002: untyped
8772
- DUMMYUNIT003: untyped
8773
- DUMMYUNIT004: untyped
8774
- DUMMYUNIT005: untyped
8775
- DUMMYUNIT006: untyped
8776
- DUMMYUNIT007: untyped
8777
- DUMMYUNIT008: untyped
8778
- DUMMYUNIT009: untyped
8779
- DUMMYUNIT010: untyped
8780
- DUMMYUNIT011: untyped
8781
- DUMMYUNIT012: untyped
8782
- DUMMYUNIT013: untyped
8783
- DUMMYUNIT014: untyped
8784
8495
 
8785
8496
  # sord omit - no YARD return type given, using untyped
8786
8497
  def self._4SLOTBAG: () -> untyped
@@ -8974,7 +8685,7 @@ module Api
8974
8685
  # sord omit - no YARD return type given, using untyped
8975
8686
  # Builds target unit type, i.e. issuing a build command to worker.build(...Api::UnitTypeId::BARRACKS)
8976
8687
  #
8977
- # _@param_ `unit_type_id` — Api::UnitTypeId the unit type which will do the creation
8688
+ # _@param_ `unit_type_id` — Api::UnitTypeId the unit type you wish to build
8978
8689
  #
8979
8690
  # _@param_ `target` — is a unit tag or a Api::Point2D. Nil for addons/orbital
8980
8691
  #
@@ -8992,7 +8703,7 @@ module Api
8992
8703
  # sord omit - no YARD return type given, using untyped
8993
8704
  # Research a specific upgrade
8994
8705
  #
8995
- # _@param_ `upgrade_id` — Api::UnitTypeId the unit type which will do the creation
8706
+ # _@param_ `upgrade_id` — Api::UnitTypeId the unit type you wish to research
8996
8707
  #
8997
8708
  # _@param_ `queue_command` — shift+command
8998
8709
  def research: (upgrade_id: Integer, ?queue_command: bool) -> untyped
@@ -9069,6 +8780,12 @@ module Api
9069
8780
  # ```
9070
8781
  def can_attack?: (unit: Api::Unit, ?weapon_index: Integer, ?ability_id: Integer?) -> bool
9071
8782
 
8783
+ # Returns whether this unit has an ability available
8784
+ # Queries API if necessary
8785
+ #
8786
+ # _@param_ `ability_id`
8787
+ def ability_available?: (Integer ability_id) -> bool
8788
+
9072
8789
  # sord warn - Api::unit wasn't able to be resolved to a constant in this project
9073
8790
  # sord warn - Api::Weapon wasn't able to be resolved to a constant in this project
9074
8791
  # Checks whether a weapon can target a unit
@@ -9143,6 +8860,22 @@ module Api
9143
8860
  # For Terran builds a tech lab add-on on the current structure
9144
8861
  def build_tech_lab: (?queue_command: untyped) -> void
9145
8862
 
8863
+ # sord omit - no YARD return type given, using untyped
8864
+ # Warps in unit type at target (location or pylon)
8865
+ # Only works if the source is a Warp Gate
8866
+ #
8867
+ # _@param_ `unit_type_id` — Api::UnitTypeId the unit type you wish to build
8868
+ #
8869
+ # _@param_ `target` — a point, which should be inside an energy source
8870
+ #
8871
+ # _@param_ `queue_command` — shift+command
8872
+ def warp: (unit_type_id: Integer, target: Api::Point2D, ?queue_command: bool) -> untyped
8873
+
8874
+ # Returns true if unit does not have orders
8875
+ #
8876
+ # _@return_ — whether unit is idle
8877
+ def is_idle?: () -> bool
8878
+
9146
8879
  # sord omit - no YARD type given for "abilities", using untyped
9147
8880
  # sord omit - no YARD type given for "target:", using untyped
9148
8881
  # Reduces repetition in the is_*action*?(target:) methods
@@ -9242,6 +8975,7 @@ module Api
9242
8975
  # Protobuf virtual class.
9243
8976
  class Point < Google::Protobuf::AbstractMessage
9244
8977
  include Sc2::Position
8978
+ include Api::PointDistanceExtension
9245
8979
  include Api::PointExtension
9246
8980
  extend Api::PointExtension::ClassMethods
9247
8981
 
@@ -9311,7 +9045,9 @@ module Api
9311
9045
  # Randomly adjusts both x and y by a range of: -offset..offset
9312
9046
  #
9313
9047
  # _@param_ `offset`
9314
- def random_offset: (Float offset) -> Api::Point2D
9048
+ #
9049
+ # _@return_ — new Position
9050
+ def random_offset: (Float offset) -> Sc2::Position
9315
9051
 
9316
9052
  # sord omit - no YARD type given for "offset", using untyped
9317
9053
  # Changes this point's x and y by the supplied offset
@@ -9323,15 +9059,15 @@ module Api
9323
9059
  # sord omit - no YARD type given for "y", using untyped
9324
9060
  # Creates a new point with x and y which is offset
9325
9061
  #
9326
- # _@return_ — self
9327
- def offset: (untyped x, untyped y) -> Api::Point2D
9062
+ # _@return_ — new Position
9063
+ def offset: (?untyped x, ?untyped y) -> Sc2::Position
9328
9064
 
9329
9065
  # sord omit - no YARD type given for "x", using untyped
9330
9066
  # sord omit - no YARD type given for "y", using untyped
9331
9067
  # Changes this point's x and y by the supplied offset
9332
9068
  #
9333
9069
  # _@return_ — self
9334
- def offset!: (untyped x, untyped y) -> Sc2::Position
9070
+ def offset!: (?untyped x, ?untyped y) -> Sc2::Position
9335
9071
 
9336
9072
  # For vector returns the magnitude, synonymous with Math.hypot
9337
9073
  def magnitude: () -> Float
@@ -9404,6 +9140,7 @@ module Api
9404
9140
  class Point2D < Google::Protobuf::AbstractMessage
9405
9141
  include Sc2::Position
9406
9142
  include Api::Point2DExtension
9143
+ include Api::PointDistanceExtension
9407
9144
  extend Api::Point2DExtension::ClassMethods
9408
9145
 
9409
9146
  # sord omit - no YARD type given for "x", using untyped
@@ -9423,7 +9160,7 @@ module Api
9423
9160
 
9424
9161
  # sord omit - no YARD type given for "z:", using untyped
9425
9162
  # Create a new 3d Point, by adding a y axis.
9426
- def to_3d: (z: untyped) -> Api::Point
9163
+ def to_3d: (?z: untyped) -> Api::Point
9427
9164
 
9428
9165
  # sord omit - no YARD type given for "other", using untyped
9429
9166
  # sord omit - no YARD return type given, using untyped
@@ -9469,7 +9206,9 @@ module Api
9469
9206
  # Randomly adjusts both x and y by a range of: -offset..offset
9470
9207
  #
9471
9208
  # _@param_ `offset`
9472
- def random_offset: (Float offset) -> Api::Point2D
9209
+ #
9210
+ # _@return_ — new Position
9211
+ def random_offset: (Float offset) -> Sc2::Position
9473
9212
 
9474
9213
  # sord omit - no YARD type given for "offset", using untyped
9475
9214
  # Changes this point's x and y by the supplied offset
@@ -9481,15 +9220,15 @@ module Api
9481
9220
  # sord omit - no YARD type given for "y", using untyped
9482
9221
  # Creates a new point with x and y which is offset
9483
9222
  #
9484
- # _@return_ — self
9485
- def offset: (untyped x, untyped y) -> Api::Point2D
9223
+ # _@return_ — new Position
9224
+ def offset: (?untyped x, ?untyped y) -> Sc2::Position
9486
9225
 
9487
9226
  # sord omit - no YARD type given for "x", using untyped
9488
9227
  # sord omit - no YARD type given for "y", using untyped
9489
9228
  # Changes this point's x and y by the supplied offset
9490
9229
  #
9491
9230
  # _@return_ — self
9492
- def offset!: (untyped x, untyped y) -> Sc2::Position
9231
+ def offset!: (?untyped x, ?untyped y) -> Sc2::Position
9493
9232
 
9494
9233
  # For vector returns the magnitude, synonymous with Math.hypot
9495
9234
  def magnitude: () -> Float
@@ -9561,6 +9300,7 @@ module Api
9561
9300
  # Protobuf virtual class.
9562
9301
  class PointI < Google::Protobuf::AbstractMessage
9563
9302
  include Sc2::Position
9303
+ include Api::PointDistanceExtension
9564
9304
 
9565
9305
  # sord omit - no YARD type given for "other", using untyped
9566
9306
  # sord omit - no YARD return type given, using untyped
@@ -9606,7 +9346,9 @@ module Api
9606
9346
  # Randomly adjusts both x and y by a range of: -offset..offset
9607
9347
  #
9608
9348
  # _@param_ `offset`
9609
- def random_offset: (Float offset) -> Api::Point2D
9349
+ #
9350
+ # _@return_ — new Position
9351
+ def random_offset: (Float offset) -> Sc2::Position
9610
9352
 
9611
9353
  # sord omit - no YARD type given for "offset", using untyped
9612
9354
  # Changes this point's x and y by the supplied offset
@@ -9618,15 +9360,15 @@ module Api
9618
9360
  # sord omit - no YARD type given for "y", using untyped
9619
9361
  # Creates a new point with x and y which is offset
9620
9362
  #
9621
- # _@return_ — self
9622
- def offset: (untyped x, untyped y) -> Api::Point2D
9363
+ # _@return_ — new Position
9364
+ def offset: (?untyped x, ?untyped y) -> Sc2::Position
9623
9365
 
9624
9366
  # sord omit - no YARD type given for "x", using untyped
9625
9367
  # sord omit - no YARD type given for "y", using untyped
9626
9368
  # Changes this point's x and y by the supplied offset
9627
9369
  #
9628
9370
  # _@return_ — self
9629
- def offset!: (untyped x, untyped y) -> Sc2::Position
9371
+ def offset!: (?untyped x, ?untyped y) -> Sc2::Position
9630
9372
 
9631
9373
  # For vector returns the magnitude, synonymous with Math.hypot
9632
9374
  def magnitude: () -> Float
@@ -9754,7 +9496,9 @@ module Api
9754
9496
  # Randomly adjusts both x and y by a range of: -offset..offset
9755
9497
  #
9756
9498
  # _@param_ `offset`
9757
- def random_offset: (Float offset) -> Api::Point2D
9499
+ #
9500
+ # _@return_ — new Position
9501
+ def random_offset: (Float offset) -> Sc2::Position
9758
9502
 
9759
9503
  # sord omit - no YARD type given for "offset", using untyped
9760
9504
  # Changes this point's x and y by the supplied offset
@@ -9766,15 +9510,15 @@ module Api
9766
9510
  # sord omit - no YARD type given for "y", using untyped
9767
9511
  # Creates a new point with x and y which is offset
9768
9512
  #
9769
- # _@return_ — self
9770
- def offset: (untyped x, untyped y) -> Api::Point2D
9513
+ # _@return_ — new Position
9514
+ def offset: (?untyped x, ?untyped y) -> Sc2::Position
9771
9515
 
9772
9516
  # sord omit - no YARD type given for "x", using untyped
9773
9517
  # sord omit - no YARD type given for "y", using untyped
9774
9518
  # Changes this point's x and y by the supplied offset
9775
9519
  #
9776
9520
  # _@return_ — self
9777
- def offset!: (untyped x, untyped y) -> Sc2::Position
9521
+ def offset!: (?untyped x, ?untyped y) -> Sc2::Position
9778
9522
 
9779
9523
  # For vector returns the magnitude, synonymous with Math.hypot
9780
9524
  def magnitude: () -> Float
@@ -9846,6 +9590,7 @@ module Api
9846
9590
  # Protobuf virtual class.
9847
9591
  class Size2DI < Google::Protobuf::AbstractMessage
9848
9592
  include Sc2::Position
9593
+ include Api::PointDistanceExtension
9849
9594
 
9850
9595
  # sord omit - no YARD type given for "other", using untyped
9851
9596
  # sord omit - no YARD return type given, using untyped
@@ -9891,7 +9636,9 @@ module Api
9891
9636
  # Randomly adjusts both x and y by a range of: -offset..offset
9892
9637
  #
9893
9638
  # _@param_ `offset`
9894
- def random_offset: (Float offset) -> Api::Point2D
9639
+ #
9640
+ # _@return_ — new Position
9641
+ def random_offset: (Float offset) -> Sc2::Position
9895
9642
 
9896
9643
  # sord omit - no YARD type given for "offset", using untyped
9897
9644
  # Changes this point's x and y by the supplied offset
@@ -9903,15 +9650,15 @@ module Api
9903
9650
  # sord omit - no YARD type given for "y", using untyped
9904
9651
  # Creates a new point with x and y which is offset
9905
9652
  #
9906
- # _@return_ — self
9907
- def offset: (untyped x, untyped y) -> Api::Point2D
9653
+ # _@return_ — new Position
9654
+ def offset: (?untyped x, ?untyped y) -> Sc2::Position
9908
9655
 
9909
9656
  # sord omit - no YARD type given for "x", using untyped
9910
9657
  # sord omit - no YARD type given for "y", using untyped
9911
9658
  # Changes this point's x and y by the supplied offset
9912
9659
  #
9913
9660
  # _@return_ — self
9914
- def offset!: (untyped x, untyped y) -> Sc2::Position
9661
+ def offset!: (?untyped x, ?untyped y) -> Sc2::Position
9915
9662
 
9916
9663
  # For vector returns the magnitude, synonymous with Math.hypot
9917
9664
  def magnitude: () -> Float
@@ -10139,7 +9886,7 @@ module Api
10139
9886
  # sord omit - no YARD return type given, using untyped
10140
9887
  # Builds target unit type, i.e. issuing a build command to worker.build(...Api::UnitTypeId::BARRACKS)
10141
9888
  #
10142
- # _@param_ `unit_type_id` — Api::UnitTypeId the unit type which will do the creation
9889
+ # _@param_ `unit_type_id` — Api::UnitTypeId the unit type you wish to build
10143
9890
  #
10144
9891
  # _@param_ `target` — is a unit tag or a Api::Point2D. Nil for addons/orbital
10145
9892
  #
@@ -10157,7 +9904,7 @@ module Api
10157
9904
  # sord omit - no YARD return type given, using untyped
10158
9905
  # Research a specific upgrade
10159
9906
  #
10160
- # _@param_ `upgrade_id` — Api::UnitTypeId the unit type which will do the creation
9907
+ # _@param_ `upgrade_id` — Api::UnitTypeId the unit type you wish to research
10161
9908
  #
10162
9909
  # _@param_ `queue_command` — shift+command
10163
9910
  def research: (upgrade_id: Integer, ?queue_command: bool) -> untyped
@@ -10234,6 +9981,12 @@ module Api
10234
9981
  # ```
10235
9982
  def can_attack?: (unit: Api::Unit, ?weapon_index: Integer, ?ability_id: Integer?) -> bool
10236
9983
 
9984
+ # Returns whether this unit has an ability available
9985
+ # Queries API if necessary
9986
+ #
9987
+ # _@param_ `ability_id`
9988
+ def ability_available?: (Integer ability_id) -> bool
9989
+
10237
9990
  # sord warn - Api::unit wasn't able to be resolved to a constant in this project
10238
9991
  # sord warn - Api::Weapon wasn't able to be resolved to a constant in this project
10239
9992
  # Checks whether a weapon can target a unit
@@ -10308,6 +10061,22 @@ module Api
10308
10061
  # For Terran builds a tech lab add-on on the current structure
10309
10062
  def build_tech_lab: (?queue_command: untyped) -> void
10310
10063
 
10064
+ # sord omit - no YARD return type given, using untyped
10065
+ # Warps in unit type at target (location or pylon)
10066
+ # Only works if the source is a Warp Gate
10067
+ #
10068
+ # _@param_ `unit_type_id` — Api::UnitTypeId the unit type you wish to build
10069
+ #
10070
+ # _@param_ `target` — a point, which should be inside an energy source
10071
+ #
10072
+ # _@param_ `queue_command` — shift+command
10073
+ def warp: (unit_type_id: Integer, target: Api::Point2D, ?queue_command: bool) -> untyped
10074
+
10075
+ # Returns true if unit does not have orders
10076
+ #
10077
+ # _@return_ — whether unit is idle
10078
+ def is_idle?: () -> bool
10079
+
10311
10080
  # sord omit - no YARD type given for "abilities", using untyped
10312
10081
  # sord omit - no YARD type given for "target:", using untyped
10313
10082
  # Reduces repetition in the is_*action*?(target:) methods
@@ -10316,7 +10085,83 @@ module Api
10316
10085
 
10317
10086
  # Protobuf virtual class.
10318
10087
  class UnitTypeData < Google::Protobuf::AbstractMessage
10088
+ include Api::UnitTypeExtension
10319
10089
  include Api::UnitTypeDataExtension
10090
+
10091
+ # sord omit - no YARD return type given, using untyped
10092
+ def mood: () -> untyped
10093
+ end
10094
+
10095
+ # Protobuf virtual class.
10096
+ class AvailableAbility < Google::Protobuf::AbstractMessage
10097
+ include Api::AbilityRemapable
10098
+
10099
+ # Ability Id. The generic id or "remapid".
10100
+ # i.e. Api::AbilityId::ATTACK_BATTLECRUISER returns generic Api::AbilityId::ATTACK
10101
+ def ability_id: () -> Integer
10102
+ end
10103
+
10104
+ # Protobuf virtual class.
10105
+ class UnitOrder < Google::Protobuf::AbstractMessage
10106
+ include Api::AbilityRemapable
10107
+
10108
+ # Ability Id. The generic id or "remapid".
10109
+ # i.e. Api::AbilityId::ATTACK_BATTLECRUISER returns generic Api::AbilityId::ATTACK
10110
+ def ability_id: () -> Integer
10111
+ end
10112
+
10113
+ # Protobuf virtual class.
10114
+ class ActionRawUnitCommand < Google::Protobuf::AbstractMessage
10115
+ include Api::AbilityRemapable
10116
+
10117
+ # Ability Id. The generic id or "remapid".
10118
+ # i.e. Api::AbilityId::ATTACK_BATTLECRUISER returns generic Api::AbilityId::ATTACK
10119
+ def ability_id: () -> Integer
10120
+ end
10121
+
10122
+ # Protobuf virtual class.
10123
+ class ActionRawToggleAutocast < Google::Protobuf::AbstractMessage
10124
+ include Api::AbilityRemapable
10125
+
10126
+ # Ability Id. The generic id or "remapid".
10127
+ # i.e. Api::AbilityId::ATTACK_BATTLECRUISER returns generic Api::AbilityId::ATTACK
10128
+ def ability_id: () -> Integer
10129
+ end
10130
+
10131
+ # Protobuf virtual class.
10132
+ class ActionError < Google::Protobuf::AbstractMessage
10133
+ include Api::AbilityRemapable
10134
+
10135
+ # Ability Id. The generic id or "remapid".
10136
+ # i.e. Api::AbilityId::ATTACK_BATTLECRUISER returns generic Api::AbilityId::ATTACK
10137
+ def ability_id: () -> Integer
10138
+ end
10139
+
10140
+ # Protobuf virtual class.
10141
+ class ActionSpatialUnitCommand < Google::Protobuf::AbstractMessage
10142
+ include Api::AbilityRemapable
10143
+
10144
+ # Ability Id. The generic id or "remapid".
10145
+ # i.e. Api::AbilityId::ATTACK_BATTLECRUISER returns generic Api::AbilityId::ATTACK
10146
+ def ability_id: () -> Integer
10147
+ end
10148
+
10149
+ # Protobuf virtual class.
10150
+ class BuildItem < Google::Protobuf::AbstractMessage
10151
+ include Api::AbilityRemapable
10152
+
10153
+ # Ability Id. The generic id or "remapid".
10154
+ # i.e. Api::AbilityId::ATTACK_BATTLECRUISER returns generic Api::AbilityId::ATTACK
10155
+ def ability_id: () -> Integer
10156
+ end
10157
+
10158
+ # Protobuf virtual class.
10159
+ class ActionToggleAutocast < Google::Protobuf::AbstractMessage
10160
+ include Api::AbilityRemapable
10161
+
10162
+ # Ability Id. The generic id or "remapid".
10163
+ # i.e. Api::AbilityId::ATTACK_BATTLECRUISER returns generic Api::AbilityId::ATTACK
10164
+ def ability_id: () -> Integer
10320
10165
  end
10321
10166
 
10322
10167
  # Protobuf virtual enum.
@@ -10345,7 +10190,7 @@ module Api
10345
10190
 
10346
10191
  # sord omit - no YARD type given for "z:", using untyped
10347
10192
  # Create a new 3d Point, by adding a y axis.
10348
- def to_3d: (z: untyped) -> Api::Point
10193
+ def to_3d: (?z: untyped) -> Api::Point
10349
10194
 
10350
10195
  # Adds additional functionality to message class Api::Point2D
10351
10196
  module ClassMethods
@@ -10360,6 +10205,12 @@ module Api
10360
10205
  end
10361
10206
  end
10362
10207
 
10208
+ # Adds additional functionality to message object Api::Unit
10209
+ module UnitTypeExtension
10210
+ # sord omit - no YARD return type given, using untyped
10211
+ def mood: () -> untyped
10212
+ end
10213
+
10363
10214
  # Adds additional functionality to message object Api::PowerSource
10364
10215
  module PowerSourceExtension
10365
10216
  include Sc2::Position
@@ -10408,7 +10259,9 @@ module Api
10408
10259
  # Randomly adjusts both x and y by a range of: -offset..offset
10409
10260
  #
10410
10261
  # _@param_ `offset`
10411
- def random_offset: (Float offset) -> Api::Point2D
10262
+ #
10263
+ # _@return_ — new Position
10264
+ def random_offset: (Float offset) -> Sc2::Position
10412
10265
 
10413
10266
  # sord omit - no YARD type given for "offset", using untyped
10414
10267
  # Changes this point's x and y by the supplied offset
@@ -10420,15 +10273,15 @@ module Api
10420
10273
  # sord omit - no YARD type given for "y", using untyped
10421
10274
  # Creates a new point with x and y which is offset
10422
10275
  #
10423
- # _@return_ — self
10424
- def offset: (untyped x, untyped y) -> Api::Point2D
10276
+ # _@return_ — new Position
10277
+ def offset: (?untyped x, ?untyped y) -> Sc2::Position
10425
10278
 
10426
10279
  # sord omit - no YARD type given for "x", using untyped
10427
10280
  # sord omit - no YARD type given for "y", using untyped
10428
10281
  # Changes this point's x and y by the supplied offset
10429
10282
  #
10430
10283
  # _@return_ — self
10431
- def offset!: (untyped x, untyped y) -> Sc2::Position
10284
+ def offset!: (?untyped x, ?untyped y) -> Sc2::Position
10432
10285
 
10433
10286
  # For vector returns the magnitude, synonymous with Math.hypot
10434
10287
  def magnitude: () -> Float
@@ -10510,6 +10363,10 @@ module Api
10510
10363
  end
10511
10364
  end
10512
10365
 
10366
+ # Adds additional functionality to message object Api::Unit
10367
+ module PointDistanceExtension
10368
+ end
10369
+
10513
10370
  # Adds additional functionality to message object Api::UnitTypeData
10514
10371
  module UnitTypeDataExtension
10515
10372
  # Sum of all morphs mineral cost