Class: D3api::HeroStats
Constant Summary collapse
- STAT_MAPPINGS =
{ :life => 'life', :damage => 'damage', :attack_speed => 'attackSpeed', :armor => 'armor', :strength => 'strength', :dexterity => 'dexterity', :vitality => 'vitality', :intelligence => 'intelligence', :physical_resist => 'physicalResist', :fire_resist => 'fireResist', :cold_resist => 'coldResist', :lightning_resist => 'lightningResist', :poison_resist => 'poisonResist', :arcane_resist => 'arcaneResist', :crit_damage => 'critDamage', :block_chance => 'blockChance', :block_amount_min => 'blockAmountMin', :block_amount_max => 'blockAmountMax', :damage_increase => 'damageIncrease', :crit_chance => 'critChance', :damage_reduction => 'damageReduction', :thorns => 'thorns', :life_steal => 'lifeSteal', :life_per_kill => 'lifePerKill', :gold_find => 'goldFind', :magic_find => 'magicFind', :life_on_hit => 'lifeOnHit', :primary_resource => 'primaryResource', :secondary_resource => 'secondaryResource' }
Instance Attribute Summary collapse
-
#arcane_resist ⇒ Object
Returns the value of attribute arcane_resist.
-
#armor ⇒ Object
Returns the value of attribute armor.
-
#attack_speed ⇒ Object
Returns the value of attribute attack_speed.
-
#block_amount_max ⇒ Object
Returns the value of attribute block_amount_max.
-
#block_amount_min ⇒ Object
Returns the value of attribute block_amount_min.
-
#block_chance ⇒ Object
Returns the value of attribute block_chance.
-
#cold_resist ⇒ Object
Returns the value of attribute cold_resist.
-
#crit_chance ⇒ Object
Returns the value of attribute crit_chance.
-
#crit_damage ⇒ Object
Returns the value of attribute crit_damage.
-
#damage ⇒ Object
Returns the value of attribute damage.
-
#damage_increase ⇒ Object
Returns the value of attribute damage_increase.
-
#damage_reduction ⇒ Object
Returns the value of attribute damage_reduction.
-
#dexterity ⇒ Object
Returns the value of attribute dexterity.
-
#fire_resist ⇒ Object
Returns the value of attribute fire_resist.
-
#gold_find ⇒ Object
Returns the value of attribute gold_find.
-
#intelligence ⇒ Object
Returns the value of attribute intelligence.
-
#life ⇒ Object
Returns the value of attribute life.
-
#life_on_hit ⇒ Object
Returns the value of attribute life_on_hit.
-
#life_per_kill ⇒ Object
Returns the value of attribute life_per_kill.
-
#life_steal ⇒ Object
Returns the value of attribute life_steal.
-
#lightning_resist ⇒ Object
Returns the value of attribute lightning_resist.
-
#magic_find ⇒ Object
Returns the value of attribute magic_find.
-
#physical_resist ⇒ Object
Returns the value of attribute physical_resist.
-
#poison_resist ⇒ Object
Returns the value of attribute poison_resist.
-
#primary_resource ⇒ Object
Returns the value of attribute primary_resource.
-
#secondary_resource ⇒ Object
Returns the value of attribute secondary_resource.
-
#strength ⇒ Object
Returns the value of attribute strength.
-
#thorns ⇒ Object
Returns the value of attribute thorns.
-
#vitality ⇒ Object
Returns the value of attribute vitality.
Instance Method Summary collapse
-
#initialize(stat_values) ⇒ HeroStats
constructor
A new instance of HeroStats.
Methods included from Request
Methods included from Connection
Constructor Details
#initialize(stat_values) ⇒ HeroStats
Returns a new instance of HeroStats.
44 45 46 |
# File 'lib/d3api/hero/stats.rb', line 44 def initialize(stat_values) set_method(stat_values, STAT_MAPPINGS) end |
Instance Attribute Details
#arcane_resist ⇒ Object
Returns the value of attribute arcane_resist.
35 36 37 |
# File 'lib/d3api/hero/stats.rb', line 35 def arcane_resist @arcane_resist end |
#armor ⇒ Object
Returns the value of attribute armor.
35 36 37 |
# File 'lib/d3api/hero/stats.rb', line 35 def armor @armor end |
#attack_speed ⇒ Object
Returns the value of attribute attack_speed.
35 36 37 |
# File 'lib/d3api/hero/stats.rb', line 35 def attack_speed @attack_speed end |
#block_amount_max ⇒ Object
Returns the value of attribute block_amount_max.
35 36 37 |
# File 'lib/d3api/hero/stats.rb', line 35 def block_amount_max @block_amount_max end |
#block_amount_min ⇒ Object
Returns the value of attribute block_amount_min.
35 36 37 |
# File 'lib/d3api/hero/stats.rb', line 35 def block_amount_min @block_amount_min end |
#block_chance ⇒ Object
Returns the value of attribute block_chance.
35 36 37 |
# File 'lib/d3api/hero/stats.rb', line 35 def block_chance @block_chance end |
#cold_resist ⇒ Object
Returns the value of attribute cold_resist.
35 36 37 |
# File 'lib/d3api/hero/stats.rb', line 35 def cold_resist @cold_resist end |
#crit_chance ⇒ Object
Returns the value of attribute crit_chance.
35 36 37 |
# File 'lib/d3api/hero/stats.rb', line 35 def crit_chance @crit_chance end |
#crit_damage ⇒ Object
Returns the value of attribute crit_damage.
35 36 37 |
# File 'lib/d3api/hero/stats.rb', line 35 def crit_damage @crit_damage end |
#damage ⇒ Object
Returns the value of attribute damage.
35 36 37 |
# File 'lib/d3api/hero/stats.rb', line 35 def damage @damage end |
#damage_increase ⇒ Object
Returns the value of attribute damage_increase.
35 36 37 |
# File 'lib/d3api/hero/stats.rb', line 35 def damage_increase @damage_increase end |
#damage_reduction ⇒ Object
Returns the value of attribute damage_reduction.
35 36 37 |
# File 'lib/d3api/hero/stats.rb', line 35 def damage_reduction @damage_reduction end |
#dexterity ⇒ Object
Returns the value of attribute dexterity.
35 36 37 |
# File 'lib/d3api/hero/stats.rb', line 35 def dexterity @dexterity end |
#fire_resist ⇒ Object
Returns the value of attribute fire_resist.
35 36 37 |
# File 'lib/d3api/hero/stats.rb', line 35 def fire_resist @fire_resist end |
#gold_find ⇒ Object
Returns the value of attribute gold_find.
35 36 37 |
# File 'lib/d3api/hero/stats.rb', line 35 def gold_find @gold_find end |
#intelligence ⇒ Object
Returns the value of attribute intelligence.
35 36 37 |
# File 'lib/d3api/hero/stats.rb', line 35 def intelligence @intelligence end |
#life ⇒ Object
Returns the value of attribute life.
35 36 37 |
# File 'lib/d3api/hero/stats.rb', line 35 def life @life end |
#life_on_hit ⇒ Object
Returns the value of attribute life_on_hit.
35 36 37 |
# File 'lib/d3api/hero/stats.rb', line 35 def life_on_hit @life_on_hit end |
#life_per_kill ⇒ Object
Returns the value of attribute life_per_kill.
35 36 37 |
# File 'lib/d3api/hero/stats.rb', line 35 def life_per_kill @life_per_kill end |
#life_steal ⇒ Object
Returns the value of attribute life_steal.
35 36 37 |
# File 'lib/d3api/hero/stats.rb', line 35 def life_steal @life_steal end |
#lightning_resist ⇒ Object
Returns the value of attribute lightning_resist.
35 36 37 |
# File 'lib/d3api/hero/stats.rb', line 35 def lightning_resist @lightning_resist end |
#magic_find ⇒ Object
Returns the value of attribute magic_find.
35 36 37 |
# File 'lib/d3api/hero/stats.rb', line 35 def magic_find @magic_find end |
#physical_resist ⇒ Object
Returns the value of attribute physical_resist.
35 36 37 |
# File 'lib/d3api/hero/stats.rb', line 35 def physical_resist @physical_resist end |
#poison_resist ⇒ Object
Returns the value of attribute poison_resist.
35 36 37 |
# File 'lib/d3api/hero/stats.rb', line 35 def poison_resist @poison_resist end |
#primary_resource ⇒ Object
Returns the value of attribute primary_resource.
35 36 37 |
# File 'lib/d3api/hero/stats.rb', line 35 def primary_resource @primary_resource end |
#secondary_resource ⇒ Object
Returns the value of attribute secondary_resource.
35 36 37 |
# File 'lib/d3api/hero/stats.rb', line 35 def secondary_resource @secondary_resource end |
#strength ⇒ Object
Returns the value of attribute strength.
35 36 37 |
# File 'lib/d3api/hero/stats.rb', line 35 def strength @strength end |
#thorns ⇒ Object
Returns the value of attribute thorns.
35 36 37 |
# File 'lib/d3api/hero/stats.rb', line 35 def thorns @thorns end |
#vitality ⇒ Object
Returns the value of attribute vitality.
35 36 37 |
# File 'lib/d3api/hero/stats.rb', line 35 def vitality @vitality end |