sc2ai 0.0.5 → 0.0.6

Sign up to get free protection for your applications and to get access to all the features.
data/sig/sc2ai.rbs CHANGED
@@ -338,7 +338,7 @@ module Sc2
338
338
  def on_status_change: (Symbol status) -> untyped
339
339
 
340
340
  # Determines if your game_info will be refreshed at this moment
341
- # Has a hard-capped refresh of only ever 2 steps
341
+ # Has a hard-capped refresh of only ever 4 steps
342
342
  # In general game_info is only refreshed Player::Bot reads from pathing_grid or placement_grid
343
343
  def game_info_stale?: () -> bool
344
344
 
@@ -985,6 +985,10 @@ module Sc2
985
985
  # Returns the upgrade ids which are researching or queued
986
986
  def upgrade_in_progress?: (untyped upgrade_id) -> bool
987
987
 
988
+ # sord omit - no YARD type given for "unit_type_id", using untyped
989
+ # For this unit type, tells you how many are in progress by checking orders for all it's sources.
990
+ def units_in_progress: (untyped unit_type_id) -> Integer
991
+
988
992
  # Returns static [Api::UnitTypeData] for a unit
989
993
  #
990
994
  # _@param_ `unit` — Api::UnitTypeId or Api::Unit
@@ -1102,6 +1106,10 @@ module Sc2
1102
1106
  # Returns the upgrade ids which are researching or queued
1103
1107
  def upgrade_in_progress?: (untyped upgrade_id) -> bool
1104
1108
 
1109
+ # sord omit - no YARD type given for "unit_type_id", using untyped
1110
+ # For this unit type, tells you how many are in progress by checking orders for all it's sources.
1111
+ def units_in_progress: (untyped unit_type_id) -> Integer
1112
+
1105
1113
  # Returns static [Api::UnitTypeData] for a unit
1106
1114
  #
1107
1115
  # _@param_ `unit` — Api::UnitTypeId or Api::Unit
@@ -1415,6 +1423,10 @@ module Sc2
1415
1423
  # Returns the upgrade ids which are researching or queued
1416
1424
  def upgrade_in_progress?: (untyped upgrade_id) -> bool
1417
1425
 
1426
+ # sord omit - no YARD type given for "unit_type_id", using untyped
1427
+ # For this unit type, tells you how many are in progress by checking orders for all it's sources.
1428
+ def units_in_progress: (untyped unit_type_id) -> Integer
1429
+
1418
1430
  # Returns static [Api::UnitTypeData] for a unit
1419
1431
  #
1420
1432
  # _@param_ `unit` — Api::UnitTypeId or Api::Unit
@@ -1835,6 +1847,16 @@ module Sc2
1835
1847
  # One pixel covers one whole block. Rounds fractionated positions down.
1836
1848
  def parsed_placement_grid: () -> Numo::Bit
1837
1849
 
1850
+ # Whether this tile is where an expansion is supposed to be placed.
1851
+ # To see if a unit/structure is blocking an expansion, pass their coordinates to this method.
1852
+ #
1853
+ # _@param_ `x`
1854
+ #
1855
+ # _@param_ `y`
1856
+ #
1857
+ # _@return_ — true if location has creep on it
1858
+ def expo_placement?: (x: (Float | Integer), y: (Float | Integer)) -> bool
1859
+
1838
1860
  # sord warn - Numo::Bit wasn't able to be resolved to a constant in this project
1839
1861
  # Returns a grid where ony the expo locations are marked
1840
1862
  def expo_placement_grid: () -> Numo::Bit
@@ -1891,11 +1913,12 @@ module Sc2
1891
1913
  # _@return_ — z axis position between -16 and 16
1892
1914
  def terrain_height: (x: (Float | Integer), y: (Float | Integer)) -> Float
1893
1915
 
1894
- # sord omit - no YARD type given for "position", using untyped
1895
1916
  # Returns the terrain height (z) at position x and y for a point
1896
1917
  #
1918
+ # _@param_ `position`
1919
+ #
1897
1920
  # _@return_ — z axis position between -16 and 16
1898
- def terrain_height_for_pos: (untyped position) -> Float
1921
+ def terrain_height_for_pos: (Sc2::Position position) -> Float
1899
1922
 
1900
1923
  # sord warn - Numo::SFloat wasn't able to be resolved to a constant in this project
1901
1924
  # Returns a parsed terrain_height from bot.game_info.start_raw.
@@ -1961,6 +1984,7 @@ module Sc2
1961
1984
 
1962
1985
  # sord warn - Numo::Bit wasn't able to be resolved to a constant in this project
1963
1986
  # Provides parsed minimap representation of creep spread
1987
+ # Caches for 4 frames
1964
1988
  #
1965
1989
  # _@return_ — Numo array
1966
1990
  def parsed_creep: () -> Numo::Bit
@@ -2035,6 +2059,13 @@ module Sc2
2035
2059
  # _@return_ — UnitGroup of geysers for the base
