Sha256: 82dd4862948eb3de094a590b26bca3c4ce538ea4c4360f44ea340cc1b5cf8b69

Contents?: true

Size: 680 Bytes

Versions: 5

Compression:

Stored size: 680 Bytes

Contents

# lib/gemwarrior/entities/items/gun.rb
# Item::Gun

require_relative '../item'

module Gemwarrior
  class Gun < Item
    def initialize
      self.name         = 'gun'
      self.description  = 'Pew pew goes this firearm, you suspect.'
      self.atk_lo       = 3
      self.atk_hi       = 5
      self.takeable     = true
      self.useable      = true
      self.equippable   = true
      self.equipped     = false
    end

    def use(player = nil)
      puts 'You pull the trigger on the gun, but realize there are no bullets in it. So, it does not do much except cause a barely audible *click* sound.'
      { type: nil, data: nil }
    end
  end
end

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
gemwarrior-0.9.33 lib/gemwarrior/entities/items/gun.rb
gemwarrior-0.9.32 lib/gemwarrior/entities/items/gun.rb
gemwarrior-0.9.31 lib/gemwarrior/entities/items/gun.rb
gemwarrior-0.9.30 lib/gemwarrior/entities/items/gun.rb
gemwarrior-0.9.28 lib/gemwarrior/entities/items/gun.rb