Class: Wowr::Classes::Agility

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) ⇒ 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

#armorObject (readonly)

Returns the value of attribute armor.



341
342
343
# File 'lib/wowr/character.rb', line 341

def armor
  @armor
end

#attackObject (readonly)

Returns the value of attribute attack.



341
342
343
# File 'lib/wowr/character.rb', line 341

def attack
  @attack
end

#crit_hit_percentObject (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