2036
2060
  def geysers_for_base: ((Api::Unit | Sc2::Position) base) -> Sc2::UnitGroup
2037
2061
 
2062
+ # Gets geysers which have not been taken for a base or base position
2063
+ #
2064
+ # _@param_ `base` — base Unit or Position
2065
+ #
2066
+ # _@return_ — UnitGroup of geysers for the base
2067
+ def geysers_open_for_base: ((Api::Unit | Sc2::Position) base) -> Sc2::UnitGroup
2068
+
2038
2069
  # _@param_ `base` — base Unit or Position
2039
2070
  #
2040
2071
  # _@return_ — UnitGroup of resources (minerals+geysers)
@@ -2070,8 +2101,15 @@ module Sc2
2070
2101
  #
2071
2102
  # _@param_ `random` — number of nearest points to randomly choose from. 1 for nearest point.
2072
2103
  #
2104
+ # _@param_ `in_power` — whether this must be on a power field
2105
+ #
2073
2106
  # _@return_ — buildable location, nil if no buildable location found
2074
- def build_placement_near: (length: Integer, target: (Api::Unit | Sc2::Position), ?random: Integer) -> Api::Point2D?
2107
+ def build_placement_near: (
2108
+ length: Integer,
2109
+ target: (Api::Unit | Sc2::Position),
2110
+ ?random: Integer,
2111
+ ?in_power: bool
2112
+ ) -> Api::Point2D?
2075
2113
 
2076
2114
  # Draws a grid within a unit (pylon/prisms) radius, then selects points which are placeable
2077
2115
  #
@@ -2104,7 +2142,6 @@ module Sc2
2104
2142
  ?count: Integer
2105
2143
  ) -> ::Array[Api::Point2D]
2106
2144
 
2107
- # sord warn - Sc2::Location wasn't able to be resolved to a constant in this project
2108
2145
  # Gets a random point near a location with a positive/negative offset applied to both x and y
2109
2146
  #
2110
2147
  # _@param_ `pos`
@@ -2115,13 +2152,12 @@ module Sc2
2115
2152
  # Randomly randomly adjust both x and y by a range of -3.5 or +3.5
2116
2153
  # geo.point_random_near(point: structures.hq.first, offset: 3.5)
2117
2154
  # ```
2118
- def point_random_near: (pos: Sc2::Location, ?offset: Float) -> Api::Point2D
2155
+ def point_random_near: (pos: Sc2::Position, ?offset: Float) -> Api::Point2D
2119
2156
 
2120
- # sord warn - Sc2::Location wasn't able to be resolved to a constant in this project
2121
2157
  # _@param_ `pos`
2122
2158
  #
2123
2159
  # _@param_ `radius`
2124
- def point_random_on_circle: (pos: Sc2::Location, ?radius: Float) -> Api::Point2D
2160
+ def point_random_on_circle: (pos: Sc2::Position, ?radius: Float) -> Api::Point2D
2125
2161
 
2126
2162
  # _@return_ — player with active connection
2127
2163
  attr_accessor bot: (Sc2::Player | untyped)
@@ -2137,7 +2173,7 @@ module Sc2
2137
2173
  def on_status_change: (Symbol status) -> untyped
2138
2174
 
2139
2175
  # Determines if your game_info will be refreshed at this moment
2140
- # Has a hard-capped refresh of only ever 2 steps
2176
+ # Has a hard-capped refresh of only ever 4 steps
2141
2177
  # In general game_info is only refreshed Player::Bot reads from pathing_grid or placement_grid
2142
2178
  def game_info_stale?: () -> bool
2143
2179
 
@@ -2151,7 +2187,7 @@ module Sc2
2151
2187
  attr_accessor status: (Symbol | untyped)
2152
2188
 
2153
2189
  # _@return_ — current game loop
2154
- attr_accessor game_loop: Integer
2190
+ attr_accessor game_loop: (Integer | untyped)
2155
2191
 
2156
2192
  # sord warn - Api::ResponseGameInfo wasn't able to be resolved to a constant in this project
2157
2193
  # sord warn - Api::ResponseGameInfo wasn't able to be resolved to a constant in this project
@@ -2227,6 +2263,10 @@ module Sc2
2227
2263
  # Returns the upgrade ids which are researching or queued
2228
2264
  def upgrade_in_progress?: (untyped upgrade_id) -> bool
2229
2265
 
2266
+ # sord omit - no YARD type given for "unit_type_id", using untyped
2267
+ # For this unit type, tells you how many are in progress by checking orders for all it's sources.
2268
+ def units_in_progress: (untyped unit_type_id) -> Integer
2269
+
2230
2270
  # Returns static [Api::UnitTypeData] for a unit
2231
2271
  #
2232
2272
  # _@param_ `unit` — Api::UnitTypeId or Api::Unit
@@ -2312,7 +2352,7 @@ module Sc2
2312
2352
  def on_status_change: (Symbol status) -> untyped
2313
2353
 
2314
2354
  # Determines if your game_info will be refreshed at this moment
