Class: Race

Inherits:
Object
  • Object
show all
Defined in:
lib/lotrd/m-race.rb

Direct Known Subclasses

Job

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initializeRace

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

#agiObject

Returns the value of attribute agi.



2
3
4
# File 'lib/lotrd/m-race.rb', line 2

def agi
  @agi
end

#dexObject

Returns the value of attribute dex.



2
3
4
# File 'lib/lotrd/m-race.rb', line 2

def dex
  @dex
end

#hpObject

Returns the value of attribute hp.



2
3
4
# File 'lib/lotrd/m-race.rb', line 2

def hp
  @hp
end

#intObject

Returns the value of attribute int.



2
3
4
# File 'lib/lotrd/m-race.rb', line 2

def int
  @int
end

#lckObject

Returns the value of attribute lck.



2
3
4
# File 'lib/lotrd/m-race.rb', line 2

def lck
  @lck
end

#strObject

Returns the value of attribute str.



2
3
4
# File 'lib/lotrd/m-race.rb', line 2

def str
  @str
end

Instance Method Details

#beastObject



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

#dwarfObject



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

#elfObject



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

#godObject



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

#humanObject



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