Class: Mobs

Inherits:
Object
  • Object
show all
Defined in:
lib/mobs.rb

Direct Known Subclasses

Cleric, GiantRat, Goblin, Knight, Kobold, Rogue, Skeleton, Wizard

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(str, agi, int, dmg, armor, hp, cur_hp, dodge, mana, cur_mana, xp, lvl, coin, name = "MOB") ⇒ Mobs

Returns a new instance of Mobs.



5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
# File 'lib/mobs.rb', line 5

def initialize(str, agi, int, dmg, armor, hp, cur_hp, dodge, mana, cur_mana, xp, lvl, coin, name="MOB")
  @str          = str
  @agi          = agi
  @int          = int
  @dmg          = dmg
  @armor        = armor
  @hp           = hp
  @cur_hp       = cur_hp
  @dodge        = dodge
  @mana         = mana
  @cur_mana     = cur_mana
  @xp           = xp
  @lvl          = lvl
  @coin         = coin
  @name         = name
end

Instance Attribute Details

#agiObject

Returns the value of attribute agi.



3
4
5
# File 'lib/mobs.rb', line 3

def agi
  @agi
end

#armorObject

Returns the value of attribute armor.



3
4
5
# File 'lib/mobs.rb', line 3

def armor
  @armor
end

#buff_drinkObject

Returns the value of attribute buff_drink.



3
4
5
# File 'lib/mobs.rb', line 3

def buff_drink
  @buff_drink
end

#buff_foodObject

Returns the value of attribute buff_food.



3
4
5
# File 'lib/mobs.rb', line 3

def buff_food
  @buff_food
end

#coinObject

Returns the value of attribute coin.



3
4
5
# File 'lib/mobs.rb', line 3

def coin
  @coin
end

#cur_hpObject

Returns the value of attribute cur_hp.



3
4
5
# File 'lib/mobs.rb', line 3

def cur_hp
  @cur_hp
end

#cur_manaObject

Returns the value of attribute cur_mana.



3
4
5
# File 'lib/mobs.rb', line 3

def cur_mana
  @cur_mana
end

#dmgObject

Returns the value of attribute dmg.



3
4
5
# File 'lib/mobs.rb', line 3

def dmg
  @dmg
end

#dodgeObject

Returns the value of attribute dodge.



3
4
5
# File 'lib/mobs.rb', line 3

def dodge
  @dodge
end

#hpObject

Returns the value of attribute hp.



3
4
5
# File 'lib/mobs.rb', line 3

def hp
  @hp
end

#intObject

Returns the value of attribute int.



3
4
5
# File 'lib/mobs.rb', line 3

def int
  @int
end

#lvlObject

Returns the value of attribute lvl.



3
4
5
# File 'lib/mobs.rb', line 3

def lvl
  @lvl
end

#manaObject

Returns the value of attribute mana.



3
4
5
# File 'lib/mobs.rb', line 3

def mana
  @mana
end

#nameObject

Returns the value of attribute name.



3
4
5
# File 'lib/mobs.rb', line 3

def name
  @name
end

#strObject

Returns the value of attribute str.



3
4
5
# File 'lib/mobs.rb', line 3

def str
  @str
end

#xpObject

Returns the value of attribute xp.



3
4
5
# File 'lib/mobs.rb', line 3

def xp
  @xp
end