2315
- # Has a hard-capped refresh of only ever 2 steps
2355
+ # Has a hard-capped refresh of only ever 4 steps
2316
2356
  # In general game_info is only refreshed Player::Bot reads from pathing_grid or placement_grid
2317
2357
  def game_info_stale?: () -> bool
2318
2358
 
@@ -2750,21 +2790,17 @@ module Sc2
2750
2790
  ?ignore_resource_requirements: bool
2751
2791
  ) -> Api::ResponseQuery
2752
2792
 
2753
- # sord warn - Api::RequestQueryPathing wasn't able to be resolved to a constant in this project
2754
2793
  # sord warn - Api::RequestQueryPathing wasn't able to be resolved to a constant in this project
2755
2794
  # sord warn - Api::ResponseQueryPathing wasn't able to be resolved to a constant in this project
2756
- # sord warn - Api::ResponseQueryPathing wasn't able to be resolved to a constant in this project
2757
2795
  # Queries one or more pathing queries
2758
2796
  #
2759
2797
  # _@param_ `queries` — one or more pathing queries
2760
2798
  #
2761
2799
  # _@return_ — one or more results depending on input size
2762
- def query_pathings: ((::Array[Api::RequestQueryPathing] | Api::RequestQueryPathing) queries) -> (::Array[Api::ResponseQueryPathing] | Api::ResponseQueryPathing)
2800
+ def query_pathings: (::Array[Api::RequestQueryPathing] queries) -> ::Array[Api::ResponseQueryPathing]
2763
2801
 
2764
- # sord warn - Api::RequestQueryAvailableAbilities wasn't able to be resolved to a constant in this project
2765
2802
  # sord warn - Api::RequestQueryAvailableAbilities wasn't able to be resolved to a constant in this project
2766
2803
  # sord warn - Api::ResponseQueryAvailableAbilities wasn't able to be resolved to a constant in this project
2767
- # sord warn - Api::ResponseQueryAvailableAbilities wasn't able to be resolved to a constant in this project
2768
2804
  # Queries one or more ability-available checks
2769
2805
  #
2770
2806
  # _@param_ `queries` — one or more pathing queries
@@ -2772,9 +2808,8 @@ module Sc2
2772
2808
  # _@param_ `ignore_resource_requirements` — Ignores requirements like food, minerals and so on.
2773
2809
  #
2774
2810
  # _@return_ — one or more results depending on input size
2775
- def query_abilities: ((::Array[Api::RequestQueryAvailableAbilities] | Api::RequestQueryAvailableAbilities) queries, ?ignore_resource_requirements: bool) -> (::Array[Api::ResponseQueryAvailableAbilities] | Api::ResponseQueryAvailableAbilities)
2811
+ def query_abilities: (::Array[Api::RequestQueryAvailableAbilities] queries, ?ignore_resource_requirements: bool) -> ::Array[Api::ResponseQueryAvailableAbilities]
2776
2812
 
2777
- # sord warn - Api::ResponseQueryAvailableAbilities wasn't able to be resolved to a constant in this project
2778
2813
  # sord warn - Api::ResponseQueryAvailableAbilities wasn't able to be resolved to a constant in this project
2779
2814
  # Queries available abilities for units
2780
2815
  #
@@ -2783,18 +2818,26 @@ module Sc2
2783
2818
  # _@param_ `ignore_resource_requirements` — Ignores requirements like food, minerals and so on.
2784
2819
  #
2785
2820
  # _@return_ — one or more results depending on input size
2786
- def query_abilities_for_unit_tags: ((::Array[Integer] | Integer) unit_tags, ?ignore_resource_requirements: bool) -> (::Array[Api::ResponseQueryAvailableAbilities] | Api::ResponseQueryAvailableAbilities)
2821
+ def query_abilities_for_unit_tags: (::Array[Integer] unit_tags, ?ignore_resource_requirements: bool) -> ::Array[Api::ResponseQueryAvailableAbilities]
2822
+
2823
+ # sord omit - no YARD type given for "ignore_resource_requirements:", using untyped
2824
+ # sord omit - no YARD return type given, using untyped
2825
+ # Queries available ability ids for one unit
2826
+ # Shortened response over #query_abilities_for_unit_tags, since we know the tag already
2827
+ # and can just return an array of ability ids.
2828
+ # Note: Querying single units are expensive and should be batched with #query_abilities_for_unit_tags
2829
+ #
2830
+ # _@param_ `unit` — a unit or a tag.
2831
+ def query_ability_ids_for_unit: ((Api::Unit | Integer) unit, ?ignore_resource_requirements: untyped) -> untyped
2787
2832
 
2788
- # sord warn - Api::RequestQueryBuildingPlacement wasn't able to be resolved to a constant in this project
2789
2833
  # sord warn - Api::RequestQueryBuildingPlacement wasn't able to be resolved to a constant in this project
2790
2834
  # sord warn - Api::ResponseQueryBuildingPlacement wasn't able to be resolved to a constant in this project
