Class: Race
- Inherits:
-
Object
- Object
- Race
- Defined in:
- lib/lotrd/m-race.rb
Direct Known Subclasses
Instance Attribute Summary collapse
-
#agi ⇒ Object
Returns the value of attribute agi.
-
#dex ⇒ Object
Returns the value of attribute dex.
-
#hp ⇒ Object
Returns the value of attribute hp.
-
#int ⇒ Object
Returns the value of attribute int.
-
#lck ⇒ Object
Returns the value of attribute lck.
-
#str ⇒ Object
Returns the value of attribute str.
Instance Method Summary collapse
- #beast ⇒ Object
- #dwarf ⇒ Object
- #elf ⇒ Object
- #god ⇒ Object
- #human ⇒ Object
-
#initialize ⇒ Race
constructor
A new instance of Race.
Constructor Details
#initialize ⇒ Race
Returns a new instance of Race.
3 4 5 6 7 8 9 10 |
# File 'lib/lotrd/m-race.rb', line 3 def initialize @hp = 0 @str = 0 @agi = 0 @int = 0 @dex = 0 @lck = 0 end |
Instance Attribute Details
#agi ⇒ Object
Returns the value of attribute agi.
2 3 4 |
# File 'lib/lotrd/m-race.rb', line 2 def agi @agi end |
#dex ⇒ Object
Returns the value of attribute dex.
2 3 4 |
# File 'lib/lotrd/m-race.rb', line 2 def dex @dex end |
#hp ⇒ Object
Returns the value of attribute hp.
2 3 4 |
# File 'lib/lotrd/m-race.rb', line 2 def hp @hp end |
#int ⇒ Object
Returns the value of attribute int.
2 3 4 |
# File 'lib/lotrd/m-race.rb', line 2 def int @int end |
#lck ⇒ Object
Returns the value of attribute lck.
2 3 4 |
# File 'lib/lotrd/m-race.rb', line 2 def lck @lck end |
#str ⇒ Object
Returns the value of attribute str.
2 3 4 |
# File 'lib/lotrd/m-race.rb', line 2 def str @str end |
Instance Method Details
#beast ⇒ Object
49 50 51 52 53 54 55 56 57 |
# File 'lib/lotrd/m-race.rb', line 49 def beast @hp = 66666 @str = 666 @agi = 666 @int = 666 @dex = 666 @lck = 666 @achievements = ["A beast. At cheating."] end |
#dwarf ⇒ Object
30 31 32 33 34 35 36 37 |
# File 'lib/lotrd/m-race.rb', line 30 def dwarf @hp = 30 @str = 25 @agi = 15 @int = 10 @dex = 10 @lck = 20 end |
#elf ⇒ Object
12 13 14 15 16 17 18 19 |
# File 'lib/lotrd/m-race.rb', line 12 def elf @hp = 20 @str = 10 @agi = 30 @int = 10 @dex = 30 @lck = 10 end |
#god ⇒ Object
39 40 41 42 43 44 45 46 47 |
# File 'lib/lotrd/m-race.rb', line 39 def god @hp = 99999 @str = 999 @agi = 999 @int = 999 @dex = 999 @lck = 999 @achievements = ["Surreee you're a god. Cheater."] end |
#human ⇒ Object
21 22 23 24 25 26 27 28 |
# File 'lib/lotrd/m-race.rb', line 21 def human @hp = 20 @str = 20 @agi = 10 @int = 20 @dex = 20 @lck = 20 end |