Sha256: 16fc05c19cf7c536734357cf453e406883d764c5c3967806df5355c5531f2a6b

Contents?: true

Size: 792 Bytes

Versions: 1

Compression:

Stored size: 792 Bytes

Contents

# lib/gemwarrior/entities/creature.rb
# Creature base class

require_relative 'entity'
require_relative '../inventory'

module Gemwarrior
  class Creature < Entity
    attr_accessor :id, :name, :description, :face, :hands, :mood, 
                  :level, :hp_cur, :hp_max, :inventory
    
    def initialize(options)
      self.id           = options[:id]
      self.name         = options[:name]
      self.description  = options[:description]
      self.face         = options[:face]
      self.hands        = options[:hands]
      self.mood         = options[:mood]

      self.level        = options[:level]
      self.hp_cur       = options[:hp_cur]
      self.hp_max       = options[:hp_max]

      self.inventory    = options[:inventory]
    end
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
gemwarrior-0.4.1 lib/gemwarrior/entities/creature.rb