2791
- # sord warn - Api::ResponseQueryBuildingPlacement wasn't able to be resolved to a constant in this project
2792
2835
  # Queries one or more pathing queries
2793
2836
  #
2794
2837
  # _@param_ `queries` — one or more placement queries
2795
2838
  #
2796
2839
  # _@return_ — one or more results depending on input size
2797
- def query_placements: ((::Array[Api::RequestQueryBuildingPlacement] | Api::RequestQueryBuildingPlacement) queries) -> (::Array[Api::ResponseQueryBuildingPlacement] | Api::ResponseQueryBuildingPlacement)
2840
+ def query_placements: (::Array[Api::RequestQueryBuildingPlacement] queries) -> ::Array[Api::ResponseQueryBuildingPlacement]
2798
2841
 
2799
2842
  # sord omit - no YARD return type given, using untyped
2800
2843
  # Generates a replay.
@@ -3051,19 +3094,15 @@ module Sc2
3051
3094
  ) -> Api::ResponseQuery
3052
3095
 
3053
3096
  # sord warn - Api::RequestQueryPathing wasn't able to be resolved to a constant in this project
3054
- # sord warn - Api::RequestQueryPathing wasn't able to be resolved to a constant in this project
3055
- # sord warn - Api::ResponseQueryPathing wasn't able to be resolved to a constant in this project
3056
3097
  # sord warn - Api::ResponseQueryPathing wasn't able to be resolved to a constant in this project
3057
3098
  # Queries one or more pathing queries
3058
3099
  #
3059
3100
  # _@param_ `queries` — one or more pathing queries
3060
3101
  #
3061
3102
  # _@return_ — one or more results depending on input size
3062
- def query_pathings: ((::Array[Api::RequestQueryPathing] | Api::RequestQueryPathing) queries) -> (::Array[Api::ResponseQueryPathing] | Api::ResponseQueryPathing)
3103
+ def query_pathings: (::Array[Api::RequestQueryPathing] queries) -> ::Array[Api::ResponseQueryPathing]
3063
3104
 
3064
3105
  # sord warn - Api::RequestQueryAvailableAbilities wasn't able to be resolved to a constant in this project
3065
- # sord warn - Api::RequestQueryAvailableAbilities wasn't able to be resolved to a constant in this project
3066
- # sord warn - Api::ResponseQueryAvailableAbilities wasn't able to be resolved to a constant in this project
3067
3106
  # sord warn - Api::ResponseQueryAvailableAbilities wasn't able to be resolved to a constant in this project
3068
3107
  # Queries one or more ability-available checks
3069
3108
  #
@@ -3072,9 +3111,8 @@ module Sc2
3072
3111
  # _@param_ `ignore_resource_requirements` — Ignores requirements like food, minerals and so on.
3073
3112
  #
3074
3113
  # _@return_ — one or more results depending on input size
3075
- def query_abilities: ((::Array[Api::RequestQueryAvailableAbilities] | Api::RequestQueryAvailableAbilities) queries, ?ignore_resource_requirements: bool) -> (::Array[Api::ResponseQueryAvailableAbilities] | Api::ResponseQueryAvailableAbilities)
3114
+ def query_abilities: (::Array[Api::RequestQueryAvailableAbilities] queries, ?ignore_resource_requirements: bool) -> ::Array[Api::ResponseQueryAvailableAbilities]
3076
3115
 
3077
- # sord warn - Api::ResponseQueryAvailableAbilities wasn't able to be resolved to a constant in this project
3078
3116
  # sord warn - Api::ResponseQueryAvailableAbilities wasn't able to be resolved to a constant in this project
3079
3117
  # Queries available abilities for units
3080
3118
  #
@@ -3083,18 +3121,26 @@ module Sc2
3083
3121
  # _@param_ `ignore_resource_requirements` — Ignores requirements like food, minerals and so on.
3084
3122
  #
3085
3123
  # _@return_ — one or more results depending on input size
3086
- def query_abilities_for_unit_tags: ((::Array[Integer] | Integer) unit_tags, ?ignore_resource_requirements: bool) -> (::Array[Api::ResponseQueryAvailableAbilities] | Api::ResponseQueryAvailableAbilities)
3124
+ def query_abilities_for_unit_tags: (::Array[Integer] unit_tags, ?ignore_resource_requirements: bool) -> ::Array[Api::ResponseQueryAvailableAbilities]
3125
+
3126
+ # sord omit - no YARD type given for "ignore_resource_requirements:", using untyped
3127
+ # sord omit - no YARD return type given, using untyped
3128
+ # Queries available ability ids for one unit
3129
+ # Shortened response over #query_abilities_for_unit_tags, since we know the tag already
3130
+ # and can just return an array of ability ids.
3131
+ # Note: Querying single units are expensive and should be batched with #query_abilities_for_unit_tags
3132
+ #
3133
+ # _@param_ `unit` — a unit or a tag.
3134
+ def query_ability_ids_for_unit: ((Api::Unit | Integer) unit, ?ignore_resource_requirements: untyped) -> untyped
3087
3135
 
