class Mob

Attributes

achievements[RW]
agi[RW]
armour[RW]
balance[RW]
dex[RW]
gold[RW]
hp[RW]
int[RW]
lck[RW]
name[R]
str[RW]
weapon[RW]

Public Instance Methods

beast() click to toggle source
Calls superclass method Job#beast
# File lib/lotrd/model/mob.rb, line 55
def beast
    super
end
dwarf() click to toggle source
Calls superclass method Job#dwarf
# File lib/lotrd/model/mob.rb, line 47
def dwarf
    super
end
elf() click to toggle source
Calls superclass method Job#elf
# File lib/lotrd/model/mob.rb, line 39
def elf
    super
end
god() click to toggle source
Calls superclass method Job#god
# File lib/lotrd/model/mob.rb, line 51
def god
    super
end
human() click to toggle source
Calls superclass method Job#human
# File lib/lotrd/model/mob.rb, line 43
def human
    super
end
jobGen() click to toggle source
# File lib/lotrd/model/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
knight() click to toggle source
Calls superclass method Job#knight
# File lib/lotrd/model/mob.rb, line 63
def knight
    super
end
mage() click to toggle source
Calls superclass method Job#mage
# File lib/lotrd/model/mob.rb, line 59
def mage
    super
end
nameGen() click to toggle source
# File lib/lotrd/model/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
raceGen() click to toggle source
# File lib/lotrd/model/mob.rb, line 7
def raceGen
    @racePick = rand(1..3)
    case @racePick
        when 1 
            elf
        when 2 
            human
        when 3 
            dwarf
    end
end
ranger() click to toggle source
Calls superclass method Job#ranger
# File lib/lotrd/model/mob.rb, line 71
def ranger
    super
end
rogue() click to toggle source
Calls superclass method Job#rogue
# File lib/lotrd/model/mob.rb, line 67
def rogue
    super
end