Sha256: bbe5d1accc1eb49b6206e2b341b25cd539c982f17a88bc8dd20a7529410ebc73
Contents?: true
Size: 1006 Bytes
Versions: 24
Compression:
Stored size: 1006 Bytes
Contents
# lib/gemwarrior/entities/item.rb # Item base class require_relative 'entity' module Gemwarrior class Item < Entity attr_accessor :atk_lo, :atk_hi, :takeable, :useable, :equippable, :equipped, :consumable, :use, :used, :number_of_uses def use(inventory = nil) 'That item does not do anything...yet.' end def describe status_text = name.upcase.colorize(:green) status_text << "\n#{description} \n".colorize(:white) status_text << "ATTACK: #{atk_lo.to_s.rjust(2)}-#{atk_hi.to_s.rjust(2)} ".colorize(:white) unless atk_lo.nil? status_text << "TAKEABLE? #{takeable} ".colorize(:white) status_text << "USEABLE? #{useable} ".colorize(:white) status_text << "EQUIPPABLE? #{equippable} ".colorize(:white) status_text << "\n" end end end
Version data entries
24 entries across 24 versions & 1 rubygems