Class: PfrpgUtility::Prerequisite::AttributePrereq

Inherits:
PfrpgUtility::Prerequisite
  • Object
show all
Defined in:
lib/pfrpg_utility/prerequisite/attribute_prereq.rb

Instance Method Summary collapse

Instance Method Details

#match(character) ⇒ Object



2
3
4
5
6
# File 'lib/pfrpg_utility/prerequisite/attribute_prereq.rb', line 2

def match(character)
  atr = @attribute.downcase
  str = "modified_#{atr[0..2]}"
  character.attributes.send(str) >= (@value.to_i)
end