Class: Wowr::Classes::Agility
- Defined in:
- lib/wowr/character.rb
Instance Attribute Summary collapse
-
#armor ⇒ Object
readonly
Returns the value of attribute armor.
-
#attack ⇒ Object
readonly
Returns the value of attribute attack.
-
#crit_hit_percent ⇒ Object
readonly
Returns the value of attribute crit_hit_percent.
Attributes inherited from BaseStat
Instance Method Summary collapse
-
#initialize(elem) ⇒ Agility
constructor
A new instance of Agility.
Constructor Details
#initialize(elem) ⇒ Agility
Returns a new instance of Agility.
342 343 344 345 346 347 348 |
# File 'lib/wowr/character.rb', line 342 def initialize(elem) @base = elem[:base].to_i @effective = elem[:effective].to_i @armor = elem[:armor].to_i @attack = elem[:attack].to_i == -1 ? nil : elem[:attack].to_i @crit_hit_percent = elem[:critHitPercent].to_f end |
Instance Attribute Details
#armor ⇒ Object (readonly)
Returns the value of attribute armor.
341 342 343 |
# File 'lib/wowr/character.rb', line 341 def armor @armor end |
#attack ⇒ Object (readonly)
Returns the value of attribute attack.
341 342 343 |
# File 'lib/wowr/character.rb', line 341 def attack @attack end |
#crit_hit_percent ⇒ Object (readonly)
Returns the value of attribute crit_hit_percent.
341 342 343 |
# File 'lib/wowr/character.rb', line 341 def crit_hit_percent @crit_hit_percent end |