Class: Mgmg::ELItem
- Inherits:
-
Object
- Object
- Mgmg::ELItem
- Defined in:
- lib/mgmg/search.rb
Instance Attribute Summary collapse
-
#armor ⇒ Object
readonly
Returns the value of attribute armor.
-
#comp ⇒ Object
readonly
Returns the value of attribute comp.
-
#exp ⇒ Object
readonly
Returns the value of attribute exp.
-
#name ⇒ Object
readonly
Returns the value of attribute name.
-
#para ⇒ Object
readonly
Returns the value of attribute para.
-
#recipe ⇒ Object
readonly
Returns the value of attribute recipe.
-
#smith ⇒ Object
readonly
Returns the value of attribute smith.
Instance Method Summary collapse
-
#initialize(recipe = nil, sc = nil) ⇒ ELItem
constructor
A new instance of ELItem.
- #weight ⇒ Object
Constructor Details
#initialize(recipe = nil, sc = nil) ⇒ ELItem
Returns a new instance of ELItem.
691 692 693 694 695 696 697 698 699 700 701 702 703 704 705 706 707 708 709 710 711 712 |
# File 'lib/mgmg/search.rb', line 691 def initialize(recipe=nil, sc=nil) if recipe.nil? @para = -Float::INFINITY @exp = Float::INFINITY else @recipe = recipe if sc.size == 3 @smith, @armor, @comp = *sc else if recipe.option.irep.kind < 8 @smith, @comp = *sc @armor = -1 else @armor, @comp = *sc @smith = -1 end end @para = recipe.para_call(*sc) @exp = Mgmg.exp(*sc) @name = recipe.name end end |
Instance Attribute Details
#armor ⇒ Object (readonly)
Returns the value of attribute armor.
713 714 715 |
# File 'lib/mgmg/search.rb', line 713 def armor @armor end |
#comp ⇒ Object (readonly)
Returns the value of attribute comp.
713 714 715 |
# File 'lib/mgmg/search.rb', line 713 def comp @comp end |
#exp ⇒ Object (readonly)
Returns the value of attribute exp.
713 714 715 |
# File 'lib/mgmg/search.rb', line 713 def exp @exp end |
#name ⇒ Object (readonly)
Returns the value of attribute name.
713 714 715 |
# File 'lib/mgmg/search.rb', line 713 def name @name end |
#para ⇒ Object (readonly)
Returns the value of attribute para.
713 714 715 |
# File 'lib/mgmg/search.rb', line 713 def para @para end |
#recipe ⇒ Object (readonly)
Returns the value of attribute recipe.
713 714 715 |
# File 'lib/mgmg/search.rb', line 713 def recipe @recipe end |
#smith ⇒ Object (readonly)
Returns the value of attribute smith.
713 714 715 |
# File 'lib/mgmg/search.rb', line 713 def smith @smith end |
Instance Method Details
#weight ⇒ Object
719 720 721 |
# File 'lib/mgmg/search.rb', line 719 def weight @recipe.build(@smith, @armor, @comp).weight end |