3088
- # sord warn - Api::RequestQueryBuildingPlacement wasn't able to be resolved to a constant in this project
3089
3136
  # sord warn - Api::RequestQueryBuildingPlacement wasn't able to be resolved to a constant in this project
3090
3137
  # sord warn - Api::ResponseQueryBuildingPlacement wasn't able to be resolved to a constant in this project
3091
- # sord warn - Api::ResponseQueryBuildingPlacement wasn't able to be resolved to a constant in this project
3092
3138
  # Queries one or more pathing queries
3093
3139
  #
3094
3140
  # _@param_ `queries` — one or more placement queries
3095
3141
  #
3096
3142
  # _@return_ — one or more results depending on input size
3097
- def query_placements: ((::Array[Api::RequestQueryBuildingPlacement] | Api::RequestQueryBuildingPlacement) queries) -> (::Array[Api::ResponseQueryBuildingPlacement] | Api::ResponseQueryBuildingPlacement)
3143
+ def query_placements: (::Array[Api::RequestQueryBuildingPlacement] queries) -> ::Array[Api::ResponseQueryBuildingPlacement]
3098
3144
 
3099
3145
  # sord omit - no YARD return type given, using untyped
3100
3146
  # Generates a replay.
@@ -3440,6 +3486,10 @@ module Sc2
3440
3486
  # Allows, i.e. Player#units.workers to fire only the first time it's called per frame
3441
3487
  def cached: (untyped key) -> untyped
3442
3488
 
3489
+ # Returns the center (average) position of all units or nil if the group is empty.
3490
+ # Outliers effect this point
3491
+ def pos_centroid: () -> Api::Point2D?
3492
+
3443
3493
  # Our first unit's bot object.
3444
3494
  # Returns nil if units are empty, so use safetly operator bot&.method(...)
3445
3495
  #
@@ -3643,6 +3693,10 @@ module Sc2
3643
3693
  # _@return_ — gas structures
3644
3694
  def completed: () -> UnitGroup
3645
3695
 
3696
+ # sord omit - no YARD return type given, using untyped
3697
+ # Selects only units which do not have orders
3698
+ def idle: () -> untyped
3699
+
3646
3700
  # Selects mineral fields
3647
3701
  #
3648
3702
  # _@return_ — mineral fields
@@ -3697,6 +3751,9 @@ module Sc2
3697
3751
  # Selects overlords
3698
3752
  def overlords: () -> Sc2::UnitGroup
3699
3753
 
3754
+ # Selects overseers
3755
+ def overseers: () -> Sc2::UnitGroup
3756
+
3700
3757
  # Selects creep tumors (all)
3701
3758
  # CREEPTUMORQUEEN is still building & burrowing
3702
3759
  # while CREEPTUMOR was spread from another tumor still building & burrowing
@@ -4131,10 +4188,17 @@ module Sc2
4131
4188
  end
4132
4189
 
4133
4190
  # A unified construct that tames Api::* messages which contain location data
4134
- # Items which are of type Sc2::Location will have #x and #y property at the least.
4191
+ # Items which are of type Sc2::Position will have #x and #y property at the least.
4135
4192
  module Position
4136
4193
  TOLERANCE: untyped
4137
4194
 
4195
+ # sord omit - no YARD type given for "other", using untyped
4196
+ # sord omit - no YARD return type given, using untyped
4197
+ # Loose equality matches on floats x and y.
4198
+ # We never check z-axis, because the map is single-level.
4199
+ # TODO: We should almost certainly introduce TOLERANCE here, but verify it's cost first.
4200
+ def ==: (untyped other) -> untyped
4201
+
4138
4202
  # A new point representing the sum of this point and the other point.
4139
4203
  #
4140
4204
  # _@param_ `other` — The other point/number to add.
@@ -4155,10 +4219,19 @@ module Sc2
4155
4219
  # _@return_ — A new point representing this point divided by the scalar.
4156
4220
  def divide: (Float scalar) -> Api::Point2D
4157
4221
 
4158
- # sord omit - no YARD return type given, using untyped
4159
- # Bug: Psych implements method 'y' on Kernel, but protobuf uses method_missing to read AbstractMethod
4160
- # We send method missing ourselves when y to fix this chain.
4161
- def y: () -> untyped
4222
+ # Returns x coordinate
4223
+ def x: () -> Float
4224
+
4225
+ # sord infer - inferred type of parameter "x" as Float using getter's return type
4226
+ # Sets x coordinate
4227
+ def x=: (Float x) -> Float
4228
+
4229
+ # Returns y coordinate
4230
+ def y: () -> Float
4231
+
4232
+ # sord infer - inferred type of parameter "y" as Float using getter's return type
4233
+ # Sets y coordinate
4234
+ def y=: (Float y) -> Float
4162
4235
 
4163
4236
  # Randomly adjusts both x and y by a range of: -offset..offset
