Class: Lich::Gemstone::DefenseAttributes

Inherits:
Object
  • Object
show all
Defined in:
documented/gemstone/creature.rb

Overview

Represents the defensive attributes of a creature.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(data) ⇒ DefenseAttributes

Returns a new instance of DefenseAttributes.



697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
# File 'documented/gemstone/creature.rb', line 697

def initialize(data)
  @asg = data[:asg]
  @melee = parse_td(data[:melee])
  @ranged = parse_td(data[:ranged])
  @bolt = parse_td(data[:bolt])
  @udf = parse_td(data[:udf])

  %i[bar_td cle_td emp_td pal_td ran_td sor_td wiz_td mje_td mne_td mjs_td mns_td mnm_td].each do |key|
    instance_variable_set("@#{key}", parse_td(data[key]))
  end

  @immunities = data[:immunities] || []
  @defensive_spells = data[:defensive_spells] || []
  @defensive_abilities = data[:defensive_abilities] || []
  @special_defenses = data[:special_defenses] || []
end

Instance Attribute Details

#asgObject

Returns the value of attribute asg.



691
692
693
# File 'documented/gemstone/creature.rb', line 691

def asg
  @asg
end

#bar_tdObject

Returns the value of attribute bar_td.



691
692
693
# File 'documented/gemstone/creature.rb', line 691

def bar_td
  @bar_td
end

#boltObject

Returns the value of attribute bolt.



691
692
693
# File 'documented/gemstone/creature.rb', line 691

def bolt
  @bolt
end

#cle_tdObject

Returns the value of attribute cle_td.



691
692
693
# File 'documented/gemstone/creature.rb', line 691

def cle_td
  @cle_td
end

#defensive_abilitiesObject

Returns the value of attribute defensive_abilities.



691
692
693
# File 'documented/gemstone/creature.rb', line 691

def defensive_abilities
  @defensive_abilities
end

#defensive_spellsObject

Returns the value of attribute defensive_spells.



691
692
693
# File 'documented/gemstone/creature.rb', line 691

def defensive_spells
  @defensive_spells
end

#emp_tdObject

Returns the value of attribute emp_td.



691
692
693
# File 'documented/gemstone/creature.rb', line 691

def emp_td
  @emp_td
end

#immunitiesObject

Returns the value of attribute immunities.



691
692
693
# File 'documented/gemstone/creature.rb', line 691

def immunities
  @immunities
end

#meleeObject

Returns the value of attribute melee.



691
692
693
# File 'documented/gemstone/creature.rb', line 691

def melee
  @melee
end

#mje_tdObject

Returns the value of attribute mje_td.



691
692
693
# File 'documented/gemstone/creature.rb', line 691

def mje_td
  @mje_td
end

#mjs_tdObject

Returns the value of attribute mjs_td.



691
692
693
# File 'documented/gemstone/creature.rb', line 691

def mjs_td
  @mjs_td
end

#mne_tdObject

Returns the value of attribute mne_td.



691
692
693
# File 'documented/gemstone/creature.rb', line 691

def mne_td
  @mne_td
end

#mnm_tdObject

Returns the value of attribute mnm_td.



691
692
693
# File 'documented/gemstone/creature.rb', line 691

def mnm_td
  @mnm_td
end

#mns_tdObject

Returns the value of attribute mns_td.



691
692
693
# File 'documented/gemstone/creature.rb', line 691

def mns_td
  @mns_td
end

#pal_tdObject

Returns the value of attribute pal_td.



691
692
693
# File 'documented/gemstone/creature.rb', line 691

def pal_td
  @pal_td
end

#ran_tdObject

Returns the value of attribute ran_td.



691
692
693
# File 'documented/gemstone/creature.rb', line 691

def ran_td
  @ran_td
end

#rangedObject

Returns the value of attribute ranged.



691
692
693
# File 'documented/gemstone/creature.rb', line 691

def ranged
  @ranged
end

#sor_tdObject

Returns the value of attribute sor_td.



691
692
693
# File 'documented/gemstone/creature.rb', line 691

def sor_td
  @sor_td
end

#special_defensesObject

Returns the value of attribute special_defenses.



691
692
693
# File 'documented/gemstone/creature.rb', line 691

def special_defenses
  @special_defenses
end

#udfObject

Returns the value of attribute udf.



691
692
693
# File 'documented/gemstone/creature.rb', line 691

def udf
  @udf
end

#wiz_tdObject

Returns the value of attribute wiz_td.



691
692
693
# File 'documented/gemstone/creature.rb', line 691

def wiz_td
  @wiz_td
end