Class: Mob

Inherits:
Job show all
Defined in:
lib/lotrd/m-mob.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods inherited from Job

#initialize

Methods inherited from Race

#initialize

Constructor Details

This class inherits a constructor from Job

Instance Attribute Details

#achievementsObject

Returns the value of attribute achievements.



5
6
7
# File 'lib/lotrd/m-mob.rb', line 5

def achievements
  @achievements
end

#agiObject

Returns the value of attribute agi.



5
6
7
# File 'lib/lotrd/m-mob.rb', line 5

def agi
  @agi
end

#armourObject

Returns the value of attribute armour.



5
6
7
# File 'lib/lotrd/m-mob.rb', line 5

def armour
  @armour
end

#balanceObject

Returns the value of attribute balance.



5
6
7
# File 'lib/lotrd/m-mob.rb', line 5

def balance
  @balance
end

#dexObject

Returns the value of attribute dex.



5
6
7
# File 'lib/lotrd/m-mob.rb', line 5

def dex
  @dex
end

#goldObject

Returns the value of attribute gold.



5
6
7
# File 'lib/lotrd/m-mob.rb', line 5

def gold
  @gold
end

#hpObject

Returns the value of attribute hp.



5
6
7
# File 'lib/lotrd/m-mob.rb', line 5

def hp
  @hp
end

#intObject

Returns the value of attribute int.



5
6
7
# File 'lib/lotrd/m-mob.rb', line 5

def int
  @int
end

#lckObject

Returns the value of attribute lck.



5
6
7
# File 'lib/lotrd/m-mob.rb', line 5

def lck
  @lck
end

#nameObject (readonly)

Returns the value of attribute name.



4
5
6
# File 'lib/lotrd/m-mob.rb', line 4

def name
  @name
end

#strObject

Returns the value of attribute str.



5
6
7
# File 'lib/lotrd/m-mob.rb', line 5

def str
  @str
end

#weaponObject

Returns the value of attribute weapon.



5
6
7
# File 'lib/lotrd/m-mob.rb', line 5

def weapon
  @weapon
end

Instance Method Details

#beastObject



55
56
57
# File 'lib/lotrd/m-mob.rb', line 55

def beast
    super
end

#dwarfObject



47
48
49
# File 'lib/lotrd/m-mob.rb', line 47

def dwarf
    super
end

#elfObject



39
40
41
# File 'lib/lotrd/m-mob.rb', line 39

def elf
    super
end

#godObject



51
52
53
# File 'lib/lotrd/m-mob.rb', line 51

def god
    super
end

#humanObject



43
44
45
# File 'lib/lotrd/m-mob.rb', line 43

def human
    super
end

#jobGenObject



19
20
21
22
23
24
25
26
27
28
29
30
31
# File 'lib/lotrd/m-mob.rb', line 19

def jobGen
    @jobPick = rand(1..4)
    case @jobPick
        when 1 
            mage
        when 2
            knight
        when 3 
            rogue
        when 4
            ranger
    end
end

#knightObject



63
64
65
# File 'lib/lotrd/m-mob.rb', line 63

def knight
    super
end

#mageObject



59
60
61
# File 'lib/lotrd/m-mob.rb', line 59

def mage
    super
end

#nameGenObject



33
34
35
36
37
# File 'lib/lotrd/m-mob.rb', line 33

def nameGen
    race_array = ['Elven', 'Human', 'Dwarven']
    job_array = ['Mage','Knight','Rogue','Ranger']
    @name = race_array[@racePick - 1] + " " + job_array[@jobPick - 1]
end

#raceGenObject



7
8
9
10
11
12
13
14
15
16
17
# File 'lib/lotrd/m-mob.rb', line 7

def raceGen
    @racePick = rand(1..3)
    case @racePick
        when 1 
            elf
        when 2 
            human
        when 3 
            dwarf
    end
end

#rangerObject



71
72
73
# File 'lib/lotrd/m-mob.rb', line 71

def ranger
    super
end

#rogueObject



67
68
69
# File 'lib/lotrd/m-mob.rb', line 67

def rogue
    super
end