4164
4237
  #
@@ -8749,6 +8822,15 @@ module Api
8749
8822
  # sord omit - no YARD return type given, using untyped
8750
8823
  def hash: () -> untyped
8751
8824
 
8825
+ # Returns an integer unique identifier
8826
+ # If the unit goes out of vision and is snapshot-able, they get a random id
8827
+ # - Such a unit gets the same unit tag when it re-enters vision
8828
+ def tag: () -> Integer
8829
+
8830
+ # sord infer - inferred type of parameter "tag" as Integer using getter's return type
8831
+ # Sets unit tag
8832
+ def tag=: (Integer tag) -> Integer
8833
+
8752
8834
  # Returns static [Api::UnitTypeData] for a unit
8753
8835
  def unit_data: () -> Api::UnitTypeData
8754
8836
 
@@ -8827,6 +8909,15 @@ module Api
8827
8909
  # _@return_ — whether unit has attribute :Summoned
8828
8910
  def is_summoned?: () -> bool
8829
8911
 
8912
+ # Whether unit is effected by buff_id
8913
+ #
8914
+ # _@param_ `buff_id`
8915
+ #
8916
+ # ```ruby
8917
+ # unit.has_buff??(Api::BuffId::QUEENSPAWNLARVATIMER)
8918
+ # ```
8919
+ def has_buff?: (Integer buff_id) -> bool
8920
+
8830
8921
  # sord omit - no YARD return type given, using untyped
8831
8922
  # Performs action on this unit
8832
8923
  #
@@ -9176,6 +9267,13 @@ module Api
9176
9267
  # Creates a Point2D using x and y
9177
9268
  def to_p2d: () -> Api::Point2D
9178
9269
 
9270
+ # sord omit - no YARD type given for "other", using untyped
9271
+ # sord omit - no YARD return type given, using untyped
9272
+ # Loose equality matches on floats x and y.
9273
+ # We never check z-axis, because the map is single-level.
9274
+ # TODO: We should almost certainly introduce TOLERANCE here, but verify it's cost first.
9275
+ def ==: (untyped other) -> untyped
9276
+
9179
9277
  # A new point representing the sum of this point and the other point.
9180
9278
  #
9181
9279
  # _@param_ `other` — The other point/number to add.
@@ -9196,10 +9294,19 @@ module Api
9196
9294
  # _@return_ — A new point representing this point divided by the scalar.
9197
9295
  def divide: (Float scalar) -> Api::Point2D
9198
9296
 
9199
- # sord omit - no YARD return type given, using untyped
9200
- # Bug: Psych implements method 'y' on Kernel, but protobuf uses method_missing to read AbstractMethod
9201
- # We send method missing ourselves when y to fix this chain.
9202
- def y: () -> untyped
9297
+ # Returns x coordinate
9298
+ def x: () -> Float
9299
+
9300
+ # sord infer - inferred type of parameter "x" as Float using getter's return type
9301
+ # Sets x coordinate
9302
+ def x=: (Float x) -> Float
9303
+
9304
+ # Returns y coordinate
9305
+ def y: () -> Float
9306
+
9307
+ # sord infer - inferred type of parameter "y" as Float using getter's return type
9308
+ # Sets y coordinate
9309
+ def y=: (Float y) -> Float
9203
9310
 
9204
9311
  # Randomly adjusts both x and y by a range of: -offset..offset
9205
9312
  #
@@ -9318,6 +9425,13 @@ module Api
9318
9425
  # Create a new 3d Point, by adding a y axis.
9319
9426
  def to_3d: (z: untyped) -> Api::Point
9320
9427
 
9428
+ # sord omit - no YARD type given for "other", using untyped
9429
+ # sord omit - no YARD return type given, using untyped
9430
+ # Loose equality matches on floats x and y.
9431
+ # We never check z-axis, because the map is single-level.
9432
+ # TODO: We should almost certainly introduce TOLERANCE here, but verify it's cost first.
9433
+ def ==: (untyped other) -> untyped
9434
+
9321
9435
  # A new point representing the sum of this point and the other point.
9322
9436
  #
9323
9437
  # _@param_ `other` — The other point/number to add.
@@ -9338,10 +9452,19 @@ module Api
9338
9452
  # _@return_ — A new point representing this point divided by the scalar.
9339
9453
  def divide: (Float scalar) -> Api::Point2D
9340
9454
 
9341
- # sord omit - no YARD return type given, using untyped
9342
- # Bug: Psych implements method 'y' on Kernel, but protobuf uses method_missing to read AbstractMethod
9343
- # We send method missing ourselves when y to fix this chain.
9344
- def y: () -> untyped
9455
+ # Returns x coordinate
9456
+ def x: () -> Float
9457
+
9458
+ # sord infer - inferred type of parameter "x" as Float using getter's return type
9459
+ # Sets x coordinate
9460
+ def x=: (Float x) -> Float
9461
+
9462
+ # Returns y coordinate
9463
+ def y: () -> Float
9464
+
9465
+ # sord infer - inferred type of parameter "y" as Float using getter's return type
9466
+ # Sets y coordinate
9467
+ def y=: (Float y) -> Float
9345
9468
 
