Module: Api::UnitTypeDataExtension
- Included in:
- UnitTypeData
- Defined in:
- lib/sc2ai/protocol/extensions/unit_type_data.rb
Overview
Adds additional functionality to message object Api::UnitTypeData
Instance Attribute Summary collapse
-
#air_damage ⇒ Float
Air weapon damage or 0.0.
-
#air_dps ⇒ Float
Air weapon damage per second or 0.0.
-
#air_range ⇒ Float
Air weapon range or 0.0 when it can’t shoot air.
-
#ground_damage ⇒ Float
Ground weapon damage or 0.0.
-
#ground_dps ⇒ Float
Ground weapon damage per second or 0.0.
-
#ground_range ⇒ Float
Ground weapon range or 0.0 when it can’t shoot ground.
-
#mineral_cost_sum ⇒ Integer
Sum of all morphs mineral cost i.e.
-
#placement_length ⇒ Integer
Length of tiles to build.
-
#vespene_cost_sum ⇒ Integer
Sum of all morphs vespene gas cost i.e.
Instance Attribute Details
#air_damage ⇒ Float
Air weapon damage or 0.0
45 46 47 |
# File 'lib/sc2ai/protocol/extensions/unit_type_data.rb', line 45 def air_damage @air_damage end |
#air_dps ⇒ Float
Air weapon damage per second or 0.0
55 56 57 |
# File 'lib/sc2ai/protocol/extensions/unit_type_data.rb', line 55 def air_dps @air_dps end |
#air_range ⇒ Float
Air weapon range or 0.0 when it can’t shoot air
35 36 37 |
# File 'lib/sc2ai/protocol/extensions/unit_type_data.rb', line 35 def air_range @air_range end |
#ground_damage ⇒ Float
Ground weapon damage or 0.0
40 41 42 |
# File 'lib/sc2ai/protocol/extensions/unit_type_data.rb', line 40 def ground_damage @ground_damage end |
#ground_dps ⇒ Float
Ground weapon damage per second or 0.0
50 51 52 |
# File 'lib/sc2ai/protocol/extensions/unit_type_data.rb', line 50 def ground_dps @ground_dps end |
#ground_range ⇒ Float
Ground weapon range or 0.0 when it can’t shoot ground
30 31 32 |
# File 'lib/sc2ai/protocol/extensions/unit_type_data.rb', line 30 def ground_range @ground_range end |
#mineral_cost_sum ⇒ Integer
Sum of all morphs mineral cost i.e. 550M Orbital command = 400M CC + 150M Upgrade i.e. 350M Hatchery = 50M Drone + 300M Build
11 12 13 |
# File 'lib/sc2ai/protocol/extensions/unit_type_data.rb', line 11 def mineral_cost_sum @mineral_cost_sum end |
#placement_length ⇒ Integer
Length of tiles to build. i.e. 5 for any Base-type (5x5) i.e. 3 for Barracks (3x3) i.e. 2 for Supply Depot (2x2)
25 26 27 |
# File 'lib/sc2ai/protocol/extensions/unit_type_data.rb', line 25 def placement_length @placement_length end |
#vespene_cost_sum ⇒ Integer
Sum of all morphs vespene gas cost i.e. 250G Broodlord = 100G Corruptor + 150G Morph
17 18 19 |
# File 'lib/sc2ai/protocol/extensions/unit_type_data.rb', line 17 def vespene_cost_sum @vespene_cost_sum end |