Class: Wowr::Classes::Intellect
- Defined in:
- lib/wowr/character.rb
Instance Attribute Summary collapse
-
#crit_hit_percent ⇒ Object
readonly
Returns the value of attribute crit_hit_percent.
-
#mana ⇒ Object
readonly
Returns the value of attribute mana.
-
#pet_bonus ⇒ Object
readonly
Returns the value of attribute pet_bonus.
Attributes inherited from BaseStat
Instance Method Summary collapse
-
#initialize(elem) ⇒ Intellect
constructor
A new instance of Intellect.
Constructor Details
#initialize(elem) ⇒ Intellect
Returns a new instance of Intellect.
363 364 365 366 367 368 369 |
# File 'lib/wowr/character.rb', line 363 def initialize(elem) @base = elem[:base].to_i @effective = elem[:effective].to_i @mana = elem[:mana].to_i @crit_hit_percent = elem[:critHitPercent].to_f @pet_bonus = elem[:petBonus].to_i == -1 ? nil : elem[:petBonus].to_i end |
Instance Attribute Details
#crit_hit_percent ⇒ Object (readonly)
Returns the value of attribute crit_hit_percent.
362 363 364 |
# File 'lib/wowr/character.rb', line 362 def crit_hit_percent @crit_hit_percent end |
#mana ⇒ Object (readonly)
Returns the value of attribute mana.
362 363 364 |
# File 'lib/wowr/character.rb', line 362 def mana @mana end |
#pet_bonus ⇒ Object (readonly)
Returns the value of attribute pet_bonus.
362 363 364 |
# File 'lib/wowr/character.rb', line 362 def pet_bonus @pet_bonus end |