Class: Wowr::Classes::Intellect

Inherits:
BaseStat
  • Object
show all
Defined in:
lib/wowr/character.rb

Instance Attribute Summary collapse

Attributes inherited from BaseStat

#base, #effective

Instance Method Summary collapse

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_percentObject (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

#manaObject (readonly)

Returns the value of attribute mana.



362
363
364
# File 'lib/wowr/character.rb', line 362

def mana
  @mana
end

#pet_bonusObject (readonly)

Returns the value of attribute pet_bonus.



362
363
364
# File 'lib/wowr/character.rb', line 362

def pet_bonus
  @pet_bonus
end