Method: Olib::Jar#acquire
- Defined in:
- lib/Olib/objects/jar.rb
#acquire ⇒ Object
52 53 54 55 56 57 58 59 60 61 62 63 |
# File 'lib/Olib/objects/jar.rb', line 52 def acquire if pullable? result = Library.do "pull ##{@id}", /^You pull/ @stacked = true if result =~ /([0-9]+) left/ else result = Library.do "buy ##{@id}", /You hand over/ unless result =~ /^You hand over/ Client.end "[FATAL] Logic flaw, not enough coins to acquire #{@name}" end end self end |