Class: Race

Inherits:
Object
  • Object
show all
Defined in:
lib/lotrd/model/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
11
12
# File 'lib/lotrd/model/race.rb', line 3

def initialize
    @hp = 0
    @def = 0
    @res = 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/model/race.rb', line 2

def agi
  @agi
end

#defObject

Returns the value of attribute def.



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

def def
  @def
end

#dexObject

Returns the value of attribute dex.



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

def dex
  @dex
end

#hpObject

Returns the value of attribute hp.



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

def hp
  @hp
end

#intObject

Returns the value of attribute int.



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

def int
  @int
end

#lckObject

Returns the value of attribute lck.



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

def lck
  @lck
end

#resObject

Returns the value of attribute res.



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

def res
  @res
end

#strObject

Returns the value of attribute str.



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

def str
  @str
end

Instance Method Details

#beastObject



59
60
61
62
63
64
65
66
67
68
69
# File 'lib/lotrd/model/race.rb', line 59

def beast
    @hp = 66666
    @def = 666
    @res = 666
    @str = 666
    @agi = 666
    @int = 666
    @dex = 666
    @lck = 666
    @achievements = ["A beast. At cheating."]
end

#dwarfObject



36
37
38
39
40
41
42
43
44
45
# File 'lib/lotrd/model/race.rb', line 36

def dwarf
    @hp = 30
    @def = 20
    @res = 10
    @str = 25 
    @agi = 15 
    @int = 10
    @dex = 10
    @lck = 20
end

#elfObject



14
15
16
17
18
19
20
21
22
23
# File 'lib/lotrd/model/race.rb', line 14

def elf
    @hp = 20
    @def = 10
    @res = 20
    @str = 10 
    @agi = 30
    @int = 10
    @dex = 30
    @lck = 10
end

#godObject



47
48
49
50
51
52
53
54
55
56
57
# File 'lib/lotrd/model/race.rb', line 47

def god
    @hp = 99999
    @def = 999
    @res = 999
    @str = 999
    @agi = 999
    @int = 999
    @dex = 999
    @lck = 999
    @achievements = ["Surreee you're a god. Cheater."]
end

#humanObject



25
26
27
28
29
30
31
32
33
34
# File 'lib/lotrd/model/race.rb', line 25

def human
    @hp = 20
    @def = 15
    @res = 15
    @str = 20 
    @agi = 10 
    @int = 20
    @dex = 20
    @lck = 20
end