Class: Dwarf
- Inherits:
-
PfrpgRaces::Race
- Object
- PfrpgRaces::Race
- Dwarf
- Defined in:
- lib/pfrpg_races/races/dwarf.rb
Instance Method Summary collapse
- #attribute_bonuses ⇒ Object
- #bonus_choices ⇒ Object
- #choose_ability_bonus? ⇒ Boolean
- #description ⇒ Object
- #int_languages ⇒ Object
- #languages ⇒ Object
- #name ⇒ Object
- #noarmor_effect ⇒ Object
- #race_id ⇒ Object
- #size ⇒ Object
- #source ⇒ Object
- #speed ⇒ Object
- #traits ⇒ Object
- #weapon_familiarity ⇒ Object
Methods inherited from PfrpgRaces::Race
#as_json, #attributes, #bonus_feats, fetch, race_list, #size_modifier
Instance Method Details
#attribute_bonuses ⇒ Object
19 20 21 22 23 24 |
# File 'lib/pfrpg_races/races/dwarf.rb', line 19 def attribute_bonuses [ RacialStatBonus.dangling('CON', 2), RacialStatBonus.dangling('WIS', 2), RacialStatBonus.dangling('CHA',-2) ] end |
#bonus_choices ⇒ Object
26 27 28 |
# File 'lib/pfrpg_races/races/dwarf.rb', line 26 def bonus_choices [] end |
#choose_ability_bonus? ⇒ Boolean
46 47 48 |
# File 'lib/pfrpg_races/races/dwarf.rb', line 46 def choose_ability_bonus? false end |
#description ⇒ Object
7 8 9 |
# File 'lib/pfrpg_races/races/dwarf.rb', line 7 def description "Dwarves are both tough and wise, but also a bit gruff. They gain +2 Constitution, +2 Wisdom, and –2 Charisma." end |
#int_languages ⇒ Object
38 39 40 |
# File 'lib/pfrpg_races/races/dwarf.rb', line 38 def int_languages ["Giant", "Gnome", "Goblin", "Orc", "Terran", "Undercommon"] end |
#languages ⇒ Object
30 31 32 |
# File 'lib/pfrpg_races/races/dwarf.rb', line 30 def languages ["Common", "Dwarven"] end |
#name ⇒ Object
3 4 5 |
# File 'lib/pfrpg_races/races/dwarf.rb', line 3 def name "Dwarf" end |
#noarmor_effect ⇒ Object
54 55 56 57 58 59 60 61 62 63 64 |
# File 'lib/pfrpg_races/races/dwarf.rb', line 54 def noarmor_effect p = Proc.new do |character, attribute, value| begin current_penalty = character.armor_speed_penalty character.bonuses.plus('speed', current_penalty) rescue Exception => e raise e end end Effect.new('misc', 'speed', 'noarmor', p) end |
#race_id ⇒ Object
15 16 17 |
# File 'lib/pfrpg_races/races/dwarf.rb', line 15 def race_id 1 end |
#size ⇒ Object
42 43 44 |
# File 'lib/pfrpg_races/races/dwarf.rb', line 42 def size "MEDIUM" end |
#source ⇒ Object
11 12 13 |
# File 'lib/pfrpg_races/races/dwarf.rb', line 11 def source "PFRPG" end |
#speed ⇒ Object
34 35 36 |
# File 'lib/pfrpg_races/races/dwarf.rb', line 34 def speed 20 end |
#traits ⇒ Object
66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 |
# File 'lib/pfrpg_races/races/dwarf.rb', line 66 def traits [ RacialTrait.new( :name => "Slow and Steady", :description => "20FT base speed / not modified by encumbrance or armor", :effects => [ noarmor_effect ] ), RacialTrait.new( :name => "Defensive Training", :description => "+4 dodge AC bonus vs. Giants" ), RacialTrait.new( :name => "Greed", :description => "+2 appraise checks w/ precious metals or gemstones" ), RacialTrait.new( :name => "Hatred", :description => "+1 attack bonus vs/ orc & goblinoid" ), RacialTrait.new( :name => "Hardy", :description => "+2 save vs poison, spells and spell-like abilities" ), RacialTrait.new( :name => "Stabililty", :description => "+4 CMD vs bull rush or trip" ), RacialTrait.new( :name => "Stonecunning", :description => "+2 perception check vs unusual stonework" ) ] end |
#weapon_familiarity ⇒ Object
50 51 52 |
# File 'lib/pfrpg_races/races/dwarf.rb', line 50 def weapon_familiarity [ "Battleaxe", "Heavy Pick", "Warhammer" ] end |