9346
9469
  # Randomly adjusts both x and y by a range of: -offset..offset
9347
9470
  #
@@ -9439,6 +9562,13 @@ module Api
9439
9562
  class PointI < Google::Protobuf::AbstractMessage
9440
9563
  include Sc2::Position
9441
9564
 
9565
+ # sord omit - no YARD type given for "other", using untyped
9566
+ # sord omit - no YARD return type given, using untyped
9567
+ # Loose equality matches on floats x and y.
9568
+ # We never check z-axis, because the map is single-level.
9569
+ # TODO: We should almost certainly introduce TOLERANCE here, but verify it's cost first.
9570
+ def ==: (untyped other) -> untyped
9571
+
9442
9572
  # A new point representing the sum of this point and the other point.
9443
9573
  #
9444
9574
  # _@param_ `other` — The other point/number to add.
@@ -9459,10 +9589,19 @@ module Api
9459
9589
  # _@return_ — A new point representing this point divided by the scalar.
9460
9590
  def divide: (Float scalar) -> Api::Point2D
9461
9591
 
9462
- # sord omit - no YARD return type given, using untyped
9463
- # Bug: Psych implements method 'y' on Kernel, but protobuf uses method_missing to read AbstractMethod
9464
- # We send method missing ourselves when y to fix this chain.
9465
- def y: () -> untyped
9592
+ # Returns x coordinate
9593
+ def x: () -> Float
9594
+
9595
+ # sord infer - inferred type of parameter "x" as Float using getter's return type
9596
+ # Sets x coordinate
9597
+ def x=: (Float x) -> Float
9598
+
9599
+ # Returns y coordinate
9600
+ def y: () -> Float
9601
+
9602
+ # sord infer - inferred type of parameter "y" as Float using getter's return type
9603
+ # Sets y coordinate
9604
+ def y=: (Float y) -> Float
9466
9605
 
9467
9606
  # Randomly adjusts both x and y by a range of: -offset..offset
9468
9607
  #
@@ -9571,6 +9710,13 @@ module Api
9571
9710
  # ```
9572
9711
  def self.[]: (untyped x, untyped y, untyped z) -> Api::Point
9573
9712
 
9713
+ # sord omit - no YARD type given for "other", using untyped
9714
+ # sord omit - no YARD return type given, using untyped
9715
+ # Loose equality matches on floats x and y.
9716
+ # We never check z-axis, because the map is single-level.
9717
+ # TODO: We should almost certainly introduce TOLERANCE here, but verify it's cost first.
9718
+ def ==: (untyped other) -> untyped
9719
+
9574
9720
  # A new point representing the sum of this point and the other point.
9575
9721
  #
9576
9722
  # _@param_ `other` — The other point/number to add.
@@ -9591,10 +9737,19 @@ module Api
9591
9737
  # _@return_ — A new point representing this point divided by the scalar.
9592
9738
  def divide: (Float scalar) -> Api::Point2D
9593
9739
 
9594
- # sord omit - no YARD return type given, using untyped
9595
- # Bug: Psych implements method 'y' on Kernel, but protobuf uses method_missing to read AbstractMethod
9596
- # We send method missing ourselves when y to fix this chain.
9597
- def y: () -> untyped
9740
+ # Returns x coordinate
9741
+ def x: () -> Float
9742
+
9743
+ # sord infer - inferred type of parameter "x" as Float using getter's return type
9744
+ # Sets x coordinate
9745
+ def x=: (Float x) -> Float
9746
+
9747
+ # Returns y coordinate
9748
+ def y: () -> Float
9749
+
9750
+ # sord infer - inferred type of parameter "y" as Float using getter's return type
9751
+ # Sets y coordinate
9752
+ def y=: (Float y) -> Float
9598
9753
 
9599
9754
  # Randomly adjusts both x and y by a range of: -offset..offset
9600
9755
  #
@@ -9692,6 +9847,13 @@ module Api
9692
9847
  class Size2DI < Google::Protobuf::AbstractMessage
9693
9848
  include Sc2::Position
9694
9849
 
9850
+ # sord omit - no YARD type given for "other", using untyped
9851
+ # sord omit - no YARD return type given, using untyped
9852
+ # Loose equality matches on floats x and y.
9853
+ # We never check z-axis, because the map is single-level.
9854
+ # TODO: We should almost certainly introduce TOLERANCE here, but verify it's cost first.
9855
+ def ==: (untyped other) -> untyped
9856
+
9695
9857
  # A new point representing the sum of this point and the other point.
9696
9858
  #
9697
9859
  # _@param_ `other` — The other point/number to add.
@@ -9712,10 +9874,19 @@ module Api
9712
9874
  # _@return_ — A new point representing this point divided by the scalar.
