Class: Wowr::Classes::Strength

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

Returns a new instance of Strength.



344
345
346
347
348
349
# File 'lib/wowr/character.rb', line 344

def initialize(elem)
	@base				= elem['base'].to_i
	@effective 	= elem['effective'].to_i
	@attack 		= elem['attack'].to_i
	@block 			= elem['block'].to_i == -1 ? nil : elem['block'].to_i
end

Instance Attribute Details

#attackObject (readonly)

Returns the value of attribute attack.



343
344
345
# File 'lib/wowr/character.rb', line 343

def attack
  @attack
end

#blockObject (readonly)

Returns the value of attribute block.



343
344
345
# File 'lib/wowr/character.rb', line 343

def block
  @block
end