Class: Mob
Instance Attribute Summary collapse
-
#achievements ⇒ Object
Returns the value of attribute achievements.
-
#agi ⇒ Object
Returns the value of attribute agi.
-
#armour ⇒ Object
Returns the value of attribute armour.
-
#balance ⇒ Object
Returns the value of attribute balance.
-
#dex ⇒ Object
Returns the value of attribute dex.
-
#gold ⇒ Object
Returns the value of attribute gold.
-
#hp ⇒ Object
Returns the value of attribute hp.
-
#int ⇒ Object
Returns the value of attribute int.
-
#lck ⇒ Object
Returns the value of attribute lck.
-
#name ⇒ Object
readonly
Returns the value of attribute name.
-
#str ⇒ Object
Returns the value of attribute str.
-
#weapon ⇒ Object
Returns the value of attribute weapon.
Instance Method Summary collapse
- #beast ⇒ Object
- #dwarf ⇒ Object
- #elf ⇒ Object
- #god ⇒ Object
- #human ⇒ Object
- #jobGen ⇒ Object
- #knight ⇒ Object
- #mage ⇒ Object
- #nameGen ⇒ Object
- #raceGen ⇒ Object
- #ranger ⇒ Object
- #rogue ⇒ Object
Methods inherited from Job
Methods inherited from Race
Constructor Details
This class inherits a constructor from Job
Instance Attribute Details
#achievements ⇒ Object
Returns the value of attribute achievements.
5 6 7 |
# File 'lib/lotrd/m-mob.rb', line 5 def achievements @achievements end |
#agi ⇒ Object
Returns the value of attribute agi.
5 6 7 |
# File 'lib/lotrd/m-mob.rb', line 5 def agi @agi end |
#armour ⇒ Object
Returns the value of attribute armour.
5 6 7 |
# File 'lib/lotrd/m-mob.rb', line 5 def armour @armour end |
#balance ⇒ Object
Returns the value of attribute balance.
5 6 7 |
# File 'lib/lotrd/m-mob.rb', line 5 def balance @balance end |
#dex ⇒ Object
Returns the value of attribute dex.
5 6 7 |
# File 'lib/lotrd/m-mob.rb', line 5 def dex @dex end |
#gold ⇒ Object
Returns the value of attribute gold.
5 6 7 |
# File 'lib/lotrd/m-mob.rb', line 5 def gold @gold end |
#hp ⇒ Object
Returns the value of attribute hp.
5 6 7 |
# File 'lib/lotrd/m-mob.rb', line 5 def hp @hp end |
#int ⇒ Object
Returns the value of attribute int.
5 6 7 |
# File 'lib/lotrd/m-mob.rb', line 5 def int @int end |
#lck ⇒ Object
Returns the value of attribute lck.
5 6 7 |
# File 'lib/lotrd/m-mob.rb', line 5 def lck @lck end |
#name ⇒ Object (readonly)
Returns the value of attribute name.
4 5 6 |
# File 'lib/lotrd/m-mob.rb', line 4 def name @name end |
#str ⇒ Object
Returns the value of attribute str.
5 6 7 |
# File 'lib/lotrd/m-mob.rb', line 5 def str @str end |
#weapon ⇒ Object
Returns the value of attribute weapon.
5 6 7 |
# File 'lib/lotrd/m-mob.rb', line 5 def weapon @weapon end |
Instance Method Details
#beast ⇒ Object
55 56 57 |
# File 'lib/lotrd/m-mob.rb', line 55 def beast super end |
#dwarf ⇒ Object
47 48 49 |
# File 'lib/lotrd/m-mob.rb', line 47 def dwarf super end |
#elf ⇒ Object
39 40 41 |
# File 'lib/lotrd/m-mob.rb', line 39 def elf super end |
#god ⇒ Object
51 52 53 |
# File 'lib/lotrd/m-mob.rb', line 51 def god super end |
#human ⇒ Object
43 44 45 |
# File 'lib/lotrd/m-mob.rb', line 43 def human super end |
#jobGen ⇒ Object
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 |
#knight ⇒ Object
63 64 65 |
# File 'lib/lotrd/m-mob.rb', line 63 def knight super end |
#mage ⇒ Object
59 60 61 |
# File 'lib/lotrd/m-mob.rb', line 59 def mage super end |
#nameGen ⇒ Object
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 |
#raceGen ⇒ Object
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 |
#ranger ⇒ Object
71 72 73 |
# File 'lib/lotrd/m-mob.rb', line 71 def ranger super end |
#rogue ⇒ Object
67 68 69 |
# File 'lib/lotrd/m-mob.rb', line 67 def rogue super end |