9713
9875
  def divide: (Float scalar) -> Api::Point2D
9714
9876
 
9715
- # sord omit - no YARD return type given, using untyped
9716
- # Bug: Psych implements method 'y' on Kernel, but protobuf uses method_missing to read AbstractMethod
9717
- # We send method missing ourselves when y to fix this chain.
9718
- def y: () -> untyped
9877
+ # Returns x coordinate
9878
+ def x: () -> Float
9879
+
9880
+ # sord infer - inferred type of parameter "x" as Float using getter's return type
9881
+ # Sets x coordinate
9882
+ def x=: (Float x) -> Float
9883
+
9884
+ # Returns y coordinate
9885
+ def y: () -> Float
9886
+
9887
+ # sord infer - inferred type of parameter "y" as Float using getter's return type
9888
+ # Sets y coordinate
9889
+ def y=: (Float y) -> Float
9719
9890
 
9720
9891
  # Randomly adjusts both x and y by a range of: -offset..offset
9721
9892
  #
@@ -9816,6 +9987,15 @@ module Api
9816
9987
  # sord omit - no YARD return type given, using untyped
9817
9988
  def hash: () -> untyped
9818
9989
 
9990
+ # Returns an integer unique identifier
9991
+ # If the unit goes out of vision and is snapshot-able, they get a random id
9992
+ # - Such a unit gets the same unit tag when it re-enters vision
9993
+ def tag: () -> Integer
9994
+
9995
+ # sord infer - inferred type of parameter "tag" as Integer using getter's return type
9996
+ # Sets unit tag
9997
+ def tag=: (Integer tag) -> Integer
9998
+
9819
9999
  # Returns static [Api::UnitTypeData] for a unit
9820
10000
  def unit_data: () -> Api::UnitTypeData
9821
10001
 
@@ -9894,6 +10074,15 @@ module Api
9894
10074
  # _@return_ — whether unit has attribute :Summoned
9895
10075
  def is_summoned?: () -> bool
9896
10076
 
10077
+ # Whether unit is effected by buff_id
10078
+ #
10079
+ # _@param_ `buff_id`
10080
+ #
10081
+ # ```ruby
10082
+ # unit.has_buff??(Api::BuffId::QUEENSPAWNLARVATIMER)
10083
+ # ```
10084
+ def has_buff?: (Integer buff_id) -> bool
10085
+
9897
10086
  # sord omit - no YARD return type given, using untyped
9898
10087
  # Performs action on this unit
9899
10088
  #
@@ -10175,6 +10364,13 @@ module Api
10175
10364
  module PowerSourceExtension
10176
10365
  include Sc2::Position
10177
10366
 
10367
+ # sord omit - no YARD type given for "other", using untyped
10368
+ # sord omit - no YARD return type given, using untyped
10369
+ # Loose equality matches on floats x and y.
10370
+ # We never check z-axis, because the map is single-level.
10371
+ # TODO: We should almost certainly introduce TOLERANCE here, but verify it's cost first.
10372
+ def ==: (untyped other) -> untyped
10373
+
10178
10374
  # A new point representing the sum of this point and the other point.
10179
10375
  #
10180
10376
  # _@param_ `other` — The other point/number to add.
@@ -10195,10 +10391,19 @@ module Api
10195
10391
  # _@return_ — A new point representing this point divided by the scalar.
10196
10392
  def divide: (Float scalar) -> Api::Point2D
10197
10393
 
10198
- # sord omit - no YARD return type given, using untyped
10199
- # Bug: Psych implements method 'y' on Kernel, but protobuf uses method_missing to read AbstractMethod
10200
- # We send method missing ourselves when y to fix this chain.
10201
- def y: () -> untyped
10394
+ # Returns x coordinate
10395
+ def x: () -> Float
10396
+
10397
+ # sord infer - inferred type of parameter "x" as Float using getter's return type
10398
+ # Sets x coordinate
10399
+ def x=: (Float x) -> Float
10400
+
10401
+ # Returns y coordinate
10402
+ def y: () -> Float
10403
+
10404
+ # sord infer - inferred type of parameter "y" as Float using getter's return type
10405
+ # Sets y coordinate
10406
+ def y=: (Float y) -> Float
10202
10407
 
10203
10408
  # Randomly adjusts both x and y by a range of: -offset..offset
10204
10409
  #
@@ -10320,6 +10525,13 @@ module Api
10320
10525
  # _@return_ — sum of vespene gas costs
10321
10526
  attr_accessor vespene_cost_sum: (Integer | untyped)
10322
10527
  end
10528
+
10529
+ # This module make sure that a read from method ability_id always returns the proper source id
10530
+ module AbilityRemapable
10531
+ # Ability Id. The generic id or "remapid".
10532
+ # i.e. Api::AbilityId::ATTACK_BATTLECRUISER returns generic Api::AbilityId::ATTACK
10533
+ def ability_id: () -> Integer
10534
+ end
10323
10535
  end
10324
10536
 
10325
10537
  # Array extensions