Class: Knight

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

Instance Attribute Summary collapse

Attributes inherited from Mobs

#agi, #armor, #buff_drink, #buff_food, #coin, #cur_hp, #cur_mana, #dmg, #dodge, #hp, #int, #lvl, #mana, #name, #str, #xp

Instance Method Summary collapse

Constructor Details

#initialize(str = 14, agi = 12, int = 8, dmg = 6, armor = 10, hp = 8, cur_hp = 8, dodge = 10, mana = 8, cur_mana = 8, xp = 0, lvl = 1, coin = 0, name = "Knight") ⇒ Knight

Returns a new instance of Knight.



48
49
50
51
52
53
# File 'lib/mobs.rb', line 48

def initialize(str=14, agi=12, int=8, dmg=6, armor=10, hp=8, cur_hp=8, dodge=10, mana=8, cur_mana=8, xp=0, lvl=1, coin=0, name="Knight")
  super(str,agi,int,dmg,armor,hp,cur_hp,dodge,mana,cur_mana,xp,lvl,coin,name)
  @buff_food = false # could have made a PlayerClass class and had these like Knight < PlayerClass and then PlayerClass would have < Mobs
  @buff_drink = false
  @spell_buff = false
end

Instance Attribute Details

#spell_buffObject

the knight has the highest melee damage, strength, and armor



46
47
48
# File 'lib/mobs.rb', line 46

def spell_buff
  @